From a00ce7b3b6df5bdf5d6fba5175758b6750d3dd23 Mon Sep 17 00:00:00 2001 From: monishdeb Date: Wed, 15 Apr 2015 15:08:59 +0530 Subject: [PATCH] minor change --- CRM/Contribute/BAO/Contribution/Utils.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution/Utils.php b/CRM/Contribute/BAO/Contribution/Utils.php index 6176f44f54..1fdf1732fb 100644 --- a/CRM/Contribute/BAO/Contribution/Utils.php +++ b/CRM/Contribute/BAO/Contribution/Utils.php @@ -225,11 +225,17 @@ class CRM_Contribute_BAO_Contribution_Utils { // (i.e., the amount NOT associated with the membership). Temporarily // cache the is_recur values so we can process the additional gift as a // one-off payment. - if ($form->_membershipBlock['is_separate_payment'] && !empty($form->_params['auto_renew'])) { - $cachedFormValue = CRM_Utils_Array::value('is_recur', $form->_values); - $cachedParamValue = CRM_Utils_Array::value('is_recur', $paymentParams); - unset($form->_values['is_recur']); - unset($paymentParams['is_recur']); + $pending = TRUE; + if ($form->_membershipBlock['is_separate_payment']) { + if (!empty($form->_params['auto_renew'])) { + $cachedFormValue = CRM_Utils_Array::value('is_recur', $form->_values); + $cachedParamValue = CRM_Utils_Array::value('is_recur', $paymentParams); + unset($form->_values['is_recur']); + unset($paymentParams['is_recur']); + } + else { + $pending = FALSE; + } } $contribution = CRM_Contribute_Form_Contribution_Confirm::processContribution( @@ -238,7 +244,7 @@ class CRM_Contribute_BAO_Contribution_Utils { NULL, $contactID, $contributionType, - TRUE, TRUE, + $pending, TRUE, $isTest, $lineItems ); -- 2.25.1