From bc8526fa7b995d6de7e43e1f845f62752f26fe3a Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 15 Sep 2015 21:46:46 -0400 Subject: [PATCH] CRM-16555 - Fix double-processors on backend credit card event form --- CRM/Contribute/Form/AbstractEditPayment.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CRM/Contribute/Form/AbstractEditPayment.php b/CRM/Contribute/Form/AbstractEditPayment.php index e72ccd2979..62c89627f2 100644 --- a/CRM/Contribute/Form/AbstractEditPayment.php +++ b/CRM/Contribute/Form/AbstractEditPayment.php @@ -432,12 +432,14 @@ LEFT JOIN civicrm_contribution on (civicrm_contribution.contact_id = civicrm_co } $this->_processors = array(); foreach ($this->_paymentProcessors as $id => $processor) { - $this->_processors[$id] = ts($processor['name']); - if (!empty($processor['description'])) { - $this->_processors[$id] .= ' : ' . ts($processor['description']); - } - if ($processor['is_recur']) { - $this->_recurPaymentProcessors[$id] = $this->_processors[$id]; + if ($processor['is_test'] == ($this->_mode == 'test')) { + $this->_processors[$id] = ts($processor['name']); + if (!empty($processor['description'])) { + $this->_processors[$id] .= ' : ' . ts($processor['description']); + } + if ($processor['is_recur']) { + $this->_recurPaymentProcessors[$id] = $this->_processors[$id]; + } } } CRM_Financial_Form_Payment::addCreditCardJs(); -- 2.25.1