-
-
Notifications
You must be signed in to change notification settings - Fork 717
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
Not possible anymore to manually capture a payment on production on some edge cases #3562
Comments
I ran the following on the OFF production server: tail -n 10000 log/production.log | grep PaymentsController\#fire --after-context 150 --before-context 10 And spotted the following:
Still investigating. |
yeah, I recognise this code. I removed it for v2! I am not sure if, at the time, I checked if it was a bug in v1 as well... this is the explanation: UPDATE: this means this bug will most probably not happen in v2 |
I read the v1 code now and I dont see where payment.inventory_units could come from... but it's weird this was not seen before... but it all depends on how calculator.line_items_for is called. maybe order.line_items is called instead of payment.line_items for most cases... |
Can we just revert the payment decorator for now to fix it? |
My change/fix is in v2 Maikel, this bug is for v1. I just shared the context of my change in v2 because it's the same line of code, but in v2. |
This happens with a particular sequence of order sequence of order creation, payment creation, and order completion when the payment method uses an order-based calculator (e.g. "Flat Percent"). Actually, I wasn't able to reproduce this from the UI using the usual checkout flow nor from the admin section. But there is a code path for this. Already working on a PR. |
Ok as it seems to be an edge case I suggest to reclass this bug as s3 bug. If this is fixed in v2 maybe we can wait then and retest after v2. I have a case that we know for sure is bugging in French production, order number # R476265115 if you want to check if same issue or not. |
@kristinalim I would suggest you don't spend too much time on this now as we understand from your first spike on it it is only concerning some edge case... Don't hesitate in those kind of bug, if when spiking you realise it might not be s2 as only concerning few specific rare cases, to review the severity ;-) |
I added the network info in the main post. |
@myriamboure I found an obvious bug in the code that could cause this, but didn't know how to get there through the UI. There is already a quick fix PR #3563 for this earlier today, and it's already in Test Ready. (@RachL In case you have time to validate. 😁) BUT I confirmed just now that adding (not capturing) a payment to a completed order fails with the same error. I'll just update the testing notes to also test adding a payment. |
Description
From general order page, or if I'm in edit mode of a specific order, when I click on "capture payment", I got the snail page.
Expected Behavior
I can capture a payment so the order is marked as paid.
Actual Behaviour
It's not
Steps to Reproduce
Animated Gif/Screenshot
Context
On French production, was documenting how to manage refunds on OFN in the user guide...
Severity
S2
Your Environment
The text was updated successfully, but these errors were encountered: