- Issue created by @mohammad-fayoumi
- @mohammad-fayoumi opened merge request.
- @mohammad-fayoumi opened merge request.
- @mohammad-fayoumi opened merge request.
- 🇮🇱Israel jsacksick
Ok so 8.x-2.x is no longer maintained, we just need an MR for 3.x.
Additionally, the checkout flow plugin now has asetOrder()
method that we could use here without the need to interfere with the route match I believe, unless some other code is relying on it?So we could update the code to look like the following:
$checkout_flow_plugin = $checkout_flow->getPlugin(); $checkout_flow_plugin->setOrder($order);
Technically the payment plugins shouldn't rely on the route match parameters from the onCancel() method as the order is passed there?
- 🇮🇱Israel jsacksick
I did implement the change proposed, See https://git.drupalcode.org/project/commerce/-/merge_requests/485/diffs?c....
Since we're making this change in
cancelPage()
, I wonder if we should do the same fromreturnPage()
(i.e. set the order on the checkout flow plugin rather than messing with the route match parameters but a bit more hesitant to change this). - 🇮🇱Israel jsacksick
The change from the commit linked in #8 introduced PHPSTAN issues. Slightly adapted the change, See: https://git.drupalcode.org/project/commerce/-/merge_requests/485/diffs?c...
- 🇮🇱Israel jsacksick
I actually decided to rewrite
returnPage()
as well for consistency.
Plugins using the route match rather than the passed order should be rewritten. But I don't believe this is the case, I think the OrderVersionMismatchException was thrown due to the checkout step redirection login from the checkout flow plugin which was always using the order from the route match. Using the setter, the order is set afresh after loading it via loadForUpdate(). -
jsacksick →
committed b8bac82c on 3.x authored by
mohammad-fayoumi →
[#3539545] fix: Fix OrderVersionMismatchException When Canceling Payment...
-
jsacksick →
committed b8bac82c on 3.x authored by
mohammad-fayoumi →