#nicholaspuglia_api
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/1328488925819310171
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
desktop
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?
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, }, }, }, }
Can you open this page in Chrome and let me know if you see Google Pay in the list of PaymentMethods?
No it's not
If you see Google Pay, click it. You should see "Google Pay selected". Is this not what you see in your own integration?
Can you share a screenshot of what you see when you access https://4242.io/test/payment-element/ ?
Do you have a card saved to your Google Pay wallet?
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
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?
No I only have it setup locally, here is a video
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
confirmPayment is called on clicking the Pay button down the bottom
Hm, are you sure?
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
Hmmm interesting, okay
I recommend looking at this flow: https://docs.stripe.com/payments/build-a-two-step-confirmation
Unless you were already following this?
Yep following that approach. I think my question is resolved now. Thanks for the help
Sure thing!