From d2f455a1954a951a35ad8fdd16319666d4af0fd9 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Wed, 14 Oct 2015 02:15:27 +1300 Subject: [PATCH] CRM-17256 don't validate cc fields if token has been entered --- CRM/Core/Payment/PayPalImpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php index 8e5d0bbc15..4f12885ea8 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -175,7 +175,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { * @param array $errors */ public function validatePaymentInstrument($values, &$errors) { - if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal') { + if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal' && empty($values['token'])) { CRM_Core_Payment_Form::validateCreditCard($values, $errors); CRM_Core_Form::validateMandatoryFields($this->getMandatoryFields(), $values, $errors); } -- 2.25.1