From fe3dbce1d450a250d1c6fdec3882d64e3a5026ef Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 12 Nov 2015 12:08:51 -0800 Subject: [PATCH] CRM-17566 fix eNotice on contributionID not being passed to processor --- CRM/Contribute/Form/Contribution/Confirm.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index c5f1958a39..22e70789d7 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -1579,7 +1579,11 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr } $payment = Civi\Payment\System::singleton()->getByProcessor($form->_paymentProcessor); - $paymentActionResult = $payment->doPayment($form->_params, 'contribute'); + // The contribution_other_id is effectively the ID for the only contribution or the non-membership contribution. + // Since we have called the membership contribution (in a 2 contribution scenario) this is out + // primary-contribution compared to that - but let's face it - it's all just too hard & confusing at the moment! + $paymentParams = array_merge($form->_params, array('contributionID' => $form->_values['contribution_other_id'])); + $paymentActionResult = $payment->doPayment($paymentParams, 'contribute'); $paymentResults[] = array('contribution_id' => $paymentResult['contribution']->id, 'result' => $paymentActionResult); // Do not send an email if Recurring transaction is done via Direct Mode // Email will we sent when the IPN is received. -- 2.25.1