flutter-plugin icon indicating copy to clipboard operation
flutter-plugin copied to clipboard

RawGooglePayButton requires a PaymentConfiguration

Open JudahMcNicholl opened this issue 1 year ago • 1 comments

RawGooglePayButton requires PaymentConfiguration but this doesn't allow us to use flutter_pay's Pay client effectively.

JudahMcNicholl avatar Aug 21 '24 03:08 JudahMcNicholl

Can you elaborate on that @JudahMcNicholl? The RawGooglePayButton now uses the PayButton API for Google Pay, which requires initialization parameters from the configuration. (see https://developers.google.com/pay/api/android/guides/resources/pay-button-api).

JlUgia avatar Oct 06 '24 16:10 JlUgia

Closing this issue due to inactivity. Feel free to re-open if relevant.

JlUgia avatar Feb 19 '25 12:02 JlUgia

I think it is more reasonable to have a PaymentConfiguration in a GooglePayButton, but not in RawGooglePayButton since we manually process onPressed using Pay client:

final Pay payClient = Pay({
        PayProvider.google_pay: getGooglePayConfiguration(),
      });

final paymentResult = await payClient.showPaymentSelector(
        PayProvider.google_pay,
        [item],
      );
...

rasuldev avatar Apr 16 '25 19:04 rasuldev