-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Error refunding order items #873
Comments
Thanks for the report. The root problem here is that the data model is not ideal on this point: it would be better to have a many-to-many relation from OrderItem <-> Refund. However, I'm not going to change the data model now since I don't want to introduce a breaking change at this stage. I think a workable solution can be implement on the current model:
|
Ok, I think a similar problem is happening with multiple payments now. If someone purchases an item with 2 or more payment methods and we need to refund the order, Method # 1 will be refunded but we will not be able to refund Method # 2. |
The refund system is supposed to be able to deal with multiple payments (see the e2e test here), but it's a very complex area of the code base so there could be a bug there perhaps. If you are able to reliably reproduce the issue you describe, please open an separate issue for that. edit: I did identify an issue with the Admin UI which does not allow refunds more than the selected Payment amount. This is an artificial constraint since the server will start by refunding that payment, and then if the refund total is not covered it will attempt to refund against any remaining Payments. I will fix this as part of the work I'm doing on this issue. |
This was a really meaty issue to fix! I did indeed find issues with the implementation of refunds when there are multiple Payments on an Order. I added some more e2e tests for these. |
Describe the bug
When I try to refund an order with the admin ui and the refund fails, I can’t try to refund again (checkboxes are missing)
To Reproduce
Steps to reproduce the behavior:
refundOrder
, you will have anAlreadyRefundedError
. If I apply this fix I have aQuantityTooGreatError
Expected behavior
Be able to relaunch a refundOrder mutation if the first one fails.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: