From d2035566046f5776d954b5c743f9b221997e6803 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Sun, 31 Aug 2014 02:11:50 +0530 Subject: [PATCH] -- CRM-15055, handled IPN request for status change ---------------------------------------- * 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php index 3de497e666..6d8a807dde 100644 --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@ -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, -- 2.25.1