From: eileenmcnaugton Date: Tue, 1 Sep 2015 05:01:28 +0000 (+1200) Subject: test-fix, pass through whether the form is in test mode X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2c89742ac344fb632a2a7986ed116a25d5678962;p=civicrm-core.git test-fix, pass through whether the form is in test mode --- diff --git a/CRM/Contribute/Form/AbstractEditPayment.php b/CRM/Contribute/Form/AbstractEditPayment.php index a66f2e1cd8..7654b0d065 100644 --- a/CRM/Contribute/Form/AbstractEditPayment.php +++ b/CRM/Contribute/Form/AbstractEditPayment.php @@ -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);