From e023ff1023974383a92d994624257c1b46c5fa8a Mon Sep 17 00:00:00 2001 From: erickadje Date: Thu, 20 Jun 2019 11:14:17 +0100 Subject: [PATCH] initial commit --- README.md | 1 - Readme.md | 21 + controllers/front/api.php | 61 +++ controllers/front/confirmation.php | 91 ++++ controllers/front/index.php | 34 ++ controllers/index.php | 34 ++ index.php | 34 ++ kkiapay.php | 405 ++++++++++++++++++ logo.png | Bin 0 -> 9169 bytes sql/index.php | 34 ++ sql/install.php | 38 ++ sql/uninstall.php | 38 ++ translations/en.php | 33 ++ translations/index.php | 34 ++ upgrade/index.php | 34 ++ upgrade/upgrade-1.1.0.php | 44 ++ views/css/back.css | 27 ++ views/css/front.css | 27 ++ views/css/index.php | 34 ++ views/img/index.php | 34 ++ views/index.php | 34 ++ views/js/back.js | 27 ++ views/js/front.js | 27 ++ views/js/index.php | 34 ++ views/templates/admin/configure.tpl | 48 +++ .../templates/admin/hook/front/api/index.php | 34 ++ .../admin/hook/front/api/payment.tpl | 9 + .../hook/front/api/payment_execution.tpl | 60 +++ views/templates/admin/hook/front/index.php | 34 ++ views/templates/admin/hook/index.php | 34 ++ views/templates/admin/index.php | 34 ++ views/templates/front/index.php | 34 ++ views/templates/index.php | 34 ++ 33 files changed, 1500 insertions(+), 1 deletion(-) delete mode 100644 README.md create mode 100644 Readme.md create mode 100644 controllers/front/api.php create mode 100644 controllers/front/confirmation.php create mode 100644 controllers/front/index.php create mode 100644 controllers/index.php create mode 100644 index.php create mode 100644 kkiapay.php create mode 100644 logo.png create mode 100644 sql/index.php create mode 100644 sql/install.php create mode 100644 sql/uninstall.php create mode 100644 translations/en.php create mode 100644 translations/index.php create mode 100644 upgrade/index.php create mode 100644 upgrade/upgrade-1.1.0.php create mode 100644 views/css/back.css create mode 100644 views/css/front.css create mode 100644 views/css/index.php create mode 100644 views/img/index.php create mode 100644 views/index.php create mode 100644 views/js/back.js create mode 100644 views/js/front.js create mode 100644 views/js/index.php create mode 100644 views/templates/admin/configure.tpl create mode 100644 views/templates/admin/hook/front/api/index.php create mode 100644 views/templates/admin/hook/front/api/payment.tpl create mode 100644 views/templates/admin/hook/front/api/payment_execution.tpl create mode 100644 views/templates/admin/hook/front/index.php create mode 100644 views/templates/admin/hook/index.php create mode 100644 views/templates/admin/index.php create mode 100644 views/templates/front/index.php create mode 100644 views/templates/index.php diff --git a/README.md b/README.md deleted file mode 100644 index ad26812..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# PrestaShop-module diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..d6ad396 --- /dev/null +++ b/Readme.md @@ -0,0 +1,21 @@ +# KKIAPAY + +KkiaPay allows businesses to safely receive payments by mobile money, credit card and bank account. + +Kkiapay is developer friendly solution that allows you to accept mobile money and credit card, and direct bank payments in your application or website. Before using this plugin, make sure you have a right Merchant Account on Kkiapay, otherwise go and create your account. It is free and without pain. + +KKIAPAY is available in: + +* Benin +* Senegal [WIP] +* [More details at ](https://kkiapay.me/features/supported-countries) + +### Prerequisites + +Prestashop greater than or equal 1.6 + + +## Usage + +* Install and configure API public key on dashboard +* [More details at ](https://docs.kkiapay.me/v1/plugin-et-sdk/prestashop) diff --git a/controllers/front/api.php b/controllers/front/api.php new file mode 100644 index 0000000..5b96b9f --- /dev/null +++ b/controllers/front/api.php @@ -0,0 +1,61 @@ + + * @copyright 2013-2016 Hennes Hervé + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * http://www.h-hennes.fr/blog/ + */ + +class kkiapayapiModuleFrontController extends ModuleFrontController { + + + /** + * Retours de l'api de paiement + */ + public function postProcess() + { + //Vérification générales + $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 = (float)$cart->getOrderTotal(true, Cart::BOTH); + + + //Traitement de la réponse OK + if ( Tools::getValue('success') and Tools::getValue('success')=='kkiapayojhsbbbes12345' ) { + $this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_PAYMENT'), $total, $this->module->displayName, null, array(), (int)$currency->id, false, $customer->secure_key); + 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); + } else { + //Erreur + $this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_ERROR'),0, $this->module->displayName, null, array(), (int)$currency->id, false, $customer->secure_key); + Tools::redirect('index.php?controller=order&step=1'); + } + } +} diff --git a/controllers/front/confirmation.php b/controllers/front/confirmation.php new file mode 100644 index 0000000..7818155 --- /dev/null +++ b/controllers/front/confirmation.php @@ -0,0 +1,91 @@ + + * @copyright 2013-2016 Hennes Hervé + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * http://www.h-hennes.fr/blog/ + */ + +class kkiapayconfirmationModuleFrontController extends ModuleFrontController +{ + + + /** + * Retours de l'api de paiement + */ + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + + parent::initContent(); + + //Vérification générales + $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'); + } + + $key = Configuration::get('KKIAPAY_PUBLIC'); + $color = Configuration::get('KKIAPAY_COLOR'); + $test = Configuration::get('KKIAPAY_CHECKBOX'); + $position= Configuration::get('KKIAPAY_POSITION'); + $private_key= Configuration::get('KKIAPAY_PRIVATE'); + $secret = Configuration::get('KKIAPAY_SECRET'); + $price= (float)$cart->getOrderTotal(true, Cart::BOTH); + $firstname_customer=$customer->firstname; + $lastname_customer=$customer->lastname; + $mylink = $this->context->link->getModuleLink('kkiapay','api'); + $mylink = $mylink.'?success=kkiapayojhsbbbes12345'; + + $this->context->smarty->assign(array( + 'back_url' => $this->context->link->getPageLink('order', true, NULL, "step=3"), + 'confirm_url' => $this->context->link->getModuleLink('kkiapay', 'api', [], true), + 'num_cart' => $cart->id, + 'moyen_payment' => $this->module->displayName, + 'date' => $cart->date_add + + )); + + $this->context->smarty->assign('firstname',$firstname_customer); + $this->context->smarty->assign('lastname',$lastname_customer); + $this->context->smarty->assign('api',$key); + $this->context->smarty->assign('price',$price); + $this->context->smarty->assign('color',$color); + $this->context->smarty->assign('position',$position); + $this->context->smarty->assign('url',$mylink); + $this->context->smarty->assign('secret',$secret); + $this->context->smarty->assign('test',$test); + $this->context->smarty->assign('private',$private_key); + + //var_dump($cart); + + $this->setTemplate('module:kkiapay/views/templates/admin/hook/front/api/payment_execution.tpl'); + } +} diff --git a/controllers/front/index.php b/controllers/front/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/controllers/front/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/controllers/index.php b/controllers/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/controllers/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/index.php b/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/kkiapay.php b/kkiapay.php new file mode 100644 index 0000000..bd09768 --- /dev/null +++ b/kkiapay.php @@ -0,0 +1,405 @@ + +* @copyright 2007-2019 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +use PrestaShop\PrestaShop\Core\Payment\PaymentOption; + +if (!defined('_PS_VERSION_')) { + exit; +} + +class Kkiapay extends PaymentModule +{ + protected $config_form = false; + + public function __construct() + { + $this->name = 'kkiapay'; + $this->tab = 'payments_gateways'; + $this->version = '1.0.0'; + $this->author = 'kkiapay'; + $this->need_instance = 0; + $this->module_key = 'eea9595b905b3279e130609bea3c0c9e'; + + /** + * Set $this->bootstrap to true if your module is compliant with bootstrap (PrestaShop 1.6) + */ + $this->bootstrap = true; + + parent::__construct(); + + $this->displayName = $this->l('kkiapay'); + $this->description = $this->l('kkiaPay permet aux entreprises de recevoir des paiements en toute sécurité via de l\'argent mobile, une carte de crédit ou un compte bancaire.'); + + $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); + $this->limited_currencies = array('XOF'); + } + + /** + * Don't forget to create update methods if needed: + * http://doc.prestashop.com/display/PS16/Enabling+the+Auto-Update + */ + public function install() + { + + Configuration::updateValue('KKIAPAY_LIVE_MODE', false); + + return parent::install() && + $this->registerHook('header') && + $this->registerHook('paymentOptions'); + } + + public function uninstall() + { + Configuration::deleteByName('KKIAPAY_LIVE_MODE'); + + return parent::uninstall(); + } + + public function hookPaymentOptions($params) + { + + $currency_id = $params['cart']->id_currency; + $currency = new Currency((int)$currency_id); + + if (in_array($currency->iso_code, $this->limited_currencies ) == false ){ + return false; + } + + $key = Configuration::get('KKIAPAY_PUBLIC'); + $color = Configuration::get('KKIAPAY_COLOR'); + $test = Configuration::get('KKIAPAY_CHECKBOX'); + $position= Configuration::get('KKIAPAY_POSITION'); + $private_key= Configuration::get('KKIAPAY_PRIVATE'); + $secret = Configuration::get('KKIAPAY_SECRET'); + $firstname_customer=($params['cookie']->customer_firstname); + $lastname_customer=($params['cookie']->customer_lastname); + $price= $params['cart']->getOrderTotal(); + //var_dump($this->module->currentOrder); + + $mylink = $this->context->link->getModuleLink('kkiapay', 'api'); + $mylink = $mylink.'?success=kkiapayojhsbbbes12345'; + //var_dump($mylink); + + $this->context->smarty->assign('firstname', $firstname_customer); + $this->context->smarty->assign('lastname', $lastname_customer); + $this->context->smarty->assign('api', $key); + $this->context->smarty->assign('price', $price); + $this->context->smarty->assign('color', $color); + $this->context->smarty->assign('position', $position); + $this->context->smarty->assign('url', $mylink); + $this->context->smarty->assign('secret', $secret); + $this->context->smarty->assign('test', $test); + $this->context->smarty->assign('private', $private_key); + + $paymentForm = $this->fetch('module:kkiapay/views/templates/admin/hook/front/api/payment.tpl'); + + $cardPaymentOption = new PaymentOption(); + + $options= $cardPaymentOption->setCallToActionText('kkiapay') + ->setAdditionalInformation($paymentForm) + ->setAction($this->context->link->getModuleLink($this->name, 'confirmation', array(), true)) + ->setLogo("http://162.243.162.212/wp-content/plugins/kkiapay-woocommerce/assets/img/kkiapay.svg"); + + return [$options]; + + } + + + public function getOptions() + + { + $options = array ( + + array ( + + 'id_checkbox_options' => 1, + + 'checkbox_options_name' => '', + + 'checked' => 'checked' ) + ); + + return $options; + + } + + public function hookPaymentReturn($params) + { + + // die(); + + if (!$this->active) { + return; + } + if (!isset($params['order']) || ($params['order']->module != $this->name)) { + return false; + } + if (isset($params['order']) && Validate::isLoadedObject($params['order']) && isset($params['order']->valid)) { + $this->smarty->assign(array( + 'id_order' => $params['order']->id, + 'valid' => $params['order']->valid, + )); + } + if (isset($params['order']->reference) && !empty($params['order']->reference)) { + $this->smarty->assign('reference', $params['order']->reference); + } + $this->smarty->assign(array( + 'shop_name' => $this->context->shop->name, + 'reference' => $params['order']->reference, + 'contact_url' => $this->context->link->getPageLink('contact', true) + )); + return $this->fetch('kkiapay/views/templates/admin/hook/front/api/payment_return.tpl'); + } + + public function hookActionValidateOrder($params){ + + var_dump($params); + die(''); + + } + + + public function getContent() + { + $output = null; + // $myModuleName = strval(Tools::getValue('password')); + // die($myModuleName); + if (Tools::isSubmit('submit'.$this->name)) { + $myModuleName = (string)Tools::getValue('KKIAPAY_PUBLIC'); + $myModulePrivate = (string)Tools::getValue('KKIAPAY_PRIVATE'); + $myModuleSecret = (string)Tools::getValue('KKIAPAY_SECRET'); + $myModuleColor = (string)Tools::getValue('KKIAPAY_COLOR'); + $myModuleCheckbox = (string)Tools::getValue('KKIAPAY_CHECKBOX'); + $myModulePosition = (string)Tools::getValue('KKIAPAY_POSITION'); + + + $v = (string)Tools::getValue('api'); + // var_dump($myModuleCheckbox);die(); + + if ( + !$myModuleName || + empty($myModuleName) || + !Validate::isGenericName($myModuleName) + ) { + + $output .= $this->displayError($this->l('Valeurs de configurations invalides')); + } else { + Configuration::updateValue('KKIAPAY_PUBLIC', $myModuleName); + Configuration::updateValue('KKIAPAY_PRIVATE', $myModulePrivate); + Configuration::updateValue('KKIAPAY_SECRET', $myModuleSecret); + Configuration::updateValue('KKIAPAY_COLOR', $myModuleColor); + Configuration::updateValue('KKIAPAY_CHECKBOX',$myModuleCheckbox ); + Configuration::updateValue('KKIAPAY_POSITION',$myModulePosition ); + $output .= $this->displayConfirmation($this->l('Paramètres mis à jour')); + } + } + + return $output.$this->displayForm(); + } + + + public function displayForm() + { + $password = (string)Tools::getValue('password'); + // var_dump($password);die(); + // if($password) { + // // only save if a value was entered + // Configuration::updateValue('passwordKey', $password); + // } + $options_test = array( + array( + 'id_option' => '1', + 'name' => $this->l('Oui') + ), + array( + 'id_option' => '0', + 'name' => $this->l('Non') + ) + ); + + $options = array( + array( + 'id_option' => 'right', + 'name' => $this->l('A droite de la page') + ), + array( + 'id_option' => 'center', + 'name' => $this->l('Au Centre de la page') + ), + array( + 'id_option'=>'left', + 'name'=>$this->l('A Gauche de la page') + ) + ); + + // Get default language + $this->hookDisplayHeader(); + $defaultLang = (int)Configuration::get('PS_LANG_DEFAULT'); + + $fieldsForm=array(); + // Init Fields form array + $fieldsForm[0]['form'] = [ + 'legend' => [ + 'title' => $this->l('Paramètres'), + ], + 'input' => [ + array( + 'type' => 'switch', + 'label' => $this->l('Activez le mode test'), + 'desc'=> $this->l('Configurez sur oui pour mettre en environnement sandbox'), + 'name' => 'KKIAPAY_CHECKBOX', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => "1", + 'label' => $this->trans('Enabled', array(), 'Admin.Global'), + ), + array( + 'id' => 'active_off', + 'value' => "0", + 'label' => $this->trans('Disabled', array(), 'Admin.Global'), + ) + ), + ) + + , + + [ + 'col' => '6', + 'type' => 'text', + 'label' => $this->l('Clé publique'), + 'name' => 'KKIAPAY_PUBLIC', + 'class'=>'form-control', + 'desc'=> $this->l('Obtenez vos clés d\'API sur le dashboard kkiapay dans la section Développeurs'), + 'required' => true + ], + [ + 'col' => '6', + 'type' => 'text', + 'label' => $this->l('Clé privé'), + 'name' => 'KKIAPAY_PRIVATE', + 'class'=>'form-control', + 'desc'=> $this->l('Obtenez vos clés d\'API sur le dashboard kkiapay dans la section Développeurs'), + ], + + [ + 'col' => '6', + 'type' => 'text', + 'label' => $this->l('Secret'), + 'name' => 'KKIAPAY_SECRET', + 'size' => 20, + 'class'=>'form-control', + 'desc'=> $this->l('Obtenez vos clés d\'API sur le dashboard kkiapay dans la section Développeurs'), + ] + , + + [ + 'col' => '6', + 'type' => 'text', + 'label' => $this->l('Couleur du widget kkiapay'), + 'name' => 'KKIAPAY_COLOR', + 'class'=>'form-control', + 'desc'=> $this->l('Paramétrez la couleur de la fenêtre kkiapay. Pour une meilleure harmonisation, utilisez la couleur dominante de votre site ou laissez vide.'), + ] + , + + array( + 'type' => 'select', + 'lang' => true, + 'label' => $this->l('Disposition du widget kkiapay'), + 'name' => 'KKIAPAY_POSITION', + 'class'=>'form-control', + 'desc'=> $this->l('Utilisez cette option pour contrôler l\'endroit où la fenêtre kkiapay devrait s\'afficher sur votre site'), + 'options' => array( + 'query' => $options, + 'id' => 'id_option', + 'name' => 'name' + ), + ), + + ], + 'submit' => [ + 'title' => $this->l('Sauvegarder'), + 'class' => 'btn btn-default pull-right' + ] + ]; + + $helper = new HelperForm(); + // $helper->fields_value["KKIAPAY_CHECKBOX_1"] = true; + // Module, token and currentIndex + $helper->module = $this->module; + $helper->name_controller = $this->name; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; + + // Language + $helper->default_form_language = $defaultLang; + $helper->allow_employee_form_lang = $defaultLang; + + // Title and toolbar + $helper->title = $this->displayName; + $helper->show_toolbar = true; // false -> remove toolbar + $helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen. + $helper->submit_action = 'submit'.$this->name; + $helper->toolbar_btn = [ + 'save' => [ + 'desc' => $this->l('Sauvegarder'), + 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name. + '&token='.Tools::getAdminTokenLite('AdminModules'), + ], + 'back' => [ + 'href' => AdminController::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminModules'), + 'desc' => $this->l('Retour à la liste') + ] + ]; + + // Load current value + // die(Configuration::get('KKIAPAY_NAME')); + // var_dump(Configuration::get('KKIAPAY_CHECKBOX_1')); + // die(); + $myModulePosition=Configuration::get('KKIAPAY_POSITION'); + // var_dump($myModulePosition); + // die(); + $helper->fields_value['KKIAPAY_PUBLIC'] = Configuration::get('KKIAPAY_PUBLIC'); + $helper->fields_value['KKIAPAY_SECRET'] = Configuration::get('KKIAPAY_SECRET'); + $helper->fields_value['KKIAPAY_PRIVATE'] = Configuration::get('KKIAPAY_PRIVATE'); + $helper->fields_value['KKIAPAY_COLOR'] = Configuration::get('KKIAPAY_COLOR'); + $helper->fields_value['KKIAPAY_CHECKBOX'] = Configuration::get('KKIAPAY_CHECKBOX'); + $helper->fields_value['KKIAPAY_POSITION'] = Configuration::get('KKIAPAY_POSITION'); + return $helper->generateForm($fieldsForm); + } + + + public function hookDisplayHeader() + { + // die(); + $this->context->controller->addCSS($this->_path.'views/css/button.css', 'all'); + $this->context->controller->addJS($this->_path.'views/css/app.js', 'all'); + } + + +} diff --git a/logo.png b/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5dc28a45a9360871d3b3192b3e9ecd9d2ed688a6 GIT binary patch literal 9169 zcma)>Wl&wswyqcM!7aGEy99!}ySr;}UBJTK-8HxdPjCqCZh_$L&Vs{N`_#U5?%k*A z_N?yFJ^Fd)9JBjRkLpNeMJW`-&xim307XVxT=m0}{!`(hK3egTsG)xbX40w(0DuoQ z01y}g06c%V0uKQIcUA!4*cbrd&j0{$opU-=1OWhud1ZNZiT8gB`0efO{h#Mw-B&Oe z{QCNOa(a1jbANhrxwCup@bq|bd0pSs=M$9u{`UIz3Vyr1d_6q_zdpZ%-(Ox{1f?BE z$Csz))&-;-64Pr$6kPA_?sAG-q*XnN%R7^@>MpPDUY?#G-rw)j^RFoQuSGO&zbL&7 zjlbVNyuZAztnV@MnZ>14ev!2wn_8~@F~BQsACXWhsq7XOQxcn0Ze$%Uq2#Kl>0=AZ zdsZ>O3yQnZw7ONbdI*lY=8?VAw!1fSxz)0M{_*q9!1lHGcgN2W97+`gT&8NMdxz2TJuuWowyXXcf*#iv$TI7S=WL^ydQ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ob5;bWq6;&q`EDOtbPcH^exFpTyz;RM-EJ=)V{DAzwMrW_cXA6l zNsc4Ul?mdr&wkL1zXgMDhuqI=3PV_J$dd}8&Aqk^~OKykUb-FWXHrQq);uT2Ymd|_+atH#?kOb?rymdLXKYaRJ;)h zx44llxy&Y!%3J4L$+^Blti~xAELd$Q{mz_A4r7&~m*B(Z!VuzXZo|__&Vw4Y1sa`P zm&SSyE1?R;r!L4d7-<}s)v%kn(N#iN7si?kjWj~JlN~5m0tsmcT(Xjy=SA+iOxc@j z$PSfoF9F_&D0>Zy4X?LJufX_+HGYPH0RO6k;yU2&i5_zS(jjC=;D0dBMnQ`2G&+yb zny;q2cYh+U;kfUvu5#C+KCbT}RAt0P)Op9w68Aj%S&>66s4CV>mPA_PGTALZ%5g?! zW~R6AO1n*m3k@CxDLx`5 zDlSO-o&f?YlZjb~jE#Nto5zR#(8BkQkqcAfHuHQDJI)a)O1CnW?Vlc=dT`ALj(W#dG+4 zvkT(Wr}#J}#i>b_W%+ciC7xE#2UJoF?#d|8=R{Cm>?mYnRQ%;FGE1G4U~@qdn`%%% z`d4y-%blBOwv^eGUx$N!7cbQIeFrXxXt>=BE z-1p-uoXSl?+s)j>&4S;|#p1&N*jd^5m{_@(*!k31x%oNR_*vPQSULGwSw}UC>;H$q z!O7gl())iGbRrQTe+aPu`NBWhJHMEdy_1WYvx%7nfSZepgNwr#;P?TM{TmSf2teJ& z;a@@Uv$FHEbCa@h@N;qTv$NvF#mIlac>jhaK3*x~U}9w*UQE52ZxB=Lyz8cQ`FR1qaVF5hsENrXcc#QuGs`G!L UZWociK2U&+graz@s4?ij0DF#xk^lez literal 0 HcmV?d00001 diff --git a/sql/index.php b/sql/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/sql/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/sql/install.php b/sql/install.php new file mode 100644 index 0000000..b63f777 --- /dev/null +++ b/sql/install.php @@ -0,0 +1,38 @@ + +* @copyright 2007-2019 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$sql = array(); + +$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'kkiapay` ( + `id_kkiapay` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id_kkiapay`) +) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;'; + +foreach ($sql as $query) { + if (Db::getInstance()->execute($query) == false) { + return false; + } +} diff --git a/sql/uninstall.php b/sql/uninstall.php new file mode 100644 index 0000000..e86fe50 --- /dev/null +++ b/sql/uninstall.php @@ -0,0 +1,38 @@ + +* @copyright 2007-2019 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * In some cases you should not drop the tables. + * Maybe the merchant will just try to reset the module + * but does not want to loose all of the data associated to the module. + */ +$sql = array(); + +foreach ($sql as $query) { + if (Db::getInstance()->execute($query) == false) { + return false; + } +} diff --git a/translations/en.php b/translations/en.php new file mode 100644 index 0000000..fd4abba --- /dev/null +++ b/translations/en.php @@ -0,0 +1,33 @@ +kkiapay_abb331b8f264ffbdd5dd3e7f14a0e9fa'] = 'kkiapay'; +$_MODULE['<{kkiapay}prestashop>kkiapay_b1d246a4251de29c6654c1b7d4418dc6'] = 'kkiaPay allows businesses to receive payments securely via mobile money, a credit card or a bank account.'; +$_MODULE['<{kkiapay}prestashop>kkiapay_40ec99718d6b5bd38b142cf80d1f34a5'] = 'Invalid configurations values'; +$_MODULE['<{kkiapay}prestashop>kkiapay_537812948d8811d9f00110af5cc967ce'] = 'Updated settings'; +$_MODULE['<{kkiapay}prestashop>kkiapay_24ace383b70d09954259c15cfeb9b2fd'] = 'Yes'; +$_MODULE['<{kkiapay}prestashop>kkiapay_6679e65c932b2c5ad98080ee21a4f0d4'] = 'No'; +$_MODULE['<{kkiapay}prestashop>kkiapay_e8f6406befb0c99943dd6c6dc1e7f5fb'] = 'On the right of the page'; +$_MODULE['<{kkiapay}prestashop>kkiapay_adaa23193abc905575c621c3550db2a0'] = 'In the center of the page'; +$_MODULE['<{kkiapay}prestashop>kkiapay_2beae5c84f5cf2d5a47eff9cfd05bbb6'] = 'On the left of the page'; +$_MODULE['<{kkiapay}prestashop>kkiapay_e7785de91330713fc2d12404bb6bd556'] = 'Settings'; +$_MODULE['<{kkiapay}prestashop>kkiapay_77f0926af3ee13c9f4478bce6771789b'] = 'Activate test mode'; +$_MODULE['<{kkiapay}prestashop>kkiapay_fd97c29220584cad166af0906ed64aeb'] = 'Select yes to put kkiapay in sandbox environment'; +$_MODULE['<{kkiapay}prestashop>kkiapay_5d3b1941139f89ce06f1d2afa29d7147'] = 'Public key'; +$_MODULE['<{kkiapay}prestashop>kkiapay_811a8d9a982106b2684a32e85ec7c00c'] = 'Get your API keys on the kkiapay dashboard in the Developers section'; +$_MODULE['<{kkiapay}prestashop>kkiapay_e9e61c0dd1dafa40252ce78a644634b2'] = 'Private key'; +$_MODULE['<{kkiapay}prestashop>kkiapay_1e6947ac7fb3a9529a9726eb692c8cc5'] = 'Secret'; +$_MODULE['<{kkiapay}prestashop>kkiapay_ac3b85a9edba2459734eb9f7e797e7ea'] = 'Color of the kkiapay widget'; +$_MODULE['<{kkiapay}prestashop>kkiapay_c261a7ba66b9ff57818151235cf2ee38'] = 'Set the color of the kkiapay window. For better harmonization, use the dominant color of your site or leave blank.'; +$_MODULE['<{kkiapay}prestashop>kkiapay_511969171614941d4c86444562e15a74'] = 'Disposition of the kkiapay widget'; +$_MODULE['<{kkiapay}prestashop>kkiapay_05f49559098a44a034419a1600d98f4e'] = 'Use this option to control where the kkiapay window should appear on your site'; +$_MODULE['<{kkiapay}prestashop>kkiapay_76b56638af22c17c4b07b74ada232fdb'] = 'Save'; +$_MODULE['<{kkiapay}prestashop>kkiapay_4dfff35d2990d6283c7f031d7a51e64c'] = 'back to the list'; +$_MODULE['<{kkiapay}prestashop>payment_fa04501841996a31b49934ab53f6e0bb'] = ' Use kkiapay to pay with your mobile money account, a credit card or a bank account'; +$_MODULE['<{kkiapay}prestashop>payment_execution_46ace3ac2b3dcd6a9556a746120f3bb7'] = 'Payment receipt'; +$_MODULE['<{kkiapay}prestashop>payment_execution_040ad9fc0b965415332b17e12ed6226d'] = 'Order number'; +$_MODULE['<{kkiapay}prestashop>payment_execution_a04db41511fbf5df5a55e14f4c53a349'] = 'Amount to be paid'; +$_MODULE['<{kkiapay}prestashop>payment_execution_6f212869bb4b093a382cf584df7c8c55'] = 'Payment method'; +$_MODULE['<{kkiapay}prestashop>payment_execution_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{kkiapay}prestashop>payment_execution_303a74098e356909ffcf68b9bd4ca1b0'] = 'Confirm'; diff --git a/translations/index.php b/translations/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/translations/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/upgrade/index.php b/upgrade/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/upgrade/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/upgrade/upgrade-1.1.0.php b/upgrade/upgrade-1.1.0.php new file mode 100644 index 0000000..bb21ba7 --- /dev/null +++ b/upgrade/upgrade-1.1.0.php @@ -0,0 +1,44 @@ + +* @copyright 2007-2019 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) { + exit; +} + +/** + * This function updates your module from previous versions to the version 1.1, + * usefull when you modify your database, or register a new hook ... + * Don't forget to create one file per version. + */ +function upgrade_module_1_1_0($module) +{ + /* + * Do everything you want right there, + * You could add a column in one of your module's tables + */ + + return true; +} diff --git a/views/css/back.css b/views/css/back.css new file mode 100644 index 0000000..edd3969 --- /dev/null +++ b/views/css/back.css @@ -0,0 +1,27 @@ +/** +* 2007-2019 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 +* @copyright 2007-2019 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +* +* Don't forget to prefix your containers with your own identifier +* to avoid any conflicts with others containers. +*/ diff --git a/views/css/front.css b/views/css/front.css new file mode 100644 index 0000000..edd3969 --- /dev/null +++ b/views/css/front.css @@ -0,0 +1,27 @@ +/** +* 2007-2019 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 +* @copyright 2007-2019 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +* +* Don't forget to prefix your containers with your own identifier +* to avoid any conflicts with others containers. +*/ diff --git a/views/css/index.php b/views/css/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/css/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/views/img/index.php b/views/img/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/img/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/views/index.php b/views/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/views/js/back.js b/views/js/back.js new file mode 100644 index 0000000..edd3969 --- /dev/null +++ b/views/js/back.js @@ -0,0 +1,27 @@ +/** +* 2007-2019 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 +* @copyright 2007-2019 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +* +* Don't forget to prefix your containers with your own identifier +* to avoid any conflicts with others containers. +*/ diff --git a/views/js/front.js b/views/js/front.js new file mode 100644 index 0000000..edd3969 --- /dev/null +++ b/views/js/front.js @@ -0,0 +1,27 @@ +/** +* 2007-2019 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 +* @copyright 2007-2019 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +* +* Don't forget to prefix your containers with your own identifier +* to avoid any conflicts with others containers. +*/ diff --git a/views/js/index.php b/views/js/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/js/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/views/templates/admin/configure.tpl b/views/templates/admin/configure.tpl new file mode 100644 index 0000000..0cdb9e3 --- /dev/null +++ b/views/templates/admin/configure.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2019 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 +* @copyright 2007-2019 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+

