-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BP-3366 $orderAmount rounding issue #199
Comments
Thankyou for contacting Buckaroo. Please note that the order is updated upon a push message send from the Buckaroo Plaza. If you're having experiencing issues with the orders that are not updated to processing, perhaps there could be a server issue and the Buckaroo IP addresses need to be added to a allow list. Please let me know if this helped. |
I opened the issue to fast. Missed these lines: WooCommerce/library/common.php Lines 1002 to 1005 in 90ab2ef
Will debug that because a client get the order note |
Thank you for your quick reply. Please let us know if you need anything by creating a new ticket or contacting our technical support team (support@buckaroo.nl) if the issue persists. |
I did some debugging and this is what I have discovered. I have checked and compared these values for multiple orders. WooCommerce/library/common.php Lines 981 to 982 in 90ab2ef
The floats are having the following values:
The isTotalPaid check returns false but the order is fully paid. Because of rounding issues this results in staying at the pending status and the order is cancelled automatically after X time.
The isTotalPaid check returns true then. This results in an order that is set to processing through WooCommerce using the
The isTotalPaid check returns true then. This results in an order that is set to processing through WooCommerce using the
The isTotalPaid check returns false but the order is fully paid. Because of rounding issues this results in staying at the pending status and the order is cancelled automatically after X time. So the issue is that the This is a possible workaround but maybe you have a better solution. $orderAmount = (float) wc_format_decimal($order->get_total(), 2, false); |
@Buckaroo-Rene can you look into this issue? |
@ricklambrechts , |
Thanks and get well soon! |
Hi @ricklambrechts , We did some research for this issue that you're facing. Unfortunately we did not see the rounding issue occuring on our test environments. Could it be that you use a different setting for the number of decimals in the currency settings? And are you still having issues regarding the order status which is not set to processing? I am looking forward to your reply. Best Regards, |
Yes the decimals setting is set to 4. But this plugin should be able to handle it right? Because prices are always round up for the payment but at the moment that the paid value is checked with the order value it is not rounded. So at that the Else the client needs the possible workaround at every update. |
@ricklambrechts , |
Thank you. I have reviewed the change and i have left a comment. |
Is it correct that this plugin does not update the order status to
processing
for example?I see the
$order->update_status()
calls withfailed
,cancelled
but I do not seeprocessing
. Only in thegateway-buckaroo-applepay.php
file I see theprocessing
update.The text was updated successfully, but these errors were encountered: