CRM-19792, fixed payment processor params to include email
authorPradeep Nayak <pradpnayak@gmail.com>
Tue, 10 Jan 2017 14:23:39 +0000 (19:53 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Tue, 10 Jan 2017 14:23:39 +0000 (19:53 +0530)
----------------------------------------
* CRM-19792: Authorize.net membership renewals with credit card not processed though event regs are
  https://issues.civicrm.org/jira/browse/CRM-19792

CRM/Contribute/Form/Contribution/Confirm.php

index 3c385d14d9f91bf38392da054607bb5f8a6c44a6..d6ec625840ce7de74aa91e3440129b1039c17082 100644 (file)
@@ -1640,6 +1640,10 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
       // 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']));
+
+      // CRM-19792 : set necessary fields for payment processor
+      CRM_Core_Payment_Form::mapParams($form->_bltID, $paymentParams, $paymentParams, TRUE);
+
       $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
@@ -1758,6 +1762,10 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
         $contributionParams['payment_instrument_id'] = $form->_paymentProcessor['payment_instrument_id'];
       }
     }
+
+    // CRM-19792 : set necessary fields for payment processor
+    CRM_Core_Payment_Form::mapParams($form->_bltID, $form->_params, $tempParams, TRUE);
+
     $membershipContribution = CRM_Contribute_Form_Contribution_Confirm::processFormContribution($form,
       $tempParams,
       $tempParams,