From b488918bcd386b921b15ed27297b1c717f64d93e Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 25 Nov 2020 11:38:51 +1300 Subject: [PATCH] [REF] Remove obscure objects from A.net --- CRM/Core/Payment/AuthorizeNetIPN.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CRM/Core/Payment/AuthorizeNetIPN.php b/CRM/Core/Payment/AuthorizeNetIPN.php index 6971fffc21..47d130f446 100644 --- a/CRM/Core/Payment/AuthorizeNetIPN.php +++ b/CRM/Core/Payment/AuthorizeNetIPN.php @@ -45,7 +45,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { // Presence of the id means it is approved. return TRUE; } - $ids = $objects = $input = []; + $ids = $input = []; $input['component'] = 'contribute'; @@ -83,20 +83,15 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { throw new CRM_Core_Exception("Could not find contribution recur record: {$ids['ContributionRecur']} in IPN request: " . print_r($input, TRUE)); } - $objects['contact'] = &$contact; - $objects['contribution'] = &$contribution; - - $contribution = &$objects['contribution']; $ids['paymentProcessor'] = $paymentProcessorID; $contribution->loadRelatedObjects($input, $ids); if (empty($contribution->_relatedObjects['paymentProcessor'])) { throw new CRM_Core_Exception("Could not find payment processor for contribution record: " . $contribution->id); } - $objects = array_merge($objects, $contribution->_relatedObjects); // check if first contribution is completed, else complete first contribution $first = TRUE; - if ($objects['contribution']->contribution_status_id == 1) { + if ($contribution->contribution_status_id == 1) { $first = FALSE; //load new contribution object if required. // create a contribution and then get it processed -- 2.25.1