elseif (empty($this->_paymentProcessors) || array_keys($this->_paymentProcessors) === array(0)) {
throw new CRM_Core_Exception(ts('You will need to configure the %1 settings for your Payment Processor before you can submit a credit card transactions.', array(1 => $this->_mode)));
}
+ //Assign submitted processor value if it is different from the loaded one.
+ if (!empty($this->_submitValues['payment_processor_id'])
+ && $this->_paymentProcessor['id'] != $this->_submitValues['payment_processor_id']) {
+ $this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($this->_submitValues['payment_processor_id']);
+ }
$this->_processors = array();
foreach ($this->_paymentProcessors as $id => $processor) {
// @todo review this. The inclusion of this IF was to address test processors being incorrectly loaded.