| Project: | Gift Certificate Module |
| Component: | Code |
| Category: | |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Came across a floating point precision problem in uc_payment_method_zero_total()
if ($total != 0) {
$result[] = array(
'pass' => FALSE,
'message' => t("Your final order total is $total, not $0. Please go back and select a different method of payment.")
);
Testing against ZERO is bad and might fail, this should be replaced by something like
if ($total > 0.001)
At least this fix worked for me.
More info here: http://www.ubercart.org/forum/bug_reports/4620/uc_order_get_total_roundi...


Honestly I haven't dug that much into it so that might be kind of a silly question to ask, so I will check out your link as well. Thanks, Ryan!
I wonder if you should just disable the zero total payment method in here and use my free order payment method available here.