#rockbly

1 messages · Page 1 of 1 (latest)

weary skiffBOT
flat tree
#

Hello

#

What integration are you using?

spice wraith
#

Express Checkout

flat tree
spice wraith
#

Would that go in the elements.create('expressCheckout', { ... }) ?

flat tree
#

Nope it goes in the onClick handler

#

Sorry that was kind of vague

spice wraith
#

I don't have an onClick - I have: expressCheckoutElement.on('confirm', handlePayment);

flat tree
#

Yeah you would also create a click handler

#

Like expressCheckoutElement.on('click', (event) => { const options = { emailRequired: true, phoneNumberRequired: true }; event.resolve(options); });

#

There is an example in the doc above

spice wraith
#

Oh, OK - so it's just a new event handler. Kind of odd that it's not configured during initialization.

flat tree
#

Yeah I think the idea is it gives you more flexibility if it is onClick

spice wraith
#

I will try this, thank you for the help!

flat tree
#

Sure!

spice wraith
#

I am also using the Payment Element for a card fallback, is there a similar option to require an email? Right now I have manually added that field into my form.

flat tree
#

No you can't force email for Payment Element

#

If you want to force collection then your own field is the correct route

#

And you can pass to the payment_method_data on confirmPayment()

spice wraith
#

Yup, that is working. Thank you again

flat tree
#

👍