{l s='kkiapay' mod='kkiapay'}

+

+ {l s='Here is my new generic module!' mod='kkiapay'}
+ {l s='Thanks to PrestaShop, now I have a great module.' mod='kkiapay'}
+ {l s='I can configure it using the following configuration form.' mod='kkiapay'} +

+
+

+ {l s='This module will boost your sales!' mod='kkiapay'} +

+
+ +
+

{l s='Documentation' mod='kkiapay'}

+

+ » {l s='You can get a PDF documentation to configure this module' mod='kkiapay'} : +

+

+
diff --git a/views/templates/admin/hook/front/api/index.php b/views/templates/admin/hook/front/api/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/templates/admin/hook/front/api/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/views/templates/admin/hook/front/api/payment.tpl b/views/templates/admin/hook/front/api/payment.tpl new file mode 100644 index 0000000..67abc7a --- /dev/null +++ b/views/templates/admin/hook/front/api/payment.tpl @@ -0,0 +1,9 @@ +{block name="content"} + +
+

{l s='Utilisez kkiapay pour payer avec votre compte mobile money, une carte de credit ou un compte bancaire' mod='kkiapay'} +

+
+ +{/block} + diff --git a/views/templates/admin/hook/front/api/payment_execution.tpl b/views/templates/admin/hook/front/api/payment_execution.tpl new file mode 100644 index 0000000..911b2b1 --- /dev/null +++ b/views/templates/admin/hook/front/api/payment_execution.tpl @@ -0,0 +1,60 @@ +{extends "$layout"} +{block name="content"} +
+
+
+
+

{l s='Reçu de paiement' mod='kkiapay'}

+
- {l s='Numéro de commande' mod='kkiapay'} : {$num_cart|escape:'htmlall':'UTF-8'} +

- {l s='Montant à payer' mod='kkiapay'} : CFA{$price|escape:'htmlall':'UTF-8'} +

- {l s='Moyen de paiement' mod='kkiapay'} : {$moyen_payment|escape:'htmlall':'UTF-8'} +

- {l s='Date' mod='kkiapay'} : {$date|escape:'htmlall':'UTF-8'} +

+ +
+
+ +
+
+
+
+ +
+
+
+
+ + + + + +{/block} diff --git a/views/templates/admin/hook/front/index.php b/views/templates/admin/hook/front/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/templates/admin/hook/front/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/views/templates/admin/hook/index.php b/views/templates/admin/hook/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/templates/admin/hook/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/views/templates/admin/index.php b/views/templates/admin/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/templates/admin/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/views/templates/front/index.php b/views/templates/front/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/templates/front/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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; diff --git a/views/templates/index.php b/views/templates/index.php new file mode 100644 index 0000000..ccf80de --- /dev/null +++ b/views/templates/index.php @@ -0,0 +1,34 @@ + +* @copyright 2007-2019 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;