// (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.
+ $pending = FALSE;
if ($form->_membershipBlock['is_separate_payment']) {
- $cachedFormValue = CRM_Utils_Array::value('is_recur', $form->_values);
- unset($form->_values['is_recur']);
- $cachedParamValue = CRM_Utils_Array::value('is_recur', $paymentParams);
- unset($paymentParams['is_recur']);
+ 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 = TRUE;
+ }
}
- $contribution = CRM_Contribute_Form_Contribution_Confirm::processContribution(
+ $contribution = CRM_Contribute_Form_Contribution_Confirm::processFormContribution(
$form,
$paymentParams,
NULL,
$contactID,
$contributionType,
- TRUE, TRUE,
+ $pending, TRUE,
$isTest,
- $lineItems
+ $lineItems,
+ $form->_bltID
);
// restore cached values (part of fix for CRM-14354)