onSuccess method
void
onSuccess({
- required IncodesPaymentResponse response,
- String? paymentGatewayName,
- String? toastMsg,
- dynamic onPaymentSuccess()?,
- bool? isShowToast,
Implementation
void onSuccess({
required IncodesPaymentResponse response,
String? paymentGatewayName,
String? toastMsg,
Function()? onPaymentSuccess,
bool? isShowToast,
}) {
bool isSuccessPayment = response.paymentStatus;
if (isSuccessPayment) {
onPaymentSuccess?.call();
isShowToast == true
? showToast(
msg: toastMsg ?? (paymentGatewayName != null ? "$paymentGatewayName Payment Successful" : "Payment Successful"),
)
: null;
}
}