- πΊπΈUnited States TomTech
Automatically closed because Drupal 7 security and bugfix support has ended β as of 5 January 2025. If the issue verifiably applies β to later versions, please reopen with details and update the version.
Hi,
I've been in a very strange issue for these months. Some orders were move from 'Pending' status to checkout_review if the payment has the error "Duplicated payment", but not always.. After 1 day, all checkout_review orders are purged as is not a completed|pending state. We usually have ~60k/65k orders per year and we had aproximately 30 issues like this (we was able to identify, maybe more).
The issue happens when a customer tries to pay 2 times the same order without any ACK in Paypal. The transaction is identified as Duplicated Payment and it, automatically, changes wrongly the status to checkout review.
It happens when the webpage is slow and the payment process is slow/enqueued or similar. The user refresh the paypal page, click in pay again and a second request goes to the backend. All payments are processed and the latest one changes the status to checkout_review. The second request changes the status from pending to checkout review within the next minute. So the window is
It was hard but I was able to reproduce it and here are the steps:
1. Go through a cart until checkout review.
2. Select the Paypal Express Checkout payment method.
3. Complete the payment and let the page redirects you to paypal.
Then it comes the tricky thing to be able to reproduce it as many times as needed. We need to manually "slow down the page" at a certain point.
4. Duplicate the paypal page tab.
5. Enable xdebug and add a breakpoint at commerce_paypal_ec.module:821.
Line> if (!commerce_paypal_ec_do_payment($payment_method, $order, $charge)) {
6. Proceed with the payment in tab #1 and let the page reach the breakpoint.
7. Proceed with the payment in tab #2 and let the page reach the breakpoint.
8. Release the breakpoint of request #1 and check the order is in status 'pending' (or any other completed/pending status)
9. Release the breakpoint of request #2 and check the order
moves to status checkout review β
because the previous page
was review β
.
10. The order goes automatically to the checkout/order-id/review page
with an error β
.
That's obviously not the way the error appears, but that's the way I was able to identify and reproduce this strange issue.
Closed: outdated
2.0
PayPal EC
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed because Drupal 7 security and bugfix support has ended β as of 5 January 2025. If the issue verifiably applies β to later versions, please reopen with details and update the version.