#prattt_ece-googlepay

1 messages Β· Page 1 of 1 (latest)

copper idolBOT
#

πŸ‘‹ 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/1262806326770405498

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

limpid rivet
#

Hey @plush vale PaymentElement and ExpressCheckoutElement have different logic internally for when it renders/doesn't render GooglePay.
If you render both elements together on one page, we try to only show GooglePay in one of the two. We don't usually expect you to render both together but visually hide one. So I think you'll need to change this logic on your end or render them separately (unmount one and mount the other)

#

prattt_ece-googlepay

plush vale
#

Thanks, makes sense. I decided to hide them with CSS instead of actually not rendering them because I had experienced some issues when re-rendering the components multiple times. It sounds like you would expect mounting and unmounting a component multiple times to work?

limpid rivet
#

yes it should work. But if it were me I would change your UI to show both really

plush vale
#

Thanks for the help! Appreciate the quick replies. Back to the drawing board πŸšΆβ€β™‚οΈ

limpid rivet
#

sure thing!

plush vale
#

Last thing, can you provide any more information about the differences between Google Pay detection between the two components? Are you aware of which browsers/OSes would display differently?

limpid rivet
#

PaymentElement only shows GooglePay if it's already fully set up with a card configured inside. My understanding is with ExpressCheckoutElement we built it differently and render it if it's supported on the device. But I'm not certain, a lot of it is internal to our libraries and I was just mentioning it as a potential reason why GooglePay might not appear, but it's not relevant in your case

plush vale
#

Ah, got it. Thanks again! Have a great day