Skip to content

Instantly share code, notes, and snippets.

@joelibaceta
Created October 2, 2019 02:11
Show Gist options
  • Save joelibaceta/d38241814e93aa2a1f12c46f585cc13e to your computer and use it in GitHub Desktop.
Save joelibaceta/d38241814e93aa2a1f12c46f585cc13e to your computer and use it in GitHub Desktop.
Culqi Prestashop validation issues

Culqi - Validation report

Addon details

Validation date: 2019-10-02 Addon type: Module Technical name: culqi Display name: Culqi Author: Team Culqi (Brayan Cruces) Version: 2.3.2 Category (tab): payments_gateways Description: Acepta tarjetas de crédito y débito en tu tienda online.

Structure

File /config_es.xml should be removed

  • /config_es.xml

The folder in which the module content is stored is incorrect, it should be culqi/ instead.

  • culqi-prestashop-2.3.2/culqi.php

Errors

In file /culqi.php:

  • The use of function file_get_contents() is forbidden; use Tools::file_get_contents() instead
Line Code
582 $data = json_decode(file_get_contents('php://input'), true);

Licenses

In file /views/js/waitMe.min.js:

  • Missing license header
Line Code
12 f.find('.waitMe[data-waitme_id="'+a+'"]').remove()}};if(l[p])return l[p].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof p

In file /views/templates/front/payment_execution.tpl:

  • Missing license header
Line Code
298

In file /views/templates/hook/payment_return.tpl:

  • Missing license header
Line Code
27 {/if}

In file /views/templates/hook/payment.tpl:

  • Missing license header
Line Code
17

In file /views/templates/hook/info.tpl:

  • Missing license header
Line Code
4

In file /views/templates/hook/payment_multi.tpl:

  • Missing license header
Line Code
17

In file /controllers/front/orderajax.php:

  • Missing file doc comment
Line Code
1 <?php

In file /controllers/front/postpayment.php:

  • Missing file doc comment
Line Code
1 <?php

In file /controllers/front/chargeajax.php:

  • Missing file doc comment
Line Code
1 <?php

In file /controllers/front/postpendingpayment.php:

  • Missing file doc comment
Line Code
1 <?php

In file /controllers/front/payment.php:

  • Missing file doc comment
Line Code
1 <?php

In file /controllers/front/validation.php:

  • Missing file doc comment
Line Code
1 <?php

In file /culqi.php:

  • Missing file doc comment
Line Code
1 <?php

In file /culqi_webhook.php:

  • Missing file doc comment
Line Code
1 <?php

Standards

In file /controllers/front/orderajax.php:

  • Line indented incorrectly; expected 4 spaces, found 2
Line Code
6 public function initContent()
| [...]

10 | } | [...] 12 | public function displayAjax() | [...] 17 | }

  • Line indented incorrectly; expected at least 4 spaces, found 2
Line Code
7 {
| [...]

13 | {

  • Line indented incorrectly; expected at least 8 spaces, found 4
Line Code
8 parent::initContent();
9 $this->ajax = true;
| [...]

14 | error_log('Actualizando orden'); 15 | $result = $this->module->updateOrder( Tools::getValue("order_id")); //$_POST["cart_id"]
16 | die(Tools::jsonEncode($result));

  • Whitespace found at end of line
Line Code
13 {
| [...]

15 | $result = $this->module->updateOrder( Tools::getValue("order_id")); //$_POST["cart_id"]

  • Space after opening parenthesis of function call prohibited
Line Code
15 $result = $this->module->updateOrder( Tools::getValue("order_id")); //$_POST["cart_id"]
  • The closing brace for the class must go on the next line after the body
Line Code
19 }

In file /controllers/front/postpayment.php:

  • Opening class brace must be on a line by itself
Line Code
4 {
  • Spaces must be used for alignment; tabs are not allowed
Line Code
4 {
  • Whitespace found at end of line
Line Code
4 {
  • Function closing brace must go on the next line following the body; found 1 blank lines before brace
Line Code
16 }
  • Expected 1 newline at end of file; 0 found
Line Code
18 }
  • The closing brace for the class must go on the next line after the body
Line Code
18 }
  • Line exceeds 120 characters; contains 205 characters
Line Code
13 $this->module->validateOrder((int)$cart->id, Configuration::get('CULQI_STATE_OK'), (float)$cart->getordertotal(true), 'Culqi', null, array(), (int)$cart->id_currency, false, $customer->secure_key);
  • Line exceeds 120 characters; contains 213 characters
Line Code
14 Tools::redirect('index.php?controller=order-confirmation&id_cart=' . (int)$cart->id . '&id_module=' . (int)$this->module->id . '&id_order=' . $this->module->currentOrder . '&key=' . $customer->secure_key);

In file /controllers/front/chargeajax.php:

  • Line indented incorrectly; expected 4 spaces, found 2
Line Code
6 public function initContent()
| [...]

10 | } | [...] 12 | public function displayAjax() | [...] 16 | } | [...] 19 | public function displayAjaxOrder() | [...] 25 | }

  • Line indented incorrectly; expected at least 4 spaces, found 2
