Passed
Pull Request — master (#4)
by
unknown
02:54
created
test/configure/ConfigureTest.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
  * @package Test\Configure
12 12
  *
13 13
  * @group oscommerce-configure
14
-
15 14
  */
16 15
 class ConfigureTest extends PagantisOscommerceTest
17 16
 {
Please login to merge, or discard this patch.
test/basic/BasicTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $this->webDriver->get(self::OSCURL);
31 31
         $condition = WebDriverExpectedCondition::titleContains(self::TITLE);
32 32
         $this->webDriver->wait()->until($condition);
33
-        $this->assertTrue((bool) $condition);
33
+        $this->assertTrue((bool)$condition);
34 34
         $this->quit();
35 35
     }
36 36
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $this->webDriver->get(self::OSCURL.self::BACKOFFICE_FOLDER);
43 43
         $condition = WebDriverExpectedCondition::titleContains(self::ADMIN_TITLE);
44 44
         $this->webDriver->wait()->until($condition);
45
-        $this->assertTrue((bool) $condition);
45
+        $this->assertTrue((bool)$condition);
46 46
         $this->quit();
47 47
     }
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
test/PagantisOscommerceTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,16 +73,16 @@  discard block
 block discarded – undo
73 73
         $faker = Factory::create();
74 74
         $this->configuration['dni'] = $this->getDNI();
75 75
         $this->configuration['birthdate'] =
76
-            $faker->numberBetween(1, 28) . '/' .
77
-            $faker->numberBetween(1, 12). '/1975'
76
+            $faker->numberBetween(1, 28).'/'.
77
+            $faker->numberBetween(1, 12).'/1975'
78 78
         ;
79 79
         $this->configuration['firstname'] = $faker->firstName;
80
-        $this->configuration['lastname'] = $faker->lastName . ' ' . $faker->lastName;
80
+        $this->configuration['lastname'] = $faker->lastName.' '.$faker->lastName;
81 81
         $this->configuration['company'] = $faker->company;
82 82
         $this->configuration['zip'] = '28'.$faker->randomNumber(3, true);
83 83
         $this->configuration['street'] = $faker->streetAddress;
84
-        $this->configuration['phone'] = '6' . $faker->randomNumber(8);
85
-        $this->configuration['email'] = date('ymd') . '@pagamastarde.com';
84
+        $this->configuration['phone'] = '6'.$faker->randomNumber(8);
85
+        $this->configuration['email'] = date('ymd').'@pagamastarde.com';
86 86
         parent::__construct($name, $data, $dataName);
87 87
     }
