chrismeller / cybersource

A simple class for interfacing with some of the basic methods of the CyberSource SOAP Toolkit API for processing credit card transactions online.
35 stars 30 forks source link

Error when running example (not an issue) #12

Closed thodeveloper closed 10 years ago

thodeveloper commented 10 years ago

The problem is my wrong setting in currency, now it can run well.

chrismeller commented 10 years ago

For future reference for anyone else with a similar problem, the issue was:

Run: http://domain.ext/tests/auth_amount.php

Got the error message

Fatal error: Uncaught exception 'CyberSource\CyberSource_Invalid_Field_Exception' with message 'c:purchaseTotals/c:currency' in D:\cybersource-master\classes\CyberSource\CyberSource.php on line 735

The error message includes the response from CyberSource, which points you at the field having a problem. In this case it's the currency field. The examples are all based in USD, which works fine for the payment processors CyberSource uses in the US, but may not be accepted internationally. Switching the examples to your local currency should resolve this issue.