MultiSafepay / magento2

MultiSafepay plugin for Magento 2
Open Software License 3.0
19 stars 8 forks source link

Order status cancelled due to tax rounding #21

Closed 6Ways closed 2 years ago

6Ways commented 2 years ago

When an order is placed with cart items the tax is rounded different in Magento / Multisafepay. The totals do not sum up. When this occurs the invoice is not created in Magento. I suspect this is because we have 9% and 21% items in one order. This only happens for a few specific amounts where the rounding is one cent off.

Steps to reproduce the behavior:

  1. Enable shopping cart items setting in Multisafepay module (with multisafepay/advanced/disable_shopping_cart = 0)
  2. Make shipping 3.95 incl. 21% VAT
  3. Make product 5.95 incl 9% VAT
  4. Put the item 2x in cart ( = 11.90 )
  5. With shipping the cart total is 11.90 + 3.95 = 15.85
  6. When the items are send to Multisafepay the total becomes 15.84 in on the payment page.
  7. Magento can't set the order to processing.

Expected behavior The right amount is sent to Multisafepay for the cart items.

Screenshots Right amount in Magento (15.85): totalsincart

Wrong amount in Multisafepay (15.84): totalsinmultisafepay

Additional context I am using Magento 2.4.1 with Multisafepay module 2.11.0. We have had this problem with the missing invoices for a while but I just discovered the rounding difference with the cart items being sent to Multisafepay. EDIT: I just tested MSP module 2.12.4 - same problem

vinodsowdagar commented 2 years ago

Hi @6Ways ,

Thank you for reporting this issue. We are going to try to reproduce this. I will let you know when i know more.

vinodsowdagar commented 2 years ago

Hi @6Ways ,

Unfortunately we were unable to reproduce this issue. Even if we hardcode the one cent difference, in our environments the invoice is still created and the order still saved.

Because we are unable to reproduce this issue, could you provide us with some more information so we can investigate further?

Please send us the following details via e-mail at integration@multisafepay.com:

Furthermore, it would be great if you can turn on the debug mode, reproduce the issue and send us the MultiSafepay logs afterwards, so we can compare the information in the logs to the information in our system.

The debug mode can be turned on via: Stores > Configuration > MultiSafepay > General Settings > Enable Debug mode > Yes

The logs can be downloaded via: Stores > Configuration > MultiSafepay > General Settings > MultiSafepay payment logs > Download

You can link to this issue as a reference in the e-mail for my colleagues, so they can put it through accordingly.

Hope to hear from you soon.

6Ways commented 2 years ago

Hi Vinod, Thanks for investigating. I did some further research and found a new order without the cart enabled that also was not processing. For some reason the Magento order is cancelled. I can uncancel the order by opening the notification link (/multisafepay/connect/notification/?transactionid=xx&timestamp=xx). The order is then processing AND invoiced but another invoice can still be created which has to be done otherwise the order will stay on processing even after shipping.

I will look deeper into it