Passed
Pull Request — master (#34)
by Raúl
03:22
created
controllers/front/payment.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
     {
26 26
         if (_PS_VERSION_ < 1.6) {
27 27
             Logger::addLog(
28
-                'Pagantis Exception For user ' .
29
-                $customer->email .
30
-                ' : ' .
28
+                'Pagantis Exception For user '.
29
+                $customer->email.
30
+                ' : '.
31 31
                 $exception->getMessage(),
32 32
                 3,
33 33
                 $exception->getCode(),
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
             );
38 38
         } else {
39 39
             PrestaShopLogger::addLog(
40
-                'Pagantis Exception For user ' .
41
-                $customer->email .
42
-                ' : ' .
40
+                'Pagantis Exception For user '.
41
+                $customer->email.
42
+                ' : '.
43 43
                 $exception->getMessage(),
44 44
                 3,
45 45
                 $exception->getCode(),
@@ -98,22 +98,22 @@  discard block
 block discarded – undo
98 98
         );
99 99
 
100 100
         try {
101
-            $userAddress =  new \Pagantis\OrdersApiClient\Model\Order\User\Address();
101
+            $userAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address();
102 102
             $userAddress
103 103
                 ->setZipCode($shippingAddress->postcode)
104
-                ->setFullName($shippingAddress->firstname . ' ' . $shippingAddress->lastname)
104
+                ->setFullName($shippingAddress->firstname.' '.$shippingAddress->lastname)
105 105
                 ->setCountryCode('ES')
106 106
                 ->setCity($shippingAddress->city)
107
-                ->setAddress($shippingAddress->address1 . ' ' . $shippingAddress->address2)
107
+                ->setAddress($shippingAddress->address1.' '.$shippingAddress->address2)
108 108
             ;
109 109
 
110
-            $orderShippingAddress =  new \Pagantis\OrdersApiClient\Model\Order\User\Address();
110
+            $orderShippingAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address();
111 111
             $orderShippingAddress
112 112
                 ->setZipCode($shippingAddress->postcode)
113
-                ->setFullName($shippingAddress->firstname . ' ' . $shippingAddress->lastname)
113
+                ->setFullName($shippingAddress->firstname.' '.$shippingAddress->lastname)
114 114
                 ->setCountryCode('ES')
115 115
                 ->setCity($shippingAddress->city)
116
-                ->setAddress($shippingAddress->address1 . ' ' . $shippingAddress->address2)
116
+                ->setAddress($shippingAddress->address1.' '.$shippingAddress->address2)
117 117
                 ->setDni($shippingAddress->dni)
118 118
                 ->setFixPhone($shippingAddress->phone)
119 119
                 ->setMobilePhone($shippingAddress->phone_mobile)
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
             $orderBillingAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address();
123 123
             $orderBillingAddress
124 124
                 ->setZipCode($billingAddress->postcode)
125
-                ->setFullName($billingAddress->firstname . ' ' . $billingAddress->lastname)
125
+                ->setFullName($billingAddress->firstname.' '.$billingAddress->lastname)
126 126
                 ->setCountryCode('ES')
127 127
                 ->setCity($billingAddress->city)
128
-                ->setAddress($billingAddress->address1 . ' ' . $billingAddress->address2)
128
+                ->setAddress($billingAddress->address1.' '.$billingAddress->address2)
129 129
                 ->setDni($billingAddress->dni)
130 130
                 ->setFixPhone($billingAddress->phone)
131 131
                 ->setMobilePhone($billingAddress->phone_mobile)
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 ->setDni($shippingAddress->dni)
144 144
             ;
145 145
 
146
-            if ($customer->birthday!='0000-00-00') {
146
+            if ($customer->birthday != '0000-00-00') {
147 147
                 $orderUser->setDateOfBirth($customer->birthday);
148 148
             }
149 149
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             Tools::redirect($cancelUrl);
220 220
         }
221 221
 
222
-        $url ='';
222
+        $url = '';
223 223
         try {
224 224
             $orderClient = new \Pagantis\OrdersApiClient\Client(
225 225
                 $pagantisPublicKey,
@@ -229,12 +229,12 @@  discard block
 block discarded – undo
229 229
             if ($order instanceof \Pagantis\OrdersApiClient\Model\Order) {
230 230
                 $url = $order->getActionUrls()->getForm();
231 231
                 $orderId = $order->getId();
232
-                $sql = "INSERT INTO `" . _DB_PREFIX_ . "pagantis_order` (`id`, `order_id`)
232
+                $sql = "INSERT INTO `"._DB_PREFIX_."pagantis_order` (`id`, `order_id`)
233 233
                      VALUES ('$cart->id','$orderId') 
234 234
                      ON DUPLICATE KEY UPDATE `order_id` = '$orderId'";
235 235
                 $result = Db::getInstance()->execute($sql);
236 236
                 if (!$result) {
237
-                    throw new UnknownException('Unable to save pagantis-order-id in database: '. $sql);
237
+                    throw new UnknownException('Unable to save pagantis-order-id in database: '.$sql);
238 238
                 }
239 239
             } else {
240 240
                 throw new OrderNotFoundException();
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@
 block discarded – undo
83 83
         $pagantisPublicKey = Configuration::get('pagantis_public_key');
84 84
         $pagantisPrivateKey = Configuration::get('pagantis_private_key');
85 85
         $okUrl = _PS_BASE_URL_.__PS_BASE_URI__
86
-                 .'index.php?canonical=true&fc=module&module=pagantis&controller=notify&'
87
-                 .http_build_query($query)
86
+                    .'index.php?canonical=true&fc=module&module=pagantis&controller=notify&'
87
+                    .http_build_query($query)
88 88
         ;
89 89
 
90 90
         $shippingAddress = new Address($cart->id_address_delivery);
Please login to merge, or discard this patch.
pagantis.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     exit;
12 12
 }
13 13
 
14
-define('_PS_PAYLATER_DIR', _PS_MODULE_DIR_. '/pagantis');
14
+define('_PS_PAYLATER_DIR', _PS_MODULE_DIR_.'/pagantis');
15 15
 
16 16
 require _PS_PAYLATER_DIR.'/vendor/autoload.php';
17 17
 
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $this->name = 'pagantis';
69 69
         $this->tab = 'payments_gateways';
70
-<<<<<<< HEAD:pagantis.php
70
+<< << << < HEAD:pagantis.php
71 71
         $this->version = '8.0.0';
72 72
         $this->author = 'Pagantis';
73
-=======
73
+=== === =
74 74
         $this->version = '7.2.2';
75 75
         $this->author = 'Paga+Tarde';
76
->>>>>>> baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
76
+>> >> >> > baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
77 77
         $this->currencies = true;
78 78
         $this->currencies_mode = 'checkbox';
79 79
         $this->module_key = '2b9bc901b4d834bb7069e7ea6510438f';
@@ -199,18 +199,18 @@  discard block
 block discarded – undo
199 199
     public function checkHooks()
200 200
     {
201 201
         try {
202
-            $sql_content = 'select * from ' . _DB_PREFIX_. 'hook_module where 
203
-            id_module = \'' . Module::getModuleIdByName($this->name) . '\' and 
204
-            id_shop = \'' . Shop::getContextShopID() . '\' and 
205
-            id_hook = \'' . Hook::getIdByName('header') . '\'';
202
+            $sql_content = 'select * from '._DB_PREFIX_.'hook_module where 
203
+            id_module = \'' . Module::getModuleIdByName($this->name).'\' and 
204
+            id_shop = \'' . Shop::getContextShopID().'\' and 
205
+            id_hook = \'' . Hook::getIdByName('header').'\'';
206 206
             $hook_exists = Db::getInstance()->ExecuteS($sql_content);
207 207
             if (empty($hook_exists)) {
208
-                $sql_insert = 'insert into ' . _DB_PREFIX_.  'hook_module 
208
+                $sql_insert = 'insert into '._DB_PREFIX_.'hook_module 
209 209
             (id_module, id_shop, id_hook, position)
210 210
             values
211
-            (\''. Module::getModuleIdByName($this->name) . '\',
212
-            \''. Shop::getContextShopID() . '\',
213
-            \''. Hook::getIdByName('header') . '\',
211
+            (\''. Module::getModuleIdByName($this->name).'\',
212
+            \''. Shop::getContextShopID().'\',
213
+            \''. Hook::getIdByName('header').'\',
214 214
             150)';
215 215
                 Db::getInstance()->execute($sql_insert);
216 216
             }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public function checkEnvVariables()
226 226
     {
227
-        $sql_content = 'select * from ' . _DB_PREFIX_. 'pagantis_config';
227
+        $sql_content = 'select * from '._DB_PREFIX_.'pagantis_config';
228 228
         $dbConfigs = Db::getInstance()->executeS($sql_content);
229 229
 
230 230
         // Convert a multimple dimension array for SQL insert statements into a simple key/value
@@ -243,15 +243,15 @@  discard block
 block discarded – undo
243 243
             }
244 244
             Db::getInstance()->insert('pagantis_config', $data);
245 245
         }
246
-<<<<<<< HEAD:pagantis.php
246
+<< << << < HEAD:pagantis.php
247 247
 
248 248
         foreach (array_merge($this->defaultConfigs, $simpleDbConfigs) as $key => $value) {
249
-            putenv($key . '=' . $value);
249
+            putenv($key.'='.$value);
250 250
         }
251 251
 
252
-        putenv("PAGANTIS_DEFAULT_CONFIGS" . '=' . json_encode($this->defaultConfigs));
253
-=======
254
->>>>>>> baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
252
+        putenv("PAGANTIS_DEFAULT_CONFIGS".'='.json_encode($this->defaultConfigs));
253
+=== === =
254
+>> >> >> > baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
255 255
     }
256 256
 
257 257
     /**
@@ -288,15 +288,15 @@  discard block
 block discarded – undo
288 288
         $cart                       = $this->context->cart;
289 289
         $currency                   = new Currency($cart->id_currency);
290 290
         $availableCurrencies        = array('EUR');
291
-<<<<<<< HEAD:pagantis.php
291
+<< << << < HEAD:pagantis.php
292 292
         $pagantisDisplayMinAmount        = getenv('PAGANTIS_DISPLAY_MIN_AMOUNT');
293 293
         $pagantisPublicKey               = Configuration::get('pagantis_public_key');
294 294
         $pagantisPrivateKey              = Configuration::get('pagantis_private_key');
295
-=======
295
+=== === =
296 296
         $pmtDisplayMinAmount        = Paylater::getExtraConfig('PMT_DISPLAY_MIN_AMOUNT');
297 297
         $pmtPublicKey               = Configuration::get('pmt_public_key');
298 298
         $pmtPrivateKey              = Configuration::get('pmt_private_key');
299
->>>>>>> baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
299
+>> >> >> > baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
300 300
 
301 301
         return (
302 302
             $cart->getOrderTotal() >= $pagantisDisplayMinAmount &&
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
         } else {
338 338
             $this->context->controller->addJS('https://cdn.pagamastarde.com/js/pmt-v2/sdk.js');
339 339
         }
340
-        $this->context->controller->addJS($this->getPathUri(). 'views/js/simulator.js');
340
+        $this->context->controller->addJS($this->getPathUri().'views/js/simulator.js');
341 341
     }
342 342
 
343 343
     /**
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         }
352 352
 
353 353
         /** @var Cart $cart */
354
-<<<<<<< HEAD:pagantis.php
354
+<< << << < HEAD:pagantis.php
355 355
         $cart                            = $this->context->cart;
356 356
         $orderTotal                      = $cart->getOrderTotal();
357 357
         $link                            = $this->context->link;
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
         $pagantisSimulatorSkin           = getenv('PAGANTIS_SIMULATOR_DISPLAY_SKIN');
366 366
         $pagantisSimulatorPosition       = getenv('PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION');
367 367
         $pagantisTitle                   = $this->l(getenv('PAGANTIS_TITLE'));
368
-=======
368
+=== === =
369 369
         $cart                       = $this->context->cart;
370 370
         $orderTotal                 = $cart->getOrderTotal();
371 371
         $link                       = $this->context->link;
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
         $pmtSimulatorSkin           = Paylater::getExtraConfig('PMT_SIMULATOR_DISPLAY_SKIN');
380 380
         $pmtSimulatorPosition       = Paylater::getExtraConfig('PMT_SIMULATOR_DISPLAY_CSS_POSITION');
381 381
         $pmtTitle                   = $this->l(Paylater::getExtraConfig('PMT_TITLE'));
382
->>>>>>> baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
382
+>> >> >> > baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
383 383
 
384 384
         $this->context->smarty->assign($this->getButtonTemplateVars($cart));
385 385
         $this->context->smarty->assign(array(
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         $paymentOption
403 403
             ->setCallToActionText($pagantisTitle)
404 404
             ->setAction($link->getModuleLink('pagantis', 'payment'))
405
-            ->setLogo($this->getPathUri(). 'logo.gif')
405
+            ->setLogo($this->getPathUri().'logo.gif')
406 406
             ->setModuleName(__CLASS__)
407 407
         ;
408 408
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
                 'input' => array(
433 433
                     array(
434 434
                         'name' => 'pagantis_is_enabled',
435
-                        'type' =>  (version_compare(_PS_VERSION_, '1.6')<0) ?'radio' :'switch',
435
+                        'type' =>  (version_compare(_PS_VERSION_, '1.6') < 0) ? 'radio' : 'switch',
436 436
                         'label' => $this->l('Module is enabled'),
437 437
                         'prefix' => '<i class="icon icon-key"></i>',
438 438
                         'class' => 't',
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
                     ),
473 473
                     array(
474 474
                         'name' => 'pagantis_simulator_is_enabled',
475
-                        'type' => (version_compare(_PS_VERSION_, '1.6')<0) ?'radio' :'switch',
475
+                        'type' => (version_compare(_PS_VERSION_, '1.6') < 0) ? 'radio' : 'switch',
476 476
                         'label' => $this->l('Simulator is enabled'),
477 477
                         'prefix' => '<i class="icon icon-key"></i>',
478 478
                         'class' => 't',
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
             $message = $this->displayError($error);
589 589
         }
590 590
 
591
-        $logo = $this->getPathUri(). 'views/img/logo_pagantis.png';
591
+        $logo = $this->getPathUri().'views/img/logo_pagantis.png';
592 592
         $tpl = $this->local_path.'views/templates/admin/config-info.tpl';
593 593
         $this->context->smarty->assign(array(
594 594
             'logo' => $logo,
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
         }
615 615
 
616 616
         /** @var Cart $cart */
617
-<<<<<<< HEAD:pagantis.php
617
+<< << << < HEAD:pagantis.php
618 618
         $cart                            = $params['cart'];
619 619
         $orderTotal                      = $cart->getOrderTotal();
620 620
         $link                            = $this->context->link;
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
         $pagantisSimulatorSkin           = getenv('PAGANTIS_SIMULATOR_DISPLAY_SKIN');
629 629
         $pagantisSimulatorPosition       = getenv('PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION');
630 630
         $pagantisTitle                   = $this->l(getenv('PAGANTIS_TITLE'));
631
-=======
631
+=== === =
632 632
         $cart                       = $params['cart'];
633 633
         $orderTotal                 = $cart->getOrderTotal();
634 634
         $link                       = $this->context->link;
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
         $pmtSimulatorSkin           = Paylater::getExtraConfig('PMT_SIMULATOR_DISPLAY_SKIN');
643 643
         $pmtSimulatorPosition       = Paylater::getExtraConfig('PMT_SIMULATOR_DISPLAY_CSS_POSITION');
644 644
         $pmtTitle                   = $this->l(Paylater::getExtraConfig('PMT_TITLE'));
645
->>>>>>> baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
645
+>> >> >> > baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
646 646
         $this->context->smarty->assign($this->getButtonTemplateVars($cart));
647 647
         $this->context->smarty->assign(array(
648 648
             'amount'                     => $orderTotal,
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
      */
684 684
     public function productPageSimulatorDisplay($functionName)
685 685
     {
686
-<<<<<<< HEAD:pagantis.php
686
+<< << << < HEAD:pagantis.php
687 687
         $productConfiguration = getenv('PAGANTIS_SIMULATOR_DISPLAY_POSITION');
688 688
         /** @var ProductCore $product */
689 689
         $product = new Product(Tools::getValue('id_product'));
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
         $pagantisSimulatorSkin             = getenv('PAGANTIS_SIMULATOR_DISPLAY_SKIN');
700 700
         $pagantisSimulatorPosition         = getenv('PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION');
701 701
         $pagantisDisplayMinAmount          = getenv('PAGANTIS_DISPLAY_MIN_AMOUNT');
702
-=======
702
+=== === =
703 703
         $productConfiguration = Paylater::getExtraConfig('PMT_SIMULATOR_DISPLAY_POSITION');
704 704
         /** @var ProductCore $product */
705 705
         $product = new Product(Tools::getValue('id_product'));
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
         $pmtSimulatorSkin             = Paylater::getExtraConfig('PMT_SIMULATOR_DISPLAY_SKIN');
716 716
         $pmtSimulatorPosition         = Paylater::getExtraConfig('PMT_SIMULATOR_DISPLAY_CSS_POSITION');
717 717
         $pmtDisplayMinAmount          = Paylater::getExtraConfig('PMT_DISPLAY_MIN_AMOUNT');
718
->>>>>>> baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
718
+>> >> >> > baa9ffd6dc8be8aa8739e095731c2af1e9011fdf:paylater.php
719 719
 
720 720
         if ($functionName != $productConfiguration ||
721 721
             $amount <= 0 ||
@@ -814,10 +814,10 @@  discard block
 block discarded – undo
814 814
      */
815 815
     public function checkLogoExists()
816 816
     {
817
-        $logo = _PS_MODULE_DIR_ . '/onepagecheckoutps/views/img/payments/'. Tools::strtolower(__CLASS__). '.png';
818
-        if (!file_exists($logo) && is_dir(_PS_MODULE_DIR_ . '/onepagecheckoutps/views/img/payments')) {
817
+        $logo = _PS_MODULE_DIR_.'/onepagecheckoutps/views/img/payments/'.Tools::strtolower(__CLASS__).'.png';
818
+        if (!file_exists($logo) && is_dir(_PS_MODULE_DIR_.'/onepagecheckoutps/views/img/payments')) {
819 819
             copy(
820
-                _PS_PAYLATER_DIR . '/views/img/logo-64x64.png',
820
+                _PS_PAYLATER_DIR.'/views/img/logo-64x64.png',
821 821
                 $logo
822 822
             );
823 823
         }
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
             return '';
830 830
         }
831 831
 
832
-        $sql = 'SELECT value FROM '._DB_PREFIX_.'pmt_config where config = \'' . pSQL($config) . '\' limit 1';
832
+        $sql = 'SELECT value FROM '._DB_PREFIX_.'pmt_config where config = \''.pSQL($config).'\' limit 1';
833 833
         if ($results = Db::getInstance()->ExecuteS($sql)) {
834 834
             if (is_array($results) && count($results) === 1 && isset($results[0]['value'])) {
835 835
                 return $results[0]['value'];
Please login to merge, or discard this patch.
controllers/front/config.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
     public function initContent()
19 19
     {
20 20
         $this->authorize();
21
-        $method = Tools::strtolower($_SERVER['REQUEST_METHOD']) . "Method";
21
+        $method = Tools::strtolower($_SERVER['REQUEST_METHOD'])."Method";
22 22
         if (method_exists($this, $method)) {
23 23
             header('HTTP/1.1 200 Ok', true, 200);
24 24
             header('Content-Type: application/json', true);
25 25
             $result = json_encode($this->{$method}());
26
-            header('Content-Length: ' . Tools::strlen($result));
26
+            header('Content-Length: '.Tools::strlen($result));
27 27
             echo $result;
28 28
             exit();
29 29
         }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function getExtraConfigs()
40 40
     {
41
-        $sql_content = 'select * from ' . _DB_PREFIX_. 'pagantis_config';
41
+        $sql_content = 'select * from '._DB_PREFIX_.'pagantis_config';
42 42
         $dbConfigs = Db::getInstance()->executeS($sql_content);
43 43
 
44 44
         $simpleDbConfigs = array();
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                     Db::getInstance()->update(
68 68
                         'pagantis_config',
69 69
                         array('value' => pSQL($value)),
70
-                        'config = \''. pSQL($config) .'\''
70
+                        'config = \''.pSQL($config).'\''
71 71
                     );
72 72
                 } else {
73 73
                     $errors[$config] = $value;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function getMethod()
93 93
     {
94
-        $sql_content = 'select * from ' . _DB_PREFIX_. 'pagantis_config';
94
+        $sql_content = 'select * from '._DB_PREFIX_.'pagantis_config';
95 95
         $dbConfigs = Db::getInstance()->executeS($sql_content);
96 96
 
97 97
         $simpleDbConfigs = array();
Please login to merge, or discard this patch.
controllers/front/notify.php 1 patch
Spacing   +10 added lines, -10 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
 
@@ -278,8 +278,8 @@  discard block
 block discarded – undo
278 278
                 Configuration::get('PS_OS_PAYMENT'),
279 279
                 $this->merchantOrder->getOrderTotal(true),
280 280
                 $this->module->displayName,
281
-                'pagantisOrderId: ' . $this->pagantisOrder->getId().
282
-                'pagantisOrderStatus: '. $this->pagantisOrder->getStatus(),
281
+                'pagantisOrderId: '.$this->pagantisOrder->getId().
282
+                'pagantisOrderStatus: '.$this->pagantisOrder->getStatus(),
283 283
                 array('transaction_id' => $this->pagantisOrderId),
284 284
                 null,
285 285
                 false,
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     protected function unblockConcurrency()
339 339
     {
340 340
         try {
341
-            Db::getInstance()->delete('pagantis_cart_process', 'timestamp < ' . (time() - 6));
341
+            Db::getInstance()->delete('pagantis_cart_process', 'timestamp < '.(time() - 6));
342 342
         } catch (\Exception $exception) {
343 343
             throw new ConcurrencyException();
344 344
         }
@@ -356,15 +356,15 @@  discard block
 block discarded – undo
356 356
     {
357 357
         if ($this->merchantOrder && $this->processError === true) {
358 358
             sleep(5);
359
-            $id = (!is_null($this->pagantisOrder))?$this->pagantisOrder->getId():null;
360
-            $status = (!is_null($this->pagantisOrder))?$this->pagantisOrder->getStatus():null;
359
+            $id = (!is_null($this->pagantisOrder)) ? $this->pagantisOrder->getId() : null;
360
+            $status = (!is_null($this->pagantisOrder)) ? $this->pagantisOrder->getStatus() : null;
361 361
             $this->module->validateOrder(
362 362
                 $this->merchantOrderId,
363 363
                 Configuration::get('PS_OS_ERROR'),
364 364
                 $this->merchantOrder->getOrderTotal(true),
365 365
                 $this->module->displayName,
366
-                ' pagantisOrderId: ' . $id.
367
-                ' pagantisOrderStatus: '. $status,
366
+                ' pagantisOrderId: '.$id.
367
+                ' pagantisOrderStatus: '.$status,
368 368
                 null,
369 369
                 null,
370 370
                 false,
@@ -400,9 +400,9 @@  discard block
 block discarded – undo
400 400
             'id_cart' => $this->merchantOrderId,
401 401
             'key' => $this->config['secureKey'],
402 402
             'id_module' => $this->module->id,
403
-            'id_order' => ($this->pagantisOrder)?$this->pagantisOrder->getId(): null,
403
+            'id_order' => ($this->pagantisOrder) ? $this->pagantisOrder->getId() : null,
404 404
         );
405
-        $url = ($error)? $this->config['urlKO'] : $this->config['urlOK'];
405
+        $url = ($error) ? $this->config['urlKO'] : $this->config['urlOK'];
406 406
         return $this->redirect($url, $parameters);
407 407
     }
408 408
 }
Please login to merge, or discard this patch.