Passed
Pull Request — master (#4)
by
unknown
02:54
created
catalog/ext/modules/payment/pagantis/callback.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         //echo "$var  ";
19 19
     }
20 20
     $destUrl = tep_href_link(FILENAME_CHECKOUT_PROCESS, htmlentities("order_id=".$_GET['order_id']."&from=notify"), 'SSL', true, false);
21
-} else {
21
+}else {
22 22
     $destUrl = tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL', true, false);
23 23
 }
24 24
 
Please login to merge, or discard this patch.
catalog/ext/modules/payment/pagantis/notifyController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 
78 78
             if ($this->origin == 'notify') {
79 79
                 $jsonResponse->printResponse();
80
-            } else {
81
-                if (get_class($exception)=='AlreadyProcessedException') {
80
+            }else {
81
+                if (get_class($exception) == 'AlreadyProcessedException') {
82 82
                     return;
83 83
                 }
84 84
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         if ($_SERVER['REQUEST_METHOD'] == 'POST') {
110 110
             $jsonResponse->printResponse();
111
-        } else {
111
+        }else {
112 112
             return $jsonResponse;
113 113
         }
114 114
     }
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
         try {
181 181
             $this->checkPagantisStatus(array('AUTHORIZED'));
182 182
         } catch (\Exception $e) {
183
-            if ($this->findOscommerceOrderId()!=='') {
183
+            if ($this->findOscommerceOrderId() !== '') {
184 184
                 throw new AlreadyProcessedException();
185
-            } else {
185
+            }else {
186 186
                 if ($this->pagantisOrder instanceof \Pagantis\OrdersApiClient\Model\Order) {
187 187
                     $status = $this->pagantisOrder->getStatus();
188
-                } else {
188
+                }else {
189 189
                     $status = '-';
190 190
                 }
191 191
                 throw new WrongStatusException($status);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     {
201 201
         global $order;
202 202
 
203
-        if ($order->info['order_status']!=='1') {
203
+        if ($order->info['order_status'] !== '1') {
204 204
             throw new AlreadyProcessedException();
205 205
         }
206 206
     }
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
             if ($orderId == null) {
278 278
                 $query = "delete from ".TABLE_PAGANTIS_CONCURRENCY." where  timestamp<".(time() - 5);
279 279
                 tep_db_query($query);
280
-            } elseif ($this->$orderId!='') {
280
+            } elseif ($this->$orderId != '') {
281 281
                 $query = "delete from ".TABLE_PAGANTIS_CONCURRENCY." where id='$orderId'";
282 282
                 tep_db_query($query);
283 283
             }
@@ -320,12 +320,12 @@  discard block
 block discarded – undo
320 320
             if (!$payed) {
321 321
                 if ($this->pagantisOrder instanceof \Pagantis\OrdersApiClient\Model\Order) {
322 322
                     $status = $this->pagantisOrder->getStatus();
323
-                } else {
323
+                }else {
324 324
                     $status = '-';
325 325
                 }
326 326
                 throw new WrongStatusException($status);
327 327
             }
328
-        } else {
328
+        }else {
329 329
             throw new OrderNotFoundException();
330 330
         }
331 331
     }
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
         tep_db_query($query);
357 357
 
358 358
         $comment = "Pagantis id=$this->pagantisOrderId/Via=".$this->origin;
359
-        $query = "insert into ".TABLE_ORDERS_STATUS_HISTORY ."(comments, orders_id, orders_status_id, customer_notified, date_added) values
359
+        $query = "insert into ".TABLE_ORDERS_STATUS_HISTORY."(comments, orders_id, orders_status_id, customer_notified, date_added) values
360 360
             ('$comment', ".$insert_id.", '".$this->orderStatus."', -1, now() )";
361 361
         tep_db_query($query);
362 362
     }
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
     private function insertLog($exception)
376 376
     {
377 377
         if ($exception instanceof \Exception) {
378
-            $logEntry= new LogEntry();
378
+            $logEntry = new LogEntry();
379 379
             $logEntryJson = $logEntry->error($exception)->toJson();
380 380
 
381 381
             $query = "insert into ".TABLE_PAGANTIS_LOG."(log) values ('$logEntryJson')";
Please login to merge, or discard this patch.
catalog/ext/modules/payment/pagantis/logController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 $orderRow = tep_db_fetch_array($resultsSelect);
12 12
 $privateKey = $orderRow['configuration_value'];
13 13
 
14
-if ($secretKey!='' && $privateKey!='') {
15
-    $query ="select log, createdAt from ".TABLE_PAGANTIS_LOG;
14
+if ($secretKey != '' && $privateKey != '') {
15
+    $query = "select log, createdAt from ".TABLE_PAGANTIS_LOG;
16 16
 
17 17
     $where = array();
18 18
     if (isset($_GET['from'])) {
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
     }
25 25
 
26 26
 
27
-    if (count($where)>0) {
28
-        $query.=" where ";
27
+    if (count($where) > 0) {
28
+        $query .= " where ";
29 29
         foreach ((array)$where as $clause) {
30
-            $query.=" $clause AND";
30
+            $query .= " $clause AND";
31 31
         }
32 32
         $query = substr($query, 0, -3);
33 33
     }
34 34
 
35 35
     $limit = ($_GET['limit']) ? $_GET['limit'] : 50;
36
-    $query.=" order by createdAt desc limit $limit";
36
+    $query .= " order by createdAt desc limit $limit";
37 37
 
38 38
     $response = array();
39 39
     $resultsSelect = tep_db_query($query);
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             $response[$i]['log']       = $orderRow['log'];
45 45
             $i++;
46 46
         }
47
-    } else {
47
+    }else {
48 48
         $response['result'] = 'Error';
49 49
     }
50 50
 
Please login to merge, or discard this patch.