-- CRM-15055, handled IPN request for status change
authorPradeep Nayak <pradeep.nayak@webaccess.co.in>
Sat, 30 Aug 2014 20:41:50 +0000 (02:11 +0530)
committerPradeep Nayak <pradeep.nayak@webaccess.co.in>
Wed, 3 Sep 2014 09:27:19 +0000 (14:57 +0530)
----------------------------------------
* CRM-15055: Line item for membership entity should be created even when Record Payment is not checked
  https://issues.civicrm.org/jira/browse/CRM-15055

CRM/Core/Payment/BaseIPN.php

index 3de497e6666db4dfeb03be36de7b3633c1d377d5..6d8a807ddef35aa65c34aac7fa4db276cab4c01d 100644 (file)
@@ -601,6 +601,10 @@ LIMIT 1;";
         $input['participant_id'] = $contribution->_relatedObjects['participant']->id;
         $input['skipLineItem'] = 1;
       }
+      elseif (!empty($contribution->_relatedObjects['membership'])) {
+        $input['skipLineItem'] = TRUE;
+        $input['contribution_mode'] = 'membership';
+      }
       //@todo writing a unit test I was unable to create a scenario where this line did not fatal on second
       // and subsequent payments. In this case the line items are created at $this->addrecurLineItems
       // and since the contribution is saved prior to this line there is always a contribution-id,