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

Purchase Button Stuck on "Loading" After Returning from Payment Page Without Completion #3014

Closed
Naman-B-Parlecha opened this issue Oct 12, 2024 · 6 comments

Comments

@Naman-B-Parlecha
Copy link
Contributor

Naman-B-Parlecha commented Oct 12, 2024

When a user clicks the "Purchase" button, they are correctly redirected to the payment page. However, if the user decides not to complete the payment and returns to the previous page (by pressing the back button), the "Purchase" button remains in a "loading" state, rather than resetting to its original "Purchase" state.

Shepherd.Guide.your.users.through.a.tour.of.your.app.-.Google.Chrome.2024-10-12.13-14-12.mp4

Steps to Reproduce:

Navigate to the Pricing page.
Click the "Purchase" button.
On the payment page, do not proceed with the payment.
Return to the previous page (either using the browser's back button or any other method).
Expected Behavior: The "Purchase" button should reset to its normal state, allowing the user to attempt the purchase again.

Actual Behavior: The "Purchase" button remains stuck in a "loading" state, preventing further interaction without refreshing the page.

Impact: This issue may confuse users, as they may assume the transaction is still in progress or that the button is broken, potentially leading to a poor user experience.

Suggested Fix: Ensure the "Purchase" button state is reset to its default state when returning from the Stripe payment page without completing the transaction.

pinging an admin @RobbieTheWagner

@RobbieTheWagner
Copy link
Member

@chuckcarpenter do we control loading state here or is it automatic from Polar?

@Naman-B-Parlecha
Copy link
Contributor Author

This is not a polar issue we are handling the state in the FE but changing state only if error occurs and not when a users returns back from payments page

So it's better to handle the state change before sending the users to payments page

@RobbieTheWagner
Copy link
Member

@Naman-B-Parlecha it sounds like you have a handle on the issue. Would you be interested in opening a PR?

@Naman-B-Parlecha
Copy link
Contributor Author

@RobbieTheWagner absolutely! the pr is awaiting your review #3015

@chuckcarpenter
Copy link
Member

@Naman-B-Parlecha I'm checking it out now, good catch!

@chuckcarpenter
Copy link
Member

closed by #3015

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

3 participants