diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php index 2ad490ac4da1ddd2f317c1c5b18c2f3ddd84246d..8f5dd3786fe98c4503f6cb4d57c79591f1b88a60 100644 --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@ -274,15 +274,18 @@ class CRM_Core_Payment_BaseIPN { /** * Handled pending contribution status. * + * @deprecated + * * @param array $objects * @param object $transaction * * @return bool */ public function pending(&$objects, &$transaction) { + CRM_Core_Error::deprecatedFunctionWarning('This function will be removed at some point'); $transaction->commit(); - Civi::log()->debug("Returning since contribution status is Pending"); - echo "Success: Returning since contribution status is pending<p>"; + Civi::log()->debug('Returning since contribution status is Pending'); + echo 'Success: Returning since contribution status is pending<p>'; return TRUE; } diff --git a/CRM/Core/Payment/PayPalIPN.php b/CRM/Core/Payment/PayPalIPN.php index a506ab3f29714c9e737bfb09833608f1164b38f9..0d3eae538678fbbaf91030744070c93bd411cde5 100644 --- a/CRM/Core/Payment/PayPalIPN.php +++ b/CRM/Core/Payment/PayPalIPN.php @@ -263,8 +263,9 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN { if ($status == 'Denied' || $status == 'Failed' || $status == 'Voided') { return $this->failed($objects, $transaction); } - elseif ($status == 'Pending') { - return $this->pending($objects, $transaction); + if ($status === 'Pending') { + Civi::log()->debug('Returning since contribution status is Pending'); + return; } elseif ($status == 'Refunded' || $status == 'Reversed') { return $this->cancelled($objects, $transaction); diff --git a/CRM/Core/Payment/PayPalProIPN.php b/CRM/Core/Payment/PayPalProIPN.php index 46c0949f8517eef1fb30573b81ca8736f01db683..a2155527240bd05529736c1e7e676e0f25b969b2 100644 --- a/CRM/Core/Payment/PayPalProIPN.php +++ b/CRM/Core/Payment/PayPalProIPN.php @@ -351,8 +351,8 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN { $this->failed($objects, $transaction); return; } - elseif ($status == 'Pending') { - $this->pending($objects, $transaction); + if ($status === 'Pending') { + Civi::log()->debug('Returning since contribution status is Pending'); return; } elseif ($status == 'Refunded' || $status == 'Reversed') {