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
Describe the bug
When a users adds a coupon code to cart, which also applies a discount to shipping costs, he gets thrown back to cart view with an exception:
[2023-05-12T10:17:22+0000] Error executing API call (422: Unprocessable Entity): The amount of the order does not match the total amount from the order lines. Expected order amount to be €250.86 but got €247.36. Field: amount. Documentation: Handling errors — API documentation — Mollie
Used versions
Magento 2.4.5.-p1:
Open source:
Mollie version number 2.25.0:
To Reproduce
Pre-conditions:
Active cart price rule with specificed coupon code which gives a discount (e.g. 10% discount) and applies also to shipping amount (= toggle: Apply to Shipping Amount = yes)
Steps to reproduce the behavior:
As a user go to your store front, put any products to your cart
Proceed to cart view / checkout
Apply your coupon code
Try to checkout and place your order
Expected behavior
Order is placed, user is on order success page
Actual behavior
Order is not placed, user is redirected back to cart, exception is thrown and displayed
[2023-05-12T10:17:22+0000] Error executing API call (422: Unprocessable Entity): The amount of the order does not match the total amount from the order lines. Expected order amount to be €250.86 but got €247.36. Field: amount. Documentation: Handling errors — API documentation — Mollie
Screenshots
Additional context
Issue is related to improper applying discount from coupon code to shipping costs, when using Mollie payment.
Mollie module is not checking if any discount has been applied to shipping costs in Magento, so the calculations does not match each others: \Mollie\Payment\Service\Order\Lines\Order::getShippingOrderLine
If the exact same cart price rule (Pre-conditions above) does not apply discount to shipping costs there is no exception and user can place its order (= toggle: Apply to Shipping Amount = no)
The text was updated successfully, but these errors were encountered:
Hello there, @your-favorite-pm! It appears that I'm unable to replicate this problem in our test environments. Could you kindly reach out to us directly so that we can investigate it together? It's possible that there might be other plugins interfering with this calculation, as it seems to be functioning correctly on a default Magento setup. Thank you!
Frank-Magmodules
changed the title
Order amount does not match when applying discount from coupon codes to shipping costs
[ISSUE] Order amount does not match when applying discount from coupon codes to shipping costs
May 26, 2023
Hello there @your-favorite-pm! We've been in touch via email, but I wanted to confirm here as well that we've just released plugin version 2.27.0, which addresses the issue you reported. Thank you once again for reaching out to us directly and for your patience. I will close this issue for now since it has been resolved, but please feel free to reopen it if you encounter any further problems related to this matter.
Describe the bug
When a users adds a coupon code to cart, which also applies a discount to shipping costs, he gets thrown back to cart view with an exception:
[2023-05-12T10:17:22+0000] Error executing API call (422: Unprocessable Entity): The amount of the order does not match the total amount from the order lines. Expected order amount to be €250.86 but got €247.36. Field: amount. Documentation: Handling errors — API documentation — Mollie
Used versions
To Reproduce
Pre-conditions:
Active cart price rule with specificed coupon code which gives a discount (e.g. 10% discount) and applies also to shipping amount (= toggle: Apply to Shipping Amount = yes)
Steps to reproduce the behavior:
Expected behavior
Order is placed, user is on order success page
Actual behavior
Order is not placed, user is redirected back to cart, exception is thrown and displayed
[2023-05-12T10:17:22+0000] Error executing API call (422: Unprocessable Entity): The amount of the order does not match the total amount from the order lines. Expected order amount to be €250.86 but got €247.36. Field: amount. Documentation: Handling errors — API documentation — Mollie
Screenshots
Additional context
Issue is related to improper applying discount from coupon code to shipping costs, when using Mollie payment.
Mollie module is not checking if any discount has been applied to shipping costs in Magento, so the calculations does not match each others:
\Mollie\Payment\Service\Order\Lines\Order::getShippingOrderLine
If the exact same cart price rule (Pre-conditions above) does not apply discount to shipping costs there is no exception and user can place its order (= toggle: Apply to Shipping Amount = no)
The text was updated successfully, but these errors were encountered: