[BUG] Unable to see Google Pay option when Payment Sheet is opened
sidharth1196 opened this issue · 17 comments
Summary
Hello, I've been trying to get google pay working for my stripe payment gateway in my android application.
I did see it once a few months ago but was in backlog for a while. I've come back to get it addressed but the same code that was working before doesn't seem to be working right now.
I'm in the UK and testing in a device within UK with a debit card liked to Google Wallet.
Code to reproduce
fun checkoutButtonOnClick(amount: Double, currency: String) {
val intentConfig = PaymentSheet.IntentConfiguration(
mode = PaymentSheet.IntentConfiguration.Mode.Payment(
amount = (amount*100).toLong(),
currency = currency,
),
// Other configuration options...
)
val address = PaymentSheet.Address(country = "GB")
val billingDetails = PaymentSheet.BillingDetails(
address = address
)
val googlePayButtonConfig = PaymentSheet.GooglePayConfiguration(
environment = PaymentSheet.GooglePayConfiguration.Environment.Test,
countryCode = "GB",
currencyCode = "GBP",
)
val configuration = PaymentSheet.Configuration(
merchantDisplayName = "",
googlePay = googlePayButtonConfig,
defaultBillingDetails = billingDetails
)
paymentSheet.presentWithIntentConfiguration(
intentConfiguration = intentConfig,
configuration = configuration
// Optional configuration - See the "Customize the sheet" section in this guide
/*configuration = PaymentSheet.Configuration(
merchantDisplayName = "Example Inc.",
)*/
)
}
Android version
Android 14
Impacted devices
Pixel 7a
Installation method
Gradle
Dependency Versions
kotlin:
stripe-android:
Android Gradle Plugin:
Gradle:
SDK classes
Video
Other information
Hi @sidharth1196 we've tested with the code you have provided and it worked on our end. Can you ensure that you have Google Pay enabled on your Dashboard and also have updated your Android manifest file according to our docs.
Hello @porter-stripe,
I'm part of the same team working on the project
We double checked the docs
-updated stripe to latest version
-Manifest is the same
-Dashboard is also fine
and as you can see the code should work fine. Do you have any other ideas why would this happen?
@porter-stripe Hi Nick, yes, we have Google Pay enabled in the stripe dashboard as well. Manifest file contains the metadata within the application tag like the documentation says.
I believe we've followed everything as recommended but can't seem to see the google pay button on the payment sheet.
Any help/suggestion would be greatly appreciated. Thanks !
Could you share a payment_intent_id / setup_intent_id for us to look at?
Could you share a payment_intent_id / setup_intent_id for us to look at?
Hello Jay , @jaynewstrom-stripe
Sorry for the delay in the response. We were waiting for our provider to let us know if it was alright to share such ID or not.
here's a recent Payment Intent ID I did :
pi_3PYTlCBvVjgH2WuT10PKdtRc
@MohandIbrahim That looks like a UUID. payment intent ids will look something like this one pi_3PYTimLu5o3P18Zp076WgAq0
@jaynewstrom-stripe yeah sorry it got mixed by me. I edited my answer
Everything looks right on the Stripe side as far as I can see.
In order for google pay to show up in PaymentSheet, you need to have a google account setup, with payment methods (a card) added to google wallet.
Does Google Pay show up if you add a card to the google wallet app?
Everything looks right on the Stripe side as far as I can see.
In order for google pay to show up in PaymentSheet, you need to have a google account setup, with payment methods (a card) added to google wallet.
Does Google Pay show up if you add a card to the google wallet app?
Hi Jay, @jaynewstrom-stripe
No, it's not showing at all...
one thing our tester pointed out is when it worked it was still the Google pay app not wallet.
We Had a branch for release that was tested around end of March this year. This branch was working with GPay but now it's not. We are very lost here and in need of guidance
Are you able to reproduce this in our sample app?
Are you able to reproduce this in our sample app?
Hi Jay @jaynewstrom-stripe
I tried using the sample app but I believe had a bunch of problems building it. Would you mind pointing me to the correct link just to be sure ?
You can download the sample from our releases page. Here's the latest: https://github.com/stripe/stripe-android/releases/download/v20.48.0/paymentsheet-example-release-20.48.0.apk
Hello @jaynewstrom-stripe,
Apologies for taking time to respond. We checked ur sample app and couldn't reproduce the issue there. The Google pay button was visible to our tester.
Could there be any large differences that would've happened between 20.40 and 20.48 ??
we don't use the GooglePayLauncher so I couldn't confirm if google pay is failing or anything.
Do you have any ideas to debug this mystery ?
Can you start by upgrading to 20.48? Also, we have a discord server that can offer live support.
Hi @jaynewstrom-stripe
The first thing I did was update the sdk to 20.48, still nothing changed. I've joined but It seems I'm unable to send anything in the dev-help.
Hello @jaynewstrom-stripe ,
After so much digging with the support. It was a human error from the dashboard. There are around 3 places to check for the wallet if enabled ( at least for us ) . The one from the outside was enabled but there was some option related to the configs addressing the app that were somehow OFF. It's working now on our app :) . Just wanted to let you know as to close this bug.
Glad you got it worked out!