Just testing this out with the eway test gateway and I have a product that is $20.01 which should return 'Refer to Issuer' according to the documentation. Instead it goes through fine. Checking the payload I see:
Message Credit card payment processed successfully: 00: Transaction Approved(Test CVN Gateway)
Amount 20.01 AUD
Status Success
Remote status true
Created Mon, 20/06/2011 - 09:39
Payload (I've cut some stuff out here)
[txAmount] => SimpleXMLElement Object
(
[0] => 200100
)
It seems it might be getting converted to cents twice, leading to the price sent to eway being 100 times too much?
Comments
Comment #1
jon nunan commentedLine 17 of eway_xml_common.class.inc has the following:
I think the '* 100' isn't needed as $charge['amount'] is already in cents. I removed it, and the test gateway returns the correct result now.
Comment #2
Anonymous (not verified) commentedthanks for the report, i'll look into it. i can see a few different places that take the amount * 100, so we just need to make sure this doesn't break anything else.
Comment #3
jon nunan commentedah yeah, I'm only testing with one method "CVN (XML)", I imagine the other types would need to be checked as well.
Comment #4
Anonymous (not verified) commentedhttp://drupalcode.org/project/commerce_eway.git/commit/9b37cf1