CRM-11338 backport exception class
authoreileenmcnaugton <eileen@fuzion.co.nz>
Fri, 4 Dec 2015 07:36:52 +0000 (20:36 +1300)
committereileen <emcnaughton@wikimedia.org>
Sun, 6 Dec 2015 22:36:00 +0000 (11:36 +1300)
Change-Id: Id4ca37d589e0d21074cae140935e28d18de2d59e

CRM/Core/Payment/PayPalImpl.php
Civi/Payment/Exception/PaymentProcessorException.php [new file with mode: 0644]

index db76d97e72094ed7a20de331bd500f8a107a7f91..a493d66b8b6edcae4148912ad379afd3829a2a1a 100644 (file)
  +--------------------------------------------------------------------+
  */
 
+use Civi\Payment\Exception\PaymentProcessorException;
+
 /**
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
+ */
+
+/**
+ * Class CRM_Core_Payment_PayPalImpl for paypal pro, paypal standard & paypal express.
  */
 class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
   const CHARSET = 'iso-8859-1';
@@ -51,7 +55,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
    * @param string $mode
    *   The mode of operation: live or test.
    *
-   * @param $paymentProcessor
+   * @param CRM_Core_Payment $paymentProcessor
    *
    * @return \CRM_Core_Payment_PayPalImpl
    */
@@ -416,7 +420,7 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
    */
   public function doQuery($params) {
     if (empty($params['trxn_id'])) {
-      throw new \Civi\Payment\Exception\PaymentProcessorException('transaction id not set');
+      return array();
     }
     $args = array(
       'TRANSACTIONID' => $params['trxn_id'],
diff --git a/Civi/Payment/Exception/PaymentProcessorException.php b/Civi/Payment/Exception/PaymentProcessorException.php
new file mode 100644 (file)
index 0000000..6a441f5
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+namespace Civi\Payment\Exception;
+
+/**
+ * Class PaymentProcessorException
+ */
+class PaymentProcessorException extends \CRM_Core_Exception {
+
+}