executePayment method

  1. @override
Future<MFGetPaymentStatusResponse> executePayment(
  1. MFExecutePaymentRequest executePaymentRequest,
  2. String lang, {
  3. dynamic onInvoiceCreated(
    1. String invoiceId
    )?,
})
override

Execute payment manually (for Manual mode)

Use this method after setupWithManualExecute to execute the payment. You can add custom validation or business logic before calling this method.

Callbacks:

  • onInvoiceCreated: Called when invoice is created (before payment execution)

Returns the payment status response after execution completes

Implementation

@override
Future<MFGetPaymentStatusResponse> executePayment(
    MFExecutePaymentRequest executePaymentRequest, String lang,
    {Function(String invoiceId)? onInvoiceCreated}) async {
  return await MFGooglePay
      .executeGooglePayPayment(executePaymentRequest, lang, onInvoiceCreated);
}