Skip to content

Commit

Permalink
Merge pull request #19406 from eileenmcnaughton/param
Browse files Browse the repository at this point in the history
[REF] Param simplification
  • Loading branch information
eileenmcnaughton authored Jan 18, 2021
2 parents 336ec5a + cfb2f03 commit 9345720
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
13 changes: 3 additions & 10 deletions CRM/Core/Payment/PayPalIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,23 +154,16 @@ public function recur($input, $ids, $recur, $contribution, $first) {
$recur->save();

if ($this->getFirstOrLastInSeriesStatus()) {
$autoRenewMembership = FALSE;
if ($recur->id &&
isset($ids['membership']) && $ids['membership']
) {
$autoRenewMembership = TRUE;
}

//send recurring Notification email for user
CRM_Contribute_BAO_ContributionPage::recurringNotify($this->getFirstOrLastInSeriesStatus(),
$ids['contact'],
$ids['contributionPage'],
$recur,
$autoRenewMembership
!empty($ids['membership'])
);
}

if ($txnType != 'subscr_payment') {
if ($txnType !== 'subscr_payment') {
return;
}

Expand All @@ -185,7 +178,7 @@ public function recur($input, $ids, $recur, $contribution, $first) {
return;
}

if ($input['paymentStatus'] != 'Completed') {
if ($input['paymentStatus'] !== 'Completed') {
throw new CRM_Core_Exception("Ignore all IPN payments that are not completed");
}

Expand Down
10 changes: 2 additions & 8 deletions CRM/Core/Payment/PayPalProIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,16 @@ public function recur($input, $ids, $recur, $contribution, $first) {
$recur->save();

if ($sendNotification) {
$autoRenewMembership = FALSE;
if ($recur->id &&
isset($ids['membership']) && $ids['membership']
) {
$autoRenewMembership = TRUE;
}
//send recurring Notification email for user
CRM_Contribute_BAO_ContributionPage::recurringNotify($subscriptionPaymentStatus,
$ids['contact'],
$ids['contributionPage'],
$recur,
$autoRenewMembership
!empty($ids['membership'])
);
}

if ($txnType != 'recurring_payment') {
if ($txnType !== 'recurring_payment') {
return;
}

Expand Down

0 comments on commit 9345720

Please sign in to comment.