View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007440||module PayPal Checkout||module PayPal checkout - sub||public||2023-03-02 15:54||2023-03-03 15:14|
|Product Version||2.2.3 / 1.2.3|
|Target Version||Fixed in Version|
|Summary||0007440: Pending orders with oxordernr 0 are deleted before the payment process can be completed|
|Description||Pending orders with oxordernr 0 are deleted before the payment process can be completed if the customer takes longer than 10 minutes to pay.|
This is a problem, especially with Sofort, since the customer's money is then withdrawn from the account anyway. After that there is neither an order nor a receipt of payment at PayPal.
This is caused by any webhook arriving >10 minutes after the oxorderdate of the pending order. An order that has the following conditions:
oxordernr = 0
oxtransstatus = NOT_FINISHED
oxpaymenttype = %oscpaypal%
oxorderdate < Time of the webhook - 10 minutes
See WebhookHandlerBase::handle() and OrderRepository::cleanUpNotFinishedOrders().
The use of cleanUpNotFinishedOrders should be reconsidered. But at least the period of 10 minutes increased.
|Steps To Reproduce||Put some things in the shopping cart, choose sofort in the payment selection and complete the order in Oxid.|
Select your bank in the Klarna window and log in. Don't proceed at first. Leave the window open. The order exists as a pending order with order number 0 in Oxid.
Wait at least 10 minutes and place another order. Complete this further order by paying for it with PayPal, for example.
Now you could theoretically complete the payment of the first order in the Klarna window. The money would be withdrawn from the customer account, but there are no longer any orders in Oxid.
|Tags||No tags attached.|
A note on reproducing the bug:
After the second order has been paid, you have to wait for the webhook requests to arrive.
Actually, on PAYMENT.CAPTURE.COMPLETED.
For CHECKOUT.ORDER.APPROVED there is an override of the method handle() in which cleanUpNotFinishedOrders() is not called.