Skip to content

Refactor Mollie payment line handling for bundles#15

Open
niekvanderreest wants to merge 1 commit into
umbraco:mainfrom
niekvanderreest:main
Open

Refactor Mollie payment line handling for bundles#15
niekvanderreest wants to merge 1 commit into
umbraco:mainfrom
niekvanderreest:main

Conversation

@niekvanderreest
Copy link
Copy Markdown

This pull request updates the handling of bundle order lines in the MollieOneTimePaymentProviderV2 payment provider to ensure correct splitting and validation of bundle items when generating Mollie payment lines. The changes improve accuracy in how bundle and non-bundle order lines are processed and sent to Mollie.

This pull request directly relates to issue: umbraco/Umbraco.Commerce.Issues#836

Bundle order line processing improvements

  • Added logic to detect bundle order lines using orderLine.IsBundle, and split them so that the parent bundle and each sub-line are represented as separate Mollie payment lines with correct amounts and tax calculations.
  • For bundle parents, only their "own" amounts (excluding sub-lines) are included as a Mollie line if greater than zero, ensuring no double-counting.
  • Each bundle sub-line is added as an individual Mollie payment line, inheriting or overriding relevant values such as SKU, description, and tax rate.

Non-bundle order line handling

  • Retained and clarified the logic for non-bundle order lines, ensuring that amounts and VAT are calculated without adjustments, as required by Mollie validation.

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