From 06051ca400c0fad0aefa117b3e5b925521b4049a Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 1 Nov 2016 00:52:09 -0400 Subject: [PATCH] Change function signature back --- CRM/Core/Payment.php | 2 +- CRM/Core/Payment/Form.php | 4 ++-- CRM/Core/Payment/PayPalImpl.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index ee25a93867..6d9bee4168 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -366,7 +366,7 @@ abstract class CRM_Core_Payment { public function validatePaymentInstrument($values, &$errors) { CRM_Core_Form::validateMandatoryFields($this->getMandatoryFields(), $values, $errors); if ($this->_paymentProcessor['payment_type'] == 1) { - CRM_Core_Payment_Form::validateCreditCard($this->_paymentProcessor['id'], $values, $errors); + CRM_Core_Payment_Form::validateCreditCard($values, $errors, $this->_paymentProcessor['id']); } } diff --git a/CRM/Core/Payment/Form.php b/CRM/Core/Payment/Form.php index 8101efd0ba..905e4a68a3 100644 --- a/CRM/Core/Payment/Form.php +++ b/CRM/Core/Payment/Form.php @@ -326,11 +326,11 @@ class CRM_Core_Payment_Form { * Make sure that credit card number and cvv are valid. * Called within the scope of a QF formRule function * - * @param int $processorID * @param array $values * @param array $errors + * @param int $processorID */ - public static function validateCreditCard($processorID = NULL, $values, &$errors) { + public static function validateCreditCard($values, &$errors, $processorID = NULL) { if (!empty($values['credit_card_type']) || !empty($values['credit_card_number'])) { if (!empty($values['credit_card_type'])) { $processorCards = CRM_Financial_BAO_PaymentProcessor::getCreditCards($processorID); diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php index 8ddcff0939..1042537291 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -176,7 +176,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { */ public function validatePaymentInstrument($values, &$errors) { if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal' && !$this->isPaypalExpress($values)) { - CRM_Core_Payment_Form::validateCreditCard($this->_paymentProcessor['id'], $values, $errors); + CRM_Core_Payment_Form::validateCreditCard($values, $errors, $this->_paymentProcessor['id']); CRM_Core_Form::validateMandatoryFields($this->getMandatoryFields(), $values, $errors); } } -- 2.25.1