onTransactionSuccess method

  1. @override
dynamic onTransactionSuccess(
  1. String id,
  2. String txRef,
  3. String callbackUrl
)
override

Implementation

@override
onTransactionSuccess(String id, String txRef, String callbackUrl) {
  OTPValidationDataResponse otpValidationDataResponse = OTPValidationDataResponse(
      callBackUrl: callbackUrl,
      txnRef: txRef
  );

  final PaymentResponse chargeResponse = PaymentResponse(
      status: "success",
      description: 'Payment Successful',
      code: "00",
      otpValidationDataResponse: otpValidationDataResponse
  );

  Navigator.pop(widget.context, chargeResponse);
}