-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
"You cannot cancel this PaymentIntent because it has a status of canceled" error #64
Comments
Update: I tried the checkout flow in a private window and it seems to work, so maybe I've got some stale cookie data or something. Regardless, it would be nice if the error above is propagated to the frontend so it can be displayed. Currently nothing happens after the crash and the frontend remains "locked" until manually reloaded. |
Hi @stuffmatic, thanks for sharing this issue. I have never seen that error before payment complete, and from what you wrote it seems to be related to your specific session, so it may be hard to reproduce. FYI I fixed the very same error recently when refunding an order, see #56. The fix is still only in master, so you may want to bundle that branch until a new release is created. |
@spaghetticode Yeah, this seems to be an unlikely corner case, so I'm not too concerned about this happening. However, it would be nice if the error was passed to the frontend in the same way as other errors (payment declined etc). Currently, it seems like |
@stuffmatic what you say about the 500 error makes sense, we need to avoid that the FE interface stops being responsive under those circumstances. A simple solution that comes to my mind is we can rescue By the way, did you happen to see more instances of that error? |
@spaghetticode Nope. I saw the issue when picking up development after doing other stuff for at least a week, so I just assumed this had to do with stale session data. Haven't tried to reproduce it since. |
Closing as we have no other occurrences of this issue to discuss ATM, but free to reopen! |
I hate to comment on a closed issue, but I just ran into this error and did some investigation. I figured the issue and I wanted to share with you what is going on. When @spaghetticode Would you like me to patch it and send a pull request or is this something you prefer the Solidus team to fix? |
@jfturcot thanks for the explanation, and no worries about the closed issue, it now makes sense to reopen it. Of course, a fix would be welcome. How do you think we should proceed when the error you mentioned ( |
I will fix it this evening after I am done working, I'll send you a pull request when it's done. |
This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions. |
I've started seeing an error that I haven't seen before when trying to proceed from the payment step:
Spree::Core::GatewayError (You cannot cancel this PaymentIntent because it has a
status of canceled. Only a PaymentIntent with one of the following statuses may be
canceled: requires_payment_method, requires_capture, requires_confirmation, requires_action.):
As far as I can tell, I haven't made any changes to my code that would explain this and I'm using a test card number that I've successfully used before (4242 4242 4242 4242).
Here's the full stacktrace
I'm using solidus_stripe 4.0.0, solidus 2.10 and rails 6.0.2.2.
Any clues would be greatly appreciated.
The text was updated successfully, but these errors were encountered: