test-fix, pass through whether the form is in test mode
authoreileenmcnaugton <eileen@fuzion.co.nz>
Tue, 1 Sep 2015 05:01:28 +0000 (17:01 +1200)
committereileenmcnaugton <eileen@fuzion.co.nz>
Tue, 1 Sep 2015 05:01:28 +0000 (17:01 +1200)
CRM/Contribute/Form/AbstractEditPayment.php

index a66f2e1cd82e68dd5ef5a38ddd43bc262998435b..7654b0d065bf8ff7f5055c8491c9cb3c655a800d 100644 (file)
@@ -643,7 +643,10 @@ LEFT JOIN  civicrm_contribution on (civicrm_contribution.contact_id = civicrm_co
    */
   protected function beginPostProcess() {
     if ($this->_mode) {
-      $this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($this->_params['payment_processor_id']);
+      $this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment(
+        $this->_params['payment_processor_id'],
+        ($this->_mode == 'test')
+      );
       if (in_array('credit_card_exp_date', array_keys($this->_params))) {
         $this->_params['year'] = CRM_Core_Payment_Form::getCreditCardExpirationYear($this->_params);
         $this->_params['month'] = CRM_Core_Payment_Form::getCreditCardExpirationMonth($this->_params);