@@ -42,23 +42,23 @@ discard block |
||
| 42 | 42 | public $errorLinkMessage; |
| 43 | 43 | |
| 44 | 44 | public $defaultConfigs = array('PAGANTIS_TITLE'=>'Instant Financing', |
| 45 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
| 46 | - 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
| 47 | - 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
| 48 | - 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
| 49 | - 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
| 50 | - 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
| 51 | - 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
| 52 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
| 53 | - 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
| 54 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR_CHECKOUT'=>'default', |
|
| 55 | - 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
| 56 | - 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
| 57 | - 'PAGANTIS_URL_OK'=>'', |
|
| 58 | - 'PAGANTIS_URL_KO'=>'', |
|
| 59 | - 'PAGANTIS_TITLE_EXTRA' => 'Paga hasta en 12 cómodas cuotas con Paga+Tarde. Solicitud totalmente online y sin papeleos,¡y la respuesta es inmediata!', |
|
| 60 | - 'PAGANTIS_PROMOTION' => '', |
|
| 61 | - 'PAGANTIS_PROMOTED_PRODUCT_CODE' => '<p>¡Financia este producto sin intereses! - 0% TAE</p>' |
|
| 45 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
| 46 | + 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
| 47 | + 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
| 48 | + 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
| 49 | + 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
| 50 | + 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
| 51 | + 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
| 52 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
| 53 | + 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
| 54 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR_CHECKOUT'=>'default', |
|
| 55 | + 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
| 56 | + 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
| 57 | + 'PAGANTIS_URL_OK'=>'', |
|
| 58 | + 'PAGANTIS_URL_KO'=>'', |
|
| 59 | + 'PAGANTIS_TITLE_EXTRA' => 'Paga hasta en 12 cómodas cuotas con Paga+Tarde. Solicitud totalmente online y sin papeleos,¡y la respuesta es inmediata!', |
|
| 60 | + 'PAGANTIS_PROMOTION' => '', |
|
| 61 | + 'PAGANTIS_PROMOTED_PRODUCT_CODE' => '<p>¡Financia este producto sin intereses! - 0% TAE</p>' |
|
| 62 | 62 | ); |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | try { |
| 182 | 182 | include_once('./ext/modules/payment/pagantis/vendor/autoload.php'); |
| 183 | 183 | global $order, $customer_id, $sendto, $billto, $cart, $languages_id, $currency, $currencies, $shipping, |
| 184 | - $payment, $comments, $customer_default_address_id, $cartID; |
|
| 184 | + $payment, $comments, $customer_default_address_id, $cartID; |
|
| 185 | 185 | $global_vars = array(); |
| 186 | 186 | $global_vars['customer_id'] = serialize($customer_id); |
| 187 | 187 | $global_vars['sendTo'] = serialize($sendto); |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | if (strpos($_SERVER[REQUEST_URI], "checkout_payment.php") <= 0) { |
| 76 | 76 | $this->title = MODULE_PAYMENT_PAGANTIS_TEXT_ADMIN_TITLE; // Payment module title in Admin |
| 77 | - } else { |
|
| 78 | - $this->title = MODULE_PAYMENT_PAGANTIS_TEXT_CHECKOUT .'<br/><br/><div class="buttonSet" style="display:none"></div><br/>'; // Payment module title in Catalog |
|
| 77 | + }else { |
|
| 78 | + $this->title = MODULE_PAYMENT_PAGANTIS_TEXT_CHECKOUT.'<br/><br/><div class="buttonSet" style="display:none"></div><br/>'; // Payment module title in Catalog |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $this->enabled = ((MODULE_PAYMENT_PAGANTIS_STATUS == 'True') ? true : false); |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | "%s://%s%s%s", |
| 86 | 86 | isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http', |
| 87 | 87 | $_SERVER['SERVER_NAME'], |
| 88 | - isset($_SERVER['SERVER_PORT']) ? ":" . $_SERVER['SERVER_PORT'] : '', |
|
| 88 | + isset($_SERVER['SERVER_PORT']) ? ":".$_SERVER['SERVER_PORT'] : '', |
|
| 89 | 89 | $_SERVER['REQUEST_URI'] |
| 90 | 90 | ) |
| 91 | 91 | ); |
| 92 | 92 | |
| 93 | - $this->form_action_url = $this->base_url . '/ext/modules/payment/pagantis/bypass.php'; |
|
| 93 | + $this->form_action_url = $this->base_url.'/ext/modules/payment/pagantis/bypass.php'; |
|
| 94 | 94 | |
| 95 | 95 | if (defined('MODULE_PAYMENT_PAGANTIS_LANG_CODE')) { |
| 96 | 96 | $this->langCode = strtoupper(MODULE_PAYMENT_PAGANTIS_LANG_CODE); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | $userAddress = new Address(); |
| 212 | 212 | $userAddress |
| 213 | 213 | ->setZipCode($order->billing['postcode']) |
| 214 | - ->setFullName($order->billing['firstname'] . ' ' . $order->billing['lastname']) |
|
| 214 | + ->setFullName($order->billing['firstname'].' '.$order->billing['lastname']) |
|
| 215 | 215 | ->setCountryCode('ES') |
| 216 | 216 | ->setCity($order->billing['city']) |
| 217 | 217 | ->setAddress($order->billing['street_address']) |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | $orderShippingAddress = new Address(); |
| 226 | 226 | $orderShippingAddress |
| 227 | 227 | ->setZipCode($order->delivery['postcode']) |
| 228 | - ->setFullName($order->billing['firstname'] . ' ' . $order->billing['lastname']) |
|
| 228 | + ->setFullName($order->billing['firstname'].' '.$order->billing['lastname']) |
|
| 229 | 229 | ->setCountryCode('ES') |
| 230 | 230 | ->setCity($order->delivery['city']) |
| 231 | 231 | ->setAddress($order->delivery['street_address']) |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $orderUser = new \Pagantis\OrdersApiClient\Model\Order\User(); |
| 236 | 236 | $orderUser |
| 237 | 237 | ->setAddress($userAddress) |
| 238 | - ->setFullName($order->billing['firstname'] . ' ' . $order->billing['lastname']) |
|
| 238 | + ->setFullName($order->billing['firstname'].' '.$order->billing['lastname']) |
|
| 239 | 239 | ->setBillingAddress($orderBillingAddress) |
| 240 | 240 | ->setEmail($order->customer['email_address']) |
| 241 | 241 | ->setFixPhone($order->customer['telephone']) |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | ->setQuantity(intval($item['qty'])) |
| 277 | 277 | ->setDescription($item['name']); |
| 278 | 278 | if ($promotedProduct) { |
| 279 | - $promotedAmount+=$product->getAmount(); |
|
| 279 | + $promotedAmount += $product->getAmount(); |
|
| 280 | 280 | $promotedMessage = $product->getDescription()."-Price:".$item['final_price']."-Qty:".$product->getQuantity(); |
| 281 | 281 | $metadataOrder->addMetadata('promotedProduct', $promotedMessage); |
| 282 | 282 | } |
@@ -296,9 +296,9 @@ discard block |
||
| 296 | 296 | ); |
| 297 | 297 | |
| 298 | 298 | $cancelUrl = trim(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL', false)); |
| 299 | - if ($this->extraConfig['PAGANTIS_URL_KO']!='') { |
|
| 299 | + if ($this->extraConfig['PAGANTIS_URL_KO'] != '') { |
|
| 300 | 300 | $koUrl = $this->extraConfig['PAGANTIS_URL_KO']; |
| 301 | - } else { |
|
| 301 | + }else { |
|
| 302 | 302 | $koUrl = $cancelUrl; |
| 303 | 303 | } |
| 304 | 304 | |
@@ -336,25 +336,25 @@ discard block |
||
| 336 | 336 | if ($pagantisOrder instanceof \Pagantis\OrdersApiClient\Model\Order) { |
| 337 | 337 | $url = $pagantisOrder->getActionUrls()->getForm(); |
| 338 | 338 | $this->insertRow($this->os_order_reference, $pagantisOrder->getId(), serialize($global_vars)); |
| 339 | - } else { |
|
| 339 | + }else { |
|
| 340 | 340 | throw new OrderNotFoundException(); |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | if ($url == "") { |
| 344 | 344 | throw new UnknownException(_("No ha sido posible obtener una respuesta de Pagantis")); |
| 345 | - } else { |
|
| 345 | + }else { |
|
| 346 | 346 | $output = "\n"; |
| 347 | - $output .= tep_draw_hidden_field("formUrl", $url) . "\n"; |
|
| 348 | - $output .= tep_draw_hidden_field("cancelUrl", $cancelUrl) . "\n"; |
|
| 347 | + $output .= tep_draw_hidden_field("formUrl", $url)."\n"; |
|
| 348 | + $output .= tep_draw_hidden_field("cancelUrl", $cancelUrl)."\n"; |
|
| 349 | 349 | return $output; |
| 350 | 350 | |
| 351 | 351 | } //TODO IFRAME |
| 352 | 352 | } catch (\Exception $exception) { |
| 353 | 353 | $this->insertLog($exception); |
| 354 | 354 | $output = "\n"; |
| 355 | - $output .= tep_draw_hidden_field("cancelUrl", $cancelUrl) . "\n"; |
|
| 356 | - $output .= tep_draw_hidden_field("errorMessage", $exception->getMessage()) . "\n"; |
|
| 357 | - $output .= tep_draw_hidden_field("errorCode", $exception->getCode()) . "\n"; |
|
| 355 | + $output .= tep_draw_hidden_field("cancelUrl", $cancelUrl)."\n"; |
|
| 356 | + $output .= tep_draw_hidden_field("errorMessage", $exception->getMessage())."\n"; |
|
| 357 | + $output .= tep_draw_hidden_field("errorCode", $exception->getCode())."\n"; |
|
| 358 | 358 | $output .= "<p>".$this->errorMessage.", <a href='$cancelUrl' style='text-decoration:underline'><b>"; |
| 359 | 359 | $output .= $this->errorLinkMessage." </b></a></p>"; |
| 360 | 360 | |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | return 'failed'; |
| 419 | 419 | } |
| 420 | 420 | |
| 421 | - tep_db_query("insert into " . TABLE_CONFIGURATION . " |
|
| 421 | + tep_db_query("insert into ".TABLE_CONFIGURATION." |
|
| 422 | 422 | ( |
| 423 | 423 | configuration_title, |
| 424 | 424 | configuration_key, |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | ', |
| 442 | 442 | now() |
| 443 | 443 | )"); |
| 444 | - tep_db_query("insert into " . TABLE_CONFIGURATION . " |
|
| 444 | + tep_db_query("insert into ".TABLE_CONFIGURATION." |
|
| 445 | 445 | ( |
| 446 | 446 | configuration_title, |
| 447 | 447 | configuration_key, |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | '0', |
| 462 | 462 | now() |
| 463 | 463 | )"); |
| 464 | - tep_db_query("insert into " . TABLE_CONFIGURATION . " |
|
| 464 | + tep_db_query("insert into ".TABLE_CONFIGURATION." |
|
| 465 | 465 | ( |
| 466 | 466 | configuration_title, |
| 467 | 467 | configuration_key, |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | '0', |
| 482 | 482 | now() |
| 483 | 483 | )"); |
| 484 | - tep_db_query("insert into " . TABLE_CONFIGURATION . " |
|
| 484 | + tep_db_query("insert into ".TABLE_CONFIGURATION." |
|
| 485 | 485 | ( |
| 486 | 486 | configuration_title, |
| 487 | 487 | configuration_key, |
@@ -513,14 +513,14 @@ discard block |
||
| 513 | 513 | */ |
| 514 | 514 | private function installPagantisTables() |
| 515 | 515 | { |
| 516 | - $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_PAGANTIS_LOG . " ( |
|
| 516 | + $sql = "CREATE TABLE IF NOT EXISTS ".TABLE_PAGANTIS_LOG." ( |
|
| 517 | 517 | id int NOT NULL AUTO_INCREMENT, |
| 518 | 518 | log text NOT NULL, |
| 519 | 519 | createdAt timestamp DEFAULT CURRENT_TIMESTAMP, |
| 520 | 520 | UNIQUE KEY id (id))"; |
| 521 | 521 | tep_db_query($sql); |
| 522 | 522 | |
| 523 | - $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_PAGANTIS_CONFIG . " ( |
|
| 523 | + $sql = "CREATE TABLE IF NOT EXISTS ".TABLE_PAGANTIS_CONFIG." ( |
|
| 524 | 524 | id int NOT NULL AUTO_INCREMENT, |
| 525 | 525 | config varchar(60) NOT NULL, |
| 526 | 526 | value varchar(200) NOT NULL, |
@@ -528,10 +528,10 @@ discard block |
||
| 528 | 528 | tep_db_query($sql); |
| 529 | 529 | |
| 530 | 530 | // check if table has records |
| 531 | - $check_query = tep_db_query("select value from " . TABLE_PAGANTIS_CONFIG); |
|
| 531 | + $check_query = tep_db_query("select value from ".TABLE_PAGANTIS_CONFIG); |
|
| 532 | 532 | if (tep_db_num_rows($check_query) === 0) { |
| 533 | 533 | foreach ((array)$this->defaultConfigs as $configKey => $configValue) { |
| 534 | - $query = "INSERT INTO " . TABLE_PAGANTIS_CONFIG . " |
|
| 534 | + $query = "INSERT INTO ".TABLE_PAGANTIS_CONFIG." |
|
| 535 | 535 | ( |
| 536 | 536 | config, |
| 537 | 537 | value |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | } |
| 546 | 546 | } |
| 547 | 547 | |
| 548 | - $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_PAGANTIS_ORDERS . " ( |
|
| 548 | + $sql = "CREATE TABLE IF NOT EXISTS ".TABLE_PAGANTIS_ORDERS." ( |
|
| 549 | 549 | id int NOT NULL AUTO_INCREMENT, |
| 550 | 550 | os_order_id varchar(50), |
| 551 | 551 | os_order_reference varchar(50) NOT NULL, |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | UNIQUE KEY id(id))"; |
| 555 | 555 | tep_db_query($sql); |
| 556 | 556 | |
| 557 | - $sql = "CREATE TABLE IF NOT EXISTS " . TABLE_PAGANTIS_CONCURRENCY . " ( |
|
| 557 | + $sql = "CREATE TABLE IF NOT EXISTS ".TABLE_PAGANTIS_CONCURRENCY." ( |
|
| 558 | 558 | id varchar(50) NOT NULL, |
| 559 | 559 | `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 560 | 560 | UNIQUE KEY id(id))"; |
@@ -566,29 +566,29 @@ discard block |
||
| 566 | 566 | */ |
| 567 | 567 | public function remove() |
| 568 | 568 | { |
| 569 | - $checkTable = tep_db_query("SHOW TABLES LIKE '" . TABLE_PAGANTIS_LOG . "'"); |
|
| 569 | + $checkTable = tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_LOG."'"); |
|
| 570 | 570 | if (tep_db_num_rows($checkTable) > 0) { |
| 571 | - tep_db_query("drop table " . TABLE_PAGANTIS_LOG); |
|
| 571 | + tep_db_query("drop table ".TABLE_PAGANTIS_LOG); |
|
| 572 | 572 | } |
| 573 | 573 | |
| 574 | - $checkTable = tep_db_query("SHOW TABLES LIKE '" . TABLE_PAGANTIS_CONFIG . "'"); |
|
| 574 | + $checkTable = tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_CONFIG."'"); |
|
| 575 | 575 | if (tep_db_num_rows($checkTable) > 0) { |
| 576 | - tep_db_query("drop table " . TABLE_PAGANTIS_CONFIG); |
|
| 576 | + tep_db_query("drop table ".TABLE_PAGANTIS_CONFIG); |
|
| 577 | 577 | } |
| 578 | 578 | |
| 579 | - $checkTable = tep_db_query("SHOW TABLES LIKE '" . TABLE_PAGANTIS_ORDERS . "'"); |
|
| 579 | + $checkTable = tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_ORDERS."'"); |
|
| 580 | 580 | if (tep_db_num_rows($checkTable) > 0) { |
| 581 | - tep_db_query("drop table " . TABLE_PAGANTIS_ORDERS); |
|
| 581 | + tep_db_query("drop table ".TABLE_PAGANTIS_ORDERS); |
|
| 582 | 582 | } |
| 583 | 583 | |
| 584 | - $checkTable = tep_db_query("SHOW TABLES LIKE '" . TABLE_PAGANTIS_CONCURRENCY . "'"); |
|
| 584 | + $checkTable = tep_db_query("SHOW TABLES LIKE '".TABLE_PAGANTIS_CONCURRENCY."'"); |
|
| 585 | 585 | if (tep_db_num_rows($checkTable) > 0) { |
| 586 | - tep_db_query("drop table " . TABLE_PAGANTIS_CONCURRENCY); |
|
| 586 | + tep_db_query("drop table ".TABLE_PAGANTIS_CONCURRENCY); |
|
| 587 | 587 | } |
| 588 | 588 | |
| 589 | - tep_db_query("DELETE FROM ". TABLE_CONFIGURATION ." where configuration_key in ('MODULE_PAYMENT_PAGANTIS_STATUS','MODULE_PAYMENT_PAGANTIS_PK','MODULE_PAYMENT_PAGANTIS_SK')"); |
|
| 589 | + tep_db_query("DELETE FROM ".TABLE_CONFIGURATION." where configuration_key in ('MODULE_PAYMENT_PAGANTIS_STATUS','MODULE_PAYMENT_PAGANTIS_PK','MODULE_PAYMENT_PAGANTIS_SK')"); |
|
| 590 | 590 | |
| 591 | - $query = "delete from " . TABLE_CONFIGURATION . " where configuration_key like '%_PAGANTIS_%'"; |
|
| 591 | + $query = "delete from ".TABLE_CONFIGURATION." where configuration_key like '%_PAGANTIS_%'"; |
|
| 592 | 592 | tep_db_query($query); |
| 593 | 593 | |
| 594 | 594 | $this->uninstallSimulator(); |
@@ -643,13 +643,13 @@ discard block |
||
| 643 | 643 | */ |
| 644 | 644 | private function insertRow($orderId, $pagantisOrderId, $globalVars) |
| 645 | 645 | { |
| 646 | - $query = "select * from " . TABLE_PAGANTIS_ORDERS . " where os_order_reference='$orderId'"; |
|
| 646 | + $query = "select * from ".TABLE_PAGANTIS_ORDERS." where os_order_reference='$orderId'"; |
|
| 647 | 647 | $resultsSelect = tep_db_query($query); |
| 648 | 648 | $countResults = tep_db_num_rows($resultsSelect); |
| 649 | 649 | if ($countResults == 0) { |
| 650 | - $query = "INSERT INTO " . TABLE_PAGANTIS_ORDERS . " |
|
| 650 | + $query = "INSERT INTO ".TABLE_PAGANTIS_ORDERS." |
|
| 651 | 651 | (os_order_reference, pagantis_order_id, globals) values ('$orderId', '$pagantisOrderId','$globalVars')"; |
| 652 | - } else { |
|
| 652 | + }else { |
|
| 653 | 653 | $query = "UPDATE ".TABLE_PAGANTIS_ORDERS." set pagantis_order_id='$pagantisOrderId' |
| 654 | 654 | where os_order_reference='$orderId'"; |
| 655 | 655 | } |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | |
| 688 | 688 | if ($this->extraConfig['PAGANTIS_PROMOTION'] == '') { |
| 689 | 689 | $promotedProducts = array(); |
| 690 | - } else { |
|
| 690 | + }else { |
|
| 691 | 691 | $promotedProducts = array_values((array)unserialize($this->extraConfig['PAGANTIS_PROMOTION'])); |
| 692 | 692 | } |
| 693 | 693 | |
@@ -700,13 +700,13 @@ discard block |
||
| 700 | 700 | private function getDescription() |
| 701 | 701 | { |
| 702 | 702 | $descriptionCode = "<img src=\"images/icon_info.gif\" border=\"0\" alt=\"Info\" title=\"Info\"> <strong>Module version:</strong> $this->version<br/><br/>"; |
| 703 | - $descriptionCode.= "<img src=\"images/icon_info.gif\" border=\"0\"> <a href='https://developer.pagantis.com/' target=\"_blank\" style=\"text-decoration: underline; font-weight: bold;\">View Online Documentation</a><br/><br/>"; |
|
| 704 | - $descriptionCode.= "<img src='images/icon_popup.gif' border='0'> <a href='http://pagantis.com' target='_blank' style='text-decoration: underline; font-weight: bold;'>Visit Pagantis Website</a><br/><br/><br/>"; |
|
| 703 | + $descriptionCode .= "<img src=\"images/icon_info.gif\" border=\"0\"> <a href='https://developer.pagantis.com/' target=\"_blank\" style=\"text-decoration: underline; font-weight: bold;\">View Online Documentation</a><br/><br/>"; |
|
| 704 | + $descriptionCode .= "<img src='images/icon_popup.gif' border='0'> <a href='http://pagantis.com' target='_blank' style='text-decoration: underline; font-weight: bold;'>Visit Pagantis Website</a><br/><br/><br/>"; |
|
| 705 | 705 | |
| 706 | 706 | if (MODULE_PAYMENT_PAGANTIS_STATUS == 'True') { |
| 707 | 707 | $pagantisPromotionUrl = $this->base_url.'/admin/promotion.php'; |
| 708 | 708 | $linkDescription = "Si deseas ofrecer financiación sin intereses para alguno de tus productos "; |
| 709 | - $descriptionCode.= "<img src='images/icon_info.gif' border='0'/> $linkDescription<a href='$pagantisPromotionUrl' style='text-decoration: underline; font-weight: bold;'>haz click aquí</a>"; |
|
| 709 | + $descriptionCode .= "<img src='images/icon_info.gif' border='0'/> $linkDescription<a href='$pagantisPromotionUrl' style='text-decoration: underline; font-weight: bold;'>haz click aquí</a>"; |
|
| 710 | 710 | } |
| 711 | 711 | |
| 712 | 712 | return $descriptionCode; |
@@ -717,18 +717,18 @@ discard block |
||
| 717 | 717 | */ |
| 718 | 718 | private function installSimulator() |
| 719 | 719 | { |
| 720 | - $checkSimulator = tep_db_query("select configuration_key, configuration_value from " .TABLE_CONFIGURATION ." |
|
| 720 | + $checkSimulator = tep_db_query("select configuration_key, configuration_value from ".TABLE_CONFIGURATION." |
|
| 721 | 721 | where configuration_key like 'MODULE_HEADER_TAGS_INSTALLED' |
| 722 | 722 | and configuration_value like '%ht_pagantis.php%';"); |
| 723 | 723 | if (tep_db_num_rows($checkSimulator) > 0) { |
| 724 | 724 | return true; |
| 725 | 725 | } |
| 726 | 726 | |
| 727 | - $query = "UPDATE " . TABLE_CONFIGURATION . " set configuration_value = concat(configuration_value, ';ht_pagantis.php') |
|
| 727 | + $query = "UPDATE ".TABLE_CONFIGURATION." set configuration_value = concat(configuration_value, ';ht_pagantis.php') |
|
| 728 | 728 | where configuration_key like 'MODULE_HEADER_TAGS_INSTALLED'"; |
| 729 | 729 | tep_db_query($query); |
| 730 | 730 | |
| 731 | - 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_HEADER_TAGS_PAGANTIS_STATUS', 'True', '', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); |
|
| 731 | + 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_HEADER_TAGS_PAGANTIS_STATUS', 'True', '', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); |
|
| 732 | 732 | } |
| 733 | 733 | |
| 734 | 734 | /** |
@@ -736,18 +736,18 @@ discard block |
||
| 736 | 736 | */ |
| 737 | 737 | private function uninstallSimulator() |
| 738 | 738 | { |
| 739 | - $checkSimulator = tep_db_query("select configuration_key, configuration_value from " .TABLE_CONFIGURATION ." |
|
| 739 | + $checkSimulator = tep_db_query("select configuration_key, configuration_value from ".TABLE_CONFIGURATION." |
|
| 740 | 740 | where configuration_key like 'MODULE_HEADER_TAGS_INSTALLED' |
| 741 | 741 | and configuration_value like '%ht_pagantis.php%';"); |
| 742 | 742 | if (tep_db_num_rows($checkSimulator) == 0) { |
| 743 | 743 | return true; |
| 744 | 744 | } |
| 745 | 745 | |
| 746 | - $query = "UPDATE " . TABLE_CONFIGURATION . " set configuration_value = REPLACE(configuration_value, ';ht_pagantis.php', '') |
|
| 746 | + $query = "UPDATE ".TABLE_CONFIGURATION." set configuration_value = REPLACE(configuration_value, ';ht_pagantis.php', '') |
|
| 747 | 747 | where configuration_key like 'MODULE_HEADER_TAGS_INSTALLED'"; |
| 748 | 748 | tep_db_query($query); |
| 749 | 749 | |
| 750 | - $query = "delete from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_HEADER_TAGS_PAGANTIS_STATUS'"; |
|
| 750 | + $query = "delete from ".TABLE_CONFIGURATION." where configuration_key = 'MODULE_HEADER_TAGS_PAGANTIS_STATUS'"; |
|
| 751 | 751 | tep_db_query($query); |
| 752 | 752 | } |
| 753 | 753 | |
@@ -757,7 +757,7 @@ discard block |
||
| 757 | 757 | private function insertLog($exception) |
| 758 | 758 | { |
| 759 | 759 | if ($exception instanceof \Exception) { |
| 760 | - $logEntry= new LogEntry(); |
|
| 760 | + $logEntry = new LogEntry(); |
|
| 761 | 761 | $logEntryJson = $logEntry->error($exception)->toJson(); |
| 762 | 762 | $logEntryJson = addslashes($logEntryJson); |
| 763 | 763 | |
@@ -776,7 +776,7 @@ discard block |
||
| 776 | 776 | return $order->customer['national_id']; |
| 777 | 777 | } elseif (isset($order->billing['piva'])) { |
| 778 | 778 | return $order->billing['piva']; |
| 779 | - } else { |
|
| 779 | + }else { |
|
| 780 | 780 | return null; |
| 781 | 781 | } |
| 782 | 782 | } |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | return $order->customer['tax_id']; |
| 792 | 792 | } elseif (isset($order->billing['cf'])) { |
| 793 | 793 | return $order->billing['cf']; |
| 794 | - } else { |
|
| 794 | + }else { |
|
| 795 | 795 | return null; |
| 796 | 796 | } |
| 797 | 797 | } |