@@ -111,7 +111,7 @@ |
||
111 | 111 | Table::TYPE_TIMESTAMP, |
112 | 112 | null, |
113 | 113 | array('nullable'=>false, |
114 | - 'default'=>Table::TIMESTAMP_INIT) |
|
114 | + 'default'=>Table::TIMESTAMP_INIT) |
|
115 | 115 | ); |
116 | 116 | return $dbConnection->createTable($table); |
117 | 117 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $secretKey = $this->getRequest()->getParam('secret'); |
45 | 45 | $privateKey = isset($this->config['pagantis_private_key']) ? $this->config['pagantis_private_key'] : null; |
46 | 46 | |
47 | - if ($secretKey!='' && $privateKey!='') { |
|
47 | + if ($secretKey != '' && $privateKey != '') { |
|
48 | 48 | $this->checkDbLogTable(); |
49 | 49 | /** @var \Magento\Framework\DB\Adapter\AdapterInterface $dbConnection */ |
50 | 50 | $dbConnection = $this->dbObject->getConnection(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } elseif ($_SERVER['REQUEST_METHOD'] == 'POST') { |
73 | 73 | if (count($_POST)) { |
74 | 74 | foreach ($_POST as $config => $value) { |
75 | - if (isset($this->defaultConfigs[$config]) && $response['status']==null) { |
|
75 | + if (isset($this->defaultConfigs[$config]) && $response['status'] == null) { |
|
76 | 76 | $dbConnection->update( |
77 | 77 | $tableName, |
78 | 78 | array('value' => $value), |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | $formattedResult = array(); |
93 | - if ($response['status']==null) { |
|
93 | + if ($response['status'] == null) { |
|
94 | 94 | $dbResult = $dbConnection->fetchAll("select * from $tableName"); |
95 | 95 | foreach ($dbResult as $value) { |
96 | 96 | $formattedResult[$value['config']] = $value['value']; |
@@ -24,21 +24,21 @@ |
||
24 | 24 | * @var array $defaultConfigs |
25 | 25 | */ |
26 | 26 | public $defaultConfigs = array('PAGANTIS_TITLE'=>'Paga en cuotas', |
27 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
28 | - 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
29 | - 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | - 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | - 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | - 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | - 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
34 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | - 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | - 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | - 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | - 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
39 | - 'PAGANTIS_URL_OK'=>'', |
|
40 | - 'PAGANTIS_URL_KO'=>'', |
|
41 | - 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
27 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
28 | + 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
29 | + 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | + 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | + 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | + 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | + 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
34 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | + 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | + 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | + 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | + 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
39 | + 'PAGANTIS_URL_OK'=>'', |
|
40 | + 'PAGANTIS_URL_KO'=>'', |
|
41 | + 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | /** |
@@ -111,7 +111,7 @@ |
||
111 | 111 | Table::TYPE_TIMESTAMP, |
112 | 112 | null, |
113 | 113 | array('nullable'=>false, |
114 | - 'default'=>Table::TIMESTAMP_INIT) |
|
114 | + 'default'=>Table::TIMESTAMP_INIT) |
|
115 | 115 | ); |
116 | 116 | return $dbConnection->createTable($table); |
117 | 117 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $secretKey = $this->getRequest()->getParam('secret'); |
45 | 45 | $privateKey = isset($this->config['pagantis_private_key']) ? $this->config['pagantis_private_key'] : null; |
46 | 46 | |
47 | - if ($secretKey!='' && $privateKey!='') { |
|
47 | + if ($secretKey != '' && $privateKey != '') { |
|
48 | 48 | $this->checkDbLogTable(); |
49 | 49 | /** @var \Magento\Framework\DB\Adapter\AdapterInterface $dbConnection */ |
50 | 50 | $dbConnection = $this->dbObject->getConnection(); |
@@ -24,22 +24,22 @@ discard block |
||
24 | 24 | $installer->startSetup(); |
25 | 25 | |
26 | 26 | $table = $installer->getConnection() |
27 | - ->newTable($installer->getTable(self::CONFIG_TABLE)) |
|
28 | - ->addColumn( |
|
29 | - 'id', |
|
30 | - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, |
|
31 | - null, |
|
32 | - ['identity' => true, 'unsigned' => true, 'nullable' => |
|
33 | - false, 'primary' => true], |
|
34 | - 'Entity ID' |
|
35 | - ) |
|
36 | - ->addColumn( |
|
37 | - 'config', |
|
38 | - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, |
|
39 | - 60, |
|
40 | - ['nullable' => false], |
|
41 | - 'Config' |
|
42 | - ) |
|
27 | + ->newTable($installer->getTable(self::CONFIG_TABLE)) |
|
28 | + ->addColumn( |
|
29 | + 'id', |
|
30 | + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, |
|
31 | + null, |
|
32 | + ['identity' => true, 'unsigned' => true, 'nullable' => |
|
33 | + false, 'primary' => true], |
|
34 | + 'Entity ID' |
|
35 | + ) |
|
36 | + ->addColumn( |
|
37 | + 'config', |
|
38 | + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, |
|
39 | + 60, |
|
40 | + ['nullable' => false], |
|
41 | + 'Config' |
|
42 | + ) |
|
43 | 43 | ->addColumn( |
44 | 44 | 'value', |
45 | 45 | \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ['nullable' => false], |
48 | 48 | 'Value' |
49 | 49 | ) |
50 | - ->setComment('Pagantis config table'); |
|
50 | + ->setComment('Pagantis config table'); |
|
51 | 51 | |
52 | 52 | $installer->getConnection()->createTable($table); |
53 | 53 |
@@ -26,9 +26,9 @@ |
||
26 | 26 | { |
27 | 27 | $originalData = $element->getOriginalData(); |
28 | 28 | $label = __($originalData['button_label']); |
29 | - $url = $this->escapeHtml($originalData['button_url']); |
|
29 | + $url = $this->escapeHtml($originalData['button_url']); |
|
30 | 30 | $labelCredentials = __($originalData['button_credentials_label']); |
31 | - $urlCredentials = $this->escapeHtml($originalData['button_credentials_url']); |
|
31 | + $urlCredentials = $this->escapeHtml($originalData['button_credentials_url']); |
|
32 | 32 | return <<<EOD |
33 | 33 | <div class="pp-buttons-container"> |
34 | 34 | <button onclick="javascript:window.open('$url')" class="scalable" type="button" id="bo_pagantis"> |
@@ -107,7 +107,7 @@ |
||
107 | 107 | foreach ($items as $key => $item) { |
108 | 108 | $promotedProduct = $this->isPromoted($item); |
109 | 109 | if ($promotedProduct == 'true') { |
110 | - $promotedAmount+=$item->getPrice()*$item->getQty(); |
|
110 | + $promotedAmount += $item->getPrice() * $item->getQty(); |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 |
@@ -96,7 +96,7 @@ |
||
96 | 96 | $headers = $transfer->getHeaders(); |
97 | 97 | |
98 | 98 | if (isset($headers['force_result'])) { |
99 | - return (int)$headers['force_result']; |
|
99 | + return (int) $headers['force_result']; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | return $this->results[mt_rand(0, 1)]; |
@@ -38,7 +38,7 @@ |
||
38 | 38 | |
39 | 39 | $payment->setAdditionalInformation( |
40 | 40 | self::FRAUD_MSG_LIST, |
41 | - (array)$response[self::FRAUD_MSG_LIST] |
|
41 | + (array) $response[self::FRAUD_MSG_LIST] |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | /** @var $payment Payment */ |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | } elseif ($this->_request->isPost()) { |
90 | 90 | if (count($_POST)) { |
91 | 91 | foreach ($_POST as $config => $value) { |
92 | - if (isset($this->defaultConfigs[$config]) && $response['status']==null) { |
|
92 | + if (isset($this->defaultConfigs[$config]) && $response['status'] == null) { |
|
93 | 93 | $dbConnection->update( |
94 | 94 | $tableName, |
95 | 95 | array('value' => $value), |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | $formattedResult = array(); |
110 | - if ($response['status']==null) { |
|
110 | + if ($response['status'] == null) { |
|
111 | 111 | $dbResult = $dbConnection->fetchAll("select * from $tableName"); |
112 | 112 | foreach ($dbResult as $value) { |
113 | 113 | $formattedResult[$value['config']] = $value['value']; |
@@ -24,21 +24,21 @@ |
||
24 | 24 | * @var array $defaultConfigs |
25 | 25 | */ |
26 | 26 | public $defaultConfigs = array('PAGANTIS_TITLE'=>'Paga en cuotas', |
27 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
28 | - 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
29 | - 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | - 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | - 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | - 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | - 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
34 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | - 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | - 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | - 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | - 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
39 | - 'PAGANTIS_URL_OK'=>'', |
|
40 | - 'PAGANTIS_URL_KO'=>'', |
|
41 | - 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
27 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
28 | + 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
29 | + 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
30 | + 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
31 | + 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
32 | + 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
33 | + 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
34 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
35 | + 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
36 | + 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
37 | + 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
38 | + 'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0, |
|
39 | + 'PAGANTIS_URL_OK'=>'', |
|
40 | + 'PAGANTIS_URL_KO'=>'', |
|
41 | + 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!' |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | /** |