Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Payment Intents #2

Open
charliematters opened this issue Sep 29, 2022 · 1 comment
Open

Duplicate Payment Intents #2

charliematters opened this issue Sep 29, 2022 · 1 comment

Comments

@charliematters
Copy link

I've run into an issue where the redirection from /pay/index.tsx to /pay/success.tsx is causing duplicate Payment Intents.

For some reason lost in time, I decided that I would use a client-side payment submission instead of the action-based one in the repo, but it's possible that the repo will also exhibit the same behaviour.

Because both /routes/pay/index.tsx and /routes/pay/success.tsx live underneath the loader in /routes/pay.tsx, each time one of them is visited, the pay.tsx loader creates a new intent.

I solved this by moving /routes/pay/success.tsx to /routes/pay.success.tsx, and I thought it might be worth an update to the tutorial

@Cardozo1w
Copy link

Hi @charliematters, thanks for the solution, I'm not experienced using Remix, can I ask you what is the difference between as it is now and the change that you suggested? Why they are working different

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants