Passed
Push — master ( 4ee2a3...ed449e )
by Cesar
03:07
created
controllers/front/notify.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     private function getPagantisOrderId()
197 197
     {
198 198
         try {
199
-            $this->pagantisOrderId= Db::getInstance()->getValue(
199
+            $this->pagantisOrderId = Db::getInstance()->getValue(
200 200
                 'select order_id from '._DB_PREFIX_.'pagantis_order where id = '.$this->merchantOrderId
201 201
             );
202 202
 
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
                 Configuration::get('PS_OS_PAYMENT'),
286 286
                 $this->merchantOrder->getOrderTotal(true),
287 287
                 $this->module->displayName,
288
-                ' pagantisOrderId: ' . $this->pagantisOrder->getId().
289
-                ' pagantisOrderStatus: '. $this->pagantisOrder->getStatus(),
288
+                ' pagantisOrderId: '.$this->pagantisOrder->getId().
289
+                ' pagantisOrderStatus: '.$this->pagantisOrder->getStatus(),
290 290
                 array('transaction_id' => $this->pagantisOrderId),
291 291
                 null,
292 292
                 false,
@@ -308,9 +308,9 @@  discard block
 block discarded – undo
308 308
             $this->orderClient->confirmOrder($this->pagantisOrderId);
309 309
             try {
310 310
                 $mode = ($_SERVER['REQUEST_METHOD'] == 'POST') ? 'NOTIFICATION' : 'REDIRECTION';
311
-                $message = 'Order CONFIRMED. The order was confirmed by a ' . $mode .
312
-                    '. Pagantis OrderId=' . $this->pagantisOrderId .
313
-                    '. Prestashop OrderId=' . $this->merchantOrderId;
311
+                $message = 'Order CONFIRMED. The order was confirmed by a '.$mode.
312
+                    '. Pagantis OrderId='.$this->pagantisOrderId.
313
+                    '. Prestashop OrderId='.$this->merchantOrderId;
314 314
                 $this->saveLog(array(
315 315
                     'message' => $message
316 316
                 ));
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
     protected function unblockConcurrency()
356 356
     {
357 357
         try {
358
-            Db::getInstance()->delete('pagantis_cart_process', 'timestamp < ' . (time() - 6));
358
+            Db::getInstance()->delete('pagantis_cart_process', 'timestamp < '.(time() - 6));
359 359
         } catch (\Exception $exception) {
360 360
             throw new ConcurrencyException();
361 361
         }
@@ -373,15 +373,15 @@  discard block
 block discarded – undo
373 373
     {
374 374
         if ($this->merchantOrder && $this->processError === true) {
375 375
             sleep(5);
376
-            $id = (!is_null($this->pagantisOrder))?$this->pagantisOrder->getId():null;
377
-            $status = (!is_null($this->pagantisOrder))?$this->pagantisOrder->getStatus():null;
376
+            $id = (!is_null($this->pagantisOrder)) ? $this->pagantisOrder->getId() : null;
377
+            $status = (!is_null($this->pagantisOrder)) ? $this->pagantisOrder->getStatus() : null;
378 378
             $this->module->validateOrder(
379 379
                 $this->merchantOrderId,
380 380
                 Configuration::get('PS_OS_ERROR'),
381 381
                 $this->merchantOrder->getOrderTotal(true),
382 382
                 $this->module->displayName,
383
-                ' pagantisOrderId: ' . $id.
384
-                ' pagantisOrderStatus: '. $status,
383
+                ' pagantisOrderId: '.$id.
384
+                ' pagantisOrderStatus: '.$status,
385 385
                 null,
386 386
                 null,
387 387
                 false,
@@ -417,9 +417,9 @@  discard block
 block discarded – undo
417 417
             'id_cart' => $this->merchantOrderId,
418 418
             'key' => $this->config['secureKey'],
419 419
             'id_module' => $this->module->id,
420
-            'id_order' => ($this->pagantisOrder)?$this->pagantisOrder->getId(): null,
420
+            'id_order' => ($this->pagantisOrder) ? $this->pagantisOrder->getId() : null,
421 421
         );
422
-        $url = ($error)? $this->config['urlKO'] : $this->config['urlOK'];
422
+        $url = ($error) ? $this->config['urlKO'] : $this->config['urlOK'];
423 423
         return $this->redirect($url, $parameters);
424 424
     }
425 425
 }
Please login to merge, or discard this patch.