triggerCallbacks method
dynamic
triggerCallbacks(
- SaleResponseCallback? callback, {
- dynamic onFailure(
- dynamic
- dynamic onResponseJSON()?,
Implementation
triggerCallbacks(SaleResponseCallback? callback, {Function(dynamic)? onFailure, Function(Map)? onResponseJSON}){
if(success != null) {
callback?.success(success!);
}
if(redirect != null) {
callback?.redirect(redirect!);
}
if(recurring != null) {
callback?.recurring(recurring!);
}
if(secure3d != null) {
callback?.secure3d(secure3d!);
}
if(decline != null) {
callback?.decline(decline!);
}
if(error != null) {
callback?.error(error!);
}
if(failure != null && onFailure != null) {
onFailure(failure);
}
if(responseJSON != null && onResponseJSON != null) {
onResponseJSON(responseJSON ?? {});
}
}