projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2c51a3
)
CRM-18688: Cancel IPN cancels entire membership
author
root
<nishant.bhorodia@gmail.com>
Wed, 8 Jun 2016 12:26:22 +0000
(17:56 +0530)
committer
root
<nishant.bhorodia@gmail.com>
Wed, 8 Jun 2016 12:26:22 +0000
(17:56 +0530)
CRM/Core/Payment/BaseIPN.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/Payment/BaseIPN.php
b/CRM/Core/Payment/BaseIPN.php
index f8cba5dadfb156656bd3e2353751dfc21e852fda..8bbbd788cbd876c74207e5e9304393ddbd13f681 100644
(file)
--- a/
CRM/Core/Payment/BaseIPN.php
+++ b/
CRM/Core/Payment/BaseIPN.php
@@
-328,8
+328,15
@@
class CRM_Core_Payment_BaseIPN {
'labelColumn' => 'name',
'flip' => 1,
));
+ // Prevent active memberships from being cancelled
+ // CRM-18688
+ $activeStatuses = array(
+ $membershipStatuses['New'],
+ $membershipStatuses['Current'],
+ $membershipStatuses['Grace'],
+ );
foreach ($memberships as $membership) {
- if ($membership) {
+ if ($membership
&& !in_array($membership->status_id, $activeStatuses)
) {
$membership->status_id = $membershipStatuses['Cancelled'];
$membership->save();