Line Code
7 {
| [...]

13 | { | [...] 20 | {

  • Line indented incorrectly; expected at least 8 spaces, found 4
Line Code
8 parent::initContent();
9 $this->ajax = true;
| [...]

14 | $result = $this->module->charge(Tools::getValue("token_id"), Tools::getValue("installments")); //$_POST["token_id"], $_POST["installments"] 15 | die(Tools::jsonEncode($result)); | [...] 21 | error_log('Actualizando orden'); 22 | $result = $this->module->updateOrder(Tools::getValue("order_id")); //$_POST["cart_id"]
| [...] 24 | die(Tools::jsonEncode($result));

  • Whitespace found at end of line
Line Code
20 {
| [...]

22 | $result = $this->module->updateOrder(Tools::getValue("order_id")); //$_POST["cart_id"]

  • The closing brace for the class must go on the next line after the body
Line Code
27 }

In file /controllers/front/postpendingpayment.php:

  • Opening class brace must be on a line by itself
Line Code
4 {
  • Spaces must be used for alignment; tabs are not allowed
Line Code
4 {
  • Whitespace found at end of line
Line Code
4 {
  • Function closing brace must go on the next line following the body; found 1 blank lines before brace
Line Code
16 }
  • Expected 1 newline at end of file; 0 found
Line Code
18 }
  • The closing brace for the class must go on the next line after the body
Line Code
18 }
  • Line exceeds 120 characters; contains 210 characters
Line Code
13 $this->module->validateOrder((int)$cart->id, Configuration::get('CULQI_STATE_PENDING'), (float)$cart->getordertotal(true), 'Culqi', null, array(), (int)$cart->id_currency, false, $customer->secure_key);
  • Line exceeds 120 characters; contains 213 characters
Line Code
14 Tools::redirect('index.php?controller=order-confirmation&id_cart=' . (int)$cart->id . '&id_module=' . (int)$this->module->id . '&id_order=' . $this->module->currentOrder . '&key=' . $customer->secure_key);

In file /controllers/front/payment.php:

  • Expected 1 space after closing parenthesis; found 9
Line Code
26 if (!$this->module->checkCurrency($cart))
  • Whitespace found at end of line
Line Code
41 // Crear una orden
| [...]

43 | $order = $this->module->createOrder();
| [...] 45 | $this->context->smarty->assign('order_id', trim($order->id));
| [...] 51 | $this->context->smarty->assign('currency', $this->context->currency->iso_code);

  • Line indented incorrectly; expected at least 12 spaces, found 11
Line Code
43 $order = $this->module->createOrder();
| [...]

45 | $this->context->smarty->assign('order_id', trim($order->id));

  • The closing brace for the class must go on the next line after the body
Line Code
59 }
  • Line exceeds 120 characters; contains 125 characters
Line Code
38 'this_path_ssl' => Tools::getShopDomainSsl(true, true) . PS_BASE_URI . 'modules/' . $this->module->name . '/'

In file /controllers/front/validation.php:

  • The closing brace for the class must go on the next line after the body
Line Code
18 }

In file /culqi.php:

  • Inline control structures are not allowed
Line Code
2 if (!defined('PS_VERSION'))
| [...]

237 | if(Configuration::get('CULQI_ENABLED_MULTIPAYMENT')) return $this->display(FILE, 'payment_multi.tpl'); | [...] 293 | if (Db::getInstance()->Execute("DELETE FROM " . DB_PREFIX . "order_state WHERE id_order_state = ( SELECT value | [...] 317 | if (!parent::uninstall()

  • Function closing brace must go on the next line following the body; found 1 blank lines before brace
Line Code
43 }
| [...]

186 | } | [...] 220 | }

  • Expected 1 space after IF keyword; 0 found
