Remove unused parameter ids['billing']
authoreileen <emcnaughton@wikimedia.org>
Sat, 1 Aug 2020 02:06:39 +0000 (14:06 +1200)
committereileen <emcnaughton@wikimedia.org>
Sat, 1 Aug 2020 02:06:39 +0000 (14:06 +1200)
This is no longer used in later functions and a quick grep of the code finds only one deprecated
function still refers to ids-billing after this

CRM/Core/Payment/AuthorizeNetIPN.php
CRM/Core/Payment/PayPalIPN.php
CRM/Core/Payment/PayPalProIPN.php

index 7946ecacbe493b3d2a2089b57f176b752385fd7c..7fa588e8d5b4de9065f8a26db7d2dd7b0fa92e16 100644 (file)
@@ -203,11 +203,10 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
    * Get the input from passed in fields.
    *
    * @param array $input
-   * @param array $ids
    *
    * @throws \CRM_Core_Exception
    */
-  public function getInput(&$input, &$ids) {
+  public function getInput(&$input) {
     $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');
@@ -216,7 +215,6 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
     $input['response_reason_text'] = $this->retrieve('x_response_reason_text', 'String', FALSE);
     $input['subscription_paynum'] = $this->retrieve('x_subscription_paynum', 'Integer', FALSE, 0);
     $input['trxn_id'] = $this->retrieve('x_trans_id', 'String', FALSE);
-    $input['trxn_id'] = $this->retrieve('x_trans_id', 'String', FALSE);
     $input['receive_date'] = $this->retrieve('receive_date', 'String', FALSE, date('YmdHis', strtotime('now')));
 
     if ($input['trxn_id']) {
@@ -229,7 +227,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN {
       $input['trxn_id'] = md5(uniqid(rand(), TRUE));
     }
 
-    $billingID = $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
+    $billingID = CRM_Core_BAO_LocationType::getBilling();
     $params = [
       'first_name' => 'x_first_name',
       'last_name' => 'x_last_name',
index 0e87056c8755bde0a2d8c017730632d2eafeffc4..68b02303b9f3886a37deda532430134f647e4ee6 100644 (file)
@@ -302,7 +302,7 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
     $membershipID = $this->retrieve('membershipID', 'Integer', FALSE);
     $contributionRecurID = $this->retrieve('contributionRecurID', 'Integer', FALSE);
 
-    $this->getInput($input, $ids);
+    $this->getInput($input);
 
     if ($component == 'event') {
       $ids['event'] = $this->retrieve('eventID', 'Integer', TRUE);
@@ -375,12 +375,11 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
 
   /**
    * @param array $input
-   * @param array $ids
    *
    * @throws \CRM_Core_Exception
    */
-  public function getInput(&$input, &$ids) {
-    $billingID = $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
+  public function getInput(&$input) {
+    $billingID = 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);
index d249aa0bef30b2d2a494358eda818db76a3c80e2..b4ac4626c84c0542ef159f5089c53f1f98574d75 100644 (file)
@@ -423,7 +423,7 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN {
     $ids['contact'] = self::getValue('c', TRUE);
     $ids['contribution'] = self::getValue('b', TRUE);
 
-    $this->getInput($input, $ids);
+    $this->getInput($input);
 
     if ($this->_component == 'event') {
       $ids['event'] = self::getValue('e', TRUE);
@@ -487,13 +487,12 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr
 
   /**
    * @param array $input
-   * @param array $ids
    *
    * @return void
    * @throws CRM_Core_Exception
    */
-  public function getInput(&$input, &$ids) {
-    $billingID = $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
+  public function getInput(&$input) {
+    $billingID = CRM_Core_BAO_LocationType::getBilling();
 
     $input['txnType'] = self::retrieve('txn_type', 'String', 'POST', FALSE);
     $input['paymentStatus'] = self::retrieve('payment_status', 'String', 'POST', FALSE);