Closed AndreiMaz closed 3 years ago
Currently it is after the closing bracket.
It's by design to avoid circular reference when calculating payment method additional fee during the checkout process.
But the payment tax is indeed calculated incorrectly if the percentage additional fee is used.
nopCommerce version: 4.3
Expected behavior: Valid Total Tax calculation including Payment additional fee when Payment fee is taxable
Actual behavior: Payment fee tax added to Total Tax multiple times
Steps to reproduce the problem: Configuration > Settings > Tax settings > Payment Payment method additional fee is taxable, Payment method additional fee tax category > something, not 0
The solution: In FixedOrByCountryStateZipTaxProvider.cs file > GetTaxTotal class the //payment method additional fee section should be INSIDE the following if statement brackets: if (!(_httpContextAccessor.HttpContext.Items.TryGetValue("nop.TaxTotal", out var result) && result is TaxTotalResult taxTotalResult)) { }
Currently it is after the closing bracket.
Source: https://www.nopcommerce.com/en/boards/topic/84841/tax-fixed-or-by-countrystatezip-plugin-payment-method-additional-fee-error