X-Git-Url: https://vcs.fsf.org/?p=trustcommerce.git;a=blobdiff_plain;f=trustcommerce.php;h=d36e42b22cc33fdae944a15eada67c7d2953df9a;hp=7ceed83567bfb0e7eeafc28739f1b27986a8b189;hb=1d2685936e83096c436b8f250502d711a243eebf;hpb=4efc3ebe49ba18dc6424ef306fa401ccbb75b1eb diff --git a/trustcommerce.php b/trustcommerce.php index 7ceed83..d36e42b 100644 --- a/trustcommerce.php +++ b/trustcommerce.php @@ -222,7 +222,7 @@ class org_fsf_payment_trustcommerce extends CRM_Core_Payment { return TRUE; } else if($this->_IsAgentBlacklisted()) { return TRUE; - } + } return FALSE; } @@ -304,7 +304,7 @@ class org_fsf_payment_trustcommerce extends CRM_Core_Payment { $cycle = 'y'; break; } - + /* Translate frequency interval from CiviCRM -> TC * Payments are the same, HOWEVER a payment of 1 (forever) should be 0 in TC */ if($payments == 1) { @@ -341,7 +341,7 @@ class org_fsf_payment_trustcommerce extends CRM_Core_Payment { // It's all good break; case self::AUTH_DECLINED: - // TODO FIXME be more or less specific? + // TODO FIXME be more or less specific? // declinetype can be: decline, avs, cvv, call, expiredcard, carderror, authexpired, fraud, blacklist, velocity // See TC documentation for more info switch($reply['declinetype']) { @@ -487,7 +487,7 @@ class org_fsf_payment_trustcommerce extends CRM_Core_Payment { $tc_params['password'] = $this->_getParam('password'); $tc_params['action'] = 'unstore'; $tc_params['billingid'] = CRM_Utils_Array::value('trxn_id', $params); - + $result = $this->_sendTCRequest($tc_params); /* Test if call failed */ @@ -499,8 +499,8 @@ class org_fsf_payment_trustcommerce extends CRM_Core_Payment { } function changeSubscriptionAmount(&$message = '', $params = array()) { - $tc_params['custid'] = $this->_getParam('user_name'); - $tc_params['password'] = $this->_getParam('password'); + $tc_params['custid'] = $this->_paymentProcessor['user_name']; + $tc_params['password'] = $this->_paymentProcessor['password']; $tc_params['action'] = 'store'; $tc_params['billingid'] = CRM_Utils_Array::value('subscriptionId', $params);