Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression fix on Paypal Std with memberships not being finalised correctly. #15538

Merged
merged 1 commit into from
Oct 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CRM/Core/Payment/PayPalIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this stop the membership processing from running if we don't have a recurring contribution? Where I found this Paypal was passing in a contribution ID + membership ID but it was not an auto-renew so there was no recurring. But the IPN still needed processing to "complete" the contribution and activate the membership.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattwire I don't think so - this block was added to attempt to add in membership id if the underlying data had an issue to get back to behaviour that existed prior to one of the membership cleanups we collaborated on totten@fefee63#diff-508afec319247dd2f89dea484e473281R339 - skipping the block should be OK

$templateContribution = CRM_Contribute_BAO_ContributionRecur::getTemplateContribution($contributionRecurID);
$membershipPayment = civicrm_api3('MembershipPayment', 'get', [
'contribution_id' => $templateContribution['id'],
Expand Down