@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | header('HTTP/1.1 200 Ok', true, 200); |
46 | 46 | header('Content-Type: application/json', true); |
47 | - header('Content-Length: ' . Tools::strlen($result)); |
|
47 | + header('Content-Length: '.Tools::strlen($result)); |
|
48 | 48 | |
49 | 49 | echo $result; |
50 | 50 | exit(); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | header('HTTP/1.1 200 Ok', true, 200); |
68 | 68 | header('Content-Type: application/json', true); |
69 | - header('Content-Length: ' . Tools::strlen($result)); |
|
69 | + header('Content-Length: '.Tools::strlen($result)); |
|
70 | 70 | |
71 | 71 | echo $result; |
72 | 72 | exit(); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | header('HTTP/1.1 403 Forbidden', true, 403); |
92 | 92 | header('Content-Type: application/json', true); |
93 | - header('Content-Length: ' . Tools::strlen($result)); |
|
93 | + header('Content-Length: '.Tools::strlen($result)); |
|
94 | 94 | |
95 | 95 | echo $result; |
96 | 96 | exit(); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | { |
35 | 35 | $parsedUrl = parse_url($url); |
36 | 36 | $separator = ($parsedUrl['query'] == null) ? '?' : '&'; |
37 | - $redirectUrl = $url. $separator . http_build_query($parameters); |
|
37 | + $redirectUrl = $url.$separator.http_build_query($parameters); |
|
38 | 38 | Tools::redirect($redirectUrl); |
39 | 39 | } |
40 | 40 | |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | $response = $exception->getMessage(); |
77 | 77 | } else { |
78 | 78 | $response = 'Unable to serialize log.'. |
79 | - 'data: '. json_encode($data). |
|
80 | - 'exception: '. json_encode($exception); |
|
79 | + 'data: '.json_encode($data). |
|
80 | + 'exception: '.json_encode($exception); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 |
@@ -18,12 +18,12 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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(); |
@@ -83,8 +83,8 @@ |
||
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); |
@@ -25,9 +25,9 @@ discard block |
||
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 |
||
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(), |
@@ -103,24 +103,24 @@ discard block |
||
103 | 103 | ); |
104 | 104 | |
105 | 105 | try { |
106 | - $userAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address(); |
|
106 | + $userAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address(); |
|
107 | 107 | $userAddress |
108 | 108 | ->setZipCode($shippingAddress->postcode) |
109 | - ->setFullName($shippingAddress->firstname . ' ' . $shippingAddress->lastname) |
|
109 | + ->setFullName($shippingAddress->firstname.' '.$shippingAddress->lastname) |
|
110 | 110 | ->setCountryCode('ES') |
111 | 111 | ->setCity($shippingAddress->city) |
112 | - ->setAddress($shippingAddress->address1 . ' ' . $shippingAddress->address2) |
|
112 | + ->setAddress($shippingAddress->address1.' '.$shippingAddress->address2) |
|
113 | 113 | ->setTaxId($this->getTaxId($customer, $shippingAddress, $billingAddress)) |
114 | 114 | ->setNationalId($this->getNationalId($customer, $shippingAddress, $billingAddress)) |
115 | 115 | ; |
116 | 116 | |
117 | - $orderShippingAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address(); |
|
117 | + $orderShippingAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address(); |
|
118 | 118 | $orderShippingAddress |
119 | 119 | ->setZipCode($shippingAddress->postcode) |
120 | - ->setFullName($shippingAddress->firstname . ' ' . $shippingAddress->lastname) |
|
120 | + ->setFullName($shippingAddress->firstname.' '.$shippingAddress->lastname) |
|
121 | 121 | ->setCountryCode('ES') |
122 | 122 | ->setCity($shippingAddress->city) |
123 | - ->setAddress($shippingAddress->address1 . ' ' . $shippingAddress->address2) |
|
123 | + ->setAddress($shippingAddress->address1.' '.$shippingAddress->address2) |
|
124 | 124 | ->setTaxId($this->getTaxId($customer, $shippingAddress, $billingAddress)) |
125 | 125 | ->setNationalId($this->getNationalId($customer, $shippingAddress, $billingAddress)) |
126 | 126 | ->setFixPhone($shippingAddress->phone) |
@@ -130,10 +130,10 @@ discard block |
||
130 | 130 | $orderBillingAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address(); |
131 | 131 | $orderBillingAddress |
132 | 132 | ->setZipCode($billingAddress->postcode) |
133 | - ->setFullName($billingAddress->firstname . ' ' . $billingAddress->lastname) |
|
133 | + ->setFullName($billingAddress->firstname.' '.$billingAddress->lastname) |
|
134 | 134 | ->setCountryCode('ES') |
135 | 135 | ->setCity($billingAddress->city) |
136 | - ->setAddress($billingAddress->address1 . ' ' . $billingAddress->address2) |
|
136 | + ->setAddress($billingAddress->address1.' '.$billingAddress->address2) |
|
137 | 137 | ->setTaxId($this->getTaxId($customer, $billingAddress, $shippingAddress)) |
138 | 138 | ->setNationalId($this->getNationalId($customer, $billingAddress, $shippingAddress)) |
139 | 139 | ->setFixPhone($billingAddress->phone) |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | ->setNationalId($this->getNationalId($customer, $shippingAddress, $billingAddress)) |
154 | 154 | ; |
155 | 155 | |
156 | - if ($customer->birthday!='0000-00-00') { |
|
156 | + if ($customer->birthday != '0000-00-00') { |
|
157 | 157 | $orderUser->setDateOfBirth($customer->birthday); |
158 | 158 | } |
159 | 159 | |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | Tools::redirect($cancelUrl); |
232 | 232 | } |
233 | 233 | |
234 | - $url =''; |
|
234 | + $url = ''; |
|
235 | 235 | try { |
236 | 236 | $orderClient = new \Pagantis\OrdersApiClient\Client( |
237 | 237 | $pagantisPublicKey, |
@@ -242,12 +242,12 @@ discard block |
||
242 | 242 | if ($order instanceof \Pagantis\OrdersApiClient\Model\Order) { |
243 | 243 | $url = $order->getActionUrls()->getForm(); |
244 | 244 | $orderId = $order->getId(); |
245 | - $sql = "INSERT INTO `" . _DB_PREFIX_ . "pagantis_order` (`id`, `order_id`) |
|
245 | + $sql = "INSERT INTO `"._DB_PREFIX_."pagantis_order` (`id`, `order_id`) |
|
246 | 246 | VALUES ('$cart->id','$orderId') |
247 | 247 | ON DUPLICATE KEY UPDATE `order_id` = '$orderId'"; |
248 | 248 | $result = Db::getInstance()->execute($sql); |
249 | 249 | if (!$result) { |
250 | - throw new UnknownException('Unable to save pagantis-order-id in database: '. $sql); |
|
250 | + throw new UnknownException('Unable to save pagantis-order-id in database: '.$sql); |
|
251 | 251 | } |
252 | 252 | } else { |
253 | 253 | throw new OrderNotFoundException(); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | private function getPagantisOrderId() |
196 | 196 | { |
197 | 197 | try { |
198 | - $this->pagantisOrderId= Db::getInstance()->getValue( |
|
198 | + $this->pagantisOrderId = Db::getInstance()->getValue( |
|
199 | 199 | 'select order_id from '._DB_PREFIX_.'pagantis_order where id = '.$this->merchantOrderId |
200 | 200 | ); |
201 | 201 | |
@@ -277,14 +277,14 @@ discard block |
||
277 | 277 | $merchantAmount = explode('.', explode(',', $merchantAmount)[0])[0]; |
278 | 278 | if ($totalAmount != $merchantAmount) { |
279 | 279 | try { |
280 | - $psTotalAmount = substr_replace($merchantAmount, '.', (strlen($merchantAmount) -2), 0); |
|
280 | + $psTotalAmount = substr_replace($merchantAmount, '.', (strlen($merchantAmount) - 2), 0); |
|
281 | 281 | |
282 | 282 | $pgTotalAmountInCents = (string) $this->pagantisOrder->getShoppingCart()->getTotalAmount(); |
283 | - $pgTotalAmount = substr_replace($pgTotalAmountInCents, '.', (strlen($pgTotalAmountInCents) -2), 0); |
|
283 | + $pgTotalAmount = substr_replace($pgTotalAmountInCents, '.', (strlen($pgTotalAmountInCents) - 2), 0); |
|
284 | 284 | |
285 | - $this->amountMismatchError = '. Amount mismatch in PrestaShop Order #'. $this->merchantOrderId . |
|
286 | - ' compared with Pagantis Order: ' . $this->pagantisOrderId . '. The order in PrestaShop has an amount'. |
|
287 | - ' of ' . $psTotalAmount . ' and in Pagantis ' . $pgTotalAmount . ' PLEASE REVIEW THE ORDER'; |
|
285 | + $this->amountMismatchError = '. Amount mismatch in PrestaShop Order #'.$this->merchantOrderId. |
|
286 | + ' compared with Pagantis Order: '.$this->pagantisOrderId.'. The order in PrestaShop has an amount'. |
|
287 | + ' of '.$psTotalAmount.' and in Pagantis '.$pgTotalAmount.' PLEASE REVIEW THE ORDER'; |
|
288 | 288 | $this->saveLog(array( |
289 | 289 | 'message' => $this->amountMismatchError |
290 | 290 | )); |
@@ -307,8 +307,8 @@ discard block |
||
307 | 307 | Configuration::get('PS_OS_PAYMENT'), |
308 | 308 | $this->merchantOrder->getOrderTotal(true), |
309 | 309 | $this->module->displayName, |
310 | - 'pagantisOrderId: ' . $this->pagantisOrder->getId() . ' ' . |
|
311 | - 'pagantisOrderStatus: '. $this->pagantisOrder->getStatus() . |
|
310 | + 'pagantisOrderId: '.$this->pagantisOrder->getId().' '. |
|
311 | + 'pagantisOrderStatus: '.$this->pagantisOrder->getStatus(). |
|
312 | 312 | $this->amountMismatchError, |
313 | 313 | array('transaction_id' => $this->pagantisOrderId), |
314 | 314 | null, |
@@ -331,9 +331,9 @@ discard block |
||
331 | 331 | $this->orderClient->confirmOrder($this->pagantisOrderId); |
332 | 332 | try { |
333 | 333 | $mode = ($_SERVER['REQUEST_METHOD'] == 'POST') ? 'NOTIFICATION' : 'REDIRECTION'; |
334 | - $message = 'Order CONFIRMED. The order was confirmed by a ' . $mode . |
|
335 | - '. Pagantis OrderId=' . $this->pagantisOrderId . |
|
336 | - '. Prestashop OrderId=' . $this->merchantOrderId; |
|
334 | + $message = 'Order CONFIRMED. The order was confirmed by a '.$mode. |
|
335 | + '. Pagantis OrderId='.$this->pagantisOrderId. |
|
336 | + '. Prestashop OrderId='.$this->merchantOrderId; |
|
337 | 337 | $this->saveLog(array( |
338 | 338 | 'message' => $message |
339 | 339 | )); |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | protected function unblockConcurrency() |
390 | 390 | { |
391 | 391 | try { |
392 | - Db::getInstance()->delete('pagantis_cart_process', 'timestamp < ' . (time() - 6)); |
|
392 | + Db::getInstance()->delete('pagantis_cart_process', 'timestamp < '.(time() - 6)); |
|
393 | 393 | } catch (\Exception $exception) { |
394 | 394 | throw new ConcurrencyException(); |
395 | 395 | } |
@@ -433,9 +433,9 @@ discard block |
||
433 | 433 | 'id_cart' => $this->merchantOrderId, |
434 | 434 | 'key' => $this->config['secureKey'], |
435 | 435 | 'id_module' => $this->module->id, |
436 | - 'id_order' => ($this->pagantisOrder)?$this->pagantisOrder->getId(): null, |
|
436 | + 'id_order' => ($this->pagantisOrder) ? $this->pagantisOrder->getId() : null, |
|
437 | 437 | ); |
438 | - $url = ($error)? $this->config['urlKO'] : $this->config['urlOK']; |
|
438 | + $url = ($error) ? $this->config['urlKO'] : $this->config['urlOK']; |
|
439 | 439 | return $this->redirect($url, $parameters); |
440 | 440 | } |
441 | 441 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | exit; |
12 | 12 | } |
13 | 13 | |
14 | -define('_PS_PAGANTIS_DIR', _PS_MODULE_DIR_. '/pagantis'); |
|
14 | +define('_PS_PAGANTIS_DIR', _PS_MODULE_DIR_.'/pagantis'); |
|
15 | 15 | |
16 | 16 | require _PS_PAGANTIS_DIR.'/vendor/autoload.php'; |
17 | 17 | |
@@ -189,18 +189,18 @@ discard block |
||
189 | 189 | public function checkHooks() |
190 | 190 | { |
191 | 191 | try { |
192 | - $sql_content = 'select * from ' . _DB_PREFIX_. 'hook_module where |
|
193 | - id_module = \'' . Module::getModuleIdByName($this->name) . '\' and |
|
194 | - id_shop = \'' . Shop::getContextShopID() . '\' and |
|
195 | - id_hook = \'' . Hook::getIdByName('header') . '\''; |
|
192 | + $sql_content = 'select * from '._DB_PREFIX_.'hook_module where |
|
193 | + id_module = \'' . Module::getModuleIdByName($this->name).'\' and |
|
194 | + id_shop = \'' . Shop::getContextShopID().'\' and |
|
195 | + id_hook = \'' . Hook::getIdByName('header').'\''; |
|
196 | 196 | $hook_exists = Db::getInstance()->ExecuteS($sql_content); |
197 | 197 | if (empty($hook_exists)) { |
198 | - $sql_insert = 'insert into ' . _DB_PREFIX_. 'hook_module |
|
198 | + $sql_insert = 'insert into '._DB_PREFIX_.'hook_module |
|
199 | 199 | (id_module, id_shop, id_hook, position) |
200 | 200 | values |
201 | - (\''. Module::getModuleIdByName($this->name) . '\', |
|
202 | - \''. Shop::getContextShopID() . '\', |
|
203 | - \''. Hook::getIdByName('header') . '\', |
|
201 | + (\''. Module::getModuleIdByName($this->name).'\', |
|
202 | + \''. Shop::getContextShopID().'\', |
|
203 | + \''. Hook::getIdByName('header').'\', |
|
204 | 204 | 150)'; |
205 | 205 | Db::getInstance()->execute($sql_insert); |
206 | 206 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | */ |
215 | 215 | public function checkEnvVariables() |
216 | 216 | { |
217 | - $sql_content = 'select * from ' . _DB_PREFIX_. 'pagantis_config'; |
|
217 | + $sql_content = 'select * from '._DB_PREFIX_.'pagantis_config'; |
|
218 | 218 | $dbConfigs = Db::getInstance()->executeS($sql_content); |
219 | 219 | |
220 | 220 | // Convert a multimple dimension array for SQL insert statements into a simple key/value |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | } else { |
318 | 318 | $this->context->controller->addJS($url); |
319 | 319 | } |
320 | - $this->context->controller->addJS($this->getPathUri(). 'views/js/simulator.js'); |
|
320 | + $this->context->controller->addJS($this->getPathUri().'views/js/simulator.js'); |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | /** |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | $paymentOption |
369 | 369 | ->setCallToActionText($pagantisTitle) |
370 | 370 | ->setAction($link->getModuleLink('pagantis', 'payment')) |
371 | - ->setLogo($this->getPathUri(). 'views/img/' . $logo) |
|
371 | + ->setLogo($this->getPathUri().'views/img/'.$logo) |
|
372 | 372 | ->setModuleName(__CLASS__) |
373 | 373 | ; |
374 | 374 | |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | 'input' => array( |
396 | 396 | array( |
397 | 397 | 'name' => 'pagantis_is_enabled', |
398 | - 'type' => (version_compare(_PS_VERSION_, '1.6')<0) ?'radio' :'switch', |
|
398 | + 'type' => (version_compare(_PS_VERSION_, '1.6') < 0) ? 'radio' : 'switch', |
|
399 | 399 | 'label' => $this->l('Module is enabled'), |
400 | 400 | 'prefix' => '<i class="icon icon-key"></i>', |
401 | 401 | 'class' => 't', |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | ), |
436 | 436 | array( |
437 | 437 | 'name' => 'pagantis_simulator_is_enabled', |
438 | - 'type' => (version_compare(_PS_VERSION_, '1.6')<0) ?'radio' :'switch', |
|
438 | + 'type' => (version_compare(_PS_VERSION_, '1.6') < 0) ? 'radio' : 'switch', |
|
439 | 439 | 'label' => $this->l('Simulator is enabled'), |
440 | 440 | 'prefix' => '<i class="icon icon-key"></i>', |
441 | 441 | 'class' => 't', |
@@ -551,9 +551,9 @@ discard block |
||
551 | 551 | $message = $this->displayError($error); |
552 | 552 | } |
553 | 553 | |
554 | - $logo = $this->getPathUri(). 'views/img/logo_pagantis.png'; |
|
554 | + $logo = $this->getPathUri().'views/img/logo_pagantis.png'; |
|
555 | 555 | if ($this->language == 'ES' || $this->language == null) { |
556 | - $logo = $this->getPathUri(). 'views/img/logo_pagamastarde.png'; |
|
556 | + $logo = $this->getPathUri().'views/img/logo_pagamastarde.png'; |
|
557 | 557 | } |
558 | 558 | $tpl = $this->local_path.'views/templates/admin/config-info.tpl'; |
559 | 559 | $this->context->smarty->assign(array( |
@@ -600,8 +600,7 @@ discard block |
||
600 | 600 | 'amount' => $orderTotal, |
601 | 601 | 'locale' => $this->language, |
602 | 602 | 'logo' => ($this->language == 'ES' || $this->language == null) ? |
603 | - 'pagamastarde.png' : |
|
604 | - 'pagantis.png', |
|
603 | + 'pagamastarde.png' : 'pagantis.png', |
|
605 | 604 | 'pagantisPublicKey' => $pagantisPublicKey, |
606 | 605 | 'pagantisCSSSelector' => $pagantisSimulatorCSSSelector, |
607 | 606 | 'pagantisPriceSelector' => $pagantisSimulatorPriceSelector, |
@@ -754,17 +753,17 @@ discard block |
||
754 | 753 | */ |
755 | 754 | public function checkLogoExists() |
756 | 755 | { |
757 | - $logoPmt = _PS_MODULE_DIR_ . '/onepagecheckoutps/views/img/payments/pagamastarde.png'; |
|
758 | - $logoPg = _PS_MODULE_DIR_ . '/onepagecheckoutps/views/img/payments/pagantis.png'; |
|
759 | - if (!file_exists($logoPmt) && is_dir(_PS_MODULE_DIR_ . '/onepagecheckoutps/views/img/payments')) { |
|
756 | + $logoPmt = _PS_MODULE_DIR_.'/onepagecheckoutps/views/img/payments/pagamastarde.png'; |
|
757 | + $logoPg = _PS_MODULE_DIR_.'/onepagecheckoutps/views/img/payments/pagantis.png'; |
|
758 | + if (!file_exists($logoPmt) && is_dir(_PS_MODULE_DIR_.'/onepagecheckoutps/views/img/payments')) { |
|
760 | 759 | copy( |
761 | - _PS_PAGANTIS_DIR . '/views/img/logo_pagamastarde.png', |
|
760 | + _PS_PAGANTIS_DIR.'/views/img/logo_pagamastarde.png', |
|
762 | 761 | $logoPmt |
763 | 762 | ); |
764 | 763 | } |
765 | - if (!file_exists($logoPg) && is_dir(_PS_MODULE_DIR_ . '/onepagecheckoutps/views/img/payments')) { |
|
764 | + if (!file_exists($logoPg) && is_dir(_PS_MODULE_DIR_.'/onepagecheckoutps/views/img/payments')) { |
|
766 | 765 | copy( |
767 | - _PS_PAGANTIS_DIR . '/views/img/logo_pagantis.png', |
|
766 | + _PS_PAGANTIS_DIR.'/views/img/logo_pagantis.png', |
|
768 | 767 | $logoPg |
769 | 768 | ); |
770 | 769 | } |
@@ -776,7 +775,7 @@ discard block |
||
776 | 775 | return ''; |
777 | 776 | } |
778 | 777 | |
779 | - $sql = 'SELECT value FROM '._DB_PREFIX_.'pagantis_config where config = \'' . pSQL($config) . '\' limit 1'; |
|
778 | + $sql = 'SELECT value FROM '._DB_PREFIX_.'pagantis_config where config = \''.pSQL($config).'\' limit 1'; |
|
780 | 779 | if ($results = Db::getInstance()->ExecuteS($sql)) { |
781 | 780 | if (is_array($results) && count($results) === 1 && isset($results[0]['value'])) { |
782 | 781 | return $results[0]['value']; |