1

In a current project we need more complex logic to determine when to set the VAT to 0%, so we do this with an adjuster added through a module.

We are using the exact method described on https://craftcms.com/docs/commerce/3.x/extend/adjusters.html#replacing-an-adjuster (The only differences are that we use some business logic to decide when the adjuster is relevant, and that our adjuster applies to the Tax of the whole order, so we don't set a line item)

This used to work, but since a recent update (Commerce 3.2.7 to 3.4.15), we always get an error when this adjuster if applied when the user submits to the 'commerce/payments/pay' action. The error is 'Something changed with the order before payment, please review your order and submit payment again.'

When the adjuster is not used, payment proceeds as normal.

If I check the code, it seems that this happens because of the 'if($totalPriceChanged' check in the PaymentsController class.

Have there been recent changes to the order validation that mean we need to approach this differently, or is there something else that I am missing?

Thanks!

1 Answer 1

1

having the same issue (also commerce 3.4.15) when the lineItem's tax class gets changed via adjuster (-> no change of totalPrice tho because tax is included in product price)

solved -> error in custom function

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.