Line Code
71 if(empty($address->address1)) {
| [...]

80 | if(empty($address->phone_mobile)) | [...] 141 | if($cargo->object == "charge") { | [...] 237 | if(Configuration::get('CULQI_ENABLED_MULTIPAYMENT')) return $this->display(FILE, 'payment_multi.tpl'); | [...] 252 | if($state == Configuration::get('CULQI_STATE_PENDING')) { | [...] 587 | if($data['type'] == $eventOrderStatus) {
| [...] 621 | if(Tools::strlen($cartID) < 1){ | [...] 652 | if($state == 'paid') { | [...] 658 | if($state == 'expired') {

  • Expected 1 space after closing parenthesis; found 9
Line Code
80 if(empty($address->phone_mobile))
| [...]

90 | if ($this->context->customer->isLogged()) | [...] 224 | if (!$this->active) | [...] 228 | if (!$this->checkCurrency($params['cart'])) | [...] 244 | if (!$this->active) | [...] 277 | if (is_array($currencies_module)) | [...] 333 | if (Tools::isSubmit('btnSubmit')) | [...] 358 | if (Tools::isSubmit('btnSubmit')) | [...] 379 | if (!Configuration::get('CULQI_STATE_OK')) | [...] 400 | if (!Configuration::get('CULQI_STATE_PENDING')) | [...] 418 | if (!Configuration::get('CULQI_STATE_EXPIRED')) | [...] 436 | if (!Configuration::get('CULQI_STATE_ERROR')) | [...] 563 | if (Tools::isSubmit('btnSubmit'))

  • Line indented incorrectly; expected 8 spaces, found 6
Line Code
107 try {
| [...]

152 | } catch(Exception $e){ | [...] 154 | }

  • Blank line found at start of control structure
Line Code
107 try {
| [...]

160 | try { | [...] 192 | try { | [...] 252 | if($state == Configuration::get('CULQI_STATE_PENDING')) { | [...] 587 | if($data['type'] == $eventOrderStatus) {
| [...] 649 | } else {

  • Line indented incorrectly; expected at least 12 spaces, found 8
Line Code
109 $cart = $this->context->cart;
| [...]

111 | $userAddress = new Address((int)$cart->id_address_invoice); 112 | $userCountry = new Country((int)$userAddress->id_country); | [...] 114 | $culqi = new Culqi\Culqi(array('api_key' => Configuration::get('CULQI_LLAVE_COMERCIO'))); | [...] 116 | $amount = $this->removeComma($cart->getOrderTotal(true, Cart::BOTH)); 117 | $email = $this->context->customer->email; 118 | $order_id = (string)$cart->id; | [...] 120 | $cargo = $culqi->Charges->create( | [...] 153 | return $e->getMessage();

  • Line indented incorrectly; expected at least 14 spaces, found 8
Line Code
139 );
  • Line indented incorrectly; expected 14 spaces, found 8
Line Code
141 if($cargo->object == "charge") {
  • Line indented incorrectly; expected at least 18 spaces, found 10
Line Code
142 Db::getInstance()->insert('culqi_order', array(
| [...]

148 | ));

  • Line indented incorrectly; expected at least 18 spaces, found 14
Line Code
143 'culqi_charge_id' => (string)$cargo->id,
144 'amount' => $amount,
145 'installments' => $installments,
146 'email' => $email,
147 'prestashop_order_id' => $order_id
  • Line indented incorrectly; expected 16 spaces, found 8
Line Code
149 }
  • Line indented incorrectly; expected at least 16 spaces, found 8
Line Code
151 return $cargo;
  • Expected 1 space after CATCH keyword; 0 found
Line Code
152 } catch(Exception $e){
| [...]

181 | } catch(Exception $e) { | [...] 216 | } catch(Exception $e) {

  • Expected 1 space after closing parenthesis; found 0
Line Code
152 } catch(Exception $e){
| [...]

621 | if(Tools::strlen($cartID) < 1){

  • Whitespace found at end of line
Line Code
155 }
| [...]

162 | $cart = $this->context->cart;
| [...] 169 | array(
170 | "metadata" => array( | [...] 173 | //"customer_secure_key" => $OrderObject->secure_key, | [...] 177 | ); | [...] 182 | echo' Error'; 183 | error_log($e->getMessage());
184 | }
| [...] 190 | public function createOrder() {
| [...] 194 | $cart = $this->context->cart; | [...] 201 | "description" => "Orden de compra ".$cart->id,
202 | "order_number" => "ps-".$cart->id."-".rand(1, 99999), 203 | "client_details" => array( | [...] 206 | "email" => $this->context->customer->email, | [...] 210 | "expiration_date" => time() + Configuration::get('CULQI_ORDER_MAX_DURATION')6060
| [...] 212 | ); | [...] 217 | return $e->getMessage();
| [...] 220 | } | [...] 235 | )); | [...] 237 | if(Configuration::get('CULQI_ENABLED_MULTIPAYMENT')) return $this->display(FILE, 'payment_multi.tpl'); | [...] 239 | return $this->display(FILE, 'payment.tpl'); | [...] 247 | }
| [...] 300 | FROM " . DB_PREFIX . "configuration WHERE name = 'CULQI_STATE_ERROR' )") &&
| [...] 304 | FROM " . DB_PREFIX . "configuration WHERE name = 'CULQI_STATE_PENDING' )" ) && | [...] 308 | FROM " . DB_PREFIX . "configuration WHERE name = 'CULQI_STATE_EXPIRED' )")
| [...] 323 | || !Configuration::deleteByName('CULQI_CODIGO_COMERCIO') 324 | || !Configuration::deleteByName('CULQI_ENABLED_MULTIPAYMENT')
325 | || !Configuration::deleteByName('CULQI_ORDER_MAX_DURATION')
| [...] 343 | }
| [...] 345 | // Añadir validacion si es que habilitado | [...] 397 | } | [...] 416 | } | [...] 471 | 'name' => 'CULQI_CODIGO_COMERCIO', | [...] 473 | 'required' => true, | [...] 479 | 'name' => 'CULQI_LLAVE_COMERCIO', | [...] 482 | ), | [...] 484 | 'type' => 'switch',
485 | 'label' => $this->l('Habilitar pago con efectivo (BETA)'), | [...] 487 | 'name' => 'CULQI_ENABLED_MULTIPAYMENT', | [...] 489 | 'required' => true,
| [...] 502 | ), | [...] 507 | 'required' => false, 508 | 'hint' => 'Colocar un numero entero. Ejemplo: 2 o 24.',
| [...] 510 | ),
| [...] 516 | 'disabled' => true, 517 | 'hint' => 'A esta URL se enviarán las notificaciones de cambios de estado de una orden. Por ejemplo cuando fue pagada o expiró. Es obligatorio crear el webhook dentro del Panel Culqi.',
518 | 'desc' => 'OBLIGATORIO. Pega esta URL dentro de la sección de Eventos > Webhooks en el panel de Culqi. Crea un webhook del tipo "order.status.changed"'
519 | ),
| [...] 553 | 'CULQI_CODIGO_COMERCIO' => Tools::getValue('CULQI_CODIGO_COMERCIO', Configuration::get('CULQI_CODIGO_COMERCIO')), 554 | 'CULQI_ENABLED_MULTIPAYMENT' => Tools::getValue('CULQI_ENABLED_MULTIPAYMENT', Configuration::get('CULQI_ENABLED_MULTIPAYMENT')), 555 | 'CULQI_ORDER_MAX_DURATION' => Tools::getValue('CULQI_ORDER_MAX_DURATION', Configuration::get('CULQI_ORDER_MAX_DURATION')), 556 | 'CULQI_ORDER_WEBHOOK' => Tools::getValue('CULQI_ORDER_WEBHOOK', PS_BASE_URL.PS_BASE_URI."modules/culqi/culqi_webhook.php")
| [...] 575 | } | [...] 578 | public function validationCulqi() | [...] 580 | error_log('Llego petición al Webhook');
| [...] 582 | $data = json_decode(file_get_contents('php://input'), true); | [...] 585 | error_log($data['data']);
| [...] 587 | if($data['type'] == $eventOrderStatus) {
| [...] 589 | $objectOrder = json_decode($data['data'], true);
590 | error_log('Evento de cambio de orden');
| [...] 592 | // Get parameters | [...] 595 | $amount = trim($objectOrder['amount']);
| [...] 597 | // Metadata 598 | $metadata = $objectOrder['metadata']; | [...] 600 | $cartID = $metadata['cart_id']; | [...] 602 | //$uidModule = trim($metadata['uid_module']); 603 | //$customerSecureKey = trim($metadata['customer_secure_key']);
| [...] 608 | // Validación
| [...] 614 | exit("Error: Metadata vacia"); 615 | } | [...] 618 | exit("Error: valores de la orden incorrectos"); 619 | }
| [...] 623 | } | [...] 629 | } | [...] 631 | // Validar carro con informacion de orden
| [...] 649 | } else {
| [...] 652 | if($state == 'paid') { 653 | error_log('Estado: Pagada'); 654 | $OrderObject->setCurrentState((int)Configuration::get('CULQI_STATE_OK')); | [...] 658 | if($state == 'expired') { 659 | error_log('Estado: Expirada'); | [...] 665 | }
| [...] 668 | }

  • Opening brace should be on a new line
Line Code
158 public function updateOrder($order_id) {
| [...]

190 | public function createOrder() {
| [...] 573 | public function removeComma($amount) {

  • Opening parenthesis of a multi-line function call must be the last content on the line
Line Code
168 $order = $culqi->Orders->update($order_id,
  • Multi-line function call not indented correctly; expected 16 spaces but found 14
Line Code
169 array(
| [...]

176 | )

  • Multi-line function call not indented correctly; expected 12 spaces but found 13
Line Code
177 );
  • Blank line found at end of control structure
Line Code
180
| [...]

215 | | [...] 661 | | [...] 667 |

  • Line indented incorrectly; expected at least 12 spaces, found 11
Line Code
182 echo' Error';
183 error_log($e->getMessage());
| [...]

212 | ); | [...] 214 | return $order; | [...] 589 | $objectOrder = json_decode($data['data'], true);
590 | error_log('Evento de cambio de orden');
| [...] 593 | $currencyCode = trim($objectOrder['currency_code']); 594 | $state = trim($objectOrder['state']); 595 | $amount = trim($objectOrder['amount']);
| [...] 598 | $metadata = $objectOrder['metadata']; | [...] 600 | $cartID = $metadata['cart_id']; 601 | error_log($cartID);

  • Line indented incorrectly; expected at least 12 spaces, found 10
Line Code
194 $cart = $this->context->cart;
195 $culqi = new Culqi\Culqi(array('api_key' => Configuration::get('CULQI_LLAVE_COMERCIO')));
| [...]

197 | $order = $culqi->Orders->create( | [...] 217 | return $e->getMessage();
| [...] 226 | return; | [...] 230 | return; | [...] 246 | return; | [...] 280 | {

  • Multi-line function call not indented correctly; expected 14 spaces but found 12
Line Code
198 array(
| [...]

211 | )

  • Multi-line function call not indented correctly; expected 10 spaces but found 11
Line Code
212 );
  • Expected 1 space after closing brace; newline found
Line Code
259 }
  • Line indented incorrectly; expected 12 spaces, found 10
Line Code
279 foreach ($currencies_module as $currency_module)
| [...]

285 | } | [...] 635 | if ($ObjCart->orderExists() > 0 ) { | [...] 665 | }

  • Expected 1 space after closing parenthesis; found 11
Line Code
279 foreach ($currencies_module as $currency_module)
  • Line indented incorrectly; expected 16 spaces, found 12
Line Code
281 if ($currency_order->id == $currency_module['id_currency'])
| [...]

284 | } | [...] 647 | if ((int)Configuration::get('CULQI_STATE_OK') == $OrderObject->current_state) { | [...] 649 | } else {
| [...] 664 | }

  • Expected 1 space after closing parenthesis; found 13
Line Code
281 if ($currency_order->id == $currency_module['id_currency'])
| [...]

335 | if (!Tools::getValue('CULQI_LLAVE_COMERCIO')) | [...] 340 | if (!Tools::getValue('CULQI_CODIGO_COMERCIO')) | [...] 361 | if (!count($this->_postErrors))

  • Line indented incorrectly; expected at least 16 spaces, found 12
Line Code
282 {
| [...]

614 | exit("Error: Metadata vacia"); | [...] 618 | exit("Error: valores de la orden incorrectos"); | [...] 622 | exit("Error: Valores personalizados incorrectos"); | [...] 626 | $ObjCart = new Cart($cartID);

  • Line indented incorrectly; expected at least 20 spaces, found 14
Line Code
283 return true;
  • Expected 0 spaces before closing bracket; 1 found
Line Code
303 Db::getInstance()->Execute("DELETE FROM " . DB_PREFIX . "order_state_lang WHERE id_order_state = ( SELECT value
| [...]

635 | if ($ObjCart->orderExists() > 0 ) {

  • Line indented incorrectly; expected at least 16 spaces, found 14
Line Code
337 $this->_postErrors[] = $this->l('El campo llave de comercio es requerido.');
| [...]

342 | $this->_postErrors[] = $this->l('El campo código de comercio es requerido.'); | [...] 363 | $this->_postProcess(); | [...] 384 | $order_state->name[$language['id_lang']] = 'Exitoso'; | [...] 405 | $order_state->name[$language['id_lang']] = 'Pendiente de pago'; | [...] 423 | $order_state->name[$language['id_lang']] = 'Orden expirada'; | [...] 441 | $order_state->name[$language['id_lang']] = 'Incorrecto';

  • Line indented incorrectly; expected 16 spaces, found 14
Line Code
365 foreach ($this->_postErrors as $err) {
| [...]

367 | }

  • Line indented incorrectly; expected at least 20 spaces, found 16
Line Code
366 $this->_html .= $this->displayError($err);
| [...]

648 | exit("WEBHOOK CALLBACK: La orden ya esta completa"); | [...] 663 | exit("WEBHOOK CALLBACK: OK");

  • No space found after comma in function call
Line Code
574 return str_replace(".","",str_replace(',', '', number_format($amount,2,'.',',')));
  • Line indented incorrectly; expected 12 spaces, found 11
Line Code
613 if (empty($metadata)) {
| [...]

615 | } | [...] 617 | if (empty($amount) || empty($currencyCode) || empty($state)) { | [...] 619 | }
| [...] 621 | if(Tools::strlen($cartID) < 1){ | [...] 623 | } | [...] 625 | if (Validate::isLoadedObject(new Cart($cartID))) { | [...] 627 | } else { | [...] 629 | }

  • Line indented incorrectly; expected at least 16 spaces, found 13
Line Code
628 exit("Error: El carrito no existe");
| [...]

636 | $OrderObject = new Order(); 637 | $OrderObject = new Order($OrderObject->getOrderByCartId($ObjCart->id));

  • Line indented incorrectly; expected 20 spaces, found 16
Line Code
652 if($state == 'paid') {
| [...]

655 | } | [...] 658 | if($state == 'expired') { | [...] 662 | }

  • Line indented incorrectly; expected at least 24 spaces, found 20
Line Code
653 error_log('Estado: Pagada');
654 $OrderObject->setCurrentState((int)Configuration::get('CULQI_STATE_OK'));
| [...]

659 | error_log('Estado: Expirada'); 660 | $OrderObject->setCurrentState((int)Configuration::get('CULQI_STATE_EXPIRED'));

  • Function closing brace must go on the next line following the body; found 2 blank lines before brace
Line Code
671 }
  • Line indented incorrectly; expected 0 spaces, found 2
Line Code
674 }
  • The closing brace for the class must go on the next line after the body
Line Code
674 }
  • Closing brace indented incorrectly; expected 0 spaces, found 2
Line Code
674 }
  • Each class must be in a file by itself
