* @return mixed self::error() if transaction failed, otherwise returns 0.
*/
function _getTCReply($reply) {
+ $this->_logger($reply);
- /* DUPLIATE CODE, please refactor. ~lisa */
- if (!$reply) {
- return self::error(9002, 'Could not initiate connection to payment gateway');
+ /* Default to AUTH_ERROR if status isn't explicitly given. */
+ if(!$reply) {
+ $reply = array('status' => self::AUTH_ERROR);
}
- $this->_logger($reply);
-
switch($reply['status']) {
case self::AUTH_BLACKLIST:
return self::error(9001, "Your transaction was declined: error #90210");