From 7cc0bc4a756aea13de4f0044f848dfe30639ebd0 Mon Sep 17 00:00:00 2001 From: Kevin Cristiano <kcristiano@kcristiano.com> Date: Thu, 19 Nov 2020 07:15:24 -0500 Subject: [PATCH] dev/core 1931 Prevent PayPal from double-encoding the IPN Notify URL PR 18980 Christian Wach --- civicrm/CRM/Core/Payment/PayPalImpl.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/civicrm/CRM/Core/Payment/PayPalImpl.php b/civicrm/CRM/Core/Payment/PayPalImpl.php index 428d77317e..3e5714286a 100644 --- a/civicrm/CRM/Core/Payment/PayPalImpl.php +++ b/civicrm/CRM/Core/Payment/PayPalImpl.php @@ -969,6 +969,8 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { // Allow further manipulation of the arguments via custom hooks .. CRM_Utils_Hook::alterPaymentProcessorParams($this, $params, $paypalParams); + $paypalParams['notify_url'] = str_replace( '%2F', '/', $paypalParams['notify_url'] ); + $uri = ''; foreach ($paypalParams as $key => $value) { if ($value === NULL) { -- GitLab