The amount to be paid is different from the total price calculated

Created on 28 June 2023, over 1 year ago

Problem/Motivation

Adjustments and total prices are calculated incorrectly which results in different prices between Simplepay and Drupal.

note: When sending "items", "total" key will be ignored.

Steps to reproduce

1. Create products where the unit price is not a whole number
2. Add adjustments to the order item (for example promotions, possibly percentage)
3. Add adjustments to the order itself
4. Check out and choose Simplepay payment
5. The order total price is not equal to which displayed on Simplepay UI.

Proposed resolution

Apply this patch for commerce products: https://www.drupal.org/project/commerce/issues/3370432 🐛 OrderItem total price rounding issue Closed: won't fix

Modify the calculation and rounding mechanism during constructing the payment request object.

Remaining tasks

Review the changes.

User interface changes

none.

API changes

none.

Data model changes

none.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024