#jimmy_begins
1 messages · Page 1 of 1 (latest)
Hi
What are the step to reproduce the issue on that page ?
For this page: https://stripe.com/docs/stripe-js/elements/payment-request-button
- Using Google Chrome, go to the page and open dev tools. Ensure you have console visible.
- Refresh the site.
- I see the GPay button (this is because I have cards registered in Chrome and the device set to Pixel 5).
- However, in dev tools console I now get the above error message (and a few more - see image).
- Clicking GPay button causes browser modal to flash but immediately close.
Thanks for all these details, checking...
is this causing an issue on your own payment page? We are aware of this error message from Google's library appearing in recent days but as far as we know so far it's not really breaking things and the error itself is probably a red herring. I'm having a look but can't replicate this "flashing" behaviour yet.
This is the scenario replayed in our live system:
to be clear, you might just be getting Link as the button because you have a Link cookie in your browser(we prioritise showing Link over Google Pay if the browser has a Link session active), so the error itself about the manifest thing doesn't necessarily mean Google Pay is broken
In this browser I have many test cards added to the payment settings, but these are not registered in GPay. GPay has only 2 expired cards. Is this the real issue? Somehow GPay button is showing despite not having any valid cards?
well as far as I understand it, you meed to have active cards in your actual Google account, https://pay.google.com/gp/w/u/0/home/paymentmethods
saved cards in Chrome just in chrome://settings/payments are not Google Pay themselves and I don't think we display the button for those
Any idea why the button shows then? Because of the expired ones?
what do you mean exactly? as in the button showing on stripe.com/docs?
also, can you visit https://jsfiddle.net/gf41orc2/ and tell me what you see?
As long as the browser thinks I am in Pixel 5, I see this:
interesting
to be clear if you click that you get an error about Cannot show PaymentRequest UI in a preview page or a background tab. (do you? I do.) which I assume is a Chrome thing that it won't let itself show the UI if you're in this devtools mobile preview mode. Maybe that's what is behind the flashing behaviour you see.
maybe part of what Chrome does when you put it in this Pixel 5 mode is it somehow forces Google Pay on, or changes whatever state the browser's native canMakePayments function is reading from
so I have at least a theory which would be:
- on your site, you don't see GPay because you don't have active saved cards in your Google wallet, and per the docs we fall back to show Link when GPay is not active
- you can force GPay to return as available with that Chrome Pixel 5 compat mode
- you get the flashing behaviour because in that compat mode, Chrome can't actually allow itself to popup the payment UI, per the error above.
I do get that error yes. I think this is a reasonable hypothesis. I will try testing with cards registered. Although Google Pay doesn't seem to let you register test cards - I assume stripe handles this as with Apple pay
So to get this to work, I added a real card to GPay and then used dev tools to get GPay to show up. I then closed Dev Tools and it allowed me to continue.
But as I have to use a real card, this means I can't test 3DS. Is there a way to test this?
not really no
but also Google Pay doesn't use 3DS so I don't follow what you're asking
customers generally don't have to do 3DS with their bank if they pay with GPay, because using a digital wallet already counts as authentication.
Ah so if you click add new card, the authentication has to happen there rather than at payment?
The confusing thing for me, if that is the case, is why your docs suggest having the handle actions piece after the completion. What other actions can happen? Is it a future proofing?
yes, authentication is handled by the wallet
well spotted; yes it's because sometimes separate 3DS authentication is needed
it's not supposed to happen but it can, it's up to the customer's bank. There isn't really a good way to test it.
Darn. OK. I suppose if it is rare, we can address it if it comes up. I think this all works for us now then. Thanks for your help!