#sarita_21302

1 messages · Page 1 of 1 (latest)

fluid stirrupBOT
last salmon
polar sage
#

This is my code

const paymentElementOptions = {
layout: "tabs",
email: "never"
};

const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");

#

but the email field is still visisble

#

Is it under billingDetails?

last salmon
#

yes follow that public documentation

#

fields.billingDetails.email

fluid stirrupBOT
polar sage
#

I'll share my code, it is still not working for me

finite musk
#

you're using a linkAuthenticationElement, that element specifically collects an email address, it's what it does.

polar sage
#

ok

#

so I need payment element?

#

Can you share code reference for it?

finite musk
#

you are already using a PaymentElement. You're using a LinkAuthenticationElement(that is the part of your page that has the email input) and you're using a PaymentElement(that is the part of the page with the card number inputs). See the diagram linked just above. That is what you built, what is described in that guide.

polar sage
#

Can see that now. Thanks

#

One more question - If I want to change the layout from tab to showing button like below attachment and card elements after the buttons, how can I achieve that?

finite musk
polar sage
#

Can this design be achieved using payment elements, if not all at least the card information section?

finite musk
#

sure that's totally possible

#

the top part is ExpressCheckoutElement, and the bottom part is a PaymentElement.

polar sage
#

Can you please share doc for styling/editing payment elements? For example - I'll have to hide the 'expiry' label

finite musk
#

you can't hide it

polar sage
#

So how can I acheive the above design with payment-element ?

#

Or I can't?