Change function signature back
authorColeman Watts <coleman@civicrm.org>
Tue, 1 Nov 2016 04:52:09 +0000 (00:52 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 1 Nov 2016 05:01:30 +0000 (01:01 -0400)
CRM/Core/Payment.php
CRM/Core/Payment/Form.php
CRM/Core/Payment/PayPalImpl.php

index ee25a938677fff9ba9ab6c176103ac4b91df8d34..6d9bee416874947587fa17595a2163a5464a8c10 100644 (file)
@@ -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']);
     }
   }
 
index 8101efd0bae58d4c0e338a6cc6f094c648cdc8f4..905e4a68a3f475c6a9f4c86ae6410e69654ca425 100644 (file)
@@ -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);
index 8ddcff0939c8c0571e94c45c79df021596b8d1bc..1042537291317140a51aee4d6ae7a1ebbf2cb522 100644 (file)
@@ -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);
     }
   }