#infinite-gradient19_unexpected

1 messages · Page 1 of 1 (latest)

muted depotBOT
#

👋 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.

thick mural
#

can see GOOGLE_PAY in both the _activeBackingLibraryName and _backingLibraries; however, "canMakePayment" is false?

turbid hatch
#

I see _canMakePaymentAvailability GOOGLE_PAY: true

#

if you expand the canMakePayment section what shows?

thick mural
#

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

turbid hatch
#

Interesting

#

Also I'm assuming roughly ~10% of users are experiencing no Google Pay payment triggered. only includes android devices in the tracking?

thick mural
#

yes! that's a correct assumption

turbid hatch
#

And are you able to replicate both the scenario where Google Pay does indeed show and the scenario where it doesn't?

thick mural
#

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

turbid hatch
#

All on same os version?

thick mural
#

hmm, that I am not sure on to be honest, will double check

turbid hatch
#

Yeah if you can share device info (type and os) that would help

thick mural
#

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

turbid hatch
#

And the devices where GPay doesn't show allow you to see Gpay if opening the link in browser?

thick mural
#

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

turbid hatch
#

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

thick mural
#

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?

turbid hatch
#

It is a pretty recent google play services version

thick mural
#

thanks! forwarding to the team will let you know shortly

muted depotBOT
thick mural
#

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

hazy dune
#

hi! fyi i'm taking over my colleague, give me a bit to catch up

thick mural
#

no worries! thank you for your help @turbid hatch

hazy dune
#

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

thick mural
#

understood. take your time, i greatly appreciate your team's help on this

hazy dune
#

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?

reef shuttle
#

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:

hazy dune
#

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?

reef shuttle
#

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

hazy dune
#

and for those 10%, it's consistent across tries right? so they consistently are popped back into the native screen?

reef shuttle
#

consistant for a given device, yeah

hazy dune
#

ok cool

muted depotBOT
thick mural
hazy dune
#

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

reef shuttle
#

Correct

hazy dune
#

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

thick mural
#

thanks! getting those spun up now

hazy dune
#

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?

thick mural
#

go ahead, will communication be through email going forward instead of on discord? or can we keep this thread?

hazy dune
#

we can keep the thread but it would only be for reference, and future communication would be via email

reef shuttle
#

This is what I see when loaded into our web view

muted depotBOT
old wyvern
#

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

hazy dune
#

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?

thick mural
#

what do you mean by PaymentSheet and how would we check that?

hazy dune
#

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

reef shuttle
#

If you look at the screen shot of code above, you can see the checks we make before ever showing these screens

old wyvern
#

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

reef shuttle
#

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.

old wyvern
#

Correct, ah though I see setExistingPaymentMethodRequired is set to true now

reef shuttle
#

yup! that's all inline

#

here's a video showing how stripe isn't showing google pay, even when other test websites will

muted depotBOT
finite grove
#

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

reef shuttle
#

No - unfortunately it looks horrible.

finite grove
#

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.

muted depotBOT
#

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.