#ferra

1 messages · Page 1 of 1 (latest)

ripe mapleBOT
ruby quartz
#

Hi! Let me help you with this.

restive ice
#

req_624zOEI4CR3U1U

ripe mapleBOT
devout niche
restive ice
#

Oh ok I'll try that. This process (with a checkbox "save my card" along with the card form) is pretty common, that's too bad you don't have this example documented?

devout niche
#

Yep, we don't. Believe there's work ongoing to add native support for this sometime in the near future

restive ice
#

Thank you, it's working like a charm!

#

Hmm in fact I have a problem

#

It seem that this does not work:

#

elements.update({setupFutureUsage: null})

#

(when unchecking)

#

while does does work:

#

elements.update({setupFutureUsage: 'off_session'});

#

(when checking)

devout niche
#

You can't set it to null, you'll need to pass and empty string ('')

restive ice
#

ok ty

#

This is what I got:

#

Invalid value for elements.update(): setupFutureUsage should be one of the following strings: off_session, on_session. You specified: .

devout niche
#

Maybe you just need to omit that parameter completely from the Elements object if not saving then

restive ice
#

Yes but when I check the box, I set this parameter. Then I have to delete it if the box is unchecked

devout niche
#

Normally you can unset values with an empty string. I've not really tried the new deferred intent flow, FYI

devout niche
#

It's not required so that should meet the requirements

restive ice
#

that's pretty overkill to delete just one option 😮

devout niche
#

Yep, valid. Not really a happy path for what you're trying to do right now (but we're working on that)

restive ice
#

ok

devout niche
#

Did that work?