Closed (fixed)
Project:
Ogone | Ubercart payment
Version:
6.x-1.4
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
2 Sep 2009 at 12:02 UTC
Updated:
17 May 2010 at 15:53 UTC
Jump to comment: Most recent file
Comments
Comment #1
fictionindustries commentedOk I fixed this by changing line 368:
$amount = $arg1->order_total * 100; //amount *100
into
$amount = round($arg1->order_total,2) * 100; //amount *100
My guess is that the VAT module added some extra decimal places to the final amount and ogone doesn't digest these small numbers very well.
Rounding the number again to a number with 2 decimal places fixed the problem.
While I was there I found another occurrence of the
$amount = ... on line 332...
$orderid = $arg1->order_id;
$amount = $arg1->order_total * 100; //amount *100
$orderid and $amount are not used untill both lines are called again on 368. Guess they can be removed too.
What do you think Kees?
Comment #2
alexanderpas commentedhow about using
round($arg1->order_total * 100)Comment #3
keesje commentedThanks for the info.
If lines are redundant they should be removed IMHO.
#2 seems most straightforward.
Anyone willing to provide a patch?
Comment #4
keesje commentedComment #5
arnebrasseur commentedI can confirm that this solves the issue, a patch is included.
Comment #6
keesje commentedFix included here: http://drupal.org/node/591092
Comment #7
arnebrasseur commentedThis is still broken in CVS. Patch for CVS HEAD included.
Comment #8
arnebrasseur commentedI must've been looking at the wrong place, it is fixed in CVS.