Skip to content
Snippets Groups Projects
Commit e9a11021 authored by mattwire's avatar mattwire
Browse files

Remove deprecated billingID from baseIPN

parent 4de71a02
Branches
Tags
No related merge requests found
......@@ -205,7 +205,6 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
* @param array $input
* @param array $ids
*
* @return bool
* @throws \CRM_Core_Exception
*/
public function getInput(&$input, &$ids) {
......@@ -230,10 +229,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
$input['trxn_id'] = md5(uniqid(rand(), TRUE));
}
if (!$this->getBillingID($ids)) {
return FALSE;
}
$billingID = $ids['billing'];
$billingID = $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
$params = [
'first_name' => 'x_first_name',
'last_name' => 'x_last_name',
......
......@@ -487,6 +487,7 @@ class CRM_Core_Payment_BaseIPN {
}
/**
* @deprecated
* Get site billing ID.
*
* @param array $ids
......@@ -494,6 +495,7 @@ class CRM_Core_Payment_BaseIPN {
* @return bool
*/
public function getBillingID(&$ids) {
CRM_Core_Error::deprecatedFunctionWarning('CRM_Core_BAO_LocationType::getBilling()');
$ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
if (!$ids['billing']) {
CRM_Core_Error::debug_log_message(ts('Please set a location type of %1', [1 => 'Billing']));
......
......@@ -381,17 +381,13 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
* @throws \CRM_Core_Exception
*/
public function getInput(&$input, &$ids) {
if (!$this->getBillingID($ids)) {
return;
}
$billingID = $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
$input['txnType'] = $this->retrieve('txn_type', 'String', FALSE);
$input['paymentStatus'] = $this->retrieve('payment_status', 'String', FALSE);
$input['invoice'] = $this->retrieve('invoice', 'String', TRUE);
$input['amount'] = $this->retrieve('mc_gross', 'Money', FALSE);
$input['reasonCode'] = $this->retrieve('ReasonCode', 'String', FALSE);
$billingID = $ids['billing'];
$lookup = [
"first_name" => 'first_name',
"last_name" => 'last_name',
......
......@@ -493,9 +493,7 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr
* @throws CRM_Core_Exception
*/
public function getInput(&$input, &$ids) {
if (!$this->getBillingID($ids)) {
return;
}
$billingID = $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
$input['txnType'] = self::retrieve('txn_type', 'String', 'POST', FALSE);
$input['paymentStatus'] = self::retrieve('payment_status', 'String', 'POST', FALSE);
......@@ -503,7 +501,6 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr
$input['amount'] = self::retrieve('mc_gross', 'Money', 'POST', FALSE);
$input['reasonCode'] = self::retrieve('ReasonCode', 'String', 'POST', FALSE);
$billingID = $ids['billing'];
$lookup = [
"first_name" => 'first_name',
"last_name" => 'last_name',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment