From 5495e78a2d2c8e58fba3a577b6eb8f05b0cad57f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 26 May 2015 13:05:30 +1200 Subject: [PATCH] CRM-16566 provide support for recommended callback style to Paypal pro --- CRM/Core/Payment.php | 6 +----- CRM/Core/Payment/PayPalImpl.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index ce5e23091b..2cb276b459 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -626,16 +626,12 @@ abstract class CRM_Core_Payment { // possible we may get more. Hence, iterate through all instances .. while ($dao->fetch()) { - // Check pp is extension + // Check pp is extension - is this still required - surely the singleton below handles it. $ext = CRM_Extension_System::singleton()->getMapper(); if ($ext->isExtensionKey($dao->class_name)) { $paymentClass = $ext->keyToClass($dao->class_name, 'payment'); require_once $ext->classToPath($paymentClass); } - else { - // Legacy or extension as module instance - $paymentClass = 'CRM_Core_' . $dao->class_name; - } $processorInstance = Civi\Payment\System::singleton()->getById($dao->processor_id); diff --git a/CRM/Core/Payment/PayPalImpl.php b/CRM/Core/Payment/PayPalImpl.php index 838542d15f..85ff69aa62 100644 --- a/CRM/Core/Payment/PayPalImpl.php +++ b/CRM/Core/Payment/PayPalImpl.php @@ -469,6 +469,20 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment { return FALSE; } + /** + * Process incoming notification. + * + * This is only supported for paypal pro at the moment & no specific plans to add this path to core + * for paypal standard as the goal must be to separate the 2. + * + * We don't need to handle paypal standard using this path as there has never been any historic support + * for paypal standard to call civicrm/payment/ipn as a path. + */ + static public function handlePaymentNotification() { + $paypalIPN = new CRM_Core_Payment_PayPalProIPN($_REQUEST); + $paypalIPN->main(); + } + /** * @param string $message * @param array $params -- 2.25.1