Skip to content

Commit

Permalink
Merge pull request #18021 from eileenmcnaughton/ids_billing
Browse files Browse the repository at this point in the history
Remove unused parameter ids['billing']
  • Loading branch information
seamuslee001 authored Aug 1, 2020
2 parents b796b4e + 41ce57e commit 94ec0b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
6 changes: 2 additions & 4 deletions CRM/Core/Payment/AuthorizeNetIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,10 @@ public function recur(&$input, &$ids, &$objects, $first) {
* 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');
Expand All @@ -216,7 +215,6 @@ public function getInput(&$input, &$ids) {
$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']) {
Expand All @@ -229,7 +227,7 @@ public function getInput(&$input, &$ids) {
$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',
Expand Down
7 changes: 3 additions & 4 deletions CRM/Core/Payment/PayPalIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public function main() {
$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);
Expand Down Expand Up @@ -375,12 +375,11 @@ public function main() {

/**
* @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);
Expand Down
7 changes: 3 additions & 4 deletions CRM/Core/Payment/PayPalProIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ public function main() {
$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);
Expand Down Expand Up @@ -487,13 +487,12 @@ public function main() {

/**
* @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);
Expand Down

0 comments on commit 94ec0b7

Please sign in to comment.