setupWithAutoExecute abstract method

Future<String> setupWithAutoExecute(
  1. String sessionId,
  2. MFGooglePayRequest googlePayRequest, {
  3. dynamic onInvoiceCreated(
    1. String invoiceId
    )?,
  4. dynamic onExecutePaymentSuccess(
    1. String,
    2. MFGetPaymentStatusResponse
    )?,
  5. dynamic onError(
    1. MFError
    )?,
})

Setup Google Pay with Auto execution mode using MFGooglePayLauncher

This mode automatically executes payment after getting the Google Pay token. Use this for simple one-time payments where you want automatic execution.

Callbacks:

  • onInvoiceCreated: Called when invoice is created (before payment execution)
  • onExecutePaymentSuccess: Called when payment is executed successfully with invoice ID and payment status
  • onError: Called if an error occurs during the payment process

Returns setup status after configuration completes

Implementation

Future<String> setupWithAutoExecute(
    String sessionId, MFGooglePayRequest googlePayRequest,
    {Function(String invoiceId)? onInvoiceCreated,
    Function(String, MFGetPaymentStatusResponse)? onExecutePaymentSuccess,
    Function(MFError)? onError});