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

jon nunan’s picture

Line 17 of eway_xml_common.class.inc has the following:

      'ewayTotalAmount' => intval ($charge['amount'] * 100),

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.

Anonymous’s picture

thanks 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.

jon nunan’s picture

ah yeah, I'm only testing with one method "CVN (XML)", I imagine the other types would need to be checked as well.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.