View Issue Details

IDProjectCategoryView StatusLast Update
0007440module PayPal Checkoutmodule PayPal checkout - subpublic2023-03-03 15:14
Status acknowledgedResolutionopen 
Product Version2.2.3 / 1.2.3 
Target VersionFixed in Version 
Summary0007440: Pending orders with oxordernr 0 are deleted before the payment process can be completed
DescriptionPending 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 ReproducePut 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.
TagsNo tags attached.



2023-03-03 09:51

reporter   ~0015072

A note on reproducing the bug:

After the second order has been paid, you have to wait for the webhook requests to arrive.
For CHECKOUT.ORDER.APPROVED there is an override of the method handle() in which cleanUpNotFinishedOrders() is not called.