// 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);
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