#asif-elements-postalcode

1 messages · Page 1 of 1 (latest)

mighty loomBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

plucky atlas
#

Here is teh child component being returned. It has all the clientsecret stuff but dont know how to pass hidePostalCode to this:

return (
<BaseLayout useLogoHeader>
<StripeElementsWrapper>
<CheckoutWrapper />
</StripeElementsWrapper>
</BaseLayout>
);

I see hidePostalCode is a Card Element type so how would this code need to be modified to support that

#

I don't really understand the challenge you're having here

#

Can you be more specific?

#

You end up mounting a card element?

#

and you want to pass the hide postal code option through?

mellow hedge
#

that's right and it shows the zipcode which i dont want ti to show

plucky atlas
#

Ok payment element, not card element

#

You can achieve this with the payment element options fields[billingDetails][address][postalCode]='never'

mellow hedge
#

what i am creating up there is paymentElement type? i am just using this element import: ```import { Elements } from '@stripe/react-stripe-js';

plucky atlas
#

Note the comment in the top-level fields option:

If you disable the collection of a certain field with the fields option, you must pass that same data to stripe.confirmPayment or the payment will be rejected.

#

Thats the ELements group, eventually you need to be creating a payment element later

#

Presumably this is within your CheckoutWrapper

mighty loomBOT