From 85d3273318b5dee8c36738b77a7ed6effa3812ed Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 6 Nov 2020 12:58:07 +1300 Subject: [PATCH] [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 --- CRM/Core/Payment/PayPalIPN.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.25.1