#infinite-gradient19_unexpected
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/1450883774853152829
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
can see GOOGLE_PAY in both the _activeBackingLibraryName and _backingLibraries; however, "canMakePayment" is false?
I see _canMakePaymentAvailability GOOGLE_PAY: true
if you expand the canMakePayment section what shows?
on devices without this issue, it looks like:
however, for devices unable to make a payment, expanded looks like:
we also use this code for IOS applications and have not experienced this problem at all! seems to be exclusively happening in-app on Web View from Android devices with Google Pay
Interesting
Also I'm assuming roughly ~10% of users are experiencing no Google Pay payment triggered. only includes android devices in the tracking?
yes! that's a correct assumption
And are you able to replicate both the scenario where Google Pay does indeed show and the scenario where it doesn't?
yes. on some of our QA devices it does show, on others it does not. we haven't been able to identify any difference in the device settings/configuraiton
All on same os version?
hmm, that I am not sure on to be honest, will double check
Yeah if you can share device info (type and os) that would help
we are using the native Google pay API to check for both availability and a card added before attemping to open a Web View
gettin device info from our QA team now will have it shortly
And the devices where GPay doesn't show allow you to see Gpay if opening the link in browser?
yes. every device where it failed in-app on a Web View worked totally fine on the same URL directly in a browser
for ExpressCheckout, GooglePay would never render in the options
we also did manual paymentRequest object creation then attempting "paymentRequest.current.show()" logic and that also would not open any GooglePay sheet
i am the team's web developer so less familiar with the Android device details, currently waiting for the android team to get back to me with device OS
ok - they said they tried this on OS 8, 10, 13, and 14 across different devices
Right but what were the Android versions and device types of the devices where this worked and what were the Android versions and device types where this didn't work
all of those
some test devices consistently worked, others did not. even as the OS was updated/downgraded
is it possible there are security/privacy settings Stripe validates in its logic determining canMakePayment that we are not checking?
Not sure off hand but don't think so
Do the devices meet these requirements: https://developers.google.com/pay/api/android/guides/recipes/using-android-webview#userrequirements
It is a pretty recent google play services version
This was only added earlier this year: https://developers.googleblog.com/adding-support-for-google-pay-within-android-webview/
thanks! forwarding to the team will let you know shortly
ok. confirmed with android team, IS_READY_TO_PAY is what is checked before sending to a possible WebView, so those user requirements are being checked
hi! fyi i'm taking over my colleague, give me a bit to catch up
no worries! thank you for your help @turbid hatch
just to give you a heads up, i am a little unfamiliar with webviews so i'm going to need to collaborate with some of my colleagues on this one which means my responses may be a little delayed
understood. take your time, i greatly appreciate your team's help on this
ok, just want to double check something - are you checking the results of this specific method?
also are you checking it before they are sent to the webview, and not within the webview itself? what happens when you call it within the webview?
Hey hey - chiming in here. I'm the Android dev on this project. Here's exactly. the code we use to know if we should 'attempt' to show the user a web payment flow with Google Pay:
just wanna revisit one thing - you say roughly ~10% of users are experiencing no Google Pay payment triggered - is that for people who are viewing the Express Checkout Element via the webview? or to put it another way, is this happening for everyone or just a subset of users? and within each user, is the behavior consistent over time?
The flow: we check the above code -> we open a web view with the Express Checkout Element in it -> if there's an issue loading the element (@infinite can say more here) then we pop them out of the webview and show a native screen. This flow happens for about 10% of users - where the above code says they're good to use Google Pay - but then the Express Checkout Element doesn't work
and for those 10%, it's consistent across tries right? so they consistently are popped back into the native screen?
consistant for a given device, yeah
ok cool
To elaborate. The Stripe event fired from ExpressCheckout onReady has an StripeExpressCheckoutElementReadyEvent that is checked. If event.availablePaymentMethods?.googlePay comes back false on Web then they are sent back to the native screen to ensure a payment can be collected
that above check is based off the Stripe docs for onReady: https://docs.stripe.com/elements/express-checkout-element#check-available-payment-methods
hmmm yep, makes sense. have you tried the flow without checking that property? i'm curious what happens, i'd assume that the element just doesn't render anything
Correct
would it be possible to try implementing this within the webview just to see what google says about the client's ability to pay within the webview? i think if we can get an answer from google's authoritative source it will help us narrow down if this is a stripe bug or something else
https://developers.google.com/pay/api/web/reference/client#isReadyToPay
one other thing i'm curious about is what happens if you point your webview to our test page
https://docs.stripe.com/testing/wallets?ui=express-checkout-element
thanks! getting those spun up now
FYI i'm going to need to step away for a while, but i think at this point it might be best if we convert this to an email case so i and my team can follow up with you async - is that okay with you?
go ahead, will communication be through email going forward instead of on discord? or can we keep this thread?
we can keep the thread but it would only be for reference, and future communication would be via email
This is what I see when loaded into our web view
Are you logged in to a Google Account with at least one card in your wallet in that browser? That button will only show up if you have at least one valid PM saved to your wallet
also one more silly question that i realize i am not certain of the answer, for those cases where google pay is not showing in the webview is it available in the PaymentSheet?
what do you mean by PaymentSheet and how would we check that?
ahh sorry i may have jumped to an assumption that you were using our payment sheet for accepting some payments natively, but that might be incorrect
If you look at the screen shot of code above, you can see the checks we make before ever showing these screens
Looking at those checks, I still think the most likely culprit is not having a payment method saved to your google wallet. That code tests whether the browser supports GPay but by default the ECE only shows if at least one card is saved to your wallet. Stripe.js's canMakePayment call works the same, it only returns true if the device supports the wallet and has a card saved to it.
With the ECE, you actually can tell it to render when the wallet doesn't have any saved PMs by setting the wallet to always when initiating the ECE
https://docs.stripe.com/js/elements_object/create_express_checkout_element#express_checkout_element_create-options-paymentMethods-googlePay
Did you see the screen shot I posted earlier in this thread? That code is what we use to determine if they have a payment method available.
Correct, ah though I see setExistingPaymentMethodRequired is set to true now
On looking further I found that it takes some extra configuration of your manifest and webview to get Google Pay to show in the ECE. Can you double check that you have these configurations as well? I have a feeling you do or else your other API calls wouldn't return true but this feels worth double checking
https://developers.google.com/pay/api/android/guides/recipes/using-android-webview#kotlin
yup! that's all inline
here's a video showing how stripe isn't showing google pay, even when other test websites will
Hello
Taking over as Pompey needs to step away soon
Is switching to Chrome Custom Tabs a possibility?
Stripe's support for Elements in an Android WebView is very new atm but as far as I know, Chrome Custom Tabs should support the wallet out of the box
No - unfortunately it looks horrible.
Gotcha. I've checked with a test app that I built for myself and Google Pay shows up for me in Express Checkout Element in a WebView on a physical Pixel device (after following - https://developers.google.com/pay/api/android/guides/recipes/using-android-webview#kotlin)
Since you're unable to see that, we'd likely need an example app from your end to reproduce the issue and suggest workarounds. In order to do that, we'll have to switch to email support.
Hello @thick mural, we have sent you a direct message, please check it at https://discord.com/channels/@me/1450964947017404477
- 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.