Closed bolleba closed 1 year ago
Hi @bolleba ,
Thank you for opening this issue! It's a tricky one because you can't really look at the bottom status. It is sometimes pending, for PayPal
that is fine, but not for iDeal
, for example. That is why it is difficult to see whether an order has been paid or not.
I will discuss this internally to check if we can come up with a good idea on this.
Hi @bolleba ,
We are happy to share that we’ve just released the new 2.21.0 version where we covered your case.
Thank you for opening this issue and for the detailed issue report.
We are closing this issue now but please feel free to reopen the issue if this still occurs.
Describe the bug After going to the checkout, the quote of the last order is restored again if the second order is placed in less than 5 minutes after the first order.
Used versions
To Reproduce Steps to reproduce the behavior:
Expected behavior The second order is placed, and the cart is empty.
Actual behavior The second order is placed, but the items remain in the cart.
Additional context This seems to be related to the fix from https://github.com/mollie/magento2/issues/560. I added some logging into Observer/ControllerActionPredispatchCheckoutIndexIndex/RestoreQuoteOfUnsuccessfulPayment.php to debug the time difference check on line 56.
$createdAt = $this->timezone->date(new \DateTime($order->getCreatedAt()));
$now = $this->timezone->date();
$diff = $now->diff($createdAt);
This shows the following results:
$createdAt = 2022-12-05 14:58:04
$now = 2022-12-05 15:02:28
$diff = 4
-> the quote is restored because there is only a difference of 4 minutesSo when a customer places a new order within 5 minutes of his last order, the quote gets restored.