Apple Pay / Google Pay are not showings when presenting the Stripe Payment Sheet
Closed this issue · 6 comments
Describe the bug
I am using this code :
Stripe.merchantIdentifier = "mymerchant.bundle.id";
Stripe.urlScheme = "myscheme";
Stripe.publishableKey = "api_key"
String customerID = "customerIDFromBackend";
String secret = "secretFromBackend";
try {
await Stripe.instance.applySettings();
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
merchantDisplayName: "MyCompanyName",
customerId: customerID,
allowsDelayedPaymentMethods: true,
applePay: const PaymentSheetApplePay(
merchantCountryCode: "FR",
),
googlePay: const PaymentSheetGooglePay(
merchantCountryCode: "FR",
testEnv: !kReleaseMode),
style: ThemeMode.system,
paymentIntentClientSecret: secret),
);
await Stripe.instance.presentPaymentSheet();
And it doesn't show either Google Pay or Apple Pay buttons.
Note iOS :
- I have done the configuration required on Apple Pay : i have uploaded the certificate to my Stripe account and registered in Xcode capibility the merchant ID
- I have a Banking card in my Apple Wallet
Note Android :
- My banking card could not be added to the Google Wallet (because my bank doesn't support it) but was added a payment method on my google account (for play store)
I am testing on real devices.
To Reproduce
Steps to reproduce the behavior:
- Entering number 123-456-789 into the cardfield.
- Tapping the confirm button.
- Observe a failure with exception (including the part of the stack trace, belonging to this package) …
Expected behavior
A clear and concise description of what you expected to happen.
Smartphone / tablet
- Devices: iPhone XS Max, Motorola 8
- OS: iOS 18.0.1, Android 11
- Package version: 11.2.0
- Flutter version : 3.24.3
Additional context
I have searched multiple issues and read everything you said in your discussion but this doesn't help.
I have also tried to run the example app but i have got so many build errors from the stripe_js (/packages
directory) classes with attributes not found, and so on.. That i could not try with your code to see if it was working unfortunately but there may be a real issue here.
did you enable apple pay in the Stripe dashboard console?
Okay @remonh87 i have the apple pay appearing on another phone (iPhone 12 Pro Max), i guess my own wallet has an issue 😅
For Google Play do you confirm i simply need to have a valid card in my Google Wallet for it to appear as well ?
Thanks for your help !
Hi for testing that is the case but in production you need to get approved by google. See https://docs.stripe.com/google-pay?platform=android#going-live
Alright thank you for your help, my app is already live on the store for few months so i will check how to update all this.
I confirm that Google Pay has appeared in debug mode after adding a Revolut card in my wallet and my app is under review for production.
Thanks again for your time