Line Code
677 class CulqiPago
  • Property name "$_postErrors" should not be prefixed with an underscore to indicate visibility
Line Code
20 private $_postErrors = array();
  • Line exceeds 120 characters; contains 124 characters
Line Code
31 $this->controllers = array('chargeajax', 'payment', 'validation', 'postpayment', 'postpendingpayment', 'orderajax');
  • Line exceeds 120 characters; contains 125 characters
Line Code
295 Db::getInstance()->Execute("DELETE FROM " . DB_PREFIX . "order_state_lang WHERE id_order_state = ( SELECT value
| [...]

299 | Db::getInstance()->Execute("DELETE FROM " . DB_PREFIX . "order_state_lang WHERE id_order_state = ( SELECT value | [...] 303 | Db::getInstance()->Execute("DELETE FROM " . DB_PREFIX . "order_state_lang WHERE id_order_state = ( SELECT value | [...] 307 | Db::getInstance()->Execute("DELETE FROM " . DB_PREFIX . "order_state_lang WHERE id_order_state = ( SELECT value

  • Method name "_postValidation" should not be prefixed with an underscore to indicate visibility
Line Code
331 private function _postValidation()
  • Method name "_displayInfo" should not be prefixed with an underscore to indicate visibility
Line Code
349 private function _displayInfo()
  • Line exceeds 120 characters; contains 238 characters
Line Code
486 'desc' => 'Permite habilitar el modo multipagos de Culqi. Aceptar tarjetas de crédito/débito y pagos en efectivo. Más información aquí',
  • Line exceeds 120 characters; contains 162 characters
Line Code
509 'desc' => 'Tiempo de duración de las ordenes creadas, en horas. Por ejemplo 24 hrs (1 día), pasado esta tiempo las órdenes expirarán.'
  • Line exceeds 120 characters; contains 213 characters
Line Code
517 'hint' => 'A esta URL se enviarán las notificaciones de cambios de estado de una orden. Por ejemplo cuando fue pagada o expiró. Es obligatorio crear el webhook dentro del Panel Culqi.',
  • Line exceeds 120 characters; contains 204 characters
Line Code
518 'desc' => 'OBLIGATORIO. Pega esta URL dentro de la sección de Eventos > Webhooks en el panel de Culqi. Crea un webhook del tipo "order.status.changed"'
  • Line exceeds 120 characters; contains 156 characters
Line Code
533 $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
  • Line exceeds 120 characters; contains 170 characters
Line Code
538 $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;
  • Line exceeds 120 characters; contains 122 characters
Line Code
552 'CULQI_LLAVE_COMERCIO' => Tools::getValue('CULQI_LLAVE_COMERCIO', Configuration::get('CULQI_LLAVE_COMERCIO')),
  • Line exceeds 120 characters; contains 126 characters
Line Code
553 'CULQI_CODIGO_COMERCIO' => Tools::getValue('CULQI_CODIGO_COMERCIO', Configuration::get('CULQI_CODIGO_COMERCIO')),
  • Line exceeds 120 characters; contains 141 characters
Line Code
554 'CULQI_ENABLED_MULTIPAYMENT' => Tools::getValue('CULQI_ENABLED_MULTIPAYMENT', Configuration::get('CULQI_ENABLED_MULTIPAYMENT')),
  • Line exceeds 120 characters; contains 135 characters
Line Code
555 'CULQI_ORDER_MAX_DURATION' => Tools::getValue('CULQI_ORDER_MAX_DURATION', Configuration::get('CULQI_ORDER_MAX_DURATION')),
  • Line exceeds 120 characters; contains 151 characters
Line Code
556 'CULQI_ORDER_WEBHOOK' => Tools::getValue('CULQI_ORDER_WEBHOOK', PS_BASE_URL.PS_BASE_URI."modules/culqi/culqi_webhook.php")
  • Method name "_postProcess" should not be prefixed with an underscore to indicate visibility
Line Code
561 private function _postProcess()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment