Skip to content

Fix #3372 by adding digital goods rounding item #3373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

luzat
Copy link

@luzat luzat commented May 9, 2025

Rounding differences were previously added as physical goods, which changed the properties of the cart. Now, if the cart does not contain physical items, the extra line item will be added as a digital goods item.

Issue: #3372


Description

Rounding differences can change the basket to contain physical goods and lead to additional errors such as order failure. This PR add the extra line item for rounding errors as a digital goods item by default, except if there are already some physical goods in the basket.

It may be viable to always add the rounding difference as a digital goods item, but I decided to change as little as possible compared to the current handling.

Steps to Test

  1. Create an order with only digital goods which introduces rounding differences (I guess because PayPal is receiving net values; here, this happens with a VAT of 19% and two items of 9.50 gross value each).
  2. An extra_line item Subtotal mismatch will be added by default by PurchaseUnitSanitizer. This item is now a digital product.
  3. Redo step 1 with at least some physical goods.
  4. A physical goods extra_line item Subtotal mismatch will be added by default by PurchaseUnitSanitizer.

Changelog Entry

Fix - Rounding items are digital goods unless the basket contains physical goods #3372

Rounding differences were previously added as physical goods, which changed the properties of the
cart. Now, if the cart does not contain physical items, the extra line item will be added as a
digital goods item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant