From 5f28a9e929dfc76948fb8569e43926dbbe02018a Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 14 Jul 2014 16:25:31 -0400 Subject: [PATCH] Remove duplicated error message in _getTCReply method. --- trustcommerce.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/trustcommerce.php b/trustcommerce.php index 554acb8..9b3f1c2 100644 --- a/trustcommerce.php +++ b/trustcommerce.php @@ -247,14 +247,13 @@ class org_fsf_payment_trustcommerce extends CRM_Core_Payment { * @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"); -- 2.25.1