#om_code

1 messages ¡ Page 1 of 1 (latest)

marsh micaBOT
#

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

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

oak sail
#

hi! just want to let you know that i'm working on some other threads atm but we'll look at this soon

marsh micaBOT
balmy quail
mellow fox
#

let options = {
appearance,
layout: {
type: 'accordion',
defaultCollapsed: false,
radios: true,
spacedAccordionItems: false,
layout: 'accordion'
},
terms: 'never',
customerSessionClientSecret: customerClientSecret,
paymentMethodOrder: PI_PAYMENT_METHODS_ORDER
}

I have passed like this but getting error
Invalid value for elements.create('payment'): terms should be an object. You specified: never.

balmy quail
#

I believe you're passing it to the wrong options

#

The options you've shared are for creating Element object

#

terms is configurable on PaymentElement object

mellow fox
#

do we do it with ruby or only js ?

balmy quail
#

Just javascript

#

Client-side

mellow fox
#

<PaymentElement
options={options}
onChange={handlePaymentElementChange}
onReady={() => {
setUnloaded(true)
setTimeout(() => {
props.setLoader(false)
}, 1000)
}}
/>

I am using PaymentElement component

balmy quail
#

try setting following then

  terms: {
    card: 'never'
  }
mellow fox
#

I have already done that in options that I am passing to <PaymentElement

balmy quail
#

If you have done that then you shouldn't be seeing Invalid value for elements.create('payment'): terms should be an object. You specified: never. error

#

I'd suggest double checking your options object

mellow fox
#

now that error is gone but I am still able to see that checkbox

balmy quail
#

Can you share a screenshot of your UI that's being rendered?

mellow fox
balmy quail
#

Oh let me check something

mellow fox
#

sure

balmy quail
#

I don't believe there's a way to hide that checkbox

mellow fox
balmy quail
#

I don't understand what you mean by that. That parameter is not really dependent of the checkbox. Rather it allows you to override the checkbox.

mellow fox
balmy quail
#

I don't believe there's a way to hide the checkbox but let me check with a colleague

mellow fox
#

yes please let me know

balmy quail
#

you'd want to set it to disabled

marsh micaBOT