INFRA-132 - CRM/Core - phpcbf
[civicrm-core.git] / CRM / Core / Payment / PayflowPro.php
index e103f278c10b70bd8b16477915e253b17ebeb888..0ecaa28ba7874d25fafa0e1205fdac7c2e18e890 100644 (file)
@@ -202,8 +202,7 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
 
         case '2 weeks':
           $params['next_sched_contribution_date'] = mktime(0, 0, 0, date("m"), date("d") + 14, date("Y"));
-          $params['end_date'] = mktime(0, 0, 0, date("m"), date("d") + (14 * $payflow_query_array['TERM'])
-            , date("Y ")
+          $params['end_date'] = mktime(0, 0, 0, date("m"), date("d") + (14 * $payflow_query_array['TERM']), date("Y ")
           );
           $payflow_query_array['START'] = date('mdY', $params['next_sched_contribution_date']);
           $payflow_query_array['PAYPERIOD'] = "BIWK";
@@ -214,8 +213,7 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
         case '4 weeks':
           $params['next_sched_contribution_date'] = mktime(0, 0, 0, date("m"), date("d") + 28, date("Y")
           );
-          $params['end_date'] = mktime(0, 0, 0, date("m"), date("d") + (28 * $payflow_query_array['TERM'])
-            , date("Y")
+          $params['end_date'] = mktime(0, 0, 0, date("m"), date("d") + (28 * $payflow_query_array['TERM']), date("Y")
           );
           $payflow_query_array['START'] = date('mdY', $params['next_sched_contribution_date']);
           $payflow_query_array['PAYPERIOD'] = "FRWK";
@@ -238,8 +236,7 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
           break;
 
         case '3 months':
-          $params['next_sched_contribution_date'] = mktime(0, 0, 0, date("m") + 3, date("d")
-            , date("Y")
+          $params['next_sched_contribution_date'] = mktime(0, 0, 0, date("m") + 3, date("d"), date("Y")
           );
           $params['end_date'] = mktime(0, 0, 0, date("m") +
             (3 * $payflow_query_array['TERM']),
@@ -259,8 +256,7 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
             (6 * $payflow_query_array['TERM']),
             date("d"), date("Y")
           );
-          $payflow_query_array['START'] = date('mdY', $params['next_sched_contribution_date'
-            ]
+          $payflow_query_array['START'] = date('mdY', $params['next_sched_contribution_date']
           );
           $payflow_query_array['PAYPERIOD'] = "SMYR";
           $params['frequency_unit'] = "month";
@@ -589,12 +585,14 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
       $errorDesc = curl_error($ch);
 
       //Paranoia - in the unlikley event that 'curl' errno fails
-      if ($errorNum == 0)
-      $errorNum = 9005;
+      if ($errorNum == 0) {
+        $errorNum = 9005;
+      }
 
       // Paranoia - in the unlikley event that 'curl' error fails
-      if (strlen($errorDesc) == 0)
-      $errorDesc = "Connection to payment gateway failed";
+      if (strlen($errorDesc) == 0) {
+        $errorDesc = "Connection to payment gateway failed";
+      }
       if ($errorNum = 60) {
         return self::errorExit($errorNum, "Curl error - " . $errorDesc .
           " Try this link for more information http://curl.haxx.se/d
@@ -660,7 +658,6 @@ class CRM_Core_Payment_PayflowPro extends CRM_Core_Payment {
     //$recurringProfileID = "RT0000000001";
     //     c  $trythis =        $this->getRecurringTransactionStatus($recurringProfileID,17);
 
-
     /*
      *Create the array of variables to be sent to the processor from the $params array
      * passed into this function