-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
PayPal Express payments fail as tries to remove stock twice #6296
Comments
For anyone using PayPal this is a show-stopper. |
For now, I've disabled saving quote items once they are in an inactive quote. This seems like a non-optimal solution, but as a hack it does the job - PayPal Express orders can go through now without throwing an error, redirecting to the review step and putting incorrect stock back into the inventory. I've added a plugin for \Magento\Quote\Model\Quote\Item\CartItemPersister containing:
|
@asemenenko Can you check into this one from the PayPal side and assign to another team if the issue relates to inventory? |
Just a side note : PayPal Express seem to be processing most things twice. I was working on a module that apply additional fees to checkout total and when checking out using paypal the fee was applying twice. I track it down to |
Hi @maderlock, thanks for reporting. I've linked this issue to internal ticket MAGETWO-58676. |
Hi, not sure what the progress on this is, but here is my take. Using Magento EE 2.1.0 Have been affected by this as well and tracked it down on our project to the "Skip Order Review Step" function with Paypal Express. If enabled, this occurs:
Our current solution is having an override on the
This works because the repository unsets it's internal variables after saving a quote, so calling I think a possible solution is that there should be a way of clearing |
@phirunson, thank you for your investigation. The internal ticket is still opened. Link to your solution has been attached to the ticket. I will leave comments as soon as there is progress on the issue. |
Hi, Is it possible that this issue it not only with PayPal Express. I'm getting the same problem with other payments method not integrated by default in Magento. |
Thanks @phirunson I was able to fix the issue in Magento CE 2.1.1 as follows:
|
Any progress on MAGETWO-58676? |
@maderlock, no, so far. I'll notice you about any changes of an issue state. |
I can confirm this bug in Magento CE 2.1.3. This bug is critical and it was reported at Aug '16, 6 months ago... Thanks to @phirunson I could fix the bug. |
@sjovanig, it is fixed in the development branch and going to be ported to Magento CE 2.1.x right after delivering to mainline. |
Facing this issue in 2.1.4 |
Hi @maderlock Fix for MAGETWO-58676 is merged to develop branch, closing the issue. |
This is closed in February and still present at 2.1.7 - wow. Paypal is useless with this bug. I am not shure how PayPal as your partner will react on a major bug like this. For us goodby PayPal for now as magento team does not solve this since month. |
Fixed in 2.1.8. (but do a couple of tests before upgrading: #10499 ) |
@ebaschiera @andidhouse #10499 does not seem to be easily reproducible on clean Magento 2 installation. Having affected shop instance in your hand it should be not too hard to locate the buggy code with xdebug. @andidhouse "full of bugs" sounds a bit harsh. I saw the problem with indexing performance degradation, but what do you mean by "bugs regarding updating"? |
I really wonder sometimes why you guys test on a clean install only? Here are only some bugs reported - if you search here on GitHub i am shure to find 10+ more. Is is really that hard to make it more stable and test more before launching a new version? |
I've checked links up to #10561 and looks like this is just a list of random bugs without any analysis. #10586 - people saw such errors before By "clean install" not the 2.1.8 installation from scratch is usually meant but any installation without third-party modules. For example, if you get clean 2.1.7 with official sample data and then upgrade it to 2.1.8 revealing some problem, it's a valid bug scenario. |
[Arrows] MC-38680: [2.3] Submitting invalid create account form leaves the submit button disabled
Preconditions
Steps to reproduce
Expected result
Actual result
Purchasing for an amount less than half works. Also, going to paypal express directly from the cart works. This is just for the checkout payment method.
From stepping through the code, it seems that after placing the order the quote is saved. On this save, all products are re-added to the cart. As the qty has already been removed from stock, this fails and an exception is thrown that there is not enough of the product. Although this isn't logged anywhere, on \Magento\Quote\Model\Quote line 1628 the exception is thrown along the lines of "Not enough stock for product blah". Thus, any qty that is more than 1/2 the remaining stock fails.
It then returns twice the stock back, so that the stock ends up too high. In some ways this is even more of a problem than PayPal failing, as we have a client that now has to do a whole new stock take!
I'm struggling to follow the code that is being run here. Why are all the products added to the quote again? Why are the buyRequests objects rather than the bare qtys that seem to exist when run at other times? Why is reset_count set on the request when the condition on \Magento\Quote\Model\Quote\Item\Processor::process never seems to fire?
The text was updated successfully, but these errors were encountered: