googlePayUI method

Future<PaymentResultData> googlePayUI({
  1. required GooglePayUI googlePayUI,
})

Initiates a Google Pay payment on Android.

Returns PaymentResultData with PaymentResult.success or PaymentResult.sync on completion, PaymentResult.noResult if cancelled, and PaymentResult.error if Google Pay is unavailable or the transaction fails.

Android only. On iOS, returns PaymentResult.error with errorCode "PLATFORM_NOT_SUPPORTED".

Implementation

Future<PaymentResultData> googlePayUI(
    {required GooglePayUI googlePayUI}) async {
  return await implementGooglePayPayment(
    checkoutId: googlePayUI.checkoutId,
    googlePayMerchantId: googlePayUI.googlePayMerchantId,
    gatewayMerchantId: googlePayUI.gatewayMerchantId,
    countryCode: googlePayUI.countryCode,
    currencyCode: googlePayUI.currencyCode,
    amount: googlePayUI.amount,
    allowedCardNetworks: googlePayUI.allowedCardNetworks,
    allowedCardAuthMethods: googlePayUI.allowedCardAuthMethods,
    channelName: channelName,
    shopperResultUrl: shopperResultUrl,
    paymentMode: paymentMode,
    lang: lang,
  );
}