#felipe-zellner_code

1 messages ¡ Page 1 of 1 (latest)

pulsar girderBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1450919958967222273

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

green tide
#

Hi there

#

I'll be with you in a moment

young bobcat
#

Hello, thank you palamedes!

green tide
#

What platform are you working on?

young bobcat
#

Im on Android platform

green tide
young bobcat
#

Yeah, our payment flow as is does not have the Google Pay button. I have add the meta-data tag on manifest, and settled the configs to the paymentsheet builder

green tide
#

okay, let me see if I can find a teammate that is more familiar with Android

#

It might be a few minutes but I will follow up when I can get someone

young bobcat
#

Thank you soo much palamedes!

icy gull
#

hi! i am getting caught up on this, but i'm spinning a few plates at the moment so my responses might be a little delayed

young bobcat
#

hi there! Np, thank you for your time!

icy gull
#

just double checking, your payment sheet otherwise works correctly? it's just not showing google pay?

young bobcat
#

In this page the Google pay also is not available

#

And I have the Google wallet with cards on the device

icy gull
#

ok, that seems to me to indicate some kind of problem with your google pay wallet then

#

gimme just a bit

young bobcat
#

Maybe can be some issue with Samsung Wallet?

pulsar girderBOT
young bobcat
#

Just to sharing. Now it appears the option for google pay. But the json element shows it is false

celest storm
#

Samsung wallet shouldn't effect whether google pay wallet shows up. You do need a card saved to your Google Pay wallet specifically though. Do you have at least one card saved to your Google Pay wallet on this device?

young bobcat
#

Yes i do. Credit and debit cards

celest storm
young bobcat
#

Yes the option is showing with the registered card

#

One weird thing i noticed, on the payment intent created, the payment_method_types being returnd do not list google pay option:

"payment_method_types": [
"card",
"link",
"pix",
],
#

On the payment_method_configuration the google_pay object is available also.
/v1/payment_method_configurations/pmc_1SNXUyID3GNhpIWBPR5x6bEJ

"google_pay": {
"available": true,
"display_preference": {
  "overridable": null,
  "preference": "on",
  "value": "on",
 },
}
celest storm
#

In our API, Google Pay falls under the umbrella of card so it being missing from that payment_method_types array will happen even when it is showing properly.

young bobcat
#

Soo google_pay dosent need to be returned on the payment_method_types array?

celest storm
#

Correct, as long as card is there and you have google pay turned on in your payment method configuration (that pmc_ object) you are good.
I am not seeing any requirements for Android other than the manifest tag and that google pay configuration code that you posted. Still looking

#

Just thinking through debugging stuff, have you tried cleaning your build directory and rebuilding? This is unlikely to be stale build code but it never hurts to check

young bobcat
#

Im doing it right now. just a sec

celest storm
#

I now see that the "Set up Google Pay API" doc that our page links to recommends adding the com.google.android.gms:play-services-wallet:19.5.0 dependency, that could be worth adding (and if so we should probably update our doc)

young bobcat
#

Also added this dependency in the build.gradle file

#

Made a clean/rebuild install and still not showing:

#

There is any limitation on test mode or paymentSheet?

celest storm
#

It should be able to work as long as you have those settings and are testing on a physical device. I am trying to see what other requirements there may be here but am not finding much at the moment.

young bobcat
#

Im trying to find something also, but with no success. Also i try to run the Stripe playground app that have some examples

celest storm
#

Interesting, is that one of our GitHub examples? Like from our stripe-android or stripe-react-native repos?

young bobcat
#

Yeah

#

Also, one difference i noted on the page you asked for, is that the link payment is not available

#

I deactivated the link payment option, but seems that do not have relation to google pay issue

celest storm
#

Yep that should be separate. Link and Google Pay can show up with or without each other

pulsar girderBOT
forest bluff
#

Hello
Stepping in here as Pompey needs to head out.
Are you using a VPN or something?

young bobcat
#

Hello Hanzo! (my fav char on ow2 haha)

#

No im not using VPN

forest bluff
#

Can you share the code you're using to configure the Payment Sheet?

young bobcat
#

Yes ofc

#

this is the fun im using to set the configuration:

private fun getStripeConfiguration(): PaymentSheet.Configuration {
        val builder = PaymentSheet.Configuration.Builder(MERCHANT_DISPLAY_NAME)
            .paymentMethodLayout(PaymentSheet.PaymentMethodLayout.Horizontal)
            .allowsDelayedPaymentMethods(true)
            .appearance(getStripeAppearance())
            .billingDetailsCollectionConfiguration(
                PaymentSheet.BillingDetailsCollectionConfiguration(
                    address = PaymentSheet.BillingDetailsCollectionConfiguration.AddressCollectionMode.Never,
                    name = PaymentSheet.BillingDetailsCollectionConfiguration.CollectionMode.Never,
                    email = PaymentSheet.BillingDetailsCollectionConfiguration.CollectionMode.Never,
                    phone = PaymentSheet.BillingDetailsCollectionConfiguration.CollectionMode.Never,
                    attachDefaultsToPaymentMethod = true
                )
            )
        val googlePayEnvironment =
            if (BuildConfig.DEBUG) {
                PaymentSheet.GooglePayConfiguration.Environment.Test
            } else {
                PaymentSheet.GooglePayConfiguration.Environment.Production
            }

        val googlePayConfiguration = PaymentSheet.GooglePayConfiguration(
            environment = googlePayEnvironment,
            countryCode = COMPANY_COUNTRY_CODE
        )

        builder.googlePay(googlePayConfiguration)

        return builder.build()
    }
forest bluff
#

Gotcha. This looks fine. what country code are you setting here?

young bobcat
#

is US

forest bluff
#

and what environment?

young bobcat
#

Is Test

#

private const val COMPANY_COUNTRY_CODE = "US"

forest bluff
#

Do you see anything in the logcat about Google Pay?

young bobcat
#

There is a warning:

Google Pay API check failed.
Possible reasons:
- Google Play service is not available on this device.
- Google account is not signed in on this device.

forest bluff
#

I think that's why

#

You may need to talk to Google or Samsung support to check why your device is reporting that Play services aren't available.

young bobcat
#

Ok reading the link documentation that the log cat provided i found this:

  • Google Pay API has launched in the user's country.
#

Maybe this do not have relation with the company country code i provided earlier, right?

forest bluff
#

It doesn't. I think it's your specific device that's having trouble with Google's software

young bobcat
#

Sure, i will check it and try to debug on more devices.

#

All done!

forest bluff
#

Awesome, glad that worked out

young bobcat
#

Thank you and the others for your help and time!