This commit is contained in:
2025-03-09 23:50:32 +01:00
parent 1e498b41c7
commit 67c05416ac
190 changed files with 8061 additions and 3363 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -219,9 +219,9 @@
},
".htaccess": {
"type": "-",
"size": 3568,
"size": 5000,
"lmtime": 0,
"modified": false
"modified": true
},
"images.inc.php": {
"type": "-",
@@ -229,7 +229,479 @@
"lmtime": 0,
"modified": false
},
"img": {},
"img": {
"404.gif": {
"type": "-",
"size": 971,
"lmtime": 0,
"modified": false
},
"admin": {},
"app_icon.png": {
"type": "-",
"size": 19187,
"lmtime": 0,
"modified": false
},
"bg_500.png": {
"type": "-",
"size": 4163,
"lmtime": 0,
"modified": false
},
"bg_loader.png": {
"type": "-",
"size": 70,
"lmtime": 0,
"modified": false
},
"c": {},
"cms": {
"3d-modern-lamp-design-1_1.jpg": {
"type": "-",
"size": 123466,
"lmtime": 0,
"modified": false
},
"3d-modern-lamp-design-1.jpg": {
"type": "-",
"size": 182297,
"lmtime": 0,
"modified": false
},
"3d-modern-lamp-design_1.jpg": {
"type": "-",
"size": 148547,
"lmtime": 0,
"modified": false
},
"3d-modern-lamp-design.jpg": {
"type": "-",
"size": 183578,
"lmtime": 0,
"modified": false
},
"cms": {},
"cms-img.jpg": {
"type": "-",
"size": 57462,
"lmtime": 0,
"modified": false
},
"config.php": {
"type": "-",
"size": 289,
"lmtime": 0,
"modified": false
},
"Home": {},
".htaccess": {
"type": "-",
"size": 247,
"lmtime": 0,
"modified": false
},
"icons": {
"10.png": {
"type": "-",
"size": 1800,
"lmtime": 1741550555846,
"modified": false
},
"11.png": {
"type": "-",
"size": 4581,
"lmtime": 1741550555846,
"modified": false
},
"12.png": {
"type": "-",
"size": 2429,
"lmtime": 1741550555847,
"modified": false
},
"1.png": {
"type": "-",
"size": 1930,
"lmtime": 1741550555845,
"modified": false
},
"2.png": {
"type": "-",
"size": 3890,
"lmtime": 1741550555847,
"modified": false
},
"3.png": {
"type": "-",
"size": 3609,
"lmtime": 1741550555849,
"modified": false
},
"4.png": {
"type": "-",
"size": 3766,
"lmtime": 1741550555849,
"modified": false
},
"5.png": {
"type": "-",
"size": 4392,
"lmtime": 1741550555850,
"modified": false
},
"6.png": {
"type": "-",
"size": 3587,
"lmtime": 1741550555850,
"modified": false
},
"7.png": {
"type": "-",
"size": 2490,
"lmtime": 1741550555851,
"modified": false
},
"8.png": {
"type": "-",
"size": 1502,
"lmtime": 1741550555852,
"modified": false
},
"9.png": {
"type": "-",
"size": 3908,
"lmtime": 1741550555852,
"modified": false
},
"arrow-down-brown-mini.svg": {
"type": "-",
"size": 312,
"lmtime": 1741550555859,
"modified": false
},
"arrow-down-brown.svg": {
"type": "-",
"size": 317,
"lmtime": 1741550555859,
"modified": false
},
"arrow-orange.svg": {
"type": "-",
"size": 342,
"lmtime": 1741550555859,
"modified": false
},
"btn-side-line.svg": {
"type": "-",
"size": 180,
"lmtime": 1741550555860,
"modified": false
},
"colors.svg": {
"type": "-",
"size": 2673,
"lmtime": 1741550555860,
"modified": false
},
"eye.svg": {
"type": "-",
"size": 1120,
"lmtime": 1741550555861,
"modified": false
},
"FacebookLogo.svg": {
"type": "-",
"size": 770,
"lmtime": 1741550555854,
"modified": false
},
"Group 1238.svg": {
"type": "-",
"size": 622,
"lmtime": 1741550555855,
"modified": false
},
"icon-0.svg": {
"type": "-",
"size": 3347,
"lmtime": 1741550555863,
"modified": false
},
"icon-Headset.svg": {
"type": "-",
"size": 1494,
"lmtime": 1741550555863,
"modified": false
},
"icon-heart.svg": {
"type": "-",
"size": 653,
"lmtime": 1741550555865,
"modified": false
},
"icon-magnifyingGlass.svg": {
"type": "-",
"size": 403,
"lmtime": 1741550555865,
"modified": false
},
"icon-package_1.svg": {
"type": "-",
"size": 1370,
"lmtime": 0,
"modified": false
},
"icon-package.svg": {
"type": "-",
"size": 1396,
"lmtime": 1741550555866,
"modified": false
},
"icon-Package.svg": {
"type": "-",
"size": 1396,
"lmtime": 0,
"modified": false
},
"icon-PayPo.svg": {
"type": "-",
"size": 2355,
"lmtime": 0,
"modified": false
},
"icon-phone.svg": {
"type": "-",
"size": 792,
"lmtime": 0,
"modified": false
},
"icon-shoppingBag.svg": {
"type": "-",
"size": 460,
"lmtime": 0,
"modified": false
},
"icon-user.svg": {
"type": "-",
"size": 664,
"lmtime": 0,
"modified": false
},
"icon-white-arrow-up.svg": {
"type": "-",
"size": 304,
"lmtime": 0,
"modified": false
},
"InstagramLogo.svg": {
"type": "-",
"size": 958,
"lmtime": 0,
"modified": false
},
"Logo.svg": {
"type": "-",
"size": 10262,
"lmtime": 0,
"modified": false
},
"logo-white.svg": {
"type": "-",
"size": 11382,
"lmtime": 0,
"modified": false
},
"mini-arrow-left.svg": {
"type": "-",
"size": 321,
"lmtime": 0,
"modified": false
},
"mini-arrow-right-brown.svg": {
"type": "-",
"size": 293,
"lmtime": 0,
"modified": false
},
"pay": {},
"PinterestLogo.svg": {
"type": "-",
"size": 936,
"lmtime": 0,
"modified": false
},
"slider-arrow-left-brown.svg": {
"type": "-",
"size": 329,
"lmtime": 0,
"modified": false
},
"slider-arrow-right-brown.svg": {
"type": "-",
"size": 329,
"lmtime": 0,
"modified": false
},
"Toggle-navigation.svg": {
"type": "-",
"size": 425,
"lmtime": 0,
"modified": false
},
"Vector.svg": {
"type": "-",
"size": 417,
"lmtime": 0,
"modified": false
}
},
"index.php": {
"type": "-",
"size": 1369,
"lmtime": 0,
"modified": false
},
"interior-design-living-room-luxury-home.webp": {
"type": "-",
"size": 97020,
"lmtime": 0,
"modified": false
},
"o-nas banner.png": {
"type": "-",
"size": 128322,
"lmtime": 0,
"modified": false
},
"wersal-kolory": {}
},
"co": {},
"e": {},
"ets_blog": {},
"favicon-1.ico": {
"type": "-",
"size": 5534,
"lmtime": 0,
"modified": false
},
"favicon.ico": {
"type": "-",
"size": 5534,
"lmtime": 0,
"modified": false
},
"fileType": {
"type": "-",
"size": 3,
"lmtime": 0,
"modified": false
},
"flags": {},
"genders": {},
".htaccess": {
"type": "-",
"size": 506,
"lmtime": 0,
"modified": false
},
"index.php": {
"type": "-",
"size": 1369,
"lmtime": 0,
"modified": false
},
"jquery-ui": {},
"l": {},
"loader.gif": {
"type": "-",
"size": 3596,
"lmtime": 0,
"modified": false
},
"loadingAnimation.gif": {
"type": "-",
"size": 5219,
"lmtime": 0,
"modified": false
},
"logo-1732092336.jpg": {
"type": "-",
"size": 2819,
"lmtime": 0,
"modified": false
},
"logo_invoice.jpg": {
"type": "-",
"size": 3545,
"lmtime": 0,
"modified": false
},
"logo.jpg": {
"type": "-",
"size": 2758,
"lmtime": 0,
"modified": false
},
"logo_mail-1718627910.jpg": {
"type": "-",
"size": 13210,
"lmtime": 0,
"modified": false
},
"logo_stores.png": {
"type": "-",
"size": 1942,
"lmtime": 0,
"modified": false
},
"m": {},
"macFFBgHack.png": {
"type": "-",
"size": 81,
"lmtime": 0,
"modified": false
},
"os": {},
"p": {},
"pr": {},
"prestashop@2x.png": {
"type": "-",
"size": 2632,
"lmtime": 0,
"modified": false
},
"prestashop-avatar.png": {
"type": "-",
"size": 9974,
"lmtime": 0,
"modified": false
},
"preston-login@2x.png": {
"type": "-",
"size": 8934,
"lmtime": 0,
"modified": false
},
"preston-login-wink@2x.png": {
"type": "-",
"size": 8871,
"lmtime": 0,
"modified": false
},
"questionmark.png": {
"type": "-",
"size": 1190,
"lmtime": 0,
"modified": false
},
"s": {},
"scenes": {},
"st": {},
"su": {},
"t": {},
"tmp": {}
},
"import-drewmax.php": {
"type": "-",
"size": 10919,
@@ -1758,20 +2230,20 @@
},
"custom.css": {
"type": "-",
"size": 69462,
"lmtime": 1737965399780,
"size": 70407,
"lmtime": 1738154333043,
"modified": false
},
"custom.css.map": {
"type": "-",
"size": 103666,
"lmtime": 1737965399780,
"size": 104721,
"lmtime": 1738154333043,
"modified": false
},
"custom.scss": {
"type": "-",
"size": 76556,
"lmtime": 1737965399376,
"size": 77383,
"lmtime": 1738154332381,
"modified": false
},
"dce0916af972e3040aa191f74b17dd46.woff2": {

BIN
admin264x7t1sv/.DS_Store vendored Normal file

Binary file not shown.

BIN
admin264x7t1sv/filemanager/.DS_Store vendored Normal file

Binary file not shown.

BIN
admin264x7t1sv/themes/.DS_Store vendored Normal file

Binary file not shown.

BIN
app/.DS_Store vendored Normal file

Binary file not shown.

BIN
app/Resources/.DS_Store vendored Normal file

Binary file not shown.

BIN
classes/.DS_Store vendored Normal file

Binary file not shown.

BIN
config/.DS_Store vendored Normal file

Binary file not shown.

BIN
config/services/.DS_Store vendored Normal file

Binary file not shown.

BIN
controllers/.DS_Store vendored Normal file

Binary file not shown.

BIN
docs/.DS_Store vendored Normal file

Binary file not shown.

BIN
js/.DS_Store vendored Normal file

Binary file not shown.

BIN
js/jquery/.DS_Store vendored Normal file

Binary file not shown.

BIN
js/tiny_mce/.DS_Store vendored Normal file

Binary file not shown.

BIN
mails/.DS_Store vendored Normal file

Binary file not shown.

BIN
mails/themes/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/blockreassurance/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/blockwishlist/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/contactform/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/cookiesplus/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/creativeelements/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
modules/dashactivity/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/dashgoals/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/dashproducts/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/dashtrends/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ets_blog/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ets_multilayerslider/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/gm_omniprice/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/gsitemap/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/pagesnotfound/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/productcomments/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_accounts/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_banner/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_buybuttonlite/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_categorytree/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_checkout/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_checkpayment/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_contactinfo/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_crossselling/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_customersignin/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_customtext/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_emailsubscription/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_facebook/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_facetedsearch/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
modules/ps_featuredproducts/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_imageslider/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_linklist/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_mainmenu/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_mbo/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_metrics/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_searchbar/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_sharebuttons/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_shoppingcart/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_socialfollow/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_themecusto/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/ps_wirepayment/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/psgdpr/.DS_Store vendored Normal file

Binary file not shown.

BIN
modules/psxmarketingwithgoogle/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>santandercredit</name>
<displayName><![CDATA[Santander - System ratalny]]></displayName>
<version><![CDATA[1.9.24]]></version>
<description><![CDATA[Santander - Zakupy na raty w internecie]]></description>
<author><![CDATA[Ryszard Klepacz]]></author>
<tab><![CDATA[payments_gateways]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,48 @@
<?php
/*
Tylko PAYMENT_DECLARED powinien być ustawiany ręcznie. Reszta przez ProposalSeviceHybrid
*/
define('EHP_APP_STATES', [
'PAYMENT_DECLARED' => 'EHP 01: Wybrano finansowanie kredytem',
'APPLICATION_PROCEDING' => 'EHP 02: oczekiwanie na decyzję Banku', //yellow
'ABANDONED' => 'EHP 03: Porzucono wniosek kredytowy', //red
'CREDIT_GRANTED' => 'EHP 04: Udzielono kredytu', //green
'CREDIT_REJECTED' => 'EHP 05: Bank odmówił udzielenia kredytu', //red
'CANCELLED' => 'EHP 06: Anulowano wniosek kredytowy', //red
'GOODS_CONFIRMATION' => 'EHP 07: Potwierdź dostępność towaru'
]);
define('EHP_ORDER_STATE_PREFIX', 'SCB_EHP_ST_');
define('BANK2SHOP_STATE_MAP', [
'Bank' => 'APPLICATION_PROCEDING',
'Bank (-101)' => 'APPLICATION_PROCEDING',
'Bank (-105)' => 'APPLICATION_PROCEDING',
'Klient' => 'APPLICATION_PROCEDING',
'Klient (-100)' => 'APPLICATION_PROCEDING',
'Klient (-104)' => 'APPLICATION_PROCEDING',
'Klient(-127)' => 'APPLICATION_PROCEDING',
'Odmowa' => 'CREDIT_REJECTED',
'Sklep' => 'GOODS_CONFIRMATION',
'Wydaj_towar' => 'CREDIT_GRANTED',
'Zakonczona' => 'CREDIT_GRANTED'
]);
define('CHECK_THIS_STATES', [
'PAYMENT_DECLARED',
'APPLICATION_PROCEDING',
'ABANDONED',
]);
define('CAN_SEND_APPLICATION',['NO' => 0, 'YES' => 1, 'MAYBE' => 2]);
define('EHP_DEF_URLS',[
'EHP_DEF_URL_SYMULATOR' => 'https://wniosek.eraty.pl/symulator/oblicz/',
'EHP_DEF_URL_WNIOSEK' => 'https://wniosek.eraty.pl/formularz/',
'EHP_DEF_SVC_LOCATION' => 'https://api.santanderconsumer.pl/ProposalServiceHybrid'
]);
define('EHP_DEF_QUERIES',[
'EHP_DEF_QTY_QUERY' => str_replace('<','&lt;', str_replace('>', '&gt;', str_replace('"','&quot;',str_replace("'", "&#039;", "$('#quantity_wanted').val();")))),
'EHP_DEF_PRICE_QUERY' => str_replace('<','&lt;', str_replace('>', '&gt;', str_replace('"','&quot;',str_replace("'", "&#039;", "$('div.current-price > span[itemprop=\"price\"],div.current-price > span.current-price-value').attr(\"content\");"))))
]);

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>santandercredit</name>
<displayName><![CDATA[Santander - System ratalny]]></displayName>
<version><![CDATA[1.9.24]]></version>
<description><![CDATA[Santander - Zakupy na raty w internecie]]></description>
<author><![CDATA[Santander Consumer Bank]]></author>
<tab><![CDATA[payments_gateways]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,57 @@
<?php
include_once 'config/ehpcfg.php';
include_once 'sql/ScbDbUtil.php';
class SantandercreditSantanderCreditReturnModuleFrontController extends ModuleFrontController {
public function __construct() {
parent::__construct();
}
public function initContent() {
parent::initContent();
$returnTemplate = 'santanderCreditReturn.tpl';
$errors = '';
// Tools::getValue('orderId') != '' BO PRZESTANIE BYĆ NUMERYKIEM
// if (Tools::getValue('orderId') != 0 && Tools::getValue('id_wniosku') != '') {
if (Tools::getValue('orderId') != '' && Tools::getValue('id_wniosku') != '') {
// $order = new Order(Tools::getValue('orderId'));
$order = new Order(ScbDbUtil::getIdOrder(Tools::getValue('orderId')));
if ($order) {
$orderPaymentCollection = $order->getOrderPaymentCollection();
$payment = $orderPaymentCollection->getFirst();
if ($payment) {
$payment->transaction_id = Tools::getValue('id_wniosku');
$payment->save();
$this->context->smarty->assign(
array('wniosekId' => preg_replace('#[^0-9/ZAG]#', '', $_GET['id_wniosku']),
'orderId' => $_GET['orderId']
)
);
// $returnTemplate = 'santanderCreditReturn.tpl';
} else {
$errors .= "Błąd w trakcie aktualizacji numeru transakcji (transactionId, wniosekId).";
$this->context->smarty->assign(array('errors' => $errors, 'wniosekId' => preg_replace('#[^0-9/ZAG]#', '', $_GET['id_wniosku']),
'orderId' => $_GET['orderId']));
$returnTemplate = 'paymentErrors.tpl';
}
} else {
$errors .= "Błędny numer zamówienia w sklepie (orderId).";
$this->context->smarty->assign(array('errors' => $errors, 'wniosekId' => preg_replace('#[^0-9/ZAG]#', '', $_GET['id_wniosku']),
'orderId' => $_GET['orderId']));
$returnTemplate = 'paymentErrors.tpl';
}
} else {
$errors .= "Nieokreślony numer wniosku lub numer zamówienia w odpowiedzi Banku (orderId, id_wniosku).";
$this->context->smarty->assign(array('errors' => $errors));
$returnTemplate = 'paymentErrors.tpl';
}
$this->setTemplate('module:santandercredit/views/templates/front/'.$returnTemplate);
}
}

View File

@@ -0,0 +1,42 @@
<?php
class santandercreditsantanderCreditValidateModuleFrontController extends ModuleFrontController
{
public function postProcess()
{
if (!($this->module instanceof SantanderCredit)) {
Tools::redirect('index.php?controller=order&step=1');
return;
}
$cart = $this->context->cart;
if ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active)
Tools::redirect('index.php?controller=order&step=1');
$customer = new Customer($cart->id_customer);
if (!Validate::isLoadedObject($customer))
Tools::redirect('index.php?controller=order&step=1');
$currency = $this->context->currency;
$total = floatval(number_format($cart->getOrderTotal(true, 3), 2, '.', ''));
$useOrderState = Configuration::get('SANTANDERCREDIT_USE_ORDER_STATE');
$this->module->validateOrder(
$cart->id,
(int) Configuration::get($useOrderState),
$total,
$this->module->displayName,
NULL,
[],
$currency->id,
false,
$customer->secure_key
);
Tools::redirect('index.php?controller=order-confirmation&id_cart=' . $cart->id . '&id_module=' . $this->module->id . '&id_order=' . $this->module->currentOrder . '&key=' . $customer->secure_key);
}
}

View File

@@ -0,0 +1,31 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
* http://localhost/presta/prestashop_1.7.1.0/module/santandercredit/test
*/
class SantandercreditTestModuleFrontController extends ModuleFrontController {
public function __construct(){
parent::__construct();
}
public function initContent(){
parent::initContent();
$mess = Tools::getValue('orderId');
$this->context->smarty->assign('test', 'to tylko test '. $mess);
$this->setTemplate('module:santandercredit/views/templates/front/test.tpl');
}
public function postProcess()
{
// global $smarty;
// $templatePath = dirname(__FILE__).'/../../views/templates/front/test.tpl';
// $smarty->assign(array(
// 'test' => 'to tylko test'
// ));
// $smarty->display($templatePath);
}
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,34 @@
<?php
/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2021 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,37 @@
function jakKupic() {
window.open('https://www.santanderconsumer.pl/raty-jak-kupic', 'jakKupic', 'width=710,height=500,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
return false;
}
function obliczRate(nrSklepu, symUrl, qtySelector, basketSelector) {
// qtySelector, basketSelector should be parameter
/* var qtySelector, basketSelector;
qtySelector = '#quantity_wanted';
basketSelector = "div.current-price > span"; */
// ------
var koszyk, ilo, qty, basket;
koszyk = 0;
ilo = 0
qty = $(qtySelector);
basket = $(basketSelector);
if(qty.length == 1 && basket.length == 1) {
ilo = qty.val();
koszyk = basket.attr('content') * ilo;
koszyk = Math.round(koszyk * 100, 2) / 100; //some stupid code just to solve strange js numeric results problem
if (koszyk > 100) {
window.open(symUrl + 'numerSklepu/' + nrSklepu + '/wariantSklepu/1/typProduktu/0/wartoscTowarow/' + koszyk);
} else {
alert("Kredytujemy zakupy w cenie powyżej 100zł");
}
} else {
alert('quantity or price selector problem, call to Admin');
}
}
function santanderCreditValidateForm() {
if ($('#santanderAgreement').is(':checked')) {
$('#scbSubmitBtn').removeAttr('disabled');
} else {
$('#scbSubmitBtn').attr('disabled','disabled');
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
<?php
class AppStateDocument {
public $Identity;
public $ShopApplicationNumbers;
public function __construct($i, $a){
$this->Identity = $i;
$this->ShopApplicationNumbers = $a;
}
};

View File

@@ -0,0 +1,44 @@
<?php
class Application {
/**
* Agreement date
*/
public $AgreementDate;
/**
* Credit Agreement number
*/
public $AgreementNumber;
/**
* Credit application number
*/
public $ApplicationNumber;
/**
* Application state change date
*/
public $ChangeDate;
/**
* Application state
*/
public $CreditState;
/**
* Downpayment(reduces total price in credit application)
*/
public $Downpayment;
/**
* This is order number. In PrestaShop - order reference (in previous module versions it was order id)
*/
public $ShopApplicationNumber;
/**
* Shop number (in the Bank database)
*/
public $ShopNumber;
/**
* Total Price paid for the order
*/
public $TotalPrice;
public $check_date;
}

View File

@@ -0,0 +1,15 @@
<?php
class ClientIdentity {
public $Login;
public $Password;
/*sklep testowy 99995 mozna wykorzystać jeśli jest przypisany do loginu sklepu.
Jeśli nie - testy można wykonywać na własnym sklepie.*/
public $ShopNumber;
public function __construct($Login, $Password, $ShopNumber) {
$this->Login = $Login;
$this->Password = $Password;
$this->ShopNumber = $ShopNumber;
}
};

View File

@@ -0,0 +1,19 @@
<?php
class SimulationResult {
public $APR;
public $AdjustmentInstalmentAmount;
public $Clause;
public $CommissionAmount;
public $CreditAmount;
public $Downpayment;
public $FirstInstallmentDate;
public $InstalmentAmount;
public $InstalmentsNumber;
public $InterestAmount;
public $InterestRate;
public $TotalAdditionalFee;
public $TotalAmountToPay;
public $TotalCreditCost;
}

View File

@@ -0,0 +1,10 @@
<?php
class ISActiveResult{
public $ErrorCode;
public $IsCorrect;
public $LogMarker;
public $Message;
public $UserMessage;
}

View File

@@ -0,0 +1,9 @@
<?php
class OperationStatus{
public $ErrorCode;
public $IsCorrect;
public $LogMarker;
public $Message;
public $UserMessage;
}

View File

@@ -0,0 +1,152 @@
<?php
include_once "Application.php";
include_once "AppStateDocument.php";
include_once "ClientIdentity.php";
include_once "FinancialDataResult.php";
include_once "IsActiveResult.php";
include_once "OperationStatus.php";
include_once "Simulation.php";
class PSHClient {
private $client;
private $login;
private $pass;
private $pemCert;
private $serviceLocation;
private $shopNumber;
public $applications;
public $operationStatus;
public $lastException;
public $isCorrect;
public $simulationResult;
public function __construct($login, $pass, $serviceLocation, $pemCert, $shopNumber) {
$this->applications = new ArrayObject();
$this->operationStatus = new OperationStatus();
$this->login = $login;
$this->pass = $pass;
$this->serviceLocation = $serviceLocation;
$this->pemCert = $pemCert;
$this->shopNumber = $shopNumber;
$wsdl = $serviceLocation . "?wsdl";
$this->client = new SoapClient(
$wsdl,
array(
'local_cert' => $pemCert,
'verify_peer' => false,
'exceptions' => 0,
'cache_wsdl' => WSDL_CACHE_NONE,
'passphrase' => $pass,
'location' => $serviceLocation
)
);
}
public function checkAppStatus($arrayOfOrderReference){
$this->lastException = null;
$this->operationStatus = new OperationStatus();
$this->isCorrect = false;
$this->applications = new ArrayObject();
$identyfikacja = new ClientIdentity($this->login, $this->pass,$this->shopNumber);
try {
$resp = $this->client->GetApplicationState(
new AppStateDocument($identyfikacja, $arrayOfOrderReference)
);
if ($this->validateResponse($resp)) {
$ap = $resp->GetApplicationStateResult->Applications->ApplicationData;
if (is_array($ap)){
$this->applications = new ArrayObject($ap);
} elseif (is_object($ap)){
$this->applications->append($ap);
} else {
$this->isCorrect = false;
$this->lastException = "Bad response structure: !no Application object!";
}
}
}
catch(Exception $e) {
$this->lastException = $e;
}
}
private function validateResponse($response) : bool{
$isOk = true;
// var_dump($response);
$msg = "Bad response structure: ";
if(!is_object($response)){
$isOk = false;
$msg= $msg . " !response is not object!";
};
if($isOk and !is_object($response->GetApplicationStateResult)){
$isOk = false;
$msg= $msg . " !GetApplicationStateResult is not object!";
};
if($isOk and !is_object($response->GetApplicationStateResult->OperationStatus)){
$isOk = false;
$msg= $msg . " !response->GetApplicationStateResult->OperationStatus is not object!";
};
if($isOk and !isset($response->GetApplicationStateResult->OperationStatus->IsCorrect)){
$isOk = false;
$msg= $msg . " !response->GetApplicationStateResult->OperationStatus->IsCorrect is not set!";
};
$this->isCorrect = $isOk;
if($isOk) {
$this->operationStatus = $response->GetApplicationStateResult->OperationStatus;
$this->isCorrect = $response->GetApplicationStateResult->OperationStatus->IsCorrect;
$this->lastException = $response->GetApplicationStateResult->OperationStatus->Message;
if($this->isCorrect and !is_object($response->GetApplicationStateResult->Applications)){
$this->isCorrect = false;
$msg= $msg . " !response->GetApplicationStateResult->Applications is not object!";
$this->lastException = $msg;
};
} else{
$this->lastException = $msg;
}
return $this->isCorrect;
}
/**
* $dnp downpayment
* $inr installment number
* $prd product/credit line
* $price
*/
public function calculateCredit($dnp, $inr, $prd, $price){
$this->lastException = null;
$this->simulationResult = null;
$this->isCorrect = false;
$identyfikacja = new ClientIdentity($this->login, $this->pass,$this->shopNumber);
try {
$resp = $this->client->GetFinancialData(
new FinancialDataDocument(
new Identyfikacja(), new Simulation($dnp, $inr, $prd, $price)));
$this->operationStatus = $resp->GetFinancialDataResult->OperationStatus;
$this->simulationResult = $resp->GetFinancialDataResult->SimulationResult;
$this->isCorrect = $this->operationStatus->IsCorrect;
}
catch(Exception $e) {
$this->lastException = $e;
}
}
public function isActive(){
$this->lastException = null;
try {
$resp = $this->client->IsActive();
$this->isActive = $resp->IsActiveResult;
$this->isCorrect = true;
}
catch(Exception $e) {
$this->lastException = $e;
$this->isCorrect = false;
}
return $this->isCorrect;
}
}

View File

@@ -0,0 +1,14 @@
<?php
class Simulation {
public $Downpayment;
public $InstalmentsNumber;
public $ProductNumber;
public $TotalPrice;
public function __construct($dnp, $inr, $prd, $price){
$this->Downpayment = $dnp;
$this->InstalmentsNumber = $inr;
$this->ProductNumber = $prd;
$this->TotalPrice = $price;
}
};

Some files were not shown because too many files have changed in this diff Show More