From 8bd7280925b3faa692c62d82cf45b751e8ac9134 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Fri, 16 Apr 2021 12:31:13 +0100 Subject: [PATCH] Add warning when url_site is not specified for paypal (it won't work if not set) --- CRM/Core/Payment/PayPalImpl.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php index e0f5f1f64b..709adc791a 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -677,6 +677,11 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { if (empty($this->_paymentProcessor['user_name'])) { $error[] = ts('User Name is not set in the Administer » System Settings » Payment Processors.'); } + if ($this->isPayPalType($this::PAYPAL_STANDARD)) { + if (empty($this->_paymentProcessor['url_site'])) { + $error[] = ts('Site URL is not set (eg. https://www.paypal.com/ - https://www.sandbox.paypal.com/)'); + } + } if (!empty($error)) { return implode('

', $error); -- 2.25.1