#hugues9308_code

1 messages ยท Page 1 of 1 (latest)

tropic cargoBOT
#

๐Ÿ‘‹ 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/1238484559750758411

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tacit saddle
#

Hey there, can you share your code for this?

fiery oracle
fiery oracle
#

Are you there?

tacit saddle
#

Hey there, lots of folks online just jugling threads, sorry

#

Ok, after reviewing the docs, the Acss collection flow is expected to happen in a modal which your customer will interact with, then you get a result indicating success or error.

#

It doesn't look like there any expected redirect to another page here, so there is no return_url option

#

If you want to redirect after success, you can do so after inspecting the setupIntent in the result from confirmAcssDebitSetup

#

You code looks like it is mixing together async/await and promise chaining (.then()) which might be complicating things

#

eg, this is likely not going to work:

const {setupIntent, error} = await stripe.confirmAcssDebitSetup(
        clientSecret,
        {...}
    ).then(function(result) {...}
#

The result is already captured by the await and destructured as {setupIntent, error}

#

instead you likely want something more like:

const {setupIntent, error} = await stripe.confirmAcssDebitSetup(
        clientSecret,
        {...}
    )
if (error) { ... }
else {
  if (setupIntent.status === "succeeded") { ... }
}
fiery oracle
#

Sorry for the newby complexities: js isn't my cup of tea, I'll try your simplification. So, for the completion page, are you suggesting that the client should redirect to that completion page on successfull completion?

tacit saddle
#

I'm saying I don't expect any "natural" redirect. You would decide about any potential redirect by inspecting setupIntent after confirmAcssDebitSetup resolves

tropic cargoBOT