88 88
     /**
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function getDNI()
92 92
     {
93
-        $dni = '0000' . rand(pow(10, 4-1), pow(10, 4)-1);
94
-        $value = (int) ($dni / 23);
93
+        $dni = '0000'.rand(pow(10, 4 - 1), pow(10, 4) - 1);
94
+        $value = (int)($dni / 23);
95 95
         $value *= 23;
96
-        $value= $dni - $value;
97
-        $letter= "TRWAGMYFPDXBNJZSQVHLCKEO";
98
-        $dniLetter= substr($letter, $value, 1);
96
+        $value = $dni - $value;
97
+        $letter = "TRWAGMYFPDXBNJZSQVHLCKEO";
98
+        $dniLetter = substr($letter, $value, 1);
99 99
         return $dni.$dniLetter;
100 100
     }
101 101
 
Please login to merge, or discard this patch.
config/configure_admin.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,21 +17,21 @@
 block discarded – undo
17 17
 define('DIR_WS_HTTPS_CATALOG', '/');
18 18
 define('DIR_FS_CATALOG', '/var/www/html/');
19 19
 define('DIR_WS_IMAGES', 'images/');
20
-define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
21
-define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
20
+define('DIR_WS_ICONS', DIR_WS_IMAGES.'icons/');
21
+define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG.'images/');
22 22
 define('DIR_WS_INCLUDES', 'includes/');
23
-define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
24
-define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
25
-define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
26
-define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
27
-define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
28
-define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
29
-define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
30
-define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
31
-define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
32
-define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
33
-define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
34
-define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
23
+define('DIR_WS_BOXES', DIR_WS_INCLUDES.'boxes/');
24
+define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES.'functions/');
25
+define('DIR_WS_CLASSES', DIR_WS_INCLUDES.'classes/');
26
+define('DIR_WS_MODULES', DIR_WS_INCLUDES.'modules/');
27
+define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES.'languages/');
28
+define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG.'includes/languages/');
29
+define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG.'includes/languages/');
30
+define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG.'images/');
31
+define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG.'includes/modules/');
32
+define('DIR_FS_BACKUP', DIR_FS_ADMIN.'backups/');
33
+define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG.'download/');
34
+define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG.'pub/');
35 35
 
36 36
 define('DB_SERVER', getenv('OSCOMMERCE_DB_HOST'));
37 37
 define('DB_SERVER_USERNAME', getenv('OSCOMMERCE_DB_USER'));
Please login to merge, or discard this patch.
config/configure.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@
 block discarded – undo
9 9
 define('DIR_WS_HTTP_CATALOG', '/');
10 10
 define('DIR_WS_HTTPS_CATALOG', '/');
11 11
 define('DIR_WS_IMAGES', 'images/');
12
-define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
12
+define('DIR_WS_ICONS', DIR_WS_IMAGES.'icons/');
13 13
 define('DIR_WS_INCLUDES', 'includes/');
14
-define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
15
-define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
16
-define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
17
-define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
14
+define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES.'functions/');
15
+define('DIR_WS_CLASSES', DIR_WS_INCLUDES.'classes/');
16
+define('DIR_WS_MODULES', DIR_WS_INCLUDES.'modules/');
17
+define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES.'languages/');
18 18
 
19 19
 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
20 20
 define('DIR_FS_CATALOG', '/var/www/html');
21
-define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
22
-define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
21
+define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG.'download/');
22
+define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG.'pub/');
23 23
 
24 24
 define('DB_SERVER', getenv('OSCOMMERCE_DB_HOST'));
25 25
 define('DB_SERVER_USERNAME', getenv('OSCOMMERCE_DB_USER'));
Please login to merge, or discard this patch.
catalog/ext/modules/payment/pagantis/bypass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
     $destUrl = $_POST['formUrl'];
5 5
 } elseif ($_POST['cancelUrl']) {
6 6
     $destUrl = $_POST['cancelUrl'];
7
-} else {
7
+}else {
8 8
     $destUrl = $_SERVER['HTTP_REFERER'];
9 9
 }
10 10
 
Please login to merge, or discard this patch.
catalog/includes/languages/english/modules/payment/pagantis.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
   global $customer_id, $order;
14 14
 
15
-  define('MODULE_PAYMENT_PAGANTIS_TEXT_CATALOG_TITLE', 'Instant financing');  // Payment option title as displayed to the customer
15
+  define('MODULE_PAYMENT_PAGANTIS_TEXT_CATALOG_TITLE', 'Instant financing'); // Payment option title as displayed to the customer
16 16
 
17 17
   define('MODULE_PAYMENT_PAGANTIS_TEXT_ADMIN_TITLE', 'Pagantis');
18 18
 
Please login to merge, or discard this patch.
catalog/includes/languages/espanol/modules/payment/pagantis.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
   global $customer_id, $order;
14 14
 
15
-  define('MODULE_PAYMENT_PAGANTIS_TEXT_CATALOG_TITLE', 'Financiación instantanea');  // Payment option title as displayed to the customer
15
+  define('MODULE_PAYMENT_PAGANTIS_TEXT_CATALOG_TITLE', 'Financiación instantanea'); // Payment option title as displayed to the customer
16 16
 
17 17
   define('MODULE_PAYMENT_PAGANTIS_TEXT_ADMIN_TITLE', 'Pagantis');
18 18
 
Please login to merge, or discard this patch.
catalog/includes/modules/payment/pagantis.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -31,26 +31,26 @@  discard block
 block discarded – undo
31 31
     public $pgNotify;
32 32
 
33 33
     public $defaultConfigs = array('PAGANTIS_TITLE'=>'Instant Financing',
34
-                                   'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE',
35
-                                   'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE',
36
-                                   'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
37
-                                   'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3,
38
-                                   'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12,
39
-                                   'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
40
-                                   'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER',
41
-                                   'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default',
42
-                                   'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default',
43
-                                   'PAGANTIS_FORM_DISPLAY_TYPE'=>0,
44
-                                   'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1,
45
-                                   'PAGANTIS_URL_OK'=>'',
46
-                                   'PAGANTIS_URL_KO'=>'',
47
-                                   'PAGANTIS_TITLE_EXTRA' => 'Paga hasta en 12 cómodas cuotas con Paga+Tarde. Solicitud totalmente online y sin papeleos,¡y la respuesta es inmediata!',
48
-                                   'PAGANTIS_ORDER_STATUS'=>'6'
34
+                                    'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE',
35
+                                    'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE',
36
+                                    'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
37
+                                    'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3,
38
+                                    'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12,
39
+                                    'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
40
+                                    'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER',
41
+                                    'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default',
42
+                                    'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default',
43
+                                    'PAGANTIS_FORM_DISPLAY_TYPE'=>0,
44
+                                    'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1,
45
+                                    'PAGANTIS_URL_OK'=>'',
46
+                                    'PAGANTIS_URL_KO'=>'',
47
+                                    'PAGANTIS_TITLE_EXTRA' => 'Paga hasta en 12 cómodas cuotas con Paga+Tarde. Solicitud totalmente online y sin papeleos,¡y la respuesta es inmediata!',
48
+                                    'PAGANTIS_ORDER_STATUS'=>'6'
49 49
     );
50 50
 
51 51
     /**
52
-    * Constructor
53
-    */
52
+     * Constructor
53
+     */
54 54
     public function __construct()
