Billmate / billmate-checkout-for-woocommerce

Payment Plugin for WooCommerce. Integrates Billmate Checkout for WooCommerce.
https://support.billmate.se/hc/sv/sections/360001483157-WooCommerce-Billmate-Checkout
2 stars 1 forks source link

Include Cart.Total.withouttax not always match articles withouttax #169

Open kalorifri opened 2 years ago

kalorifri commented 2 years ago

Cart.Total.withouttax is the sum of all articles.withouttax + Cart.Handling.withouttax + Cart.Shipping.withouttax. In some cases, might be caused by rounding, it does not match and cause error 9107 on Billmate API end and Billmate Checkout can not be loaded. In first example below, expected value of Cart.Total.withouttax is 95680 In second example below, expected value of Cart.Total.withouttax is 1654520 Different stores, both used plugin version 1.3.0

Partial and anonymized examples of where it failed:

"Articles": [ { "artnr": "123456", "title": "Item", "quantity": 1, "aprice": 119600, "withouttax": 95680, "taxrate": 25, "discount": 20 } ], "Cart": { "Handling": { "withouttax": 0, "taxrate": 0 }, "Shipping": { "withouttax": 0, "taxrate": 0 }, "Total": { "withouttax": 95700, "tax": 23900, "rounding": 0, "withtax": 119600 } }

"Articles": [ { "artnr": "987654321", "title": "Item", "quantity": 1, "aprice": 1654520, "withouttax": 1654520, "taxrate": 0, "discount": 0 } ], "Cart": { "Handling": { "withouttax": 0, "taxrate": 0 }, "Shipping": { "withouttax": 0, "taxrate": 0 }, "Total": { "withouttax": 1654500, "tax": 0, "rounding": 0, "withtax": 1654500 } }

NiklasHogefjord commented 2 years ago

Hi @kalorifri, Sorry for the late reply. I think it would be good to look into this a bit more. However, I'm not able to recreate the issue myself.