From: eileen Date: Thu, 5 Nov 2020 23:58:07 +0000 (+1300) Subject: [REF] Minor variable cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=85d3273318b5dee8c36738b77a7ed6effa3812ed;p=civicrm-core.git [REF] Minor variable cleanup This continues the process of using the variables we have loaded within the IPN rather than those that were loaded onto objects FROM the ones loaded in this IPN --- diff --git a/CRM/Core/Payment/PayPalIPN.php b/CRM/Core/Payment/PayPalIPN.php index 360086b853..ea3e6e2634 100644 --- a/CRM/Core/Payment/PayPalIPN.php +++ b/CRM/Core/Payment/PayPalIPN.php @@ -208,8 +208,8 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN { $this->single($input, [ 'related_contact' => $ids['related_contact'] ?? NULL, - 'participant' => !empty($objects['participant']) ? $objects['participant']->id : NULL, - 'contributionRecur' => !empty($objects['contributionRecur']) ? $objects['contributionRecur']->id : NULL, + 'participant' => $ids['participant'] ?? NULL, + 'contributionRecur' => $recur->id, ], $objects['contribution'], TRUE); } @@ -363,7 +363,7 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN { $this->single($input, [ 'related_contact' => $ids['related_contact'] ?? NULL, 'participant' => $ids['participant'] ?? NULL, - 'contributionRecur' => !empty($objects['contributionRecur']) ? $objects['contributionRecur']->id : NULL, + 'contributionRecur' => $contributionRecurID, ], $objects['contribution']); } catch (CRM_Core_Exception $e) {