From 107f03ee896738ee392b985f9323e96df7ca162d Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 18 Oct 2019 19:46:47 +1300 Subject: [PATCH] Regression fix on Paypal Std with memberships not being finalised correctly. Per https://github.com/civicrm/civicrm-core/pull/15053#issuecomment-542770130 --- CRM/Core/Payment/PayPalIPN.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Payment/PayPalIPN.php b/CRM/Core/Payment/PayPalIPN.php index d7a13692b65f..c5484857c30e 100644 --- a/CRM/Core/Payment/PayPalIPN.php +++ b/CRM/Core/Payment/PayPalIPN.php @@ -336,7 +336,8 @@ public function main() { Civi::log()->debug('PayPalIPN: Received (ContactID: ' . $ids['contact'] . '; trxn_id: ' . $input['trxn_id'] . ').'); - if ($this->retrieve('membershipID', 'Integer', FALSE)) { + // Debugging related to possible missing membership linkage + if ($contributionRecurID && $this->retrieve('membershipID', 'Integer', FALSE)) { $templateContribution = CRM_Contribute_BAO_ContributionRecur::getTemplateContribution($contributionRecurID); $membershipPayment = civicrm_api3('MembershipPayment', 'get', [ 'contribution_id' => $templateContribution['id'],