Skip to content

Commit

Permalink
Merge pull request #29521 from seamuslee001/extern_legacy_drupal9
Browse files Browse the repository at this point in the history
[REF] Ensure that CMS is booted prior to processing legacy PayPal IPN
  • Loading branch information
eileenmcnaughton authored Feb 27, 2024
2 parents 24d2f22 + 5a5fe9a commit 883c523
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions extern/ipn.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@
/* Cache the real UF, override it with the SOAP environment */

CRM_Core_Config::singleton();
$log = new CRM_Utils_SystemLogger();
if (empty($_GET)) {
$log->alert('payment_notification processor_name=PayPal', $_REQUEST);
$paypalIPN = new CRM_Core_Payment_PayPalProIPN($_REQUEST);
}
else {
$log->alert('payment_notification PayPal_Standard', $_REQUEST);
$paypalIPN = new CRM_Core_Payment_PayPalIPN($_REQUEST);
// @todo upgrade standard per Pro
}
try {
switch ($config->userFramework) {
case 'Joomla':
Expand All @@ -69,6 +59,16 @@
break;

}
$log = new CRM_Utils_SystemLogger();
if (empty($_GET)) {
$log->alert('payment_notification processor_name=PayPal', $_REQUEST);
$paypalIPN = new CRM_Core_Payment_PayPalProIPN($_REQUEST);
}
else {
$log->alert('payment_notification PayPal_Standard', $_REQUEST);
$paypalIPN = new CRM_Core_Payment_PayPalIPN($_REQUEST);
// @todo upgrade standard per Pro
}
$paypalIPN->main();
}
catch (CRM_Core_Exception $e) {
Expand Down

0 comments on commit 883c523

Please sign in to comment.