Passed
Pull Request — master (#37)
by Raúl
02:11
created
controllers/front/notify.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     private function getPmtOrderId()
197 197
     {
198 198
         try {
199
-            $this->pmtOrderId= Db::getInstance()->getValue(
199
+            $this->pmtOrderId = Db::getInstance()->getValue(
200 200
                 'select order_id from '._DB_PREFIX_.'pmt_order where id = '.$this->merchantOrderId
201 201
             );
202 202
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                 Configuration::get('PS_OS_PAYMENT'),
283 283
                 $this->merchantOrder->getOrderTotal(true),
284 284
                 $this->module->displayName,
285
-                'pmtOrderId: ' . $this->pmtOrder->getId(),
285
+                'pmtOrderId: '.$this->pmtOrder->getId(),
286 286
                 array('transaction_id' => $this->pmtOrderId),
287 287
                 null,
288 288
                 false,
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
             $this->orderClient->confirmOrder($this->pmtOrderId);
305 305
             try {
306 306
                 $mode = ($_SERVER['REQUEST_METHOD'] == 'POST') ? 'NOTIFICATION' : 'REDIRECTION';
307
-                $message = 'Order CONFIRMED. The order was confirmed by a ' . $mode .
308
-                    '. Pagantis OrderId=' . $this->pmtOrderId .
309
-                    '. Prestashop OrderId=' . $this->merchantOrderId;
307
+                $message = 'Order CONFIRMED. The order was confirmed by a '.$mode.
308
+                    '. Pagantis OrderId='.$this->pmtOrderId.
309
+                    '. Prestashop OrderId='.$this->merchantOrderId;
310 310
                 $this->saveLog(array(
311 311
                     'message' => $message
312 312
                 ));
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
     protected function unblockConcurrency()
352 352
     {
353 353
         try {
354
-            Db::getInstance()->delete('pmt_cart_process', 'timestamp < ' . (time() - 6));
354
+            Db::getInstance()->delete('pmt_cart_process', 'timestamp < '.(time() - 6));
355 355
         } catch (\Exception $exception) {
356 356
             throw new ConcurrencyException();
357 357
         }
@@ -369,15 +369,15 @@  discard block
 block discarded – undo
369 369
     {
370 370
         if ($this->merchantOrder && $this->processError === true) {
371 371
             sleep(5);
372
-            $id = (!is_null($this->pmtOrder))?$this->pmtOrder->getId():null;
373
-            $status = (!is_null($this->pmtOrder))?$this->pmtOrder->getStatus():null;
372
+            $id = (!is_null($this->pmtOrder)) ? $this->pmtOrder->getId() : null;
373
+            $status = (!is_null($this->pmtOrder)) ? $this->pmtOrder->getStatus() : null;
374 374
             $this->module->validateOrder(
375 375
                 $this->merchantOrderId,
376 376
                 Configuration::get('PS_OS_ERROR'),
377 377
                 $this->merchantOrder->getOrderTotal(true),
378 378
                 $this->module->displayName,
379
-                ' pmtOrderId: ' . $id .
380
-                ' pmtStatusId:' . $status,
379
+                ' pmtOrderId: '.$id.
380
+                ' pmtStatusId:'.$status,
381 381
                 null,
382 382
                 null,
383 383
                 false,
@@ -413,9 +413,9 @@  discard block
 block discarded – undo
413 413
             'id_cart' => $this->merchantOrderId,
414 414
             'key' => $this->config['secureKey'],
415 415
             'id_module' => $this->module->id,
416
-            'id_order' => ($this->pmtOrder)?$this->pmtOrder->getId(): null,
416
+            'id_order' => ($this->pmtOrder) ? $this->pmtOrder->getId() : null,
417 417
         );
418
-        $url = ($error)? $this->config['urlKO'] : $this->config['urlOK'];
418
+        $url = ($error) ? $this->config['urlKO'] : $this->config['urlOK'];
419 419
         return $this->redirect($url, $parameters);
420 420
     }
421 421
 }
Please login to merge, or discard this patch.