Adyen / adyen-salesforce-commerce-cloud

Salesforce Commerce Cloud (formerly Demandware)
MIT License
91 stars 77 forks source link

Shipping cost calculation for Paypal Express #1196

Open kubilaykiran opened 1 month ago

kubilaykiran commented 1 month ago

Describe the bug Shipping cost is sent as net even if the site has gross taxation.

To Reproduce Steps to reproduce the behavior:

  1. Go to the cart page on the site with gross taxation.
  2. Click on the Paypal Express button.
  3. Compare the shipping method prices on the Paypal popup with the storefront.
  4. See the difference

Expected behavior Shipping price should be sent as gross if the site has gross taxation.

Screenshots image

Additional context The possible root cause: https://github.com/Adyen/adyen-salesforce-commerce-cloud/pull/1134/files https://github.com/Adyen/adyen-salesforce-commerce-cloud/pull/1172/files

shanikantsingh commented 1 month ago

Hello @kubilaykiran,

For PayPal update order call we need to pass the total taxes separately. There is a validation that checks if the new amount is sum of total taxes plus delivery cost plus initial amount. So, since we have to pass the taxes separately we cannot include the shipping tax as part of the delivery cost as it will cause validation error. This also takes into account for the situation where tax rate could change based on the tax jurisdiction.

Regards, Shani Adyen