#remilapierre_api

1 messages ¡ Page 1 of 1 (latest)

hasty jewelBOT
#

👋 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/1418608822192439338

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

coarse nebula
#

I would like to change the sentence / add terms

muted oak
coarse nebula
#

<PaymentElement options={{
business: {name: this.props.org.name},
defaultValues: {
billingDetails: {
name: this.props.client.name,
email: this.props.client.email,
phone: this.props.client.phone,
address: {
line1: this.props.client.address,
city: this.props.client.city,
state: this.props.client.state,
postal_code: this.props.client.postal,
}
}
},
}} />

#

I can add it here I guess?

muted oak
#

Yes that looks like the right part of the code

coarse nebula
#

Amazing

#

Is it possible to hide the postal code requirement there also?

muted oak
coarse nebula
#

<PaymentElement options={{
business: {name: this.props.org.name},
defaultValues: {
billingDetails: {
name: this.props.client.name,
email: this.props.client.email,
phone: this.props.client.phone,
address: {
line1: this.props.client.address,
city: this.props.client.city,
state: this.props.client.state,
postal_code: this.props.client.postal,
}
}
},
terms: {
card: 'never',
applePay: 'never',
googlePay: 'never'
},
fields: {
billingDetails: {
address: 'never'
}
}
}} />

#

So this will work

muted oak
#

Looks right at a glance, give it a try and let me know if there are any issues!

#

Wait sorry, if you just want to configure the postal code then you're missing that parameter

#
fields: {
  billingDetails: {
    address: {
      postalCode: 'never'
    }
  }
}
coarse nebula
#

Uncaught (in promise) IntegrationError: You specified "never" for fields.billing_details.address.postal_code when creating the payment Element, but did not pass confirmParams.payment_method_data.billing_details.address.postal_code when calling stripe.confirmPayment(). If you opt out of collecting data via the payment Element using the fields option, the data must be passed in when calling stripe.confirmPayment().

#

getting this

muted oak
#

The error message is saying that you need to pass the data one way or another. Can you explain the specific reason why you want to hide the zip code field in the element?

coarse nebula
#

Because its not necessary...

#

But I guess it is?

muted oak
#

Yes, it is necessary in this case