Fix e-notice with Manual processor
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 23 Jul 2023 23:14:36 +0000 (11:14 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 23 Jul 2023 23:14:36 +0000 (11:14 +1200)
CRM/Core/Payment.php
CRM/Core/Payment/Manual.php

index 52665be201f0ee2821912451ddfa31b618225aa2..0453ac8ad712de39aa2f1add103e5d7241d8dd79 100644 (file)
@@ -500,8 +500,7 @@ abstract class CRM_Core_Payment {
   /**
    * Default payment instrument validation.
    *
-   * Implement the usual Luhn algorithm via a static function in the CRM_Core_Payment_Form if it's a credit card
-   * Not a static function, because I need to check for payment_type.
+   * Payment processors should override this.
    *
    * @param array $values
    * @param array $errors
index 360055e5c8e33737615909196d39ca08b4e9c242..07a008c0ec3737883ed85f547a88415a0f472b29 100644 (file)
@@ -294,4 +294,14 @@ class CRM_Core_Payment_Manual extends CRM_Core_Payment {
     return TRUE;
   }
 
+  /**
+   * Override default payment instrument validation, as recommended.
+   *
+   * We have nothing to validate here.
+   *
+   * @param array $values
+   * @param array $errors
+   */
+  public function validatePaymentInstrument($values, &$errors): void {}
+
 }