Open BezV8 opened 6 years ago
Having this issue on 2.3.0 for all orders
Can confirm the problem for 2.3.1 on all Paypal orders.
Can confirm the problem for 2.3.1 on all Paypal orders.
As it turned out for us, the problem was not in the Magento code. We have a custom payment method with an observer listening to the sales_order_payment_save_before event. In the observer we Injected an instance of Magento\Webapi\Controller\Rest\InputParamsResolver and called its resolve method without checking if the route name is empty. If the route name is not empty this causes an exception, because the route could not be found, but this exception was somehow not logged. We added an additional check for a non-empty route name and now the Paypal problem doesn't occur anymore. Hope this might be helpful for someone having a similar problem.
Having same issue in 2.3.2
Same here in 2.3.2, is there anyone working on this @magento-engcom-team as this is also affecting the payflo pro as well.
Hi all,
Magento support have highlighted the following as fixing this issue.. 547f453
@magento-engcom-team what release line is this going to be tagged in please?
@craigcarnell did this work for you?
@magento-team Any update on this issue?
So far no solution here. In the mean time had to disable PayPal express, and offer only credit card payments, store- configuration- sales- payment method / payment pro- configure / PayPal express checkout-Advance Setting) Payment applicable from specific countries, and no countries selected.
@shauldover does this only affect Paypal Express or all forms of paypal (e/g credit cards on your site via payflow/payments pro)? Due to the nature of the issue (DB deadlocks) it would surprise me if this issue is specific to any payment method.
@djamps Only PayPal Express. Credit card through payflow working fine.
Same issue here confirmed on 2.2.8
Any updates?
I'm having the same issue in Magento 2.3.2 using PayPal Standard. PayPal is sending client notifications that " Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:"
im migrating all my magento client from magento. this platform is ridiculously poor and a money pit of a platform. Good luck!
We haven't gotten a DB deadlock on orders in over a month since doing two things (not sure which is more affective).
We still get an occational deadlock on the cron process but this is small potatos compared to orders failing. I recommend the following module to help in some of these cases:
https://github.com/cadencelabs/magento2-deadlockRetry
However, we still have get occasional uncaptured/missing paypal express orders (wrong order ID in log, ect). With no evidence of deadlock, it turns out these are all international orders and the failure is triggered by a missing state/province in the customer's paypal account.
Does anyone have any solution to fix this error?
Apparently not.
This issue comes from your third-party module.
Kindly re-check all your module which customized the order flow.
I fixed it with condition check Order Object in Observer.
if ( $order )
The solution is to store guest data in a timely manner: module-checkout/Model/GuestPaymentInformationManagement.php public function savePaymentInformation( $cartId, $email, \Magento\Quote\Api\Data\PaymentInterface $paymentMethod, \Magento\Quote\Api\Data\AddressInterface $billingAddress = null ) { $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); /* @var Quote $quote / $quote = $this->cartRepository->getActive($quoteIdMask->getQuoteId());
if ($billingAddress) { $billingAddress->setEmail($email); $quote->removeAddress($quote->getBillingAddress()->getId()); $quote->setBillingAddress($billingAddress); $quote->setCustomerEmail($email); $quote->setDataChanges(true);
} else { $quote->getBillingAddress()->setEmail($email); } $this->cartRepository->save($quote); $this->limitShippingCarrier($quote); $this->cartRepository->save($quote);
$this->paymentMethodManagement->set($cartId, $paymentMethod); return true;
}
I think this would be the correct patch for 2.3.0 (all credits to @olgaiskra):
--- clean/GuestPaymentInformationManagement.php 2019-09-20 14:25:56.696734848 +0200
+++ new/GuestPaymentInformationManagement.php 2019-09-23 08:48:37.286939940 +0200
@@ -137,6 +137,7 @@
\Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
\Magento\Quote\Api\Data\AddressInterface $billingAddress = null
) {
+ //O Romanovskaja Agenda 20.09.2019 changed for Pay Pal Guest working
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
/** @var Quote $quote */
$quote = $this->cartRepository->getActive($quoteIdMask->getQuoteId());
@@ -145,12 +146,14 @@
$billingAddress->setEmail($email);
$quote->removeAddress($quote->getBillingAddress()->getId());
$quote->setBillingAddress($billingAddress);
+ $quote->setCustomerEmail($email);
$quote->setDataChanges(true);
} else {
$quote->getBillingAddress()->setEmail($email);
}
$this->limitShippingCarrier($quote);
-
+ $this->cartRepository->save($quote);
+
$this->paymentMethodManagement->set($cartId, $paymentMethod);
return true;
}
Hi,
Has anyone found the solution for this issue?
Thanks
If this issue is severe enough for developers to create extensions to mitigate the effects, why hasn't this been resolved? Very frustrating.
yes, this is a painful one. I also facing it on a 2.3.3 version.
Seeing this on multiple installations of Magento 2.3.3. Tried all the above fixes an none of them appear to fix the issue.
Problem also exists on Magento 2.3.2. error... main.CRITICAL: The "10000003523" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"10000003523\" order ID is incorrect. Verify the ID and try again. at /home/xxx/public_html/vendor/magento/module-paypal/Model/Ipn.php:143)"} []
Problem also exists on Magento 2.3.2. error... main.CRITICAL: The "10000003523" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The "10000003523" order ID is incorrect. Verify the ID and try again. at /home/xxx/public_html/vendor/magento/module-paypal/Model/Ipn.php:143)"} []
Exactly the same issue on our Magento 2.3.1 instance. It seems to happen randomly.
Found out that if any module intercepts this method
\Magento\Sales\Model\Order\Payment\State\CommandInterface::execute
and when that plugin failed then order is not placed in magento.
What interesting that, $order->getId()
in that method returns null
that's why some 3rd extensions can fail can cause this issue.
For some reason 3rd module can intercept any of this class instead of the interface
\Magento\Sales\Model\Order\Payment\State\RegisterCaptureNotificationCommand
\Magento\Sales\Model\Order\Payment\State\AuthorizeCommand
\Magento\Sales\Model\Order\Payment\State\CaptureCommand
\Magento\Sales\Model\Order\Payment\State\OrderCommand
UPD: you can try to restore those orders based on saved quotes for them if there enough data, here is SQL
SELECT DISTINCT quote.entity_id as quote_id, reserved_order_id, quote.store_id as store_id, quote.created_at, ord.entity_id
FROM quote
inner join quote_item item on quote.entity_id = item.quote_id and quote.reserved_order_id IS NOT NULL
inner join quote_payment payment on quote.entity_id = payment.quote_id and payment.method = 'paypal_express' and
payment.additional_information like '%paypal_express_checkout_token%'
left join sales_order as ord on ord.quote_id = quote.entity_id
where ord.entity_id is null;
can be related ? https://github.com/magento/magento2/issues/25862
Although that previously we thought it is only related to PayPal Express payment only and we disabled it, it it showing now also on credit card payment (PayPal pro). not on every order. Anyone got possible fix?
Everything we've done so far which have eliminated deadlocks occuring during orders and greatly reduced deadlocks overall:
In Magento: Asynchronous grid = on Flat products and categories = on Async indexing = on Production mode enabled always Install Cadence_DeadlockRetry
In my.cnf transaction-isolation = READ-COMMITTED (along with other optimizations)
Beef up your server's CPU and disk speed (IOPS) as much as possible. This is very important, even for low traffic sites. Fast SSD's on dedicated hardware/instances are a must.
Switched to authorize.net for CC orders (mainly due to double auth fees with the payflow integration) - see https://github.com/magento/magento2/issues/6542 - no more missing CC orders either.
At this point we aren't seeing any order related mysql deadlocks, but we are still seeing very occasional "wrong order ID" in the system log and a corresponding missing paypal order. What gives?
We determined this remaining issue is poor CURL error handling in the payflow module. A VERY occasional connection issue with paypal with no attempt to retry and no traceback thrown. If this happens during order processing after the first API call (several API calls are made) you are left with a missing/incomplete order. You'll have a payment, a quote with valid order ID, but no corresponding order.
We wrote a command line module to programatically complete these orders. We could even take it one step further and grep the exception log for "Wrong order ID: "$n" and automate it.
Ideally, there should at least be N retries when CURL exceptions occur (similar to what the Cadence_DeadlockRetry module does for mysql deadlocks). We briefly attempted this but found magento's payflow integration too dense and co-dependant with other core modules to override completely.
;TLDR
This entire issue has at least two causes. MySQL deadlocks which are a way of life with magento, and poor exception handling in the payflow module. Neither of these issues are trivial to expose in testing, so the devs are not going to spend time with this.
The payflow integration in it's current state across all magento2 versions is a steaming pile. Switch to something else for payments (at least for CC's), if you can.
Hi @djamps Would you mind sharing your command line module to complete the missing orders? Would be greatly appreciated!
We wrote a command line module to programatically complete these orders. We could even take it one step further and grep the exception log for "Wrong order ID: "$n" and automate it.
Hey So I use 2.3.5-p1 and something like this happens. I just can't understand one thing, I use massiveGRID so I easily do a environment clone, change the url and it's working as a test one. The curious thing is that in live site this happens, all the info appears in quote tables but the order itself is not created at all, but, in the clone environment all works fine. So I thought of 2 option or it was cloudflare or all the customers online that gives more load. With this I paused cloudflare, all kept the same, no order at all and the error. With the customers idk what to do, I installed Cadence_DeadlockRetry to see if it helped but no luck. I'm not sure if here it's the same cause but the errors surely is.
Anyone got news on this?
Thanks
In my case, after some hours debug and check files debug.log, exception.log, payment.log, I found the issue is Numeric value out of range: 167 Out of range value for column 'sequence_value' at row 1, query was: INSERT INTO
sequence_invoice_1() VALUES ()
Then I go to table sequence_invoice_1 and have changed type of "sequence_value" from int(10) to bigint(20). Now, it works fine.
Our customer have a lot order migration from Magento 1 to Magento 2. That is an issue. Hope it can help someone.
Alothemes - Happy Coding!
We have just had the issue on 2.3.5-p2:
[2020-11-12 12:35:51] main.CRITICAL: The "1000426282" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426282\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:36:05] main.CRITICAL: The "1000426282" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426282\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:36:26] main.CRITICAL: The "1000426282" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426282\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:37:08] main.CRITICAL: The "1000426282" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426282\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:38:30] main.CRITICAL: The "1000426282" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426282\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:38:31] main.CRITICAL: The "1000426283" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426283\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:38:33] main.CRITICAL: The "1000426283" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426283\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:39:44] main.CRITICAL: The "1000426283" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426283\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:40:36] main.CRITICAL: The "1000426284" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426284\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:40:38] main.CRITICAL: The "1000426284" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426284\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:40:49] main.CRITICAL: The "1000426284" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426284\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:41:06] main.CRITICAL: The "1000426283" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426283\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:41:12] main.CRITICAL: The "1000426284" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426284\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
[2020-11-12 12:41:54] main.CRITICAL: The "1000426284" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"1000426284\" order ID is incorrect. Verify the ID and try again. at /vendor/magento/module-paypal/Model/Ipn.php:146)"} []
Did anyone ever find out why this is happening? Am getting this randomly, not very often on 2.3 as well.
Replicating on 2.3.5 - "The "xxxxxxxxxxx" order ID is incorrect. Verify the ID and try again."
HI @magento-devops WE have faced the same issue in 2.3.1 EE, we are planning to upgrade to 2.4.2 EE does this fixed in 2.4.2 ?
I got the same issue on 2.4.2, anyone know how to fix it?
I have confirmed that this is happening on Magento 2.3.7!
HI @magento-devops WE have faced the same issue in 2.3.1 EE, we are planning to upgrade to 2.4.2 EE does this fixed in 2.4.2 ?
Please see my long post above, this is an issue across all versions, and it has certainly not been fixed. The same crappy payflow module without proper exception handling exists to this day.
And its certainly not going to be, anytime soon.
On Mon, Jul 12, 2021, 18:32 djamps @.***> wrote:
HI @magento-devops https://github.com/magento-devops WE have faced the same issue in 2.3.1 EE, we are planning to upgrade to 2.4.2 EE does this fixed in 2.4.2 ?
Please see my long post above, this is an issue across all versions, and it has certainly not been fixed.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/15427#issuecomment-878423109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7X6ICFORSJNYVR576FUGTTXMKLDANCNFSM4FBCO2JQ .
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x
, ^Area:.*
Once all required labels are present, please add Issue: Confirmed
label again.
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x
, ^Area:.*
Once all required labels are present, please add Issue: Confirmed
label again.
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-991 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
It even happening in Magento 2.4.3.
Getting an average of 1 per day per site of these errors on 2.3.5-p2. So no one has any sort of a solution? Customers are seeing the erros "Something wrong. Please try again" when click on "Place Order":
[2021-09-23 15:47:30] main.CRITICAL: Placing an order with quote_id 17ephb7mJnLdfcnwpvPzqkHGoRFd3mpc is failed: Something wrong. Please try again. [] []
Having the same issue on Magento 2.3.6.
The issue is ALWAYS happening with two of 50 "Virtual Proucts" (Downloads). I tried deleting the products, but even if I delete the products and create a new one, it is happening on every order.
Paypal IPN fails and is sending an email with a notice "Instant Payment deactivated" to the customer.
[2021-10-13 12:59:08] main.CRITICAL: The "000007083" order ID is incorrect. Verify the ID and try again. {"exception":"[object] (Exception(code: 0): The \"000007083\" order ID is incorrect. Verify the ID and try again. at /var/www/html/vendor/magento/module-paypal/Model/Ipn.php:147)"} []
bump :)
same issue on 2.4.3-p1
Having the same issue on the latest Magento version 2.4.5-p1. I recently upgraded magento from 2.4.1 to 2.4.5-p1, and made some test orders, then the issue happened occasionally. Unfortunately I can not reproduce it, but I can provide some details for solving this problem. The system log as following:
Magento system is writing the same error for the order ID 000000434 again and again, but actually it has created the order ID 000000435 for this transaction. In my papal account, the order ID for the transaction is 000000434, magento 000000435 for the same transaction number instead. So the problem is that order ids in magento and paypal for the transaction should be same, but different instead. I think wrong order ID passed to paypal system, then it sends the IPN with wrong order ID again and again. At the same time, the issue seems be related to the paypal express review step, when you make the payment using paypal express checkout on product or shopping cart page, you login your paypal account, click continue, it should be redirected to the paypal/express/review page, but for the order with this error, I remember, the order was placed directly, your are redirected to the suscess page without review step, and the shopping cart was not cleared after purchase. Since I'm not a professional programmer, hope this will help for the issue.
When using paypal express integration as the payment method on Magento 2.2.2 a small number of orders fail after the payment has been taken by paypal. No order is registered in Magento, but paypal takes payment and sends a confirmation to both customer and store owner.
Looking in the logs the error which seems to be associated with these orders failing is:
main.CRITICAL: Wrong order ID: "000000222". {"exception":"[object] (Exception(code: 0): Wrong order ID: \"000000222\". at .../vendor/magento/module-paypal/Model/Ipn.php:140)"}
Preconditions
Steps to reproduce
Expected result
Actual result