#ara

1 messages · Page 1 of 1 (latest)

wanton muralBOT
opal pasture
#

Hi 👋

So you want to only display the Payment Element if the Express Checkout Element does not present any valid wallets? Or do something else based on whether or not the Express Checkout Element is presented?

glossy gulch
#

In the preview where they have 'Or pay another way'

#

Just want to render that if express checkout is actually showing any payment options

opal pasture
#

Okay I get what you mean

glossy gulch
opal pasture
#

Yeah i was just looking to see if we have an analog of that functionality

#

That would be the ideal solution

glossy gulch
#

Right

#

Another option I considered is getting the express checkout element from the dom

#

const expressCheckoutElement = elements.getElement('expressCheckout');

#

But not sure if there are any fields I can check there

opal pasture
#

That is what I was thinking. I'm checking my test integration but I'm not seeing any data in that element object to indicate what wallets are presented

glossy gulch
#

I inspect elemented the preview page but its literally called fakewalletbutton and the or pay another way ui doesnt render conditionally 🥲

opal pasture
#

The field you are looking for in the event is availablePaymentMethods

glossy gulch
#

Wowwww

#

Tysm

#

❤️

#

Can I ask one more thing

#

When testing stripe locally, the ui doesnt render for me. It renders fine on my staging static website though. I believe this is because on my staging website I have ssl certificate whereas locally I do not. Locally my app is on https with no ssl certificate. Do I have to be on http locally for the ui to show up?

opal pasture
#

You need to be using HTTPS for the wallets to render. I would recommend looking into tools like ngrok https://ngrok.com/ if you need to test locally

glossy gulch
#

Gotcha. Thank you