55 55
     {
56 56
         $this->version = '8.0.0';
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
      **************/
88 88
 
89 89
     /**
90
-    * Here you can implement using payment zones (refer to standard PayPal module as reference)
91
-    */
90
+     * Here you can implement using payment zones (refer to standard PayPal module as reference)
91
+     */
92 92
     public function update_status()
93 93
     {
94 94
 
@@ -325,10 +325,10 @@  discard block
 block discarded – undo
325 325
     }
326 326
 
327 327
     /**
328
-    * Post-processing activities
329
-    *
330
-    * @return boolean
331
-    */
328
+     * Post-processing activities
329
+     *
330
+     * @return boolean
331
+     */
332 332
     public function after_process()
333 333
     {
334 334
         $this->pgNotify->confirmInformation();
@@ -437,16 +437,16 @@  discard block
 block discarded – undo
437 437
     }
438 438
 
439 439
     /**
440
-    * Internal list of configuration keys used for configuration of the module
441
-    *
442
-    * @return array
443
-    */
440
+     * Internal list of configuration keys used for configuration of the module
441
+     *
442
+     * @return array
443
+     */
444 444
     public function keys()
445 445
     {
446 446
         return array('MODULE_PAYMENT_PAGANTIS_STATUS',
447
-           'MODULE_PAYMENT_PAGANTIS_PK',
448
-           'MODULE_PAYMENT_PAGANTIS_SK'
449
-           );
447
+            'MODULE_PAYMENT_PAGANTIS_PK',
448
+            'MODULE_PAYMENT_PAGANTIS_SK'
449
+            );
450 450
     }
451 451
 
