Closed (fixed)
Project:
Ubercart eWay Payment Gateway
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Dec 2011 at 09:38 UTC
Updated:
29 Jun 2012 at 23:14 UTC
I have been testing the 7.x.dev version and at the moment it charges the total amount to eway in cents instead of dollars.
Eg the cart total of $1 is charged as $0.01 to eway.
I have fixed this by updating line 385 from:
'ewayTotalAmount' => uc_currency_format($amount, FALSE, FALSE, ''),
to:
'ewayTotalAmount' => uc_currency_format($amount * 100, FALSE, FALSE, ''),
Comments
Comment #1
mbelos commentedCheck your store's "Number of decimal places" setting: /admin/store/settings/store. If it's set to 0, it will not output the cents at all and result in an incorrect "dollar" amount being sent to eWay. If it's set to 2 (which most stores will be) then it will correctly output the amount in cents. I think this needs to be changed, and instead of using the uc_currency_format function to decide, it should just use the following:
'ewayTotalAmount' => $amount * 100,Comment #2
agileware commentedAgree with '$amount * 100' change applied. Committed to latest dev.