From a58e6d09d97e867cfe79f0a1babe2ce9a962862d Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Tue, 16 Jan 2018 19:18:59 +0530 Subject: [PATCH] CRM-21323 : Fix backend credit card payment processor selection --- CRM/Contribute/Form/AbstractEditPayment.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Contribute/Form/AbstractEditPayment.php b/CRM/Contribute/Form/AbstractEditPayment.php index c09e51d276..7789e7ac10 100644 --- a/CRM/Contribute/Form/AbstractEditPayment.php +++ b/CRM/Contribute/Form/AbstractEditPayment.php @@ -355,6 +355,11 @@ WHERE contribution_id = {$id} 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. -- 2.25.1