Merge pull request #4958 from pratikshad/code-cleanup-batch-19
[civicrm-core.git] / CRM / Core / Payment / FirstData.php
index be6fa7689b80849530cd3570332fcec7b849d295..089838d49e7cea29ad90b0fdf5b83f68a797ad67 100644 (file)
 */
 
 /**
- Note that in order to use FirstData / LinkPoint you need a certificate (.pem) file issued by them
- and a store number. You can configure the path to the certificate and the store number
- through the front end of civiCRM. The path is as seen by the server not the url
- -----------------------------------------------------------------------------------------------
- The basic functionality of this processor is that variables from the $params object are transformed
- into xml using a function provided by the processor. The xml is submitted to the processor's https site
- using curl and the response is translated back into an array using the processor's function.
-
- If an array ($params) is returned to the calling function it is treated as a success and the values from
- the array are merged into the calling functions array.
-
- If an result of class error is returned it is treated as a failure
-
- -----------------------------------------------------------------------------------------------
- **/
Note that in order to use FirstData / LinkPoint you need a certificate (.pem) file issued by them
and a store number. You can configure the path to the certificate and the store number
through the front end of civiCRM. The path is as seen by the server not the url
-----------------------------------------------------------------------------------------------
The basic functionality of this processor is that variables from the $params object are transformed
into xml using a function provided by the processor. The xml is submitted to the processor's https site
using curl and the response is translated back into an array using the processor's function.
+ *
If an array ($params) is returned to the calling function it is treated as a success and the values from
the array are merged into the calling functions array.
+ *
If an result of class error is returned it is treated as a failure
+ *
-----------------------------------------------------------------------------------------------
+ */
 
 /**
  * From Payment processor documentation
@@ -60,11 +60,10 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
    * pattern and cache the instance in this variable
    *
    * @var object
-   * @static
    */
   static private $_singleton = NULL;
 
-  /**********************************************************
+  /**
    * Constructor
    *
    * @param string $mode
@@ -80,12 +79,12 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
     $this->_paymentProcessor = $paymentProcessor;
   }
 
-  /**********************************************************
+  /**
    * This function is set up and put here to make the mapping of fields
    * from the params object  as visually clear as possible for easy editing
    *
    *  Comment out irrelevant fields
-   **********************************************************/
+   */
   public function mapProcessorFieldstoParams($params) {
     /*concatenate full customer name first  - code from EWAY gateway
          */
@@ -140,10 +139,10 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
     return $requestFields;
   }
 
-  /**********************************************************
+  /**
    * This function sends request and receives response from
    * the processor
-   **********************************************************/
+   */
   public function doDirectPayment(&$params) {
     if ($params['is_recur'] == TRUE) {
       CRM_Core_Error::fatal(ts('%1 - recurring payments not implemented', array(1 => $paymentProcessor)));
@@ -316,9 +315,9 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
     return $contribution->find();
   }
 
-  /**************************************************
+  /**
    * Produces error message and returns from class
-   **************************************************/
+   */
   public function &errorExit($errorCode = NULL, $errorMessage = NULL) {
     $e = CRM_Core_Error::singleton();
 
@@ -331,14 +330,14 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
     return $e;
   }
 
-  /**************************************************
+  /**
    * NOTE: 'doTransferCheckout' not implemented
-   **************************************************/
+   */
   public function doTransferCheckout(&$params, $component) {
     CRM_Core_Error::fatal(ts('This function is not implemented'));
   }
 
-  /********************************************************************************************
+  /**
    * This public function checks to see if we have the right processor config values set
    *
    * NOTE: Called by Events and Contribute to check config params are set prior to trying
@@ -349,10 +348,9 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
    *
    * returns string $errorMsg if any errors found - null if OK
    *
-   ******************************************************************************************
+   *  function checkConfig( $mode )           CiviCRM V1.9 Declaration
+   * CiviCRM V2.0 Declaration
    */
-  //  function checkConfig( $mode )          // CiviCRM V1.9 Declaration
-  // CiviCRM V2.0 Declaration
   public function checkConfig() {
     $errorMsg = array();