452 452
     /**
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         if (strpos($_SERVER[REQUEST_URI], "checkout_payment.php") <= 0) {
61 61
             $this->title = MODULE_PAYMENT_PAGANTIS_TEXT_ADMIN_TITLE; // Payment module title in Admin
62
-        } else {
62
+        }else {
63 63
             $this->title = MODULE_PAYMENT_PAGANTIS_TEXT_CATALOG_TITLE; // Payment module title in Catalog
64 64
         }
65 65
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             )
78 78
         );
79 79
 
80
-        $this->form_action_url = $this->base_url . '/ext/modules/payment/pagantis/bypass.php';
80
+        $this->form_action_url = $this->base_url.'/ext/modules/payment/pagantis/bypass.php';
81 81
     }
82 82
 
83 83
     /***************
@@ -287,16 +287,16 @@  discard block
 block discarded – undo
287 287
             if ($pagantisOrder instanceof \Pagantis\OrdersApiClient\Model\Order) {
288 288
                 $url = $pagantisOrder->getActionUrls()->getForm();
289 289
                 $this->insertRow($this->order_id, $pagantisOrder->getId(), serialize($global_vars));
290
-            } else {
290
+            }else {
291 291
                 throw new OrderNotFoundException();
292 292
             }
293 293
 
294 294
             if ($url == "") {
295 295
                 throw new UnknownException(_("No ha sido posible obtener una respuesta de Pagantis"));
296
-            } else { //if ($this->extraConfig['PAGANTIS_FORM_DISPLAY_TYPE'] == '0') {
296
+            }else { //if ($this->extraConfig['PAGANTIS_FORM_DISPLAY_TYPE'] == '0') {
297 297
                 $output = "\n";
298
-                $output.= tep_draw_hidden_field("formUrl", $url) . "\n";
299
-                $output.= tep_draw_hidden_field("cancelUrl", $cancelUrl) . "\n";
298
+                $output .= tep_draw_hidden_field("formUrl", $url)."\n";
299
+                $output .= tep_draw_hidden_field("cancelUrl", $cancelUrl)."\n";
300 300
                 return $output;
301 301
             } /*else {
302 302
                 $template_fields = array(
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     public function before_process()
318 318
     {
319 319
         include_once('./ext/modules/payment/pagantis/notifyController.php');
320
-        $this->pgNotify = new notifyController();var_dump($_GET['from']);var_dump($_POST);die;
320
+        $this->pgNotify = new notifyController(); var_dump($_GET['from']); var_dump($_POST); die;
321 321
         $this->pgNotify->setOscommerceOrderId($_GET['order_id']);
322 322
         $this->pgNotify->setOrigin(isset($_GET['from']) ? ($_GET['from']) : 'order');
323 323
         $this->pgNotify->setOrderStatus($this->extraConfig['PAGANTIS_ORDER_STATUS']);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     public function check()
343 343
     {
344 344
         if (!isset($this->_check)) {
345
-            $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_PAGANTIS_STATUS'");
345
+            $check_query = tep_db_query("select configuration_value from ".TABLE_CONFIGURATION." where configuration_key = 'MODULE_PAYMENT_PAGANTIS_STATUS'");
346 346
             $this->_check = tep_db_num_rows($check_query);
347 347
         }
348 348
         $this->installPagantisTables();
@@ -360,9 +360,9 @@  discard block
 block discarded – undo
360 360
             tep_redirect(tep_href_link(FILENAME_MODULES, 'set=payment&module=pagantis', 'NONSSL'));
361 361
             return 'failed';
362 362
         }
363
-        tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Pagantis module', 'MODULE_PAYMENT_PAGANTIS_STATUS', 'True', '', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
364
-        tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Public Key', 'MODULE_PAYMENT_PAGANTIS_PK', '', 'MANDATORY. You can get in your pagantis profile', '6', '0', now())");
365
-        tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Secret Key', 'MODULE_PAYMENT_PAGANTIS_SK', '', 'MANDATORY. You can get in your pagantis profile', '6', '0', now())");
363
+        tep_db_query("insert into ".TABLE_CONFIGURATION." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Pagantis module', 'MODULE_PAYMENT_PAGANTIS_STATUS', 'True', '', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
364
+        tep_db_query("insert into ".TABLE_CONFIGURATION." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Public Key', 'MODULE_PAYMENT_PAGANTIS_PK', '', 'MANDATORY. You can get in your pagantis profile', '6', '0', now())");
365
+        tep_db_query("insert into ".TABLE_CONFIGURATION." (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Secret Key', 'MODULE_PAYMENT_PAGANTIS_SK', '', 'MANDATORY. You can get in your pagantis profile', '6', '0', now())");
366 366
 
367 367
         //tep_db_query("insert into " . TABLE_ORDERS_STATUS . " (orders_status_id, language_id, orders_status_name, public_flag, downloads_flag) values (6, 1, 'Pagantis [Transactions]', 0, 0)");
368 368
         $this->installPagantisTables();
@@ -373,25 +373,25 @@  discard block
 block discarded – undo
373 373
      */
374 374
     private function installPagantisTables()
375 375
     {
376
-        $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_PAGANTIS_LOG . " ( 
376
+        $sql = "CREATE TABLE IF NOT EXISTS ".TABLE_PAGANTIS_LOG." ( 
377 377
                           id int NOT NULL AUTO_INCREMENT, 
378 378
                           log text NOT NULL, 
379 379
                           createdAt timestamp DEFAULT CURRENT_TIMESTAMP, 
380 380
                           UNIQUE KEY id (id))";
381 381
         tep_db_query($sql);
382 382
 
383
-        $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_PAGANTIS_CONFIG . " (
383
+        $sql = "CREATE TABLE IF NOT EXISTS ".TABLE_PAGANTIS_CONFIG." (
384 384
                             id int NOT NULL AUTO_INCREMENT, 
385 385
                             config varchar(60) NOT NULL, 
386 386
                             value varchar(200) NOT NULL, 
387 387
                             UNIQUE KEY id(id))";
388 388
         tep_db_query($sql);
389 389
         foreach ((array)$this->defaultConfigs as $configKey => $configValue) {
390
-            $query = "INSERT INTO " . TABLE_PAGANTIS_CONFIG . " (config, value) values ('$configKey', '$configValue')";
390
+            $query = "INSERT INTO ".TABLE_PAGANTIS_CONFIG." (config, value) values ('$configKey', '$configValue')";
391 391
             tep_db_query($query);
392 392
         }
393 393
 
394
-        $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_PAGANTIS_ORDERS . " (
394
+        $sql = "CREATE TABLE IF NOT EXISTS ".TABLE_PAGANTIS_ORDERS." (
395 395
                             id int NOT NULL AUTO_INCREMENT, 
396 396
                             os_order_id varchar(50), 
397 397
                             os_order_reference varchar(50) NOT NULL,
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
                             UNIQUE KEY id(id))";
401 401
         tep_db_query($sql);
402 402
 
403
-        $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_PAGANTIS_CONCURRENCY . " (
403
+        $sql = "CREATE TABLE IF NOT EXISTS ".TABLE_PAGANTIS_CONCURRENCY." (
404 404
                             id int NOT NULL,
405 405
                             `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
406 406
                             UNIQUE KEY id(id))";
@@ -414,22 +414,22 @@  discard block
 block discarded – undo
414 414
     {
415 415
         $checkTable = tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_LOG."'");
416 416
         if (tep_db_num_rows($checkTable) > 0) {
417
-            tep_db_query("drop table " . TABLE_PAGANTIS_LOG);
417
+            tep_db_query("drop table ".TABLE_PAGANTIS_LOG);
418 418
         }
419 419
 
420 420
         $checkTable = tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_CONFIG."'");
421 421
         if (tep_db_num_rows($checkTable) > 0) {
422
-            tep_db_query("drop table " . TABLE_PAGANTIS_CONFIG);
422
+            tep_db_query("drop table ".TABLE_PAGANTIS_CONFIG);
423 423
         }
424 424
 
425 425
         $checkTable = tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_ORDERS."'");
426 426
         if (tep_db_num_rows($checkTable) > 0) {
427
-            tep_db_query("drop table " . TABLE_PAGANTIS_ORDERS);
427
+            tep_db_query("drop table ".TABLE_PAGANTIS_ORDERS);
428 428
         }
429 429
 
430 430
         $checkTable = tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_CONCURRENCY."'");
431 431
         if (tep_db_num_rows($checkTable) > 0) {
432
-            tep_db_query("drop table " . TABLE_PAGANTIS_CONCURRENCY);
432
+            tep_db_query("drop table ".TABLE_PAGANTIS_CONCURRENCY);
433 433
         }
434 434
 
435 435
         $query = "delete from ".TABLE_ORDERS_STATUS." where orders_status_id='6'";
@@ -482,13 +482,13 @@  discard block
 block discarded – undo
482 482
      */
483 483
     private function insertRow($orderId, $pagantisOrderId, $globalVars)
484 484
     {
485
-        $query = "select * from ". TABLE_PAGANTIS_ORDERS ." where os_order_id='$orderId'";
485
+        $query = "select * from ".TABLE_PAGANTIS_ORDERS." where os_order_id='$orderId'";
486 486
         $resultsSelect = tep_db_query($query);
487 487
         $countResults = tep_db_num_rows($resultsSelect);
488 488
         if ($countResults == 0) {
489
-            $query = "INSERT INTO ". TABLE_PAGANTIS_ORDERS ."(os_order_reference, PAGANTIS_order_id, globals) values ('$this->os_order_reference', '$pagantisOrderId','$globalVars')";
490
-        } else {
491
-            $query = "UPDATE " . TABLE_PAGANTIS_ORDERS . " set PAGANTIS_order_id='$pagantisOrderId' where os_order_reference='$orderId'";
489
+            $query = "INSERT INTO ".TABLE_PAGANTIS_ORDERS."(os_order_reference, PAGANTIS_order_id, globals) values ('$this->os_order_reference', '$pagantisOrderId','$globalVars')";
490
+        }else {
491
+            $query = "UPDATE ".TABLE_PAGANTIS_ORDERS." set PAGANTIS_order_id='$pagantisOrderId' where os_order_reference='$orderId'";
492 492
         }
493 493
         tep_db_query($query);
494 494
     }
Please login to merge, or discard this patch.