You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In scenarios where an order has multiple transactions (e.g. changing payment method after order), the computed paymentMethods in useOrderDetails and useOrderPayment often reference the wrong method. The implementations on which order transaction is considered relevant are inconsistent with the Shopware business logic and standard TWIG storefront.
Expected Behavior
The computed transaction / payment method should be relevant and consistent with Shopware.
Steps To Reproduce
Create an order with payment method A, don't complete payment
Switch payment method to method B with orderSetPayment post /order/payment
Disable payment method A in Shopware Shop Settings
Result in Frontends:
paymentMethod from useOrderDetails is method A
activeTransaction and paymentMethod from useOrderPayment is null
Visible payment method in TWIG storefront: method B
Is there an existing issue for this?
Current Behavior
In scenarios where an order has multiple transactions (e.g. changing payment method after order), the computed
paymentMethod
s inuseOrderDetails
anduseOrderPayment
often reference the wrong method. The implementations on which order transaction is considered relevant are inconsistent with the Shopware business logic and standard TWIG storefront.Expected Behavior
The computed transaction / payment method should be relevant and consistent with Shopware.
Steps To Reproduce
orderSetPayment post /order/payment
Result in Frontends:
paymentMethod
fromuseOrderDetails
is method AactiveTransaction
andpaymentMethod
fromuseOrderPayment
is nullVisible payment method in TWIG storefront: method B
Environment
Anything else?
The relevant transaction for
useOrderDetails
is probably the latest one. (Seeorder.transactions|last.paymentMethod
in https://github.com/shopware/shopware/blob/trunk/src/Storefront/Resources/views/storefront/page/account/order-history/order-detail.html.twig#L93-L105, not sure how this array is sorted though)The relevant transaction for
useOrderPayment
maybe should take inspiration from https://github.com/shopware/shopware/blob/trunk/src/Core/Checkout/Payment/PaymentProcessor.php#L202-L225.Related to discussion #1443
The text was updated successfully, but these errors were encountered: