Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to see Google Pay option when Payment Sheet is opened #8695

Open
sidharth1196 opened this issue Jun 26, 2024 · 12 comments
Open
Labels
bug triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@sidharth1196
Copy link

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

@porter-stripe
Copy link
Contributor

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.

@porter-stripe porter-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Jun 26, 2024
@MohandIbrahim
Copy link

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?

@sidharth1196
Copy link
Author

@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 !

@jaynewstrom-stripe
Copy link
Collaborator

Could you share a payment_intent_id / setup_intent_id for us to look at?

@MohandIbrahim
Copy link

MohandIbrahim commented Jul 3, 2024

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

@jaynewstrom-stripe
Copy link
Collaborator

@MohandIbrahim That looks like a UUID. payment intent ids will look something like this one pi_3PYTimLu5o3P18Zp076WgAq0

@MohandIbrahim
Copy link

@jaynewstrom-stripe yeah sorry it got mixed by me. I edited my answer

@jaynewstrom-stripe
Copy link
Collaborator

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?

@MohandIbrahim
Copy link

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

@jaynewstrom-stripe
Copy link
Collaborator

Are you able to reproduce this in our sample app?

@MohandIbrahim
Copy link

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 ?

@jaynewstrom-stripe
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

4 participants