#felipe-zellner_code
1 messages ¡ Page 1 of 1 (latest)
đ 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.
- felipe-zellner_code, 2 days ago, 11 messages
Hello, thank you palamedes!
What platform are you working on?
Im on Android platform
and did you note the caveats listed here?
https://docs.stripe.com/payments/mobile/accept-payment?platform=android&type=payment#test-google-pay
Google allows you to make test payments through their Test card suite. The test suite supports using Stripe test cards.
You must test Google Pay using a physical Android device instead of a simulated device, in a country where Google Pay is supported. Log in to a Google account on your test device with a real card saved to Google Wallet.
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
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
Thank you soo much palamedes!
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
hi there! Np, thank you for your time!
just double checking, your payment sheet otherwise works correctly? it's just not showing google pay?
what happens if you visit this test site on the same device? are you seeing google pay as a payment option?
https://docs.stripe.com/testing/wallets?ui=express-checkout-element
In this page the Google pay also is not available
And I have the Google wallet with cards on the device
ok, that seems to me to indicate some kind of problem with your google pay wallet then
gimme just a bit
Maybe can be some issue with Samsung Wallet?
Just to sharing. Now it appears the option for google pay. But the json element shows it is false
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?
Yes i do. Credit and debit cards
Gotcha, trying to think of what this may be given that. One more quick test, can you click on button on the Express Checkout Element tab of that page and see if the cards that you are expecting show up on the payment sheet? https://docs.stripe.com/testing/wallets?ui=express-checkout-element
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",
},
}
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.
Soo google_pay dosent need to be returned on the payment_method_types array?
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
Im doing it right now. just a sec
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)
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?
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.
Im trying to find something also, but with no success. Also i try to run the Stripe playground app that have some examples
Interesting, is that one of our GitHub examples? Like from our stripe-android or stripe-react-native repos?
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
Yep that should be separate. Link and Google Pay can show up with or without each other
Hello
Stepping in here as Pompey needs to head out.
Are you using a VPN or something?
Can you share the code you're using to configure the Payment Sheet?
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()
}
Gotcha. This looks fine. what country code are you setting here?
is US
and what environment?
Do you see anything in the logcat about Google Pay?
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.
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.
There's this support thread that talks about how you can re-install them - https://support.google.com/android/thread/197634333/google-play-services-not-available?hl=en
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?
It doesn't. I think it's your specific device that's having trouble with Google's software
Awesome, glad that worked out
Thank you and the others for your help and time!