#dnoise_best-practices

1 messages ยท Page 1 of 1 (latest)

rain novaBOT
#

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

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

livid helmBOT
peak trail
#

Hi ๐Ÿ‘‹ my biggest concern with that approach is that if one element requires a redirect be performed, for the type of Payment Method the customer selected to use, that the second element may get destroyed before the customer can finish using it.

jovial sierra
#

they redirect back to our page after they're done with that journey yeah? The payments don't need to be atomic ("both or neither at once"), but for my site both need to be done before going to the "you're all done" page.

peak trail
#

It depends on where you tell us to redirect them to afterwards, but yes, that seems like an option.

jovial sierra
#

But the stripe elements don't rely on some global singleton where doing this is going to suffer some major weirdness?

peak trail
#

Depends on how you manage your instances of stripe on your page, and whether you try to create two distinct instances or not. You also may struggle with saving/retrieving state when you go back to the payment page.

#

It's not a flow we see often, and in my test flows I've built with multiple elements they've always been with the intention of only one element actually being used at a time, so I'm not exactly sure what limitations you'll run into and those could depend on the environment/framework you're building in.

jovial sierra
#

Sounds like wandering into undefined behavior territory. Thanks! I think I'll try to not mount more than 1.