Paypal: Use getBaseReturnUrl() function
authorMatthew Wire <mjw@mjwconsult.co.uk>
Wed, 18 Jan 2023 19:55:05 +0000 (19:55 +0000)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Wed, 18 Jan 2023 20:02:45 +0000 (20:02 +0000)
CRM/Core/Payment/PayPalImpl.php

index df8a8512dde807d77b0bf555ea16a831286dee91..87ed5d31fd20d6dee1cf2ec6f21c04a4de35915a 100644 (file)
@@ -939,7 +939,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
     $notifyURL = $this->getNotifyUrl();
 
     $config = CRM_Core_Config::singleton();
-    $url = ($this->_component == 'event') ? 'civicrm/event/register' : 'civicrm/contribute/transact';
+    $url = $this->getBaseReturnUrl();
     $cancel = ($this->_component == 'event') ? '_qf_Register_display' : '_qf_Main_display';
 
     $cancelUrlString = "$cancel=1&cancel=1&qfKey={$params['qfKey']}";