From be7255003d221f398723679fbaf90dc6ad53b445 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Fri, 4 Mar 2016 11:42:31 +0530 Subject: [PATCH] add signature and minor optimisation --- CRM/Admin/Form/PaymentProcessor.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CRM/Admin/Form/PaymentProcessor.php b/CRM/Admin/Form/PaymentProcessor.php index f687933d49..d392c4337f 100644 --- a/CRM/Admin/Form/PaymentProcessor.php +++ b/CRM/Admin/Form/PaymentProcessor.php @@ -378,10 +378,11 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { * @param bool $test */ public function updatePaymentProcessor(&$values, $domainID, $test) { - if ($test == TRUE) { - $values['user_name'] = $values['test_user_name']; - $values['password'] = $values['test_password']; - } + if ($test) { + foreach (array('user_name', 'password', 'signature') as $field) { + $values[$field] = empty($values["test_{$field}"]) ? CRM_Utils_Array::value($field, $values) : $values["test_{$field}"]; + } + } $params = array_merge(array( 'id' => $test ? $this->_testID : $this->_id, 'domain_id' => $domainID, -- 2.25.1