#techblogogy_api

1 messages ยท Page 1 of 1 (latest)

tame carbonBOT
#

๐Ÿ‘‹ 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/1265661166995247146

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rich glade
#

hi! do you have those screenshots?

proven kernel
#

just a sec, working on it

#

So this is how it shows up while in test mode "with Pay Stripe" $39.99 at the bottom

#

But once running with production keys, it's no longer there

#

Sorry for ghetto "screenshots" android doesn't allow to screenshot this dialog via system

rich glade
#

hmm, interesting. Maybe their code on your production site is slightly different and you don't actually pass the total items? Might help if you have a link to the site so I can inspect the running code

proven kernel
#

The code doesn't change the only thing that changes are the keys. Give me a sec. I'll send you over a link with production keys

#

Here's a temporary link for you

#

It's using production keys

rich glade
#

I don't actually get a PaymentRequestButton on this page, just CardElement

proven kernel
#

Is google pay setup for the specific browser?

rich glade
#

yes

proven kernel
#

One thing to note, is that on desktop the "total" shows up correctly for both prod and test

proven kernel
rich glade
#

ok for some reason you have this set up to only use PRB when I visit on a mobile browser

rich glade
proven kernel
#

ok understood

#

are they any other parameters appart from total or displayItems I can use to set the "display price"?

rich glade
#

no

proven kernel
#

Got it! Thanks for the help

rich glade
#

sorry I don't have a better answer, it's possible there is something we can change in the internals of stripe.js here but it's also possible it's just Google, there have been similiar issues like this in the past and it's pretty inconsistent how these parameters get handled

#

to me the fact it shows up properly on Desktop, and in testmode on mobile, means we probably pass the information correctly into the Google Pay SDK we call, it's just handled inconsistently in Chrome for Android's client

proven kernel
#

yeah could be the case

#

One other weird thing I noticed is that when using "stripe payment links", the google pay UI that shows up is completely different from the paymentRequest one

rich glade
#

yes, PaymentRequestButton is an older integration and uses the PaymentRequest browser standard, newer integrations like Checkout/ExpressCheckoutElement/PaymentElement directly use Google's JS library, I think.

proven kernel
rich glade
#

I'd really suggest just using the ExpressCheckoutElement or PaymentElement instead as as more supported option instead of the components you're currently using on the page you shared, but that's possible too(though it will only give you a Token tok_xxx object and you'll have to figure out how to convert that to a PaymentMethod)

proven kernel
#

yeah, I've converted tok_xxx to payment method in past and passed that over to payment intent. Thanks for the heads up!

#

Appreciate your help ๐Ÿ™