#nicholaspuglia_api

1 messages ¡ Page 1 of 1 (latest)

worldly timberBOT
#

👋 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/1328488925819310171

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

scenic iris
#

Hi there

#

Is this on mobile or a desktop browser?

tepid canyon
#

desktop

scenic iris
#

Hm, the GooglePay prompts shouldn't automatically be displayed with the PaymentElement. Are you sure you're not using the ExpressCheckoutElement instead?

#

Do you have a link to the guide you're following to build this?

tepid canyon
#

I'm building using the react-stripe-js library and using the PaymentElement component

#

I'm setting the options object like this
const StripePaymentElementOptions: StripePaymentElementOptions = { wallets: { applePay: applePayAvailable ? 'auto' : 'never' as PaymentWalletOption, googlePay: googlePayAvailable ? 'auto' : 'never' as PaymentWalletOption, }, defaultValues: { billingDetails: { name: props.customer_name, email: props.customer_email, address: { country: props.regionCode, }, }, }, }

scenic iris
#

Can you open this page in Chrome and let me know if you see Google Pay in the list of PaymentMethods?

tepid canyon
#

No it's not

scenic iris
#

If you see Google Pay, click it. You should see "Google Pay selected". Is this not what you see in your own integration?

tepid canyon
scenic iris
#

Do you have a card saved to your Google Pay wallet?

tepid canyon
#

In my own integration I see google pay in the list of payment methods. When I click it, the Payment Element shows a similar UI to how the Cash App Pay one works in this test link but it also automatically open the modal

#

Yeah I do

scenic iris
#

Do you have a link to your test environment?

#

If not, could you share a screenshot of what the PaymentElement looks like within your own integration?

tepid canyon
scenic iris
#

Thanks!

#

Hard to say without seeing more of your code but I suspect this has something to do with when you're calling confirmPayment. The GooglePay modal shouldn't pop up until this is called

tepid canyon
#

confirmPayment is called on clicking the Pay button down the bottom

scenic iris
#

Hm, are you sure?

tepid canyon
#

Yes 100% sure

#

The only thing I can think of that might impact is the onChange. I'm removing the logic in that function now to see if it changes anything

#

Ok that was the issue, I think the reason is because for credit card we are listening to the event.complete and create a new payment method in order to get the card brand and funding

#

For google pay I assume we need to follow a different approach

scenic iris
#

Hmmm interesting, okay

#

Unless you were already following this?

tepid canyon
#

Yep following that approach. I think my question is resolved now. Thanks for the help

scenic iris
#

Sure thing!