Merge pull request #14457 from civicrm/5.14
[civicrm-core.git] / CRM / Core / Payment / FirstData.php
index 116d2322ba533dee6440f013610e11320502007c..a8f5b4f7ff42d2239ce9865195ba2e250dbd93e7 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | FirstData Core Payment Module for CiviCRM version 4.7              |
+ | FirstData Core Payment Module for CiviCRM version 5                |
  +--------------------------------------------------------------------+
  | Licensed to CiviCRM under the Academic Free License version 3.0    |
  |                                                                    |
@@ -52,7 +52,7 @@
  * **************************
  */
 class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
-  # (not used, implicit in the API, might need to convert?)
+  // (not used, implicit in the API, might need to convert?)
   const CHARSET = 'UFT-8';
 
   /**
@@ -122,7 +122,7 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
     $requestFields['email'] = $params['email'];
     $requestFields['ip'] = $params['ip_address'];
     $requestFields['transactionorigin'] = "Eci";
-    #32 character string
+    // 32 character string
     $requestFields['invoice_number'] = $params['invoiceID'];
     $requestFields['ordertype'] = 'Sale';
     $requestFields['comments'] = $params['description'];
@@ -160,7 +160,7 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
     }
 
     if (!defined('CURLOPT_SSLCERT')) {
-      CRM_Core_Error::fatal(ts('%1 - Gateway requires curl with SSL support', array(1 => $paymentProcessor)));
+      CRM_Core_Error::fatal(ts('%1 - Gateway requires curl with SSL support', [1 => $paymentProcessor]));
     }
 
     /**********************************************************
@@ -179,9 +179,9 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
      * define variables for connecting with the gateway
      **********************************************************/
 
-    # Name and location of certificate file
+    // Name and location of certificate file
     $key = $this->_paymentProcessor['password'];
-    # Your store number
+    // Your store number
     $requestFields["configfile"] = $this->_paymentProcessor['user_name'];
     $port = "1129";
     $host = $this->_paymentProcessor['url_site'] . ":" . $port . "/LSGSXML";
@@ -309,6 +309,7 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
       return $params;
     }
   }
+
   // end function doDirectPayment
 
   /**
@@ -346,7 +347,7 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
    * CiviCRM V2.0 Declaration
    */
   public function checkConfig() {
-    $errorMsg = array();
+    $errorMsg = [];
 
     if (empty($this->_paymentProcessor['user_name'])) {
       $errorMsg[] = ts(' Store Name is not set for this payment processor');