Support » Plugin: WooCommerce QuickPay » Decimals

  • Hello,
    we get a lot of these warnings in the admin dashboard:

    “Unable to capture payment on order #123456. Problem: Validation error – amount: is too large”

    We have located this down to the WC setting “Number of decimals” which is set to zero. This combined with a transaction fees will result in the “order total” to be rounded to eg. DKK 103 while the “capture amount” is DKK 102.75.

    It is not possible to use $order->get_total() function, because WooCommerce (wrongly) stores the rounded amount in the database. Therefore we suggest that your plugin creates a get_correct_total function that calculates the total + transaction fees and uses this to compare with the (correct) capture amount.

  • The topic ‘Decimals’ is closed to new replies.