X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPayment%2FAuthorizeNetIPN.php;h=6257cc4d6af274b53b56691ffe06ed7f1b76d561;hb=2aa397bc9ba4608d4146278d55dedd4080c53aec;hp=97fd481c24684ddee1ec43ebe3a82c47ff23f3de;hpb=64e59809d10c3ff342718a28f42983ec217dc282;p=civicrm-core.git diff --git a/CRM/Core/Payment/AuthorizeNetIPN.php b/CRM/Core/Payment/AuthorizeNetIPN.php index 97fd481c24..6257cc4d6a 100644 --- a/CRM/Core/Payment/AuthorizeNetIPN.php +++ b/CRM/Core/Payment/AuthorizeNetIPN.php @@ -37,11 +37,12 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { /** * Constructor function * - * @param $inputData array contents of HTTP REQUEST + * @param $inputData + * Array contents of HTTP REQUEST. * * @throws CRM_Core_Exception */ - function __construct($inputData) { + public function __construct($inputData) { $this->setInputParameters($inputData); parent::__construct(); } @@ -51,7 +52,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { * * @return bool|void */ - function main($component = 'contribute') { + public function main($component = 'contribute') { //we only get invoice num as a key player from payment gateway response. //for ARB we get x_subscription_id and x_subscription_paynum @@ -97,7 +98,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { * * @return bool */ - function recur(&$input, &$ids, &$objects, $first) { + public function recur(&$input, &$ids, &$objects, $first) { $this->_isRecurring = TRUE; $recur = &$objects['contributionRecur']; @@ -206,7 +207,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { * @param $input * @param $ids */ - function getInput(&$input, &$ids) { + public function getInput(&$input, &$ids) { $input['amount'] = $this->retrieve('x_amount', 'String'); $input['subscription_id'] = $this->retrieve('x_subscription_id', 'Integer'); $input['response_code'] = $this->retrieve('x_response_code', 'Integer'); @@ -247,7 +248,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { * @param $ids * @param $input */ - function getIDs(&$ids, &$input) { + public function getIDs(&$ids, &$input) { $ids['contact'] = $this->retrieve('x_cust_id', 'Integer', FALSE, 0); $ids['contribution'] = $this->retrieve('x_invoice_num', 'Integer'); @@ -302,15 +303,19 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr } /** - * @param string $name parameter name - * @param string $type parameter type - * @param bool $abort abort if not present - * @param null $default default value + * @param string $name + * Parameter name. + * @param string $type + * Parameter type. + * @param bool $abort + * Abort if not present. + * @param null $default + * Default value. * * @throws CRM_Core_Exception * @return mixed */ - function retrieve($name, $type, $abort = TRUE, $default = NULL) { + public function retrieve($name, $type, $abort = TRUE, $default = NULL) { $value = CRM_Utils_Type::validate( empty($this->_inputParameters[$name]) ? $default : $this->_inputParameters[$name], $type, @@ -320,7 +325,7 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr throw new CRM_Core_Exception("Could not find an entry for $name"); } return $value; -} + } /** * @param $ids @@ -328,7 +333,7 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr * * @return bool */ - function checkMD5($ids, $input) { + public function checkMD5($ids, $input) { $paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($ids['paymentProcessor'], $input['is_test'] ? 'test' : 'live' ); @@ -342,4 +347,3 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr return TRUE; } } -