From ea9aeef205889c386579ae617ebac2fae24c68d5 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 24 Jul 2023 11:14:36 +1200 Subject: [PATCH] Fix e-notice with Manual processor --- CRM/Core/Payment.php | 3 +-- CRM/Core/Payment/Manual.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index 52665be201..0453ac8ad7 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -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 diff --git a/CRM/Core/Payment/Manual.php b/CRM/Core/Payment/Manual.php index 360055e5c8..07a008c0ec 100644 --- a/CRM/Core/Payment/Manual.php +++ b/CRM/Core/Payment/Manual.php @@ -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 {} + } -- 2.25.1