Remove last reference to Payment->_processorName in core & remove from processors
authoreileen <emcnaughton@wikimedia.org>
Tue, 2 Jun 2020 21:47:47 +0000 (09:47 +1200)
committereileen <emcnaughton@wikimedia.org>
Tue, 2 Jun 2020 21:50:11 +0000 (09:50 +1200)
I left it on Core_Payment to keep the deprecation notice visible

CRM/Contribute/Form/UpdateBilling.php
CRM/Core/Payment.php
CRM/Core/Payment/AuthorizeNet.php
CRM/Core/Payment/Dummy.php
CRM/Core/Payment/Elavon.php
CRM/Core/Payment/PayJunction.php
CRM/Core/Payment/PayPalImpl.php
CRM/Core/Payment/PayflowPro.php
CRM/Core/Payment/PaymentExpress.php
CRM/Core/Payment/Realex.php
CRM/Core/Payment/eWAY.php

index 1370802e5494bea13208fecef2c0151dbae44ce5..06486b25257265667a7fd8cdf937cdf621ae9f95 100644 (file)
@@ -55,12 +55,12 @@ class CRM_Contribute_Form_UpdateBilling extends CRM_Contribute_Form_Contribution
     }
 
     if ((!$this->_crid && !$this->_coid && !$this->_mid) || (!$this->_subscriptionDetails)) {
-      CRM_Core_Error::fatal('Required information missing.');
+      throw new CRM_Core_Exception('Required information missing.');
     }
 
     if (!$this->_paymentProcessor['object']->supports('updateSubscriptionBillingInfo')) {
-      CRM_Core_Error::fatal(ts("%1 processor doesn't support updating subscription billing details.",
-        array(1 => $this->_paymentProcessor['object']->_processorName)
+      throw new CRM_Core_Exception(ts("%1 processor doesn't support updating subscription billing details.",
+        [1 => $this->_paymentProcessor['title']]
       ));
     }
     $this->assign('paymentProcessor', $this->_paymentProcessor);
index aec1fadf7832dbb9d82c01ab95a614c9ef7c0c8f..c4e4deb2c583126aa1ee2ce6abef3f4d142de747 100644 (file)
@@ -94,7 +94,7 @@ abstract class CRM_Core_Payment {
   /**
    * Processor type label.
    *
-   * (Deprecated parameter but used in some messages).
+   * (Deprecated unused parameter).
    *
    * @var string
    * @deprecated
index 7f0c4f4fd2aece9b2ae0dcbc3be4f7fdd4092205..03a1438a055b6e672418f2e3a1af0e340892814e 100644 (file)
@@ -72,7 +72,6 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment {
   public function __construct($mode, &$paymentProcessor) {
     $this->_mode = $mode;
     $this->_paymentProcessor = $paymentProcessor;
-    $this->_processorName = ts('Authorize.net');
 
     $this->_setParam('apiLogin', $paymentProcessor['user_name']);
     $this->_setParam('paymentKey', $paymentProcessor['password']);
index e0a079a8f1b8b48218c9811bdc6e9354531e7d66..c3535c6918a65c68ca497f1bfd9e9620531a8cc5 100644 (file)
@@ -64,7 +64,6 @@ class CRM_Core_Payment_Dummy extends CRM_Core_Payment {
   public function __construct($mode, &$paymentProcessor) {
     $this->_mode = $mode;
     $this->_paymentProcessor = $paymentProcessor;
-    $this->_processorName = ts('Dummy Processor');
   }
 
   /**
index 0e63ded17d12c56d104a100e945a99ce45cbda74..2f9a140694ac9e349dae7cc340ffde133d4e1357 100644 (file)
@@ -50,7 +50,6 @@ class CRM_Core_Payment_Elavon extends CRM_Core_Payment {
     // live or test
     $this->_mode = $mode;
     $this->_paymentProcessor = $paymentProcessor;
-    $this->_processorName = ts('Elavon');
   }
 
   /**
index 646421ee03f1409bda82a19d4fd89fa7976b92a8..4fe0512979ae26112ed466a5c7cfd85ec7aa4f64 100644 (file)
@@ -43,7 +43,6 @@ class CRM_Core_Payment_PayJunction extends CRM_Core_Payment {
   public function __construct($mode, &$paymentProcessor) {
     $this->_mode = $mode;
     $this->_paymentProcessor = $paymentProcessor;
-    $this->_processorName = ts('PayJunction');
   }
 
   /**
index 092ef82ec028cf7ec7c34faf9de3c6f0a8ad3035..022067bd98b568294c53c5d23e5763aa600fa93a 100644 (file)
@@ -43,19 +43,6 @@ class CRM_Core_Payment_PayPalImpl extends CRM_Core_Payment {
   public function __construct($mode, &$paymentProcessor) {
     $this->_mode = $mode;
     $this->_paymentProcessor = $paymentProcessor;
-
-    if ($this->isPayPalType($this::PAYPAL_STANDARD)) {
-      $this->_processorName = ts('PayPal Standard');
-    }
-    elseif ($this->isPayPalType($this::PAYPAL_EXPRESS)) {
-      $this->_processorName = ts('PayPal Express');
-    }
-    elseif ($this->isPayPalType($this::PAYPAL_PRO)) {
-      $this->_processorName = ts('PayPal Pro');
-    }
-    else {
-      throw new PaymentProcessorException('CRM_Core_Payment_PayPalImpl: Payment processor type is not defined!');
-    }
   }
 
   /**
index 662f6f9640a6c4cf4dd53138ab4219d96699b312..06355395bff516cd187884d3e23092fc5daee3b5 100644 (file)
@@ -36,7 +36,6 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
     // live or test
     $this->_mode = $mode;
     $this->_paymentProcessor = $paymentProcessor;
-    $this->_processorName = ts('Payflow Pro');
   }
 
   /*
index 643119444f20bc32e033f614f48fbf7e42f16d04..af2e876355b48826434a532cf98f9c14e6e1d749 100644 (file)
@@ -63,7 +63,6 @@ class CRM_Core_Payment_PaymentExpress extends CRM_Core_Payment {
 
     $this->_mode = $mode;
     $this->_paymentProcessor = $paymentProcessor;
-    $this->_processorName = ts('DPS Payment Express');
   }
 
   /**
index 8100aa95319546b764e21f63e5318ed6d543ccc5..fad410d3be5ee9a487860fd7064019d2104d45e9 100644 (file)
@@ -65,7 +65,6 @@ class CRM_Core_Payment_Realex extends CRM_Core_Payment {
   public function __construct($mode, &$paymentProcessor) {
     $this->_mode = $mode;
     $this->_paymentProcessor = $paymentProcessor;
-    $this->_processorName = ts('Realex');
 
     $this->_setParam('merchant_ref', $paymentProcessor['user_name']);
     $this->_setParam('secret', $paymentProcessor['password']);
index ba52b0f8a09ed6cca6e6b8e4a07ed5b86a6b3b8c..d0a369ea8873e2ad4383a2ce0c0418806d9e336a 100644 (file)
@@ -126,7 +126,6 @@ class CRM_Core_Payment_eWAY extends CRM_Core_Payment {
     // live or test
     $this->_mode = $mode;
     $this->_paymentProcessor = $paymentProcessor;
-    $this->_processorName = ts('eWay');
   }
 
   /**