first commit

This commit is contained in:
2024-11-05 12:22:50 +01:00
commit e5682a3912
19641 changed files with 2948548 additions and 0 deletions

24
modules/paylane/README.md Normal file
View File

@@ -0,0 +1,24 @@
# PayLane Prestashop plugin
The PayLane Prestashop plugin allows for a seamless integration with our payment gateway. This plugin has been tested and is regularly maintained by PayLane. If you notice any bugs, please report them.
# Installation
## Automatic installation
1. In your Prestashop administration panel, navigate to the Modules page. Once there, click `Add a new module` and upload the `paylane.zip` file using the upload tool.
2. Once the upload is complete, click `Install` and the wizard will automatically install the plugin.
## Manual installation
1. Upload the contents of the `src` directory into the root directory of your Prestashop installation.
2. Follow the 2nd step as above
# Official documentation
Code snippets, full API documetation, plugins, integration examples and much more can be found in the [PayLane DevZone](http://devzone.paylane.com/).
# License
MIT license. See the LICENSE file for more details.

View File

@@ -0,0 +1,208 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
class ApplePay extends PaymentMethodAbstract
{
protected $paymentType = 'applepay';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
}
/*
public function getPaymentOption()
{
$active = (boolean)Configuration::get('PAYLANE_APPLEPAY_ACTIVE');
$paymentOption = null;
if ($active) {
$label = Configuration::get('paylane_applepay_label');
$paymentOption = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption();
$paymentOption->setCallToActionText($label)
->setForm($this->generatePaymentForm());
if ((bool)Configuration::get('paylane_applepay_showImg')) {
$paymentOption->setLogo(_MODULE_DIR_ . 'paylane/views/img/payment_methods/applepay.png');
}
}
return $paymentOption;
}
*/
public function getPaymentConfig()
{
$filename = _PS_ROOT_DIR_ . '/.well-known/apple-developer-merchantid-domain-association';
$dirname = dirname($filename);
if (!is_dir($dirname))
{
mkdir($dirname, 0755, true);
}
$cert = (string)Configuration::get('paylane_applepay_certificate');
$handle = fopen($filename, 'w+');
fwrite($handle, $cert);
fclose($handle);
return array(
'paylane_applepay_label' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_APPLE_PAY_LABEL', 'applepay'),
'default' => $this->paylane->l('PAYLANE_APPLE_PAY_DEFAULT_APPLE_PAY', 'applepay')
),
'paylane_applepay_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_APPLE_PAY_SHOW_PAYMENT_METHOD_IMAGE', 'applepay'),
'default' => 1
),
'paylane_applepay_certificate' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_APPLE_PAY_LABEL_APPLE_PAY_CERTIFICATE', 'applepay'),
'default' => $this->paylane->l('PAYLANE_APPLE_PAY_DEFAULT_APPLE_PAY_CERTIFICATE', 'applepay')
),
);
}
public function handlePayment($paymentParams)
{
$context = Context::getContext();
$context->cookie->payment_type = $this->paymentType;
$result = array();
$data = array();
$data['sale'] = $this->prepareSaleData();
$data['customer'] = $this->prepareCustomerData();
$data['card'] = array(
'token' => $paymentParams['token']
);
$apiResult = $this->client->applePaySale($data);
if (!empty($apiResult['success']) && $apiResult['success']) {
$result = array(
'order_status' => 'CLEARED',
'success' => $apiResult['success'],
'error' => $apiResult['error'],
'id_sale' => $apiResult['id_sale']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PS_OS_PAYMENT');
}
} else {
$result = array(
'order_status' => 'ERROR',
'success' => $apiResult['success'],
'error' => $apiResult['error']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
}
return $result;
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/apple_pay.tpl');
}
public function getTemplateVars()
{
$context = Context::getContext();
$countryCode = Tools::strtoupper($context->language->iso_code);
$currencyCode = $context->currency->iso_code;
$products = $context->cart->getProducts(true);
if ($this->isOldPresta()) {
$paymentDescription = Translate::getModuleTranslation('paylane', 'Order from shop ', 'paylane');
$paymentDescription .= $context->shop->name;
} else {
$paymentDescription = $context->getTranslator()->trans('Order from shop ') . $context->shop->name;
}
$totalPrice = 0;
foreach ($products as $prod) {
$totalPrice += $prod['total_wt'];
}
return array(
'action' => $context->link->getModuleLink('paylane', 'validation', array(), true),
'applePayLabel' => Configuration::get('paylane_applepay_label'),
'countryCode' => $countryCode,
'currencyCode' => $currencyCode,
'paymentDescription' => $paymentDescription,
'amount' => sprintf('%01.2f', round($totalPrice, 2)),
'apiKey' => (string)Configuration::get('PAYLANE_GENERAL_PUBLIC_KEY_API'),
'withImage' => (bool)Configuration::get('paylane_applepay_showImg'),
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'applePayLabel' => Configuration::get('paylane_applepay_label'),
'withImage' => (bool)Configuration::get('paylane_applepay_showImg')
));
return $this->fetchTemplate('front/payment_link/apple_pay.tpl');
}
protected function prepareCustomerData()
{
$context = Context::getContext();
$cart = $context->cart;
$cookie = $context->cookie;
$lang = new Language($cookie->id_lang);
$result = array();
$address = new Address($cart->id_address_invoice);
if ($address->firstname && $address->lastname) {
$result['name'] = $address->firstname . ' ' . $address->lastname;
}
if ($cookie->email) {
$result['email'] = $cookie->email;
}
if ($_SERVER['REMOTE_ADDR']) {
$result['ip'] = $_SERVER['REMOTE_ADDR'];
}
if ($address->country) {
$result['country_code'] = Tools::strtoupper($lang->iso_code);
}
return $result;
}
}

View File

@@ -0,0 +1,124 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
class Blik extends PaymentMethodAbstract
{
protected $paymentType = 'BLIK';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
parent::__construct();
}
public function getPaymentConfig()
{
return array(
'paylane_blik_label' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_BLIK_LABEL', 'blik'),
'default' => $this->paylane->l('PAYLANE_BLIK_DEFAULT', 'blik'),
),
'paylane_blik_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_BLIK_SHOW_IMAGE', 'blik'),
'default' => 1
),
);
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/blik.tpl');
}
public function getTemplateVars()
{
$context = Context::getContext();
$context->cookie->payment_type = $this->paymentType;
return array(
'action' => $context->link->getModuleLink('paylane', 'validation', array(), true),
'paymentMethodLabel' => Configuration::get('paylane_blik_label'),
'withImage' => (bool)Configuration::get('paylane_blik_showImg')
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'blikLabel' => Configuration::get('paylane_blik_label'),
'withImage' => (bool)Configuration::get('paylane_blik_showImg')
));
return $this->fetchTemplate('front/payment_link/blik.tpl');
}
public function handlePayment($paymentParams)
{
$context = Context::getContext();
$context->cookie->payment_type = $this->paymentType;
$result = array();
$data = array();
$data['sale'] = $this->prepareSaleData();
$data['customer'] = $this->prepareCustomerData();
$data['payment_type'] = $paymentParams['type'];
$data['code'] = $paymentParams['code'];
$data['back_url'] = $paymentParams['back_url'];
$apiResult = $this->client->blikSale($data);
if (!empty($apiResult['success']) && $apiResult['success']) {
$result = array(
'order_status' => 'CLEARED',
'success' => $apiResult['success'],
'id_sale' => $apiResult['id_sale'],
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PS_OS_PAYMENT');
}
} else {
$result = array(
'order_status' => 'ERROR',
'success' => $apiResult['success'],
'error' => $apiResult['error']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
}
return $result;
}
}

View File

@@ -0,0 +1,222 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
class BankTransfer extends PaymentMethodAbstract
{
protected $paymentType = 'banktransfer';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
parent::__construct();
}
/*
public function getPaymentOption()
{
$active = (boolean)Configuration::get('PAYLANE_BANKTRANSFER_ACTIVE');
$paymentOption = null;
if ($active) {
$label = Configuration::get('paylane_banktransfer_label');
$paymentOption = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption();
$paymentOption->setCallToActionText($label)
->setForm($this->generatePaymentForm());
if ((bool)Configuration::get('paylane_banktransfer_showImg')) {
$paymentOption->setLogo(_MODULE_DIR_ . 'paylane/views/img/payment_methods/banktransfer.png');
}
}
return $paymentOption;
}
*/
public function getPaymentConfig()
{
return array(
'paylane_banktransfer_label' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_BANK_TRANSFER_LABEL', 'banktransfer'),
'default' => $this->paylane->l('PAYLANE_BANK_TRANSFER_DEFAULT', 'banktransfer'),
),
'paylane_banktransfer_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_BANK_TRANSFER_SHOW_PAYMENT_METHOD_IMAGE', 'banktransfer'),
'default' => 1
)
);
}
public function handlePayment($paymentParams)
{
$context = Context::getContext();
$context->cookie->payment_type = $this->paymentType;
$result = array();
$data = array();
$data['sale'] = $this->prepareSaleData();
$data['customer'] = $this->prepareCustomerData();
$data['payment_type'] = $paymentParams['payment_type'];
$data['back_url'] = $paymentParams['back_url'];
if ($this->isOldPresta()) {
$data['back_url'] = $context->link->getModuleLink('paylane', 'general', array(), true);
}
$apiResult = $this->client->bankTransferSale($data);
if (!empty($apiResult['success']) && $apiResult['success']) {
Tools::redirect($apiResult['redirect_url']);
die;
} else {
$result = array(
'order_status' => 'ERROR',
'success' => $apiResult['success'],
'error' => $apiResult['error']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
}
return $result;
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/bank_transfer.tpl');
}
public function getTemplateVars()
{
$context = Context::getContext();
return array(
'action' => $context->link->getModuleLink('paylane', 'validation', array(), true),
'paymentTypes' => $this->getBankTransferPaymentTypes(),
'paymentMethodLabel' => Configuration::get('paylane_banktransfer_label'),
'withImage' => (bool)Configuration::get('paylane_banktransfer_showImg')
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'paymentMethodLabel' => Configuration::get('paylane_banktransfer_label'),
'withImage' => (bool)Configuration::get('paylane_banktransfer_showImg')
));
return $this->fetchTemplate('front/payment_link/bank_transfer.tpl');
}
protected function getBankTransferPaymentTypes()
{
$result = array(
'AB' => array(
'label' => 'Alior Bank'
),
'AS' => array(
'label' => 'T-Mobile Usługi Bankowe'
),
'MT' => array(
'label' => 'mTransfer'
),
'IN' => array(
'label' => 'Inteligo'
),
'IP' => array(
'label' => 'iPKO'
),
'MI' => array(
'label' => 'Millenium'
),
'CA' => array(
'label' => 'Credit Agricole'
),
'PP' => array(
'label' => 'Poczta Polska'
),
'PCZ' => array(
'label' => 'Bank Pocztowy'
),
'IB' => array(
'label' => 'Idea Bank'
),
'PO' => array(
'label' => 'Pekao S.A.'
),
'GB' => array(
'label' => 'Getin Bank'
),
'IG' => array(
'label' => 'ING Bank Śląski'
),
'WB' => array(
'label' => 'Santander Bank'
),
'PB' => array(
'label' => 'Bank BGŻ BNP PARIBAS'
),
'CT' => array(
'label' => 'Citi'
),
'PL' => array(
'label' => 'Plus Bank'
),
'NP' => array(
'label' => 'Noble Pay'
),
'BS' => array(
'label' => 'Bank Spółdzielczy'
),
'NB' => array(
'label' => 'NestBank'
),
'PBS' => array(
'label' => 'Podkarpacki Bank Spółdzielczy'
),
'SGB' => array(
'label' => 'Spółdzielcza Grupa Bankowa'
),
'BP' => array(
'label' => 'Bank BPH'
),
'BLIK' => array(
'label' => 'BLIK'
),
'OH' => array(
'label' => 'Other bank'
),
);
return $result;
}
}

View File

@@ -0,0 +1,420 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/PayLaneCards.php');
class CreditCard extends PaymentMethodAbstract
{
protected $paymentType = 'creditcard';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
parent::__construct();
}
/*
public function getPaymentOption()
{
$active = (boolean)Configuration::get('PAYLANE_CREDITCARD_ACTIVE');
$paymentOption = null;
if ($active) {
$label = Configuration::get('paylane_creditcard_label');
$paymentOption = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption();
$paymentOption->setCallToActionText($label)
->setForm($this->generatePaymentForm());
if ((bool)Configuration::get('paylane_creditcard_showImg')) {
$paymentOption->setLogo(_MODULE_DIR_ . 'paylane/views/img/payment_methods/creditcard.png');
}
}
return $paymentOption;
}
*/
protected function prepareSale($token) {
$tokenExplode = explode('|', $token);
$idSale = $tokenExplode[0];
$card = $tokenExplode[1];
return array('id_sale' => $idSale, 'card' => $card);
}
protected function isValidate($token) {
$context = Context::getContext();
$prepare = $this->prepareSale($token);
$customerId = $context->customer->id;
$payLaneCards = new PayLaneCards();
return $payLaneCards->isSaleAlreadyExist($customerId, $prepare['id_sale'], $prepare['card']);
}
public function handlePayment($paymentParams)
{
$context = Context::getContext();
if (!empty($paymentParams['creditCardString'])) {
$customerId = $context->customer->id;
$context->cookie->{'paylane_cards_'.$customerId} = $paymentParams['creditCardString'];
}
//using single-click way
if ((!empty($paymentParams['authorization_id']) || !empty($paymentParams['id_sale'])) && ($paymentParams['id_sale'] != "addNewCard")) {
if (!$this->isValidate($paymentParams['id_sale'])) {
$result = array(
'order_status' => 'ERROR',
'success' => false,
'error' => array('error_description' => 'Wrong token card'),
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
return $result;
}
$prepareSale = $this->prepareSale($paymentParams['id_sale']);
$paymentParams['id_sale'] = $prepareSale['id_sale'];
$result = $this->handleSingleClickPayment($paymentParams);
} else { // 3DS transaction type
$data = array();
$data['sale'] = $this->prepareSaleData();
$data['customer'] = $this->prepareCustomerData();
$data['card'] = array(
'token' => $paymentParams['token']
);
if ((boolean)Configuration::get('paylane_creditcard_3ds')) { // 3DS check enabled
$data['back_url'] = $paymentParams['back_url'];
if ($this->isOldPresta()) {
$data['back_url'] = $context->link->getModuleLink(
'paylane',
'3dsvalidation',
array('cart_id' => $cart->id, 'secure_key' => $customer->secure_key, 'payment_method' => $this->paymentMethod),
true);
}
$result = $this->client->checkCard3DSecureByToken($data);
if (isset($result['is_card_enrolled']) && $result['is_card_enrolled']) {
// if card enrolled
Tools::redirect($result['redirect_url']);
//single click save credit card
if ((!empty($result['id_sale'])) && ($context->customer->isLogged())) {
$payLaneCards = new PayLaneCards();
$customerId = $context->customer->id;
$creditCardString = $context->cookie->{'paylane_cards_'.$customerId};
unset($context->cookie->{'paylane_cards_'.$customerId});
if (!$payLaneCards->checkIfCardAlreadyExist($customerId, $creditCardString)) {
$payLaneCards->insertCard($result['id_sale'], $customerId, $creditCardString);
}
}
die;
}else{
$result = $this->client->cardSaleByToken($data);
//single click save credit card
if ((!empty($result['id_sale'])) && ($context->customer->isLogged())) {
$payLaneCards = new PayLaneCards();
$customerId = $context->customer->id;
$creditCardString = $context->cookie->{'paylane_cards_'.$customerId};
unset($context->cookie->{'paylane_cards_'.$customerId});
if (!$payLaneCards->checkIfCardAlreadyExist($customerId, $creditCardString)) {
$payLaneCards->insertCard($result['id_sale'], $customerId, $creditCardString);
}
}
}
} else { // 3DS check disabled
$result = $this->client->cardSaleByToken($data);
//single click save credit card
if ((!empty($result['id_sale'])) && ($context->customer->isLogged())) {
$payLaneCards = new PayLaneCards();
$customerId = $context->customer->id;
$creditCardString = $context->cookie->{'paylane_cards_'.$customerId};
unset($context->cookie->{'paylane_cards_'.$customerId});
if (!$payLaneCards->checkIfCardAlreadyExist($customerId, $creditCardString)) {
$payLaneCards->insertCard($result['id_sale'], $customerId, $creditCardString);
}
}
}
}
return $result;
}
public function handle3DSPayment($paymentParams)
{
$result = array(
'success' => false,
'error' => null
);
if ((boolean)Configuration::get('paylane_creditcard_3ds') && $paymentParams['id_3dsecure_auth']) {
$ds3Status = $this->client->saleBy3DSecureAuthorization(array(
'id_3dsecure_auth' => $paymentParams['id_3dsecure_auth']
));
if (!empty($ds3Status['success']) && $ds3Status['success']) {
$result = array(
'order_status' => 'CLEARED',
'success' => $ds3Status['success'],
'id_sale' => $ds3Status['id_sale']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PS_OS_PAYMENT');
}
} else {
$result = array(
'order_status' => 'ERROR',
'success' => $ds3Status['success'],
'error' => $ds3Status['error']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
}
}
$context = Context::getContext();
if ((!empty($result['id_sale'])) && ($context->customer->isLogged())) {
$payLaneCards = new PayLaneCards();
$customerId = $context->customer->id;
$creditCardString = $context->cookie->{'paylane_cards_'.$customerId};
unset($context->cookie->{'paylane_cards_'.$customerId});
if (!$payLaneCards->checkIfCardAlreadyExist($customerId, $creditCardString)) {
$payLaneCards->insertCard($result['id_sale'], $customerId, $creditCardString);
}
}
return $result;
}
public function getPaymentConfig()
{
return array(
'paylane_creditcard_label' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_CREDITCARD_LABEL', 'creditcard'),
'default' => $this->paylane->l('PAYLANE_CREDITCARD_DEFAULT', 'creditcard'),
),
'paylane_creditcard_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_CREDITCARD_SHOW_PAYMENT_METHOD_IMAGE', 'creditcard'),
'default' => 1
),
'paylane_creditcard_fraud_check_override' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_CREDITCARD_FRAUD_CHECK_OVERRIDE', 'creditcard'),
),
'paylane_creditcard_fraud_check' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_CREDITCARD_FRAUD_CHECK', 'creditcard'),
),
'paylane_creditcard_avs_override' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_CREDITCARD_AVS_OVERRIDE', 'creditcard'),
),
'paylane_creditcard_avs' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_CREDITCARD_AVS_LEVEL', 'creditcard'),
'options' => array(
array(
'value' => 0,
'label' => '0'
),
array(
'value' => 1,
'label' => '1'
),
array(
'value' => 2,
'label' => '2'
),
array(
'value' => 3,
'label' => '3'
),
array(
'value' => 4,
'label' => '4'
),
)
),
'paylane_creditcard_3ds' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_CREDITCARD_3DS_CHECK', 'creditcard'),
'default' => 1
),
'paylane_creditcard_blocked_amount' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_CREDITCARD_BLOCKED_AMOUNT', 'creditcard'),
'required' => false,
'default' => 1
),
// @TODO: To implement that function
// 'paylane_creditcard_single_click' => array(
// 'type' => 'select',
// 'label' => 'Single click payments'
// )
);
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/credit_card.tpl');
}
public function getTemplateVars()
{
$context = Context::getContext();
$months = array();
for ($i = 1; $i <= 12; $i++) {
$months[] = sprintf("%02d", $i);
}
$years = array();
for ($i = 0; $i <= 10; $i++) {
$years[] = date('Y', strtotime('+'.$i.' years'));
}
$authorizeId = $this->getAuthorizeId();
$isFirstOrder = $this->isCustomerFirstOrder();
$payLaneCards = new PayLaneCards();
$creditCardsArray = $payLaneCards->getCreditCardsByCustomerId($context->customer->id);
return array(
'action' => $context->link->getModuleLink('paylane', 'validation', array(), true),
'months' => $months,
'years' => $years,
'creditCardsArray' => $creditCardsArray,
'isSingleClickActive' => (boolean)Configuration::get('paylane_creditcard_single_click'),
'authorizeId' => $authorizeId,
'isFirstOrder' => $isFirstOrder,
'lastSaleId' => 0, // @TODO: Handle in future
'apiKey' => (string)Configuration::get('PAYLANE_GENERAL_PUBLIC_KEY_API'),
'paymentMethodLabel' => (string)Configuration::get('paylane_creditcard_label'),
'withImage' => (bool)Configuration::get('paylane_creditcard_showImg')
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'paymentMethodLabel' => Configuration::get('paylane_creditcard_label'),
'withImage' => (bool)Configuration::get('paylane_creditcard_showImg')
));
return $this->fetchTemplate('front/payment_link/credit_card.tpl');
}
protected function handleSingleClickPayment($paymentParams)
{
$data = array();
if (!empty($paymentParams['id_sale'])) {
$data['id_sale'] = $paymentParams['id_sale'];
}
if (!empty($paymentParams['authorization_id'])) {
$data['id_authorization'] = $paymentParams['authorization_id'];
}
$context = Context::getContext();
$cart = $context->cart;
$currency = $context->currency;
$data['amount'] = sprintf('%01.2f', $cart->getOrderTotal());
$data['currency'] = $currency->iso_code;
$data['description'] = $cart->id;
if (!empty($paymentParams['id_sale'])) {
$result = $this->client->resaleBySale($data);
}
if (!empty($paymentParams['authorization_id'])) {
$result = $this->client->resaleByAuthorization($data);
}
return $result;
}
protected function isCustomerFirstOrder()
{
$context = Context::getContext();
$customer = $context->customer;
$orderCount = Order::getCustomerNbOrders($customer->id);
return (boolean)($orderCount < 1);
}
protected function getAuthorizeId()
{
$context = Context::getContext();
$customer = $context->customer;
$authorizeId = (int)Configuration::get('paylane_card_auth_id_' . $customer->id);
return $authorizeId;
}
protected function getCustomerLastOrderPaylaneSaleId()
{
$context = Context::getContext();
$customer = $context->customer;
$orderSql = 'SELECT `reference`
FROM `'._DB_PREFIX_.'orders`
WHERE `id_customer` = '.(int)$customer->id
. ' AND `payment` = "' . (string)Configuration::get('paylane_creditcard_label') . '"'
. ' ORDER BY `date_upd` DESC'
.Shop::addSqlRestriction();
$result = Db::getInstance()->getRow($orderSql);
$sql = 'SELECT `transaction_id`
FROM `'._DB_PREFIX_.'order_payment`
WHERE `order_reference` = "'.(string)$result['reference'] . '"'
.Shop::addSqlRestriction();
$result = Db::getInstance()->getRow($sql);
return isset($result['transaction_id']) ? $result['transaction_id'] : null;
}
}

View File

@@ -0,0 +1,133 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
class DirectDebit extends PaymentMethodAbstract
{
protected $paymentType = 'directdebit';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
}
/*
public function getPaymentOption()
{
$active = (boolean)Configuration::get('PAYLANE_DIRECTDEBIT_ACTIVE');
$paymentOption = null;
if ($active) {
$label = Configuration::get('paylane_directdebit_label');
$paymentOption = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption();
$paymentOption->setCallToActionText($label)
->setForm($this->generatePaymentForm());
if ((bool)Configuration::get('paylane_directdebit_showImg')) {
$paymentOption->setLogo(_MODULE_DIR_ . 'paylane/views/img/payment_methods/sepa.png');
}
}
return $paymentOption;
}
*/
public function getPaymentConfig()
{
return array(
'paylane_directdebit_label' => array(
'type' => 'text',
'label' =>$this->paylane->l('PAYLANE_DIRECT_DEBIT_LABEL', 'directdebit'),
'default' => $this->paylane->l('PAYLANE_DIRECT_DEBIT_DEFAULT', 'directdebit'),
),
'paylane_directdebit_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_DIRECT_DEBIT_SHOW_PAYMENT_IMAGE', 'directdebit'),
'default' => 1
),
'paylane_directdebit_mandate_id' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_DIRECT_DEBIT_MANDATE_ID', 'directdebit'),
'default' => $this->paylane->l('PAYLANE_DIRECT_DEBIT_MANDATE_ID_DEFAULT', 'directdebit')
)
);
}
public function handlePayment($paymentParams)
{
$data = array();
$data['sale'] = $this->prepareSaleData();
$data['customer'] = $this->prepareCustomerData();
$data['account'] = array(
'account_holder' => $paymentParams['account_holder'],
'account_country' => $paymentParams['account_country'],
'iban' => $paymentParams['iban'],
'bic' => $paymentParams['bic'],
'mandate_id' => Configuration::get('paylane_directdebit_mandate_id')
);
$apiResult = $this->client->directDebitSale($data);
return $apiResult;
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/direct_debit.tpl');
}
public function getTemplateVars()
{
$context = Context::getContext();
$countries = Country::getCountries((int)Configuration::get('PS_LANG_DEFAULT'));
$result = array();
foreach ($countries as $country) {
$result[$country['iso_code']] = $country['name'];
}
return array(
'action' => $context->link->getModuleLink('paylane', 'validation', array(), true),
'countries' => $result,
'paymentMethodLabel' => Configuration::get('paylane_directdebit_label'),
'withImage' => (bool)Configuration::get('paylane_directdebit_showImg')
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'paymentMethodLabel' => Configuration::get('paylane_directdebit_label'),
'withImage' => (bool)Configuration::get('paylane_directdebit_showImg')
));
return $this->fetchTemplate('front/payment_link/direct_debit.tpl');
}
}

View File

@@ -0,0 +1,170 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
class GooglePay extends PaymentMethodAbstract
{
protected $paymentType = 'googlepay';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
}
public function getPaymentConfig()
{
return array(
'paylane_googlepay_label' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_GOOGLE_PAY_LABEL', 'googlepay'),
'default' => $this->paylane->l('PAYLANE_GOOGLE_PAY_DEFAULT', 'googlepay'),
),
'paylane_googlepay_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_GOOGLE_PAY_SHOW_PAYMENT_METHOD_IMAGE', 'googlepay'),
'default' => 1
),
);
}
public function handlePayment($paymentParams)
{
$context = Context::getContext();
$context->cookie->payment_type = $this->paymentType;
$result = array();
$data = array();
$data['sale'] = $this->prepareSaleData();
$data['customer'] = $this->prepareCustomerData();
$data['card'] = array(
'token' => $paymentParams['token']
);
$apiResult = $this->client->applePaySale($data);
if (!empty($apiResult['success']) && $apiResult['success']) {
$result = array(
'order_status' => 'CLEARED',
'success' => $apiResult['success'],
'error' => $apiResult['error'],
'id_sale' => $apiResult['id_sale']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PS_OS_PAYMENT');
}
} else {
$result = array(
'order_status' => 'ERROR',
'success' => $apiResult['success'],
'error' => $apiResult['error']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
}
return $result;
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/apple_pay.tpl');
}
public function getTemplateVars()
{
$context = Context::getContext();
$countryCode = Tools::strtoupper($context->language->iso_code);
$currencyCode = $context->currency->iso_code;
$products = $context->cart->getProducts(true);
if ($this->isOldPresta()) {
$paymentDescription = Translate::getModuleTranslation('paylane', 'Order from shop ', 'paylane');
$paymentDescription .= $context->shop->name;
} else {
$paymentDescription = $context->getTranslator()->trans('Order from shop ') . $context->shop->name;
}
$totalPrice = 0;
foreach ($products as $prod) {
$totalPrice += $prod['total_wt'];
}
return array(
'action' => $context->link->getModuleLink('paylane', 'validation', array(), true),
'googlePayLabel' => Configuration::get('paylane_googlepay_label'),
'countryCode' => $countryCode,
'currencyCode' => $currencyCode,
'paymentDescription' => $paymentDescription,
'amount' => sprintf('%01.2f', round($totalPrice, 2)),
'apiKey' => (string)Configuration::get('PAYLANE_GENERAL_PUBLIC_KEY_API'),
'withImage' => (bool)Configuration::get('paylane_googlepay_showImg'),
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'applePayLabel' => Configuration::get('paylane_applepay_label'),
'withImage' => (bool)Configuration::get('paylane_applepay_showImg')
));
return $this->fetchTemplate('front/payment_link/apple_pay.tpl');
}
protected function prepareCustomerData()
{
$context = Context::getContext();
$cart = $context->cart;
$cookie = $context->cookie;
$lang = new Language($cookie->id_lang);
$result = array();
$address = new Address($cart->id_address_invoice);
if ($address->firstname && $address->lastname) {
$result['name'] = $address->firstname . ' ' . $address->lastname;
}
if ($cookie->email) {
$result['email'] = $cookie->email;
}
if ($_SERVER['REMOTE_ADDR']) {
$result['ip'] = $_SERVER['REMOTE_ADDR'];
}
if ($address->country) {
$result['country_code'] = Tools::strtoupper($lang->iso_code);
}
return $result;
}
}

View File

@@ -0,0 +1,153 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
class Ideal extends PaymentMethodAbstract
{
protected $paymentType = 'ideal';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
}
/*
public function getPaymentOption()
{
$active = (boolean)Configuration::get('PAYLANE_IDEAL_ACTIVE');
$paymentOption = null;
if ($active) {
$label = Configuration::get('paylane_ideal_label');
$paymentOption = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption();
$paymentOption->setCallToActionText($label)
->setForm($this->generatePaymentForm());
if ((bool)Configuration::get('paylane_ideal_showImg')) {
$paymentOption->setLogo(_MODULE_DIR_ . 'paylane/views/img/payment_methods/ideal.png');
}
}
return $paymentOption;
}
*/
public function getPaymentConfig()
{
return array(
'paylane_ideal_label' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_IDEAL_LABEL', 'ideal'),
'default' => $this->paylane->l('PAYLANE_IDEAL_DEFAULT', 'ideal'),
),
'paylane_ideal_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_IDEAL_SHOW_PAYMENT_METHOD_IMAGE', 'ideal'),
'default' => 1
)
);
}
public function handlePayment($paymentParams)
{
$context = Context::getContext();
$context->cookie->payment_type = $this->paymentType;
$result = array();
$data = array();
$data['sale'] = $this->prepareSaleData();
$data['customer'] = $this->prepareCustomerData();
$data['bank_code'] = $paymentParams['bank_code'];
$data['back_url'] = $paymentParams['back_url'];
if ($this->isOldPresta()) {
$data['back_url'] = $context->link->getModuleLink('paylane', 'general', array(), true);
}
$apiResult = $this->client->idealSale($data);
if (!empty($apiResult['success']) && $apiResult['success']) {
Tools::redirect($apiResult['redirect_url']);
die;
} else {
$result = array(
'order_status' => 'ERROR',
'success' => $apiResult['success'],
'error' => $apiResult['error']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
}
return $result;
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/ideal.tpl');
}
public function getTemplateVars()
{
$context = Context::getContext();
try {
$result = $this->client->idealBankCodes();
} catch (\Exception $e) {
$result = array(
'success' => false
);
}
$banks = array();
if (!empty($result['success']) && $result['success']) {
$banks = $result['data'];
}
return array(
'action' => $context->link->getModuleLink('paylane', 'validation', array(), true),
'banks' => $banks,
'paymentMethodLabel' => Configuration::get('paylane_ideal_label'),
'withImage' => (bool)Configuration::get('paylane_ideal_showImg')
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'paymentMethodLabel' => Configuration::get('paylane_ideal_label'),
'withImage' => (bool)Configuration::get('paylane_ideal_showImg')
));
return $this->fetchTemplate('front/payment_link/ideal.tpl');
}
}

View File

@@ -0,0 +1,96 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
class PayLaneCards extends ObjectModel
{
public static $definition = array(
'table' => 'endora_paylane_cards',
'primary' => 'id_sale',
'fields' => array(
'id_sale' => array(
'type' => self::TYPE_INT,
'validate' => 'isUnsignedInt'
),
'customer_id' => array(
'type' => self::TYPE_INT,
'validate' => 'isUnsignedInt'
),
'credit_card_number' => array(
'type' => self::TYPE_STRING,
'size' => 255
)
),
);
public function getCreditCardsByCustomerId($customerId)
{
$sql = new DbQuery();
$sql->select('*');
$sql->from('endora_paylane_cards');
$sql->where('customer_id = '.$customerId);
$result = Db::getInstance()->executeS($sql);
return $result;
}
public function checkIfCardAlreadyExist($customerId, $creditCardNumber)
{
$sql = new DbQuery();
$sql->select('*');
$sql->from('endora_paylane_cards');
$sql->where('customer_id = '.$customerId.' AND '.'credit_card_number = \''.$creditCardNumber.'\'');
$result = Db::getInstance()->getRow($sql);
if ($result) {
return true;
} else {
return false;
}
}
public function isSaleAlreadyExist($customerId, $idSale, $card)
{
$sql = new DbQuery();
$sql->select('*');
$sql->from('endora_paylane_cards');
$sql->where('customer_id = '.(int)$customerId.' AND '.'credit_card_number = \''.$card.'\' AND '.'id_sale = '.(int)$idSale.'');
$result = Db::getInstance()->getRow($sql);
if ($result) {
return true;
} else {
return false;
}
}
public function insertCard($id_sale, $customerId, $creditCardNumber)
{
$query = "INSERT INTO `"._DB_PREFIX_."endora_paylane_cards` (`id_sale`, `customer_id`, `credit_card_number`)";
$query .= " VALUES (".$id_sale.",".$customerId.",'".$creditCardNumber."')";
Db::getInstance()->execute($query);
}
}

View File

@@ -0,0 +1,137 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
class PayPal extends PaymentMethodAbstract
{
protected $paymentType = 'paypal';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
parent::__construct();
}
/*
public function getPaymentOption()
{
$active = (boolean)Configuration::get('PAYLANE_PAYPAL_ACTIVE');
$paymentOption = null;
if ($active) {
$label = Configuration::get('paylane_paypal_label');
$paymentOption = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption();
$paymentOption->setCallToActionText($label)
->setForm($this->generatePaymentForm());
if ((bool)Configuration::get('paylane_paypal_showImg')) {
$paymentOption->setLogo(_MODULE_DIR_ . 'paylane/views/img/payment_methods/paypal.png');
}
}
return $paymentOption;
}
*/
public function handlePayment($paymentParams)
{
$context = Context::getContext();
$context->cookie->payment_type = $this->paymentType;
$result = array();
$data = array();
$data['sale'] = $this->prepareSaleData();
$data['payment_type'] = $paymentParams['type'];
$data['back_url'] = $paymentParams['back_url'];
if ($this->isOldPresta()) {
$data['back_url'] = $context->link->getModuleLink('paylane', 'general', array(), true);
}
$apiResult = $this->client->paypalSale($data);
if (!empty($apiResult['success']) && $apiResult['success']) {
Tools::redirect($apiResult['redirect_url']);
die;
} else {
$result = array(
'order_status' => 'ERROR',
'success' => $apiResult['success'],
'error' => $apiResult['error']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
}
return $result;
}
public function getPaymentConfig()
{
return array(
'paylane_paypal_label' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_PAYPAL_LABEL', 'paypal'),
'default' => $this->paylane->l('PAYLANE_PAYPAL_DEFAULT', 'paypal'),
),
'paylane_paypal_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_PAYPAL_SHOW_PAYMENT_METHOD_IMAGE', 'paypal'),
'default' => 1
),
);
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/paypal.tpl');
}
public function getTemplateVars()
{
$context = Context::getContext();
return array(
'action' => $context->link->getModuleLink('paylane', 'validation', array(), true),
'paymentMethodLabel' => Configuration::get('paylane_paypal_label'),
'withImage' => (bool)Configuration::get('paylane_paypal_showImg')
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'paymentMethodLabel' => Configuration::get('paylane_paypal_label'),
'withImage' => (bool)Configuration::get('paylane_paypal_showImg')
));
return $this->fetchTemplate('front/payment_link/paypal.tpl');
}
}

View File

@@ -0,0 +1,133 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/lib/paylane-rest.php');
abstract class PaymentMethodAbstract
{
protected $client = null;
protected $paymentType = null;
//abstract public function getPaymentOption();
abstract public function getPaymentConfig();
public function __construct()
{
$apiUser = Configuration::get('PAYLANE_GENERAL_LOGIN_API');
$apiPass = Configuration::get('PAYLANE_GENERAL_PASSWORD_API');
if ($apiUser && $apiPass) {
$this->client = new PayLaneRestClient($apiUser, $apiPass);
}
}
protected function prepareSaleData()
{
$context = Context::getContext();
$cart = $context->cart;
$currency = $context->currency;
$result = array();
$result['amount'] = sprintf('%01.2f', $cart->getOrderTotal());
$result['currency'] = $currency->iso_code;
$result['description'] = (string)$cart->id;
if ($this->paymentType === 'creditcard') {
if ((boolean)Configuration::get('paylane_creditcard_fraud_check_override')) {
$result['fraud_check_on'] = (boolean)Configuration::get('paylane_creditcard_fraud_check');
}
if ((boolean)Configuration::get('paylane_creditcard_avs_override')) {
$result['avs_check_level'] = (int)Configuration::get('paylane_creditcard_avs');
}
}
return $result;
}
protected function prepareCustomerData()
{
$context = Context::getContext();
$cart = $context->cart;
$cookie = $context->cookie;
$lang = new Language($cookie->id_lang);
$result = array();
$address = new Address($cart->id_address_invoice);
$state = new State($address->id_state);
if ($address->firstname && $address->lastname) {
$result['name'] = $address->firstname . ' ' . $address->lastname;
}
if ($cookie->email) {
$result['email'] = $cookie->email;
}
if ($_SERVER['REMOTE_ADDR']) {
$result['ip'] = $_SERVER['REMOTE_ADDR'];
}
$result['address'] = array();
if ($address->address1) {
$result['address']['street_house'] = $address->address1;
}
if ($address->address2) {
$result['address']['street_house'] .= ' ' . $address->address2;
}
if ($address->postcode) {
$result['address']['zip'] = $address->postcode;
}
if ($address->city) {
$result['address']['city'] = $address->city;
}
if ($state->name) {
$result['address']['state'] = $state->name;
}
if ($address->country) {
$result['address']['country_code'] = Country::getIsoById((int)$address->id_country);
}
return $result;
}
protected function isOldPresta()
{
return version_compare(_PS_VERSION_, '1.7', '<');
}
protected function fetchTemplate($path)
{
$context = Context::getContext();
if ($this->isOldPresta()) {
return $context->smarty->fetch(_PS_MODULE_DIR_ . 'paylane/views/templates/' . $path);
} else {
return $context->smarty->fetch('module:paylane/views/templates/' . $path);
}
}
}

View File

@@ -0,0 +1,209 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
class SecureForm extends PaymentMethodAbstract
{
protected $paymentType = 'secureform';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
parent::__construct();
}
protected $availableLangs = array(
'pl', 'en', 'de', 'es', 'fr', 'nl', 'it'
);
/*
public function getPaymentOption()
{
$active = (Configuration::get('paylane_payment_mode') === 'SECURE_FORM');
$paymentOption = null;
if ($active) {
$label = Configuration::get('paylane_secureform_label');
$paymentOption = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption();
$paymentOption->setCallToActionText($label)
->setForm($this->generatePaymentForm());
if ((bool)Configuration::get('paylane_secureform_showImg')) {
$paymentOption->setLogo(_MODULE_DIR_ . 'paylane/views/img/payment_methods/secureform.png');
}
}
return $paymentOption;
}
*/
public function getPaymentConfig()
{
return array(
'paylane_secureform_label' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_SECUREFORM_LABEL', 'secureform'),
'default' => $this->paylane->l('PAYLANE_SECUREFORM_DEFAULT', 'secureform'),
),
'paylane_secureform_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_SECUREFORM_SHOW_PAYMENT_METHOD_IMAGE', 'secureform'),
'default' => 1
),
);
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/secureform.tpl');
}
public function getTemplateVars()
{
return array(
'action' => 'https://secure.paylane.com/order/cart.html',
'paymentMethodLabel' => Configuration::get('paylane_secureform_label'),
'data' => $this->getFormData(),
'withImage' => (bool)Configuration::get('paylane_secureform_showImg')
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'paymentMethodLabel' => Configuration::get('paylane_secureform_label'),
'withImage' => (bool)Configuration::get('paylane_secureform_showImg')
));
return $this->fetchTemplate('front/payment_link/secure_form.tpl');
}
protected function getFormData()
{
$result = array();
$context = Context::getContext();
$cookie = $context->cookie;
$currency = new Currency($cookie->id_currency);
$lang = new Language($cookie->id_lang);
$cart = $context->cart;
$hashSalt = Configuration::get('PAYLANE_GENERAL_HASH');
$cookie->payment_type = $this->paymentType;
$result['amount'] = $cart->getOrderTotal();
$result['currency'] = $currency->iso_code;
$result['merchant_id'] = Configuration::get('PAYLANE_GENERAL_MERCHANTID');
$result['description'] = $cart->id;
$result['transaction_description'] = $this->generateTransactionDescription();
$result['transaction_type'] = 'S';
$result['back_url'] = $context->link->getModuleLink('paylane', 'general', array(), true);
$result['language'] = in_array($lang->iso_code, $this->availableLangs) ? $lang->iso_code : 'en';
$hashCode = $hashSalt . '|' . $result['description'] . '|' . $result['amount'] . '|';
$hashCode .= $result['currency'] . '|' . $result['transaction_type'];
$result['hash'] = sha1($hashCode);
if ((bool)Configuration::get('paylane_secureform_send_customer_data')) {
$customerData = $this->getCustomerData();
if (count($customerData) > 0) {
$result = array_merge($result, $customerData);
}
}
return $result;
}
protected function getCustomerData()
{
$context = Context::getContext();
$cart = $context->cart;
$cookie = $context->cookie;
$lang = new Language($cookie->id_lang);
$result = array();
$address = new Address($cart->id_address_invoice);
$state = new State($address->id_state);
if ($address->firstname && $address->lastname) {
$result['customer_name'] = $address->firstname . ' ' . $address->lastname;
}
if ($cookie->email) {
$result['customer_email'] = $cookie->email;
}
if ($address->address1) {
$result['customer_address'] = $address->address1;
}
if ($address->address2) {
$result['customer_address'] .= ' ' . $address->address2;
}
if ($address->postcode) {
$result['customer_zip'] = $address->postcode;
}
if ($address->city) {
$result['customer_city'] = $address->city;
}
if ($state->name) {
$result['customer_state'] = $state->name;
}
if ($address->country) {
if (in_array($lang->iso_code, $this->availableLangs)) {
$result['customer_country'] = Tools::strtoupper($lang->iso_code);
} else {
$result['customer_country'] = 'EN';
}
}
return $result;
}
protected function generateTransactionDescription()
{
$context = Context::getContext();
$cart = $context->cart;
$details = $cart->getSummaryDetails();
$txt = 'Cart #' . $cart->id . '<br> ';
foreach ($details['products'] as $product) {
$txt .= $product['name'] . ' x ' . $product['quantity'] . '<br>';
}
return $txt;
}
}

View File

@@ -0,0 +1,136 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(_PS_MODULE_DIR_ . 'paylane/class/PaymentMethodAbstract.php');
class Sofort extends PaymentMethodAbstract
{
protected $paymentType = 'sofort';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
}
/*
public function getPaymentOption()
{
$active = (boolean)Configuration::get('PAYLANE_SOFORT_ACTIVE');
$paymentOption = null;
if ($active) {
$label = Configuration::get('paylane_sofort_label');
$paymentOption = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption();
$paymentOption->setCallToActionText($label)
->setForm($this->generatePaymentForm());
if ((bool)Configuration::get('paylane_sofort_showImg')) {
$paymentOption->setLogo(_MODULE_DIR_ . 'paylane/views/img/payment_methods/sofort.png');
}
}
return $paymentOption;
}
*/
public function handlePayment($paymentParams)
{
$context = Context::getContext();
$context->cookie->payment_type = $this->paymentType;
$result = array();
$data = array();
$data['sale'] = $this->prepareSaleData();
$data['customer'] = $this->prepareCustomerData();
$data['payment_type'] = $paymentParams['type'];
$data['back_url'] = $paymentParams['back_url'];
if ($this->isOldPresta()) {
$data['back_url'] = $context->link->getModuleLink('paylane', 'general', array(), true);
}
$apiResult = $this->client->sofortSale($data);
if (!empty($apiResult['success']) && $apiResult['success']) {
Tools::redirect($apiResult['redirect_url']);
die;
} else {
$result = array(
'order_status' => 'ERROR',
'success' => $apiResult['success'],
'error' => $apiResult['error']
);
if ($this->isOldPresta()) {
$result['order_status'] = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
}
return $result;
}
public function getPaymentConfig()
{
return array(
'paylane_sofort_label' => array(
'type' => 'text',
'label' => $this->paylane->l('PAYLANE_SOFORT_LABEL', 'sofort'),
'default' => $this->paylane->l('PAYLANE_SOFORT_DEFAULT', 'sofort'),
),
'paylane_sofort_showImg' => array(
'type' => 'select',
'label' => $this->paylane->l('PAYLANE_SOFORT_SHOW_PAYMENT_METHOD_IMAGE', 'sofort'),
'default' => 1
),
);
}
public function generatePaymentForm()
{
$context = Context::getContext();
$context->smarty->assign($this->getTemplateVars());
return $this->fetchTemplate('front/payment_form/sofort.tpl');
}
public function getTemplateVars()
{
$context = Context::getContext();
return array(
'action' => $context->link->getModuleLink('paylane', 'validation', array(), true),
'paymentMethodLabel' => Configuration::get('paylane_sofort_label'),
'withImage' => (bool)Configuration::get('paylane_sofort_showImg')
);
}
public function generatePaymentLinkTemplate()
{
$context = Context::getContext();
$context->smarty->assign(array(
'paymentMethodLabel' => Configuration::get('paylane_sofort_label'),
'withImage' => (bool)Configuration::get('paylane_sofort_showImg')
));
return $this->fetchTemplate('front/payment_link/sofort.tpl');
}
}

View File

@@ -0,0 +1,33 @@
<?php
/*
* 2007-2016 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-2016 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,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>paylane</name>
<displayName><![CDATA[Polskie ePłatności]]></displayName>
<version><![CDATA[2.0.5]]></version>
<description><![CDATA[Przetwarzanie płatności internetowych przez Polskie ePłatności]]></description>
<author><![CDATA[Polskie ePłatności]]></author>
<tab><![CDATA[payments_gateways]]></tab>
<confirmUninstall><![CDATA[Czy na pewno chcesz usunąć swoje dane?]]></confirmUninstall>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,365 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/../../core/core.php');
require_once(dirname(__FILE__).'/paymentStatus.php');
require_once(_PS_MODULE_DIR_ . 'paylane/paylane.php');
class Paylane3dsValidationModuleFrontController extends ModuleFrontController
{
protected $orderConfirmationUrl = 'index.php?controller=order-confirmation';
public function isOldPresta()
{
return version_compare(_PS_VERSION_, '1.7', '<');
}
public function postProcess()
{
if ($this->isOldPresta()) {
$this->postProcess16();
return;
}
$cartId = (int)Tools::getValue('cart_id');
PrestaShopLogger::addLog('process return url', 1, null, 'Cart', $cartId, true);
$orderId = Order::getOrderByCartId($cartId);
PrestaShopLogger::addLog('order id:', 1, null, 'Order', $orderId, true);
$payment = Tools::getValue('payment_method');
if ($payment == 'CREDITCARD') {
$payment = 'CreditCard';
}
if (isset($payment)) {
require_once(_PS_MODULE_DIR_ . 'paylane/class/' . $payment . '.php');
$paylane = new Paylane();
$handler = new $payment($paylane);
try {
$responseStatus = $this->getResponseStatus();
$result = $handler->handle3DSPayment($responseStatus);
if ($result['success']) {
$responseStatus['transaction_id'] = $result['id_sale'];
if (isset($result['order_status'])) {
$orderStatus = $result['order_status'];
} else {
$orderStatus = 'CLEARED';
}
$responseStatus['paylane_status'] = $orderStatus;
$responseStatus['status'] = PaylanePaymentCore::paymentStatus($responseStatus['paylane_status']);
} else {
$errorStatus = PaylanePaymentCore::getErrorMessage(
array('error_text' => $result['error']['error_description'])
);
$this->redirectError($errorStatus);
}
} catch (Exception $e) {
$errorStatus = PaylanePaymentCore::getErrorMessage(array('error_text' => $e->getMessage()));
$this->redirectError($errorStatus);
}
} else {
$responseStatus = $this->getResponseStatus();
}
//$responseStatus = $this->getResponseStatus();
//$result = $this->handle3DSPayment($responseStatus);
PrestaShopLogger::addLog('Paylane - return url order ID:'. $orderId, 1, null, 'Cart', $cartId, true);
$this->checkPaymentStatus($cartId, $responseStatus); //LK
if ($orderId) {
PrestaShopLogger::addLog('validate order', 1, null, 'Cart', $cartId, true);
$this->validateOrder($cartId, $responseStatus['transaction_id']);
} else {
PrestaShopLogger::addLog('prestashop order not found', 1, null, 'Cart', $cartId, true);
//$this->checkPaymentStatus($cartId, $responseStatus); //LK
}
}
protected function getResponseStatus() {
$responseStatus = array();
$responseStatus['paylane_status'] = Tools::getValue('status');
$responseStatus['status'] = PaylanePaymentCore::paymentStatus($responseStatus['paylane_status']);
$responseStatus['amount'] = Tools::getValue('amount');
$responseStatus['currency'] = Tools::getValue('currency');
$responseStatus['description'] = Tools::getValue('description');
$responseStatus['hash'] = Tools::getValue('hash');
$responseStatus['transaction_id'] = Tools::getValue('id_sale');
$responseStatus['payment_method'] = (Tools::getValue('payment_method')) ? Tools::getValue('payment_method') : Tools::getValue('payment_type');
$responseStatus['error_code'] = Tools::getValue('error_code');
$responseStatus['error_text'] = Tools::getValue('error_text');
$responseStatus['id_3dsecure_auth'] = Tools::getValue('id_3dsecure_auth');
return $responseStatus;
}
protected function validateOrder($cartId, $transactionId)
{
$order = $this->module->getOrderByTransactionId($transactionId);
PrestaShopLogger::addLog('transaction log order : '.print_r($order, true), 1, null, 'Cart', $cartId, true);
if (empty($order) || empty($order['order_status'])) {
PrestaShopLogger::addLog('Paylane - status url late', 1, null, 'Cart', $cartId, true);
$this->checkPaymentStatus($cartId, $transactionId);
} elseif ($order['order_status'] == $this->module->failedStatus) {
$paymentResponse = unserialize($order['payment_response']);
$errorStatus = PaylanePaymentCore::getErrorMessage($paymentResponse);
$this->redirectError($errorStatus);
} else {
if ($this->context->cart->OrderExists() == false) {
$responseStatus = $this->getResponseStatus();
PrestaShopLogger::addLog('Paylane - check order from return url', 1, null, 'Cart', $cartId, true);
$this->checkPaymentStatus($cartId, $responseStatus);
} else {
PrestaShopLogger::addLog(
'Paylane - redirect success validate return url',
1,
null,
'Cart',
$cartId,
true
);
$this->redirectSuccess($cartId);
}
}
}
protected function checkPaymentStatus($cartId, $responseStatus)
{
$cart = $this->context->cart;
$fieldParams = array();
PrestaShopLogger::addLog('Paylane - check Payment Status', 1, null, 'Cart', $cartId, true);
PrestaShopLogger::addLog(
'Paylane - check payment status:'. print_r($responseStatus, true),
1,
null,
'Cart',
$cartId,
true
);
if (isset($responseStatus) && $responseStatus['status'] !== '-2') {
$PaymentStatus = new PaylanePaymentStatusModuleFrontController();
$isTransactionLogValid = $PaymentStatus->isTransactionLogValid($responseStatus['transaction_id']);
if (!$isTransactionLogValid) {
$orderTotal = $responseStatus['amount'];
$transactionLog = $PaymentStatus->setTransactionLog($orderTotal, $responseStatus);
PrestaShopLogger::addLog('Paylane - transactionLog: '. print_r($transactionLog, true), 1, null, 'Cart', $cartId, true);
$generatedMd5Sig = $this->module->generateMd5sig($responseStatus);
$isPaymentSignatureEqualsGeneratedSignature =
$this->module->isPaymentSignatureEqualsGeneratedSignature(
$responseStatus['hash'],
$generatedMd5Sig
);
$generatedAntiFraudHash = $this->module->generateAntiFraudHash(
$cartId,
$responseStatus['payment_method'],
$cart->date_add
);
$isFraud = $this->module->isFraud($generatedAntiFraudHash, Tools::getValue('secure_method'));
$additionalInformation =
$PaymentStatus->getAdditionalInformation(
$responseStatus,
$isPaymentSignatureEqualsGeneratedSignature,
$isFraud
);
PrestaShopLogger::addLog(
'Paylane - save transaction log from return URL',
1,
null,
'Cart',
$cartId,
true
);
$PaymentStatus->saveTransactionLog($transactionLog, 0, $additionalInformation);
$PaymentStatus->validatePayment($cartId, $responseStatus, $responseStatus['status']);
}
$this->redirectSuccess($cartId);
} elseif (isset($responseStatus) && $responseStatus['status'] == '-2') {
$PaymentStatus = new PaylanePaymentStatusModuleFrontController();
$currency = $this->context->currency;
$customer = new Customer($cart->id_customer);
$this->module->validateOrder(
(int)$cart->id,
$PaymentStatus->getPaymentStatus($responseStatus),
$amount = sprintf('%01.2f', $cart->getOrderTotal()),
$this->getPaymentName($responseStatus['payment_method']),
null,
array(),
(int)$currency->id,
false,
$customer->secure_key
);
$errorStatus = PaylanePaymentCore::getErrorMessage($responseStatus);
$this->redirectError($errorStatus);
} else {
$this->redirectPaymentReturn();
}
}
protected function getPaymentName($paymentType)
{
$paymentMethod = PaylanePaymentCore::getPaymentMethodByPaymentType($paymentType);
if ($this->module->l('PAYLANE_FRONTEND_PM_'.$paymentType) == 'PAYLANE_FRONTEND_PM_'.$paymentType) {
$paymentName = $paymentMethod['name'];
} else {
$paymentName = $this->module->l('PAYLANE_FRONTEND_PM_'.$paymentType);
}
$isPaylane = strpos($paymentName, 'Paylane');
if ($isPaylane === false) {
$paymentName = 'Paylane '.$paymentName;
}
return $paymentName;
}
protected function redirectError($returnMessage)
{
$this->errors[] = $returnMessage;
$this->redirectWithNotifications($this->context->link->getPageLink('order', true, null, array(
'step' => '3')));
}
protected function redirectPaymentReturn()
{
$url = $this->context->link->getModuleLink('paylane', 'paymentReturn', array(
'secure_key' => $this->context->customer->secure_key), true);
PrestaShopLogger::addLog('rediret to payment return : '.$url, 1, null, 'Cart', $this->context->cart->id, true);
Tools::redirect($url);
exit;
}
protected function redirectSuccess($cartId)
{
Tools::redirect(
$this->orderConfirmationUrl.
'&id_cart='.$cartId.
'&id_module='.(int)$this->module->id.
'&key='.$this->context->customer->secure_key
);
}
public function postProcess16()
{
if (method_exists('Tools', 'getAllValues')) {
$params = Tools::getAllValues();
} else {
$params = $_POST + $_GET;
}
if (isset($params['payment']) && isset($params['payment']['additional_information'])) {
$paymentParams = $params['payment']['additional_information'];
} else {
$paymentParams = null;
}
$idSale = null;
$orderStatus = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
$displayName = $this->module->displayName;
if (!isset($params['payment_type'])){
$params['payment_type'] = 'CreditCard';
}
if (isset($params['payment_type'])) {
require_once(_PS_MODULE_DIR_ . 'paylane/class/' . $params['payment_type'] . '.php');
$paylane = Module::getInstanceByName('paylane');
$paymentParams = $params;
$handler = new $params['payment_type']($paylane);
$result = $handler->handle3DSPayment($paymentParams);
if ($result['success']) {
$idSale = $result['id_sale'];
if (isset($result['order_status'])) {
$orderStatus = $result['order_status'];
} else {
$orderStatus = Configuration::get('PS_OS_PAYMENT');
}
}
$paymentLabelPath = 'paylane_' . Tools::strtolower($params['payment_type']) . '_label';
$displayName .= ' | ' . Configuration::get($paymentLabelPath);
}
$cart = $this->context->cart;
if (!$this->module->checkCurrency($cart)) {
Tools::redirect('index.php?controller=order');
}
$customer = new Customer($cart->id_customer);
$currency = $this->context->currency;
$amount = sprintf('%01.2f', $cart->getOrderTotal());
$extraVars = null;
if (!is_null($idSale)) {
$extraVars = array(
'transaction_id' => $idSale
);
}
if (!Validate::isLoadedObject($customer)) {
Tools::redirect('index.php?controller=order&step=1');
}
$this->module->validateOrder(
(int)$cart->id,
$orderStatus,
$amount,
$displayName,
null,
$extraVars,
(int)$currency->id,
false,
$customer->secure_key
);
$redirectUrl = 'index.php?controller=order-confirmation&id_cart=';
$redirectUrl .= (int)$cart->id.'&id_module='.(int)$this->module->id;
$redirectUrl .= '&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key;
Tools::redirect($redirectUrl);
}
}

View File

@@ -0,0 +1,138 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
/**
* Only Prestashop 1.6
*/
class PaylaneGeneralModuleFrontController extends ModuleFrontController
{
const STATUS_ERROR = 'ERROR';
const STATUS_CLEARED = 'CLEARED';
const STATUS_PENDING = 'PENDING';
const STATUS_PERFORMED = 'PERFORMED';
public $ssl = true;
/**
* @see FrontController::postProcess()
*/
public function postProcess()
{
$cookie = Context::getContext()->cookie;
$paymentType = $cookie->payment_type;
if (!$paymentType) {
Tools::redirect('index.php?controller=order&step=1');
}
if (method_exists('Tools', 'getAllValues')) {
$params = Tools::getAllValues();
} else {
$params = $_POST + $_GET;
}
$status = $params['status'];
$amount = $params['amount'];
$currency = $params['currency'];
$cartId = $params['description'];
$hash = $params['hash'];
$idSale = isset($params['id_sale']) ? $params['id_sale'] : null;
$hashSalt = Configuration::get('PAYLANE_GENERAL_HASH');
$hashCode = $hashSalt . '|' . $status . '|' . $cartId . '|';
$hashCode .= $amount . '|' . $currency . '|' . $idSale;
$hashComputed = sha1($hashCode);
$orderStatus = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
if ($hash === $hashComputed) {
if ($status === self::STATUS_PENDING) {
$orderStatus = Configuration::get('PAYLANE_PAYMENT_STATUS_PENDING');
}
//if ($status === self::STATUS_PERFORMED) {
// $orderStatus = Configuration::get('paylane_order_performed_status');
//}
if ($status === self::STATUS_CLEARED || $status === self::STATUS_PERFORMED) {
$orderStatus = Configuration::get('PS_OS_PAYMENT');
}
if ($status === self::STATUS_ERROR) {
$orderStatus = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
}
} else {
Tools::redirect('index.php?controller=order&step=1');
}
$cart = $this->context->cart;
if (!$this->module->checkCurrency($cart)) {
Tools::redirect('index.php?controller=order');
}
$customer = new Customer($cart->id_customer);
$currency = $this->context->currency;
$extraVars = null;
if (!is_null($idSale)) {
$extraVars = array(
'transaction_id' => $idSale
);
}
if (!Validate::isLoadedObject($customer)) {
Tools::redirect('index.php?controller=order&step=1');
}
$displayName = $this->module->displayName . ' | ' . Configuration::get('paylane_'.$paymentType.'_label');
unset($cookie->payment_type);
if( !($idOrder = Order::getOrderByCartId($cartId)) ) {
$this->module->validateOrder(
(int)$cartId,
$orderStatus,
$amount,
$displayName,
null,
$extraVars,
(int)$currency->id,
false,
$customer->secure_key
);
} else {
$order = new Order($idOrder);
$order->setCurrentState($orderStatus);
}
$redirectUrl = 'index.php?controller=order-confirmation&id_cart=';
$redirectUrl .= (int)$cart->id.'&id_module='.(int)$this->module->id;
$redirectUrl .= '&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key;
Tools::redirect($redirectUrl);
}
}

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,169 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
class Order16 extends Order {
public static function getOrderByCartId_Paylane($id_cart)
{
$sql = 'SELECT *
FROM `'._DB_PREFIX_.'orders`
WHERE `id_cart` = '.(int)$id_cart
.Shop::addSqlRestriction();
$result = Db::getInstance()->getRow($sql);
return isset($result['id_order']) ? new self((int) $result['id_order']) : null;
}
}
class PaylaneNotificationModuleFrontController extends ModuleFrontController
{
const NOTIFICATION_TYPE_SALE = 'S';
const NOTIFICATION_TYPE_REFUND = 'R';
public $ssl = true;
public function initContent()
{
if ($this->isOldPresta()) {
parent::initContent();
}
if (method_exists('Tools', 'getAllValues')) {
$params = Tools::getAllValues();
} else {
$params = $_POST + $_GET;
}
if (!empty(Configuration::get('PAYLANE_NOTIFICATION_USER')) && !empty(Configuration::get('PAYLANE_NOTIFICATION_PASSWORD'))) {
if (!isset($_SERVER['PHP_AUTH_USER'])
|| !isset($_SERVER['PHP_AUTH_PW'])
|| Configuration::get('PAYLANE_NOTIFICATION_USER') != $_SERVER['PHP_AUTH_USER']
|| Configuration::get('PAYLANE_NOTIFICATION_PASSWORD') != $_SERVER['PHP_AUTH_PW']) {
$this->failAuthorization();
}
}
if (empty($params['communication_id'])) {
die('Empty communication id');
}
if (!empty($params['token']) && Configuration::get('PAYLANE_NOTIFICATION_TOKEN') !== $params['token']) {
die('Wrong token');
}
$this->handleAutoMessages($params['content']);
die($params['communication_id']);
}
protected function failAuthorization()
{
// authentication failed
header("WWW-Authenticate: Basic realm=\"Secure Area\"");
header("HTTP/1.0 401 Unauthorized");
exit();
}
public function isOldPresta()
{
return version_compare(_PS_VERSION_, '1.7', '<');
}
protected function handleAutoMessages($messages)
{
foreach ($messages as $message) {
if (empty($message['text'])) {
// Message without Prestashop cart ID - skip
continue;
}
$idSale = $message['id_sale'];
$cartId = $message['text'];
$amount = $message['amount'];
$currCode = $message['currency_code'];
$transType = $message['type'];
// Get order by id_cart
$db = Db::getInstance(_PS_USE_SQL_SLAVE_);
if ($this->isOldPresta()) {
$order = Order16::getOrderByCartId_Paylane($cartId);
} else {
$order = Order::getByCartId($cartId);
}
if (empty($order))
{
$cart = new Cart($cartId);
$customer = new Customer($cart->id_customer);
$currency = new Currency($cart->id_currency);
$total = (float)$cart->getOrderTotal(true, Cart::BOTH);
$this->module->validateOrder(
$cart->id,
Configuration::get('PS_OS_PAYMENT'),
$total,
$this->module->displayName,
null,
array(),
(int)$currency->id,
false,
$customer->secure_key
);
$orderId = Order::getByCartId($cartId);
$db->update('order_payment', array(
'transaction_id' => $idSale,
'payment_method' => $orderId->payment
), 'order_reference = "'.$orderId->reference.'"');
}
if (!empty($order)) {
if ((float) $order->total_paid !== (float) $amount) {
die('Wrong amount');
}
switch ($message['type']) {
case self::NOTIFICATION_TYPE_SALE:
$orderStatus = Configuration::get('PAYLANE_PAYMENT_STATUS_CLEARED');
$order->setCurrentState($orderStatus);
$db->update('order_payment', array(
'transaction_id' => $idSale,
'payment_method' => $order->payment
), 'order_reference = "'.$order->reference.'"');
break;
case self::NOTIFICATION_TYPE_REFUND:
break;
default:
die('Unrecognized message type (' . $message['type'] . ')');
}
}
}
}
}

View File

@@ -0,0 +1,124 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
/**
* Only Prestashop 1.6
*/
class PaylanePaymentModuleFrontController extends ModuleFrontController
{
public $ssl = true;
public $display_column_left = false;
public function __construct()
{
parent::__construct();
$this->display_column_left = false;
}
/**
* @see FrontController::initContent()
*/
public function initContent()
{
parent::initContent();
$cart = $this->context->cart;
if (!$this->module->checkCurrency($cart)) {
Tools::redirect('index.php?controller=order');
}
//if is submit data create order
// if(!empty(Tools::getValue('description')) && !Order::getOrderByCartId(Tools::getValue('description'))) {
// $this->createOrder();
// }
if (method_exists('Tools', 'getAllValues')) {
$params = Tools::getAllValues();
} else {
$params = $_POST + $_GET;
}
if (!isset($params) || !isset($params['payment_type'])) {
Tools::redirect('index.php?controller=order');
} else {
if ($params['payment_type'] == 'Blik') {
$file_name = 'BLIK';
} else {
$file_name = $params['payment_type'];
}
require_once(_PS_MODULE_DIR_ . 'paylane/class/' . $file_name . '.php');
$paylane = Module::getInstanceByName('paylane');
$handler = new $params['payment_type']($paylane);
$templateVars = $handler->getTemplateVars();
$pathSsl = Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'modules/' . $this->module->name . '/';
$this->context->smarty->assign(array_merge(array(
'nbProducts' => $cart->nbProducts(),
'this_path' => $this->module->getPathUri(),
'this_path_bw' => $this->module->getPathUri(),
'this_path_ssl' => $pathSsl
), $templateVars));
if ($params['payment_type'] === 'PayPal') {
$params['payment_type'] = 'Paypal';
}
$this->setTemplate('payment_form/' . $this->toSnakeCase($params['payment_type']) . '16.tpl');
//?paypal
}
}
protected function toSnakeCase($input)
{
preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches);
$ret = $matches[0];
foreach ($ret as &$match) {
$match = $match == Tools::strtoupper($match) ? Tools::strtolower($match) : lcfirst($match);
}
return implode('_', $ret);
}
protected function createOrder(){
die(
$this->module->validateOrder(
(int)$this->context->cart->id,
(int)Configuration::get('PAYLANE_PAYMENT_STATUS_PENDING'),
sprintf('%01.2f', $this->context->cart->getOrderTotal(true, Cart::BOTH)),
'Paylane ',
null,
[],
(int)$this->context->cart->id_currency,
false,
$this->context->customer->secure_key
)
);
}
}

View File

@@ -0,0 +1,224 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/../../core/core.php');
class PaylanePaymentAbstractModuleFrontController extends ModuleFrontController
{
protected $paymentMethod = '';
protected $paymentClass = '';
protected $templateName = 'module:paylane/views/templates/front/paylane_PAYMENT_METHOD.tpl';
//protected $templateName16 = _PS_MODULE_DIR_ . 'paylane/views/templates/front/payment_form/payment16_PAYMENT_METHOD.tpl';
public $ssl = true;
public $display_column_left = false;
public function initContent()
{
parent::initContent();
$cart = $this->context->cart;
$messageLog =
'Paylane - start payment process, method : '. $this->paymentMethod .
' by customer id : ' . $cart->id_customer;
PrestaShopLogger::addLog($messageLog, 1, null, 'Cart', $cart->id, true);
PrestaShopLogger::addLog('Paylane - get post parameters', 1, null, 'Cart', $cart->id, true);
$postParameters = $this->getPostParameters();
$messageLog = 'Paylane - post parameters : ' . print_r($postParameters, true);
PrestaShopLogger::addLog($messageLog, 1, null, 'Cart', $cart->id, true);
PrestaShopLogger::addLog('Paylane - get widget url', 1, null, 'Cart', $cart->id, true);
$redirectUrl = $this->getRedirectUrl();
PrestaShopLogger::addLog('Paylane - widget url : ' . $redirectUrl, 1, null, 'Cart', $cart->id, true);
$this->context->smarty->assign(array(
'fullname' => $this->context->customer->firstname ." ". $this->context->customer->lastname,
'lang' => $this->getLang(),
'redirectUrl' => $redirectUrl, //paylane response
'postParameters' => $postParameters,
'paymentMethod' => $this->paymentMethod,
'total' => $this->context->cart->getOrderTotal(true, Cart::BOTH),
));
/*
if ($this->isOldPresta()) {
$this->context->smarty->assign($this->getTemplateVars());
$templateName = str_replace(
'PAYMENT_METHOD', strtolower($this->paymentMethod), $this->templateName16
);
$this->context->smarty->fetch($templateName);
} else {
$templateName = str_replace(
'PAYMENT_METHOD', strtolower($this->paymentMethod), $this->templateName
);
$this->setTemplate($templateName);
}
*/
$templateName = str_replace(
'PAYMENT_METHOD', strtolower($this->paymentMethod), $this->templateName
);
$this->setTemplate($templateName);
}
protected function isOldPresta()
{
return version_compare(_PS_VERSION_, '1.7', '<');
}
protected function getRedirectUrl() {
return PaylanePaymentCore::getPaylaneRedirectUrl();
}
private function redirectError($returnMessage)
{
$this->errors[] = $this->module->getLocaleErrorMapping($returnMessage);
$this->redirectWithNotifications($this->context->link->getPageLink('order', true, null, array(
'step' => '3')));
}
private function getPostParameters()
{
$cart = $this->context->cart;
$contextLink = $this->context->link;
$customer = new Customer($cart->id_customer);
$address = new Address((int)$cart->id_address_delivery);
$country = new Country($address->id_country);
$currency = new Currency((int)$cart->id_currency);
$cartDetails = $cart->getSummaryDetails();
$dateTime = PaylanePaymentCore::getDateTime();
$paylaneSettings = $this->getPaylaneSettings();
if (empty($paylaneSettings['merchant_id'])
|| empty($paylaneSettings['hash'])
) {
$messageLog = 'Paylane - general setting is not completed. either of the parameter is not filled';
PrestaShopLogger::addLog($messageLog, 3, null, 'Cart', $cart->id, true);
$this->redirectError('ERROR_GENERAL_REDIRECT');
}
$postParameters = array();
$postParameters['merchant_id'] = $paylaneSettings['merchant_id'];
$postParameters['public_key_api'] = $paylaneSettings['public_key_api'];
$postParameters['transaction_id'] = str_pad((int)($cart->id), 4, "0", STR_PAD_LEFT);
$postParameters['return_url'] = $contextLink->getModuleLink(
'paylane',
'validation',
array('cart_id' => $cart->id, 'secure_key' => $customer->secure_key, 'payment_method' => $this->paymentMethod),
true
);
$postParameters['3dsreturn_url'] = $contextLink->getModuleLink(
'paylane',
'3dsvalidation',
array('cart_id' => $cart->id, 'secure_key' => $customer->secure_key, 'payment_method' => $this->paymentMethod),
true
);
$postParameters['status_url'] = $this->getStatusUrl();
$postParameters['cancel_url'] = $contextLink->getPageLink('order', true, null, array('step' => '3'));
$postParameters['language'] = strtolower($this->getLang());
$postParameters['customer_email'] = $this->context->customer->email;
$postParameters['customer_firstname'] = $this->context->customer->firstname;
$postParameters['customer_lastname'] = $this->context->customer->lastname;
$postParameters['customer_address'] = $address->address1;
$postParameters['customer_zip'] = $address->postcode;
$postParameters['customer_city'] = $address->city;
$postParameters['customer_country'] = $country->iso_code;
$postParameters['amount'] = $cart->getOrderTotal(true, Cart::BOTH);
$postParameters['hash'] = PaylanePaymentCore::generateHash(
str_pad((int)($cart->id), 4, "0", STR_PAD_LEFT),
(float)($cart->getOrderTotal(true)),
$currency->iso_code,
'S'
);
$postParameters['transaction_type'] = 'S';
$postParameters['currency'] = $currency->iso_code;
$postParameters['transaction_description'] = $this->getProductsName($cart->getProducts());
$messageLog = 'Paylane - get post parameters : ' . print_r($postParameters, true);
return array_merge($postParameters, $this->getTemplateVars());
}
protected function getTemplateVars() {
return array();
}
private function getProductsName($products)
{
$description = array();
foreach($products as $product) {
$description[] = $product['name'];
}
return implode(',', $description);
}
private function getStatusUrl()
{
$cart = $this->context->cart;
$cartId = $this->context->cart->id;
$paymentMethod = $this->paymentMethod;
$cartDate = $cart->date_add;
$statusUrl = $this->context->link->getModuleLink(
'paylane',
'paymentStatus',
array(
'payment_method' => $this->paymentMethod,
'cart_id' => $cartId,
'payment_key' => $this->module->generateAntiFraudHash($cartId, $paymentMethod, $cartDate)
),
true
);
return $statusUrl;
}
private function getLang()
{
$cart = $this->context->cart;
$language = new Language((int)$cart->id_lang);
$languageCode = $language->iso_code;
return Tools::strtoupper($languageCode);
}
private function getPaylaneSettings()
{
$paylaneSettings = array();
$paylaneSettings['merchant_id'] = Configuration::get('PAYLANE_GENERAL_MERCHANTID');
$paylaneSettings['hash'] = Configuration::get('PAYLANE_GENERAL_HASH');
$paylaneSettings['login_api'] = Configuration::get('PAYLANE_GENERAL_LOGIN_API');
$paylaneSettings['public_key_api'] = Configuration::get('PAYLANE_GENERAL_PUBLIC_KEY_API');
$paylaneSettings['password_api'] = Configuration::get('PAYLANE_GENERAL_PASSWORD_API');
return $paylaneSettings;
}
}

View File

@@ -0,0 +1,39 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/ApplePay.php');
class PaylanePaymentApplepayModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'APPLEPAY';
public function getTemplateVars()
{
$payment = new ApplePay();
return $payment->getTemplateVars();
}
}

View File

@@ -0,0 +1,40 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/BankTransfer.php');
require_once(_PS_MODULE_DIR_ . 'paylane/paylane.php');
class PaylanePaymentBanktransferModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'BANKTRANSFER';
public function getTemplateVars()
{
$paylane = new Paylane();
$payment = new BankTransfer($paylane);
return $payment->getTemplateVars();
}
}

View File

@@ -0,0 +1,41 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/BLIK.php');
require_once(_PS_MODULE_DIR_ . 'paylane/paylane.php');
class PaylanePaymentBlikModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'BLIK';
public function getTemplateVars()
{
$paylane = new Paylane();
$payment = new Blik($paylane);
return $payment->getTemplateVars();
}
}

View File

@@ -0,0 +1,41 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/CreditCard.php');
require_once(_PS_MODULE_DIR_ . 'paylane/paylane.php');
class PaylanePaymentCreditcardModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'CREDITCARD';
public function getTemplateVars()
{
$paylane = new Paylane();
$payment = new CreditCard($paylane);
return $payment->getTemplateVars();
}
}

View File

@@ -0,0 +1,38 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/DirectDebit.php');
class PaylanePaymentDirectdebitModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'DIRECTDEBIT';
public function getTemplateVars()
{
$payment = new DirectDebit();
return $payment->getTemplateVars();
}
}

View File

@@ -0,0 +1,39 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/GooglePay.php');
class PaylanePaymentGooglePayModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'GOOGLEPAY';
public function getTemplateVars()
{
$payment = new GooglePay();
return $payment->getTemplateVars();
}
}

View File

@@ -0,0 +1,38 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/Ideal.php');
class PaylanePaymentIdealModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'IDEAL';
public function getTemplateVars()
{
$payment = new Ideal();
return $payment->getTemplateVars();
}
}

View File

@@ -0,0 +1,41 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/PayPal.php');
require_once(_PS_MODULE_DIR_ . 'paylane/paylane.php');
class PaylanePaymentPaypalModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'PAYPAL';
public function getTemplateVars()
{
$paylane = new Paylane();
$payment = new PayPal($paylane);
return $payment->getTemplateVars();
}
}

View File

@@ -0,0 +1,38 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
class PaylanePaymentReturnModuleFrontController extends ModuleFrontController
{
public function initContent()
{
parent::initContent();
$this->context->smarty->assign(array(
'shop_name' => $this->context->shop->name
));
$this->setTemplate('module:paylane/views/templates/front/payment_return.tpl');
}
}

View File

@@ -0,0 +1,37 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
class PaylanePaymentSecureformModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'SECUREFORM';
protected function getRedirectUrl() {
return PaylanePaymentCore::getPaylaneRedirectSecureFormUrl();
}
}

View File

@@ -0,0 +1,39 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/paymentAbstract.php');
require_once(_PS_MODULE_DIR_ . 'paylane/class/Sofort.php');
class PaylanePaymentSofortModuleFrontController extends PaylanePaymentAbstractModuleFrontController
{
protected $paymentMethod = 'SOFORT';
public function getTemplateVars()
{
$payment = new Sofort();
return $payment->getTemplateVars();
}
}

View File

@@ -0,0 +1,381 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
class PaylanePaymentStatusModuleFrontController extends ModuleFrontController
{
public function postProcess()
{
$status = Tools::getValue('status');
if ($status) {
$cartId = Tools::getValue('cart_id');
$orderId = Order::getOrderByCartId($cartId);
Context::getContext()->cart = new Cart((int)$cartId);
PrestaShopLogger::addLog('Paylane - use status_url', 1, null, 'Cart', $cartId, true);
PrestaShopLogger::addLog('Paylane - get payment response from status_url', 1, null, 'Cart', $cartId, true);
$paymentResponse = $this->getPaymentResponse();
$messageLog = 'Paylane - payment response from status_url : ' . print_r($paymentResponse, true);
PrestaShopLogger::addLog($messageLog, 1, null, 'Cart', $cartId, true);
$orderId = Order::getOrderByCartId($cartId);
$isTransactionLogValid = $this->isTransactionLogValid($paymentResponse['transaction_id']);
$order = $this->module->getOrderByTransactionId($paymentResponse['transaction_id']);
if (!$isTransactionLogValid) {
$cart = $this->context->cart;
$orderTotal = $paymentResponse['amount'];
$transactionLog = $this->setTransactionLog($orderTotal, $paymentResponse);
$generatedMd5Sig = $this->module->generateMd5sig($paymentResponse);
$isPaymentSignatureEqualsGeneratedSignature = $this->module->isPaymentSignatureEqualsGeneratedSignature(
$paymentResponse['md5sig'],
$generatedMd5Sig
);
$generatedAntiFraudHash = $this->module->generateAntiFraudHash(
$cartId,
$this->getPaymentMethod(),
$cart->date_add
);
$isFraud = $this->module->isFraud($generatedAntiFraudHash, Tools::getValue('secure_payment'));
$additionalInformation =
$this->getAdditionalInformation(
$paymentResponse,
$isPaymentSignatureEqualsGeneratedSignature,
$isFraud
);
PrestaShopLogger::addLog(
'Paylane - save transaction log from status URL',
1,
null,
'Cart',
$cartId,
true
);
$this->saveTransactionLog($transactionLog, 0, $additionalInformation);
if ($orderId) {
$order = $this->module->getOrderByTransactionId($paymentResponse['transaction_id']);
$messageLog = 'Paylane - use status_url on existed order';
PrestaShopLogger::addLog($messageLog, 1, null, 'Order', $orderId, true);
if ($order['order_status'] == $this->module->pendingStatus) {
$messageLog = 'Paylane - use status_url on pending status';
PrestaShopLogger::addLog($messageLog, 1, null, 'Order', $orderId, true);
$this->updateTransactionLog($paymentResponse, $order['id_order']);
$this->module->updatePaymentStatus($order['id_order'], $paymentResponse['status']);
}
die('ok');
}
$this->validatePayment($cartId, $paymentResponse);
}
} else {
$messageLog = 'Paylane - no payment response from gateway';
PrestaShopLogger::addLog($messageLog, 3, null, 'Cart', 0, true);
die('no response from gateway.');
}
die('end');
}
public function validatePayment($cartId, $paymentResponse, $status = '')
{
Context::getContext()->cart = new Cart((int)$cartId);
$cart = $this->context->cart;
Context::getContext()->currency = new Currency((int)$cart->id_currency);
$customer = new Customer($cart->id_customer);
$messageLog =
'Paylane - Module Status : '. $this->module->active .
', Customer Id : '. $cart->id_customer .
', Delivery Address : '. $cart->id_address_delivery .
', Invoice Address : '. $cart->id_address_invoice;
PrestaShopLogger::addLog($messageLog, 1, null, 'Cart', $cart->id, true);
if ($cart->id_customer == 0 || $cart->id_address_delivery == 0
|| $cart->id_address_invoice == 0 || !$this->module->active
|| !Validate::isLoadedObject($customer)) {
PrestaShopLogger::addLog('Paylane - customer datas are not valid', 3, null, 'Cart', $cart->id, true);
die('Erreur etc.');
}
$this->processSuccessPayment($customer, $paymentResponse, $status);
}
protected function processSuccessPayment($customer, $paymentResponse, $status)
{
$cart = $this->context->cart;
$cartId = $cart->id;
$currency = $this->context->currency;
if ($paymentResponse['status'] == $this->module->clearedStatus
|| $paymentResponse['status'] == $this->module->pendingStatus
|| $paymentResponse['status'] == $this->module->performedStatus
) {
$generatedMd5Sig = $this->module->generateMd5sig($paymentResponse);
$isPaymentSignatureEqualsGeneratedSignature =
$this->module->isPaymentSignatureEqualsGeneratedSignature(
$paymentResponse['hash'],
$generatedMd5Sig
);
$generatedAntiFraudHash =
$this->module->generateAntiFraudHash($cartId, $this->getPaymentMethod(), $cart->date_add);
$isFraud = false;
if (!empty(Tools::getValue('payment_key'))) {
$isFraud = $this->module->isFraud($generatedAntiFraudHash, Tools::getValue('payment_key'));
}
if (!$isPaymentSignatureEqualsGeneratedSignature && !empty($paymentResponse['hash'])) {
$paymentResponse['status'] = $this->module->failedStatus;
$messageLog = 'Paylane - invalid credential detected';
PrestaShopLogger::addLog($messageLog, 1, null, 'Cart', $cartId, true);
} elseif ($isFraud) {
$paymentResponse['status'] = $this->module->fraudStatus;
$messageLog = 'Paylane - fraud detected';
PrestaShopLogger::addLog($messageLog, 1, null, 'Cart', $cartId, true);
}
} else {
$errorMessage = 'PAYLANE_ERROR_99_GENERAL';
if ($paymentResponse['status'] == $this->module->failedStatus
&& isset($paymentResponse['error_code'])) {
$errorMessage = $this->getErrorMessage($paymentResponse);
}
$messageLog = 'Paylane - order has not been successfully created : '. $errorMessage;
PrestaShopLogger::addLog($messageLog, 3, null, 'Cart', $cartId, true);
die('payment failed');
}
$orderTotal = $paymentResponse['amount'];
$transactionLog = $this->setTransactionLog($orderTotal, $paymentResponse);
PrestaShopLogger::addLog('Paylane - get payment status', 1, null, 'Cart', $cartId, true);
if (!empty($status)) {
$paymentResponse['status'] = $status;
}
$paymentStatus = $this->getPaymentStatus($paymentResponse);
PrestaShopLogger::addLog('Paylane - payment status : '. $paymentStatus, 1, null, 'Cart', $cartId, true);
if(!($idOrder = Order::getOrderByCartId($cartId)) ) {
$this->module->validateOrder(
$cartId,
$paymentStatus,
$transactionLog['amount'],
$transactionLog['payment_name'],
null,
array(),
$currency->id,
false,
$customer->secure_key
);
}
// } else {
// $order = new Order($idOrder);
// $order->setCurrentState($paymentStatus);
// }
$orderId = $this->module->currentOrder;
$this->context->cookie->paylane_paymentName = $transactionLog['payment_name'];
$serializedResponse = serialize($paymentResponse);
$this->updateTransactionLog(
$paymentResponse['transaction_id'],
$paymentResponse,
$serializedResponse,
$orderId
);
$messageLog = 'Paylane - order ('. $orderId .') has been successfully created';
PrestaShopLogger::addLog($messageLog, 1, null, 'Cart', $cartId, true);
}
protected function getPaymentResponse()
{
$paymentResponse = array();
foreach ($_REQUEST as $parameter => $value) {
$parameter = Tools::strtolower($parameter);
$paymentResponse[$parameter] = $value;
}
$paymentResponse['paylane_status'] = $paymentResponse['status'];
$paymentResponse['status'] = PaylanePaymentCore::paymentStatus($paymentResponse['paylane_status']);
return $paymentResponse;
}
public function getPaymentStatus($paymentResponse)
{
switch ($paymentResponse['status']) {
case $this->module->pendingStatus:
return Configuration::get('PAYLANE_PAYMENT_STATUS_PENDING');
case $this->module->performedStatus:
return Configuration::get('PAYLANE_PAYMENT_STATUS_PERFORMED');
case $this->module->failedStatus:
return Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
default:
return Configuration::get('PS_OS_PAYMENT');
}
}
public function setTransactionLog($orderTotal, $paymentResponse)
{
$transactionLog = array();
$transactionLog['transaction_id'] = $paymentResponse['transaction_id'];
$transactionLog['payment_type'] = $this->getPaymentType($paymentResponse);
$transactionLog['payment_method'] = 'PAYLANE_FRONTEND_PM_'.$this->getPaymentMethod();
$transactionLog['payment_name'] = $this->getPaymentName($transactionLog['payment_type']);
$transactionLog['status'] = $paymentResponse['status'];
$transactionLog['currency'] = $paymentResponse['currency'];
$transactionLog['amount'] = $this->getPaymentAmount($orderTotal, $paymentResponse);
$transactionLog['payment_response'] = serialize($paymentResponse);
return $transactionLog;
}
protected function getPaymentMethod()
{
return (Tools::getValue('payment_method')) ? Tools::getValue('payment_method') : Tools::getValue('payment_type');
}
protected function getPaymentType($paymentResponse)
{
return $paymentResponse['payment_method'];
}
protected function getPaymentName($paymentType)
{
$paymentMethod = PaylanePaymentCore::getPaymentMethodByPaymentType($paymentType);
if ($this->module->l('PAYLANE_FRONTEND_PM_'.$paymentType) == 'PAYLANE_FRONTEND_PM_'.$paymentType) {
$paymentName = $paymentMethod['name'];
} else {
$paymentName = $this->module->l('PAYLANE_FRONTEND_PM_'.$paymentType);
}
$isPaylane = strpos($paymentName, 'Paylane');
if ($isPaylane === false) {
$paymentName = 'Paylane '.$paymentName;
}
return $paymentName;
}
protected function getPaymentAmount($orderTotal, $paymentResponse)
{
if (!empty($paymentResponse['amount'])) {
return $paymentResponse['amount'];
}
return $orderTotal;
}
public function getAdditionalInformation($paymentResponse, $isFraud)
{
$additionalInfo = array();
if (isset($paymentResponse['ip_country'])) {
$additionalInfo['PAYLANE_BACKEND_ORDER_ORIGIN'] = $paymentResponse['ip_country'];
}
if ($isFraud) {
$additionalInfo['BACKEND_TT_FRAUD'] = $paymentResponse['status'];
}
return serialize($additionalInfo);
}
public function saveTransactionLog($transactionLog, $orderId, $additionalInformation)
{
$sql = "INSERT INTO "._DB_PREFIX_."endora_paylane_order_ref (
id_order,
transaction_id,
payment_method,
order_status,
ref_id,
payment_code,
currency,
amount,
add_information,
payment_response
)
VALUES "."('".
(int)$orderId."','".
pSQL($transactionLog['transaction_id'])."','".
pSQL($transactionLog['payment_method'])."','".
pSQL($transactionLog['status'])."','".
pSQL($transactionLog['transaction_id'])."','".
pSQL($transactionLog['payment_type'])."','".
pSQL($transactionLog['currency'])."','".
(float)$transactionLog['amount']."','".
pSQL($additionalInformation)."','".
pSQL($transactionLog['payment_response']).
"')";
PrestaShopLogger::addLog('Paylane - save transaction log : ' . $sql, 1, null, 'Order', $orderId, true);
if (!Db::getInstance()->execute($sql)) {
PrestaShopLogger::addLog('Paylane - failed when saving transaction log', 3, null, 'Order', $orderId, true);
die('Erreur etc.');
}
PrestaShopLogger::addLog('Paylane - transaction log succefully saved', 1, null, 'Order', $orderId, true);
}
protected function updateTransactionLog($transactionId, $paymentResponse, $serializedResponse, $orderId)
{
$sql = "UPDATE "._DB_PREFIX_."endora_paylane_order_ref SET
id_order = '".pSQL($orderId)."',
order_status = '".pSQL($paymentResponse['status'])."',
payment_response = '".pSQL($serializedResponse)."'
where transaction_id = '".pSQL($transactionId)."'";
$messageLog = 'Paylane - update payment response from status_url : ' . $sql;
PrestaShopLogger::addLog($messageLog, 1, null, 'Order', $orderId, true);
if (!Db::getInstance()->execute($sql)) {
$messageLog = 'Paylane - failed when updating payment response from status_url';
PrestaShopLogger::addLog($messageLog, 3, null, 'Order', $orderId, true);
die('Erreur etc.');
}
PrestaShopLogger::addLog('Paylane - status_url response succefully updated', 1, null, 'Order', $orderId, true);
}
public function isTransactionLogValid($transactionId)
{
$order = $this->module->getOrderByTransactionId($transactionId);
// var_dump($order);exit;
$messageLog = 'Paylane - existing order : ' . print_r($order, true);
PrestaShopLogger::addLog($messageLog, 1, null, 'Cart', $this->context->cart->id, true);
if (!empty($order)) {
return true;
} else {
return false;
}
}
}

View File

@@ -0,0 +1,358 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
require_once(dirname(__FILE__).'/../../core/core.php');
require_once(dirname(__FILE__).'/paymentStatus.php');
require_once(_PS_MODULE_DIR_ . 'paylane/paylane.php');
class PaylaneValidationModuleFrontController extends ModuleFrontController
{
protected $orderConfirmationUrl = 'index.php?controller=order-confirmation';
public function isOldPresta()
{
return version_compare(_PS_VERSION_, '1.7', '<');
}
public function postProcess()
{
if ($this->isOldPresta()) {
$this->postProcess16();
return;
}
$cartId = (int)Tools::getValue('cart_id');
PrestaShopLogger::addLog('process return url', 1, null, 'Cart', $cartId, true);
$orderId = Order::getOrderByCartId($cartId);
PrestaShopLogger::addLog('order id:', 1, null, 'Order', $orderId, true);
$payment = Tools::getValue('payment');
$paymentParams = null;
if (isset($payment) && isset($payment['additional_information'])) {
$paymentParams = $payment['additional_information'];
}
if (isset($paymentParams['type'])) {
require_once(_PS_MODULE_DIR_ . 'paylane/class/' . $paymentParams['type'] . '.php');
$paylane = new Paylane();
$handler = new $paymentParams['type']($paylane);
try {
$responseStatus = $this->getResponseStatus();
$result = $handler->handlePayment($paymentParams);
if ($result['success']) {
$responseStatus['transaction_id'] = $result['id_sale'];
if (isset($result['order_status'])) {
$orderStatus = $result['order_status'];
} else {
$orderStatus = 'CLEARED';
}
$responseStatus['paylane_status'] = $orderStatus;
$responseStatus['status'] = PaylanePaymentCore::paymentStatus($responseStatus['paylane_status']);
} else {
$errorStatus = PaylanePaymentCore::getErrorMessage(
array('error_text' => $result['error']['error_description'])
);
$this->redirectError($errorStatus);
}
} catch (Exception $e) {
$errorStatus = PaylanePaymentCore::getErrorMessage(array('error_text' => $e->getMessage()));
$this->redirectError($errorStatus);
}
} else {
$responseStatus = $this->getResponseStatus();
}
PrestaShopLogger::addLog('Paylane - return url order ID:'. $orderId, 1, null, 'Cart', $cartId, true);
$this->checkPaymentStatus($cartId, $responseStatus); //LK
if ($orderId) {
PrestaShopLogger::addLog('validate order', 1, null, 'Cart', $cartId, true);
$this->validateOrder($cartId, $responseStatus['transaction_id']);
} else {
PrestaShopLogger::addLog('prestashop order not found', 1, null, 'Cart', $cartId, true);
//$this->checkPaymentStatus($cartId, $responseStatus); //LK
}
}
protected function getResponseStatus() {
$responseStatus = array();
$responseStatus['paylane_status'] = Tools::getValue('status');
$responseStatus['status'] = PaylanePaymentCore::paymentStatus($responseStatus['paylane_status']);
$responseStatus['amount'] = Tools::getValue('amount');
$responseStatus['currency'] = Tools::getValue('currency');
$responseStatus['description'] = Tools::getValue('description');
$responseStatus['hash'] = Tools::getValue('hash');
$responseStatus['transaction_id'] = Tools::getValue('id_sale');
$responseStatus['payment_method'] = (Tools::getValue('payment_method')) ? Tools::getValue('payment_method') : Tools::getValue('payment_type');
$responseStatus['error_code'] = Tools::getValue('error_code');
$responseStatus['error_text'] = Tools::getValue('error_text');
return $responseStatus;
}
protected function validateOrder($cartId, $transactionId)
{
$order = $this->module->getOrderByTransactionId($transactionId);
PrestaShopLogger::addLog('transaction log order : '.print_r($order, true), 1, null, 'Cart', $cartId, true);
if (empty($order) || empty($order['order_status'])) {
PrestaShopLogger::addLog('Paylane - status url late', 1, null, 'Cart', $cartId, true);
$this->checkPaymentStatus($cartId, $transactionId);
} elseif ($order['order_status'] == $this->module->failedStatus) {
$paymentResponse = unserialize($order['payment_response']);
$errorStatus = PaylanePaymentCore::getErrorMessage($paymentResponse);
$this->redirectError($errorStatus);
} else {
if ($this->context->cart->OrderExists() == false) {
$responseStatus = $this->getResponseStatus();
PrestaShopLogger::addLog('Paylane - check order from return url', 1, null, 'Cart', $cartId, true);
$this->checkPaymentStatus($cartId, $responseStatus);
} else {
PrestaShopLogger::addLog(
'Paylane - redirect success validate return url',
1,
null,
'Cart',
$cartId,
true
);
$this->redirectSuccess($cartId);
}
}
}
protected function checkPaymentStatus($cartId, $responseStatus)
{
$cart = $this->context->cart;
$fieldParams = array();
PrestaShopLogger::addLog('Paylane - check Payment Status', 1, null, 'Cart', $cartId, true);
PrestaShopLogger::addLog(
'Paylane - check payment status:'. print_r($responseStatus, true),
1,
null,
'Cart',
$cartId,
true
);
if (isset($responseStatus) && $responseStatus['status'] !== '-2') {
$PaymentStatus = new PaylanePaymentStatusModuleFrontController();
$isTransactionLogValid = $PaymentStatus->isTransactionLogValid($responseStatus['transaction_id']);
if (!$isTransactionLogValid) {
$orderTotal = $responseStatus['amount'];
$transactionLog = $PaymentStatus->setTransactionLog($orderTotal, $responseStatus);
PrestaShopLogger::addLog('Paylane - transactionLog: '. print_r($transactionLog, true), 1, null, 'Cart', $cartId, true);
$generatedMd5Sig = $this->module->generateMd5sig($responseStatus);
$isPaymentSignatureEqualsGeneratedSignature =
$this->module->isPaymentSignatureEqualsGeneratedSignature(
$responseStatus['hash'],
$generatedMd5Sig
);
$generatedAntiFraudHash = $this->module->generateAntiFraudHash(
$cartId,
$responseStatus['payment_method'],
$cart->date_add
);
$isFraud = $this->module->isFraud($generatedAntiFraudHash, Tools::getValue('secure_method'));
$additionalInformation =
$PaymentStatus->getAdditionalInformation(
$responseStatus,
$isPaymentSignatureEqualsGeneratedSignature,
$isFraud
);
PrestaShopLogger::addLog(
'Paylane - save transaction log from return URL',
1,
null,
'Cart',
$cartId,
true
);
$PaymentStatus->saveTransactionLog($transactionLog, 0, $additionalInformation);
$PaymentStatus->validatePayment($cartId, $responseStatus, $responseStatus['status']);
}
$this->redirectSuccess($cartId);
} elseif (isset($responseStatus) && $responseStatus['status'] == '-2') {
$PaymentStatus = new PaylanePaymentStatusModuleFrontController();
$currency = $this->context->currency;
$customer = new Customer($cart->id_customer);
$this->module->validateOrder(
(int)$cart->id,
$PaymentStatus->getPaymentStatus($responseStatus),
$amount = sprintf('%01.2f', $cart->getOrderTotal()),
$this->getPaymentName($responseStatus['payment_method']),
null,
array(),
(int)$currency->id,
false,
$customer->secure_key
);
$errorStatus = PaylanePaymentCore::getErrorMessage($responseStatus);
$this->redirectError($errorStatus);
} else {
$this->redirectPaymentReturn();
}
}
protected function getPaymentName($paymentType)
{
$paymentMethod = PaylanePaymentCore::getPaymentMethodByPaymentType($paymentType);
if ($this->module->l('PAYLANE_FRONTEND_PM_'.$paymentType) == 'PAYLANE_FRONTEND_PM_'.$paymentType) {
$paymentName = $paymentMethod['name'];
} else {
$paymentName = $this->module->l('PAYLANE_FRONTEND_PM_'.$paymentType);
}
$isPaylane = strpos($paymentName, 'Paylane');
if ($isPaylane === false) {
$paymentName = 'Paylane '.$paymentName;
}
return $paymentName;
}
protected function redirectError($returnMessage)
{
$this->errors[] = $returnMessage;
$this->redirectWithNotifications($this->context->link->getPageLink('order', true, null, array(
'step' => '3')));
}
protected function redirectPaymentReturn()
{
$url = $this->context->link->getModuleLink('paylane', 'paymentReturn', array(
'secure_key' => $this->context->customer->secure_key), true);
PrestaShopLogger::addLog('rediret to payment return : '.$url, 1, null, 'Cart', $this->context->cart->id, true);
Tools::redirect($url);
exit;
}
protected function redirectSuccess($cartId)
{
Tools::redirect(
$this->orderConfirmationUrl.
'&id_cart='.$cartId.
'&id_module='.(int)$this->module->id.
'&key='.$this->context->customer->secure_key
);
}
public function postProcess16()
{
if (method_exists('Tools', 'getAllValues')) {
$params = Tools::getAllValues();
} else {
$params = $_POST + $_GET;
}
if (isset($params['payment']) && isset($params['payment']['additional_information'])) {
$paymentParams = $params['payment']['additional_information'];
} else {
$paymentParams = null;
}
$idSale = null;
$orderStatus = Configuration::get('PAYLANE_PAYMENT_STATUS_FAILED');
$displayName = $this->module->displayName;
if (isset($params['payment_type'])) {
require_once(_PS_MODULE_DIR_ . 'paylane/class/' . $params['payment_type'] . '.php');
$paylane = Module::getInstanceByName('paylane');
$handler = new $params['payment_type']($paylane);
$result = $handler->handlePayment($paymentParams);
if ($result['success']) {
$idSale = $result['id_sale'];
if (isset($result['order_status'])) {
$orderStatus = $result['order_status'];
} else {
$orderStatus = Configuration::get('PS_OS_PAYMENT');
}
}
$paymentLabelPath = 'paylane_' . Tools::strtolower($params['payment_type']) . '_label';
$displayName .= ' | ' . Configuration::get($paymentLabelPath);
}
$cart = $this->context->cart;
if (!$this->module->checkCurrency($cart)) {
Tools::redirect('index.php?controller=order');
}
$customer = new Customer($cart->id_customer);
$currency = $this->context->currency;
$amount = sprintf('%01.2f', $cart->getOrderTotal());
$extraVars = null;
if (!is_null($idSale)) {
$extraVars = array(
'transaction_id' => $idSale
);
}
if (!Validate::isLoadedObject($customer)) {
Tools::redirect('index.php?controller=order&step=1');
}
$this->module->validateOrder(
(int)$cart->id,
$orderStatus,
$amount,
$displayName,
null,
$extraVars,
(int)$currency->id,
false,
$customer->secure_key
);
$redirectUrl = 'index.php?controller=order-confirmation&id_cart=';
$redirectUrl .= (int)$cart->id.'&id_module='.(int)$this->module->id;
$redirectUrl .= '&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key;
Tools::redirect($redirectUrl);
}
}

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,745 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
class PaylanePaymentCore
{
protected static $paylaneSecureFormUrl = 'https://secure.paylane.com/order/cart.html';
protected static $paylaneApiUrl = '';
private $paylane;
public function __construct(Module $paylane) {
$this->paylane = $paylane;
}
public static $allowedCountries = array(
'ALA','ALB','DZA','ASM','AND','AGO','AIA','ATA','ATG','ARG','ARM','ABW','AUS','AUT','AZE','BHS','BHR','BGD',
'BRB','BLR','BEL','BLZ','BEN','BMU','BTN','BOL','BIH','BWA','BVT','BRA','BRN','BGR','BFA','BDI','KHM','CMR',
'CAN','CPV','CYM','CAF','TCD','CHL','CHN','CXR','CCK','COL','COM','COG','COD','COK','CRI','CIV','HRV','CYP',
'CZE','DNK','DJI','DMA','DOM','ECU','EGY','SLV','GNQ','ERI','EST','ETH','FLK','FRO','FJI','FIN','FRA','GUF',
'PYF','ATF','GAB','GMB','GEO','DEU','GHA','GIB','GRC','GRL','GRD','GLP','GUM','GTM','GGY','HTI','HMD','VAT',
'GIN','GNB','GUY','HND','HKG','HUN','ISL','IND','IDN','IRL','IMN','ISR','ITA','JAM','JPN','JEY','JOR','KAZ',
'KEN','KIR','KOR','KWT','LAO','LVA','LBN','LSO','LBR','LIE','LTU','LUX','MAC','MKD','MDG','MWI','MYS','MDV',
'MLI','MLT','MHL','MTQ','MRT','MUS','MYT','MEX','FSM','MDA','MCO','MNG','MNE','MSR','MAR','MOZ','MMR','NAM',
'NPL','NLD','ANT','NCL','NZL','NIC','NER','NGA','NIU','NFK','MNP','NOR','OMN','PAK','PLW','PSE','PAN','PNG',
'PRY','PER','PHL','PCN','POL','PRT','PRI','QAT','REU','ROU','RUS','RWA','SHN','KNA','LCA','MAF','SPM','VCT',
'WSM','SMR','STP','SAU','SEN','SRB','SYC','SLE','SGP','SVK','SVN','SLB','SOM','ZAF','SGS','ESP','LKA','SUR',
'SJM','SWZ','SWE','CHE','TWN','TJK','TZA','THA','TLS','TGO','TKL','TON','TTO','TUN','TUR','TKM','TCA','TUV',
'UGA','UKR','ARE','GBR','USA','UMI','URY','UZB','VUT','VEN','VNM','VGB','VIR','WLF','ESH','YEM','ZMB','ZWE'
);
public static $unallowedCountries = array(
// 'AFG','CUB','ERI','IRN','IRQ','JPN','KGZ','LBY','PRK','SDN','SSD','SYR'
);
public static $paymentMethods = array (
'SECUREFORM' => array(
'name' => 'Paylane SecureForm',
'allowedCountries' => 'ALL'
),
'CREDITCARD' => array(
'name' => 'Paylane CreditCard',
'allowedCountries' => 'ALL'
),
'BANKTRANSFER' => array(
'name' => 'Paylane BankTransfer',
'allowedCountries' => 'ALL'
),
'PAYPAL' => array(
'name' => 'Paylane PayPal',
'allowedCountries' => 'ALL'
),
'BLIK' => array(
'name' => 'Paylane BLIK',
'allowedCountries' => 'ALL',
),
// 'DIRECTDEBIT' => array(
// 'name' => 'Paylane DirectDebit',
// 'allowedCountries' => 'ALL'
// ),
// 'SOFORT' => array(
// 'name' => 'Paylane Sofort',
// 'allowedCountries' => 'ALL'
// ),
// 'IDEAL' => array(
// 'name' => 'Paylane Ideal',
// 'allowedCountries' => 'ALL'
// ),
// 'APPLEPAY' => array(
// 'name' => 'Paylane ApplePay',
// 'allowedCountries' => 'ALL'
// ),
// 'GOOGLEPAY' => array(
// 'name' => 'Paylane GooglePay',
// 'allowedCountries' => 'ALL'
// ),
);
public static function getPaymentMethods()
{
return self::$paymentMethods;
}
public static function getPaymentMethodByPaymentType($paymentType)
{
return self::$paymentMethods[$paymentType];
}
public static function getPaylaneRedirectSecureFormUrl()
{
$paylaneRedirectUrl = self::$paylaneSecureFormUrl;
return $paylaneRedirectUrl;
}
public static function getPaylaneRedirectUrl()
{
$paylaneRedirectUrl = self::$paylaneApiUrl;
return $paylaneRedirectUrl;
}
public static function paymentStatus($paylaneStatus)
{
$status = array();
$status['PENDING'] = '1';
//$status['PERFORMED'] = '2';
$status['PERFORMED'] = '3';
$status['CLEARED'] = '3';
$status['ERROR'] = '-2';
return isset($status[$paylaneStatus]) ? $status[$paylaneStatus] : $status['ERROR'];
}
public static function getSupportedPaymentsByCountryCode($countryCode)
{
if (Tools::strlen($countryCode) == 2) {
$countryCode = self::getCountryIso3ByIso2($countryCode);
}
$supportedPayments = array();
if (!in_array($countryCode, self::$unallowedCountries)) {
foreach (self::$paymentMethods as $key => $paymentMethod) {
if (isset($paymentMethod['exceptedCountries'])
&& in_array($countryCode, $paymentMethod['exceptedCountries'])
) {
continue;
}
if ($paymentMethod['allowedCountries'] == 'ALL') {
$paymentMethod['allowedCountries'] = self::$allowedCountries;
}
if (in_array($countryCode, $paymentMethod['allowedCountries'])) {
$supportedPayments[] = $key;
}
}
}
return $supportedPayments;
}
public static function getDateTime()
{
$t = microtime(true);
$micro = sprintf("%06d", ($t - floor($t)) * 1000000);
$d = new DateTime(date('Y-m-d H:i:s.'.$micro, $t));
return $d->format("ymdhiu");
}
public static function randomNumber($length)
{
$result = '';
for ($i = 0; $i < $length; $i++) {
$result .= mt_rand(0, 9);
}
return $result;
}
public static function getTrnStatus($code)
{
switch ($code) {
case '3':
$status = 'BACKEND_TT_CLEARED';
break;
case '2':
$status = 'BACKEND_TT_PERFORMED';
break;
case '1':
$status = 'BACKEND_TT_PENDING';
break;
case '-2':
$status = 'BACKEND_TT_FAILED';
break;
}
return $status;
}
public static function getErrorMessage($responseStatus) {
$errorStatus = ('Paylane Error:');
$api_url = 'https://payto.app/api/translate_error/pl/';
if (isset($responseStatus['error_code'])) { //Secureform, BankTransfer
$error_code = $api_url . $responseStatus['error_code'];
$translatedErrorCode = file_get_contents($error_code);
$errorStatus .= ' '. $translatedErrorCode;
}
// if (isset($responseStatus['error_code'])) {
// $errorStatus .= ' '. $responseStatus['error_code'];
// }
if (isset($responseStatus['error_text'])) {
$errorStatus .= ' '. $responseStatus['error_text'];
}
return $errorStatus;
}
public static function getCountryIso3ByIso2($iso2)
{
$iso3 = array(
'AF' => 'AFG',
'AL' => 'ALB',
'DZ' => 'DZA',
'AS' => 'ASM',
'AD' => 'AND',
'AO' => 'AGO',
'AI' => 'AIA',
'AQ' => 'ATA',
'AG' => 'ATG',
'AR' => 'ARG',
'AM' => 'ARM',
'AW' => 'ABW',
'AU' => 'AUS',
'AT' => 'AUT',
'AZ' => 'AZE',
'BS' => 'BHS',
'BH' => 'BHR',
'BD' => 'BGD',
'BB' => 'BRB',
'BY' => 'BLR',
'BE' => 'BEL',
'BZ' => 'BLZ',
'BJ' => 'BEN',
'BM' => 'BMU',
'BT' => 'BTN',
'BO' => 'BOL',
'BA' => 'BIH',
'BW' => 'BWA',
'BV' => 'BVT',
'BR' => 'BRA',
'IO' => 'IOT',
'VG' => 'VGB',
'BN' => 'BRN',
'BG' => 'BGR',
'BF' => 'BFA',
'BI' => 'BDI',
'KH' => 'KHM',
'CM' => 'CMR',
'CA' => 'CAN',
'CV' => 'CPV',
'KY' => 'CYM',
'CF' => 'CAF',
'TD' => 'TCD',
'CL' => 'CHL',
'CN' => 'CHN',
'CX' => 'CXR',
'CC' => 'CCK',
'CO' => 'COL',
'KM' => 'COM',
'CG' => 'COG',
'CD' => 'COD',
'CK' => 'COK',
'CR' => 'CRI',
'HR' => 'HRV',
'CU' => 'CUB',
'CY' => 'CYP',
'CZ' => 'CZE',
'CI' => 'CIV',
'DK' => 'DNK',
'DJ' => 'DJI',
'DM' => 'DMA',
'DO' => 'DOM',
'EC' => 'ECU',
'EG' => 'EGY',
'SV' => 'SLV',
'GQ' => 'GNQ',
'ER' => 'ERI',
'EE' => 'EST',
'ET' => 'ETH',
'FK' => 'FLK',
'FO' => 'FRO',
'FJ' => 'FJI',
'FI' => 'FIN',
'FR' => 'FRA',
'GF' => 'GUF',
'PF' => 'PYF',
'TF' => 'ATF',
'GA' => 'GAB',
'GM' => 'GMB',
'GE' => 'GEO',
'DE' => 'DEU',
'GH' => 'GHA',
'GI' => 'GIB',
'GR' => 'GRC',
'GL' => 'GRL',
'GD' => 'GRD',
'GP' => 'GLD',
'GU' => 'GUM',
'GT' => 'GTM',
'GG' => 'GGY',
'GN' => 'HTI',
'GW' => 'HMD',
'GY' => 'VAT',
'HT' => 'GIN',
'HM' => 'GNB',
'HN' => 'HND',
'HK' => 'HKG',
'HU' => 'HUN',
'IS' => 'ISL',
'IN' => 'IND',
'ID' => 'IDN',
'IR' => 'IRN',
'IQ' => 'IRQ',
'IE' => 'IRL',
'IM' => 'IMN',
'IL' => 'ISR',
'IT' => 'ITA',
'JM' => 'JAM',
'JP' => 'JPN',
'JE' => 'JEY',
'JO' => 'JOR',
'KZ' => 'KAZ',
'KE' => 'KEN',
'KI' => 'KIR',
'KW' => 'KWT',
'KG' => 'KGZ',
'LA' => 'LAO',
'LV' => 'LVA',
'LB' => 'LBN',
'LS' => 'LSO',
'LR' => 'LBR',
'LY' => 'LBY',
'LI' => 'LIE',
'LT' => 'LTU',
'LU' => 'LUX',
'MO' => 'MAC',
'MK' => 'MKD',
'MG' => 'MDG',
'MW' => 'MWI',
'MY' => 'MYS',
'MV' => 'MDV',
'ML' => 'MLI',
'MT' => 'MLT',
'MH' => 'MHL',
'MQ' => 'MTQ',
'MR' => 'MRT',
'MU' => 'MUS',
'YT' => 'MYT',
'MX' => 'MEX',
'FM' => 'FSM',
'MD' => 'MDA',
'MC' => 'MCO',
'MN' => 'MNG',
'ME' => 'MNE',
'MS' => 'MSR',
'MA' => 'MAR',
'MZ' => 'MOZ',
'MM' => 'MMR',
'NA' => 'NAM',
'NR' => 'NRU',
'NP' => 'NPL',
'NL' => 'NLD',
'AN' => 'ANT',
'NC' => 'NCL',
'NZ' => 'NZL',
'NI' => 'NIC',
'NE' => 'NER',
'NG' => 'NGA',
'NU' => 'NIU',
'NF' => 'NFK',
'KP' => 'PRK',
'MP' => 'MNP',
'NO' => 'NOR',
'OM' => 'OMN',
'PK' => 'PAK',
'PW' => 'PLW',
'PS' => 'PSE',
'PA' => 'PAN',
'PG' => 'PNG',
'PY' => 'PRY',
'PE' => 'PER',
'PH' => 'PHL',
'PN' => 'PCN',
'PL' => 'POL',
'PT' => 'PRT',
'PR' => 'PRI',
'QA' => 'QAT',
'RO' => 'ROU',
'RU' => 'RUS',
'RW' => 'RWA',
'RE' => 'REU',
'BL' => 'BLM',
'SH' => 'SHN',
'KN' => 'KNA',
'LC' => 'LCA',
'MF' => 'MAF',
'PM' => 'SPM',
'WS' => 'WSM',
'SM' => 'SMR',
'SA' => 'SAU',
'SN' => 'SEN',
'RS' => 'SRB',
'SC' => 'SYC',
'SL' => 'SLE',
'SG' => 'SGP',
'SK' => 'SVK',
'SI' => 'SVN',
'SB' => 'SLB',
'SO' => 'SOM',
'ZA' => 'ZAF',
'GS' => 'SGS',
'KR' => 'KOR',
'ES' => 'ESP',
'LK' => 'LKA',
'VC' => 'VCT',
'SD' => 'SDN',
'SR' => 'SUR',
'SJ' => 'SJM',
'SZ' => 'SWZ',
'SE' => 'SWE',
'CH' => 'CHE',
'SY' => 'SYR',
'ST' => 'STP',
'TW' => 'TWN',
'TJ' => 'TJK',
'TZ' => 'TZA',
'TH' => 'THA',
'TL' => 'TLS',
'TG' => 'TGO',
'TK' => 'TKL',
'TO' => 'TON',
'TT' => 'TTO',
'TN' => 'TUN',
'TR' => 'TUR',
'TM' => 'TKM',
'TC' => 'TCA',
'TV' => 'TUV',
'UM' => 'UMI',
'VI' => 'VIR',
'UG' => 'UGA',
'UA' => 'UKR',
'AE' => 'ARE',
'GB' => 'GBR',
'US' => 'USA',
'UY' => 'URY',
'UZ' => 'UZB',
'VU' => 'VUT',
'VA' => 'GUY',
'VE' => 'VEN',
'VN' => 'VNM',
'WF' => 'WLF',
'EH' => 'ESH',
'YE' => 'YEM',
'ZM' => 'ZMB',
'ZW' => 'ZWE',
'AX' => 'ALA'
);
if ($iso2) {
return array_key_exists($iso2, $iso3) ? $iso3[$iso2] : '';
} else {
return '';
}
}
public static function getCountryIso2ByIso3($iso3)
{
$iso2 = array(
'AFG' => 'AF',
'ALB' => 'AL',
'DZA' => 'DZ',
'ASM' => 'AS',
'AND' => 'AD',
'AGO' => 'AO',
'AIA' => 'AI',
'ATA' => 'AQ',
'ATG' => 'AG',
'ARG' => 'AR',
'ARM' => 'AM',
'ABW' => 'AW',
'AUS' => 'AU',
'AUT' => 'AT',
'AZE' => 'AZ',
'BHS' => 'BS',
'BHR' => 'BH',
'BGD' => 'BD',
'BRB' => 'BB',
'BLR' => 'BY',
'BEL' => 'BE',
'BLZ' => 'BZ',
'BEN' => 'BJ',
'BMU' => 'BM',
'BTN' => 'BT',
'BOL' => 'BO',
'BIH' => 'BA',
'BWA' => 'BW',
'BVT' => 'BV',
'BRA' => 'BR',
'IOT' => 'IO',
'VGB' => 'VG',
'BRN' => 'BN',
'BGR' => 'BG',
'BFA' => 'BF',
'BDI' => 'BI',
'KHM' => 'KH',
'CMR' => 'CM',
'CAN' => 'CA',
'CPV' => 'CV',
'CYM' => 'KY',
'CAF' => 'CF',
'TCD' => 'TD',
'CHL' => 'CL',
'CHN' => 'CN',
'CXR' => 'CX',
'CCK' => 'CC',
'COL' => 'CO',
'COM' => 'KM',
'COG' => 'CG',
'COD' => 'CD',
'COK' => 'CK',
'CRI' => 'CR',
'HRV' => 'HR',
'CUB' => 'CU',
'CYP' => 'CY',
'CZE' => 'CZ',
'CIV' => 'CI',
'DNK' => 'DK',
'DJI' => 'DJ',
'DMA' => 'DM',
'DOM' => 'DO',
'ECU' => 'EC',
'EGY' => 'EG',
'SLV' => 'SV',
'GNQ' => 'GQ',
'ERI' => 'ER',
'EST' => 'EE',
'ETH' => 'ET',
'FLK' => 'FK',
'FRO' => 'FO',
'FJI' => 'FJ',
'FIN' => 'FI',
'FRA' => 'FR',
'GUF' => 'GF',
'PYF' => 'PF',
'ATF' => 'TF',
'GAB' => 'GA',
'GMB' => 'GM',
'GEO' => 'GE',
'DEU' => 'DE',
'GHA' => 'GH',
'GIB' => 'GI',
'GRC' => 'GR',
'GRL' => 'GL',
'GRD' => 'GD',
'GLD' => 'GP',
'GUM' => 'GU',
'GTM' => 'GT',
'GGY' => 'GG',
'HTI' => 'GN',
'HMD' => 'GW',
'VAT' => 'GY',
'GIN' => 'HT',
'GNB' => 'HM',
'HND' => 'HN',
'HKG' => 'HK',
'HUN' => 'HU',
'ISL' => 'IS',
'IND' => 'IN',
'IDN' => 'ID',
'IRN' => 'IR',
'IRQ' => 'IQ',
'IRL' => 'IE',
'IMN' => 'IM',
'ISR' => 'IL',
'ITA' => 'IT',
'JAM' => 'JM',
'JPN' => 'JP',
'JEY' => 'JE',
'JOR' => 'JO',
'KAZ' => 'KZ',
'KEN' => 'KE',
'KIR' => 'KI',
'KWT' => 'KW',
'KGZ' => 'KG',
'LAO' => 'LA',
'LVA' => 'LV',
'LBN' => 'LB',
'LSO' => 'LS',
'LBR' => 'LR',
'LBY' => 'LY',
'LIE' => 'LI',
'LTU' => 'LT',
'LUX' => 'LU',
'MAC' => 'MO',
'MKD' => 'MK',
'MDG' => 'MG',
'MWI' => 'MW',
'MYS' => 'MY',
'MDV' => 'MV',
'MLI' => 'ML',
'MLT' => 'MT',
'MHL' => 'MH',
'MTQ' => 'MQ',
'MRT' => 'MR',
'MUS' => 'MU',
'MYT' => 'YT',
'MEX' => 'MX',
'FSM' => 'FM',
'MDA' => 'MD',
'MCO' => 'MC',
'MNG' => 'MN',
'MNE' => 'ME',
'MSR' => 'MS',
'MAR' => 'MA',
'MOZ' => 'MZ',
'MMR' => 'MM',
'NAM' => 'NA',
'NRU' => 'NR',
'NPL' => 'NP',
'NLD' => 'NL',
'ANT' => 'AN',
'NCL' => 'NC',
'NZL' => 'NZ',
'NIC' => 'NI',
'NER' => 'NE',
'NGA' => 'NG',
'NIU' => 'NU',
'NFK' => 'NF',
'PRK' => 'KP',
'MNP' => 'MP',
'NOR' => 'NO',
'OMN' => 'OM',
'PAK' => 'PK',
'PLW' => 'PW',
'PSE' => 'PS',
'PAN' => 'PA',
'PNG' => 'PG',
'PRY' => 'PY',
'PER' => 'PE',
'PHL' => 'PH',
'PCN' => 'PN',
'POL' => 'PL',
'PRT' => 'PT',
'PRI' => 'PR',
'QAT' => 'QA',
'ROU' => 'RO',
'RUS' => 'RU',
'RWA' => 'RW',
'REU' => 'RE',
'BLM' => 'BL',
'SHN' => 'SH',
'KNA' => 'KN',
'LCA' => 'LC',
'MAF' => 'MF',
'SPM' => 'PM',
'WSM' => 'WS',
'SMR' => 'SM',
'SAU' => 'SA',
'SEN' => 'SN',
'SRB' => 'RS',
'SYC' => 'SC',
'SLE' => 'SL',
'SGP' => 'SG',
'SVK' => 'SK',
'SVN' => 'SI',
'SLB' => 'SB',
'SOM' => 'SO',
'ZAF' => 'ZA',
'SGS' => 'GS',
'KOR' => 'KR',
'ESP' => 'ES',
'LKA' => 'LK',
'VCT' => 'VC',
'SDN' => 'SD',
'SUR' => 'SR',
'SJM' => 'SJ',
'SWZ' => 'SZ',
'SWE' => 'SE',
'CHE' => 'CH',
'SYR' => 'SY',
'STP' => 'ST',
'TWN' => 'TW',
'TJK' => 'TJ',
'TZA' => 'TZ',
'THA' => 'TH',
'TLS' => 'TL',
'TGO' => 'TG',
'TKL' => 'TK',
'TON' => 'TO',
'TTO' => 'TT',
'TUN' => 'TN',
'TUR' => 'TR',
'TKM' => 'TM',
'TCA' => 'TC',
'TUV' => 'TV',
'UMI' => 'UM',
'VIR' => 'VI',
'UGA' => 'UG',
'UKR' => 'UA',
'ARE' => 'AE',
'GBR' => 'GB',
'USA' => 'US',
'URY' => 'UY',
'UZB' => 'UZ',
'VUT' => 'VU',
'GUY' => 'VA',
'VEN' => 'VE',
'VNM' => 'VN',
'WLF' => 'WF',
'ESH' => 'EH',
'YEM' => 'YE',
'ZMB' => 'ZM',
'ZWE' => 'ZW',
'ALA' => 'AX'
);
if ($iso3) {
return array_key_exists($iso3, $iso2) ? $iso2[$iso3] : '';
} else {
return '';
}
}
public static function generateHash($m_t_id, $amount, $cur_code, $trans_type)
{
return SHA1(
Configuration::get('PAYLANE_GENERAL_HASH') . "|" .
$m_t_id . "|" .
$amount . "|" .
$cur_code . "|" .
$trans_type
);
}
}

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;

11
modules/paylane/index.php Normal file
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,33 @@
<?php
/*
* 2007-2016 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-2016 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,680 @@
<?php
/*
* 2005-2016 PayLane sp. z.o.o.
*
* 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@Paylane.pl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PayLane to newer
* versions in the future. If you wish to customize PayLane for your
* needs please refer to http://www.Paylane.pl for more information.
*
* @author PayLane <info@paylane.pl>
* @copyright 2005-2019 PayLane sp. z.o.o.
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PayLane sp. z.o.o.
*/
/**
* Client library for Paylane REST Server.
* More info at http://devzone.paylane.com
*/
class PayLaneRestClient
{
/**
* @var string
*/
protected $api_url = 'https://direct.paylane.com/rest/';
/**
* @var string
*/
protected $username = null, $password = null;
/**
* @var array
*/
protected $http_errors = array
(
400 => '400 Bad Request',
401 => '401 Unauthorized',
500 => '500 Internal Server Error',
501 => '501 Not Implemented',
502 => '502 Bad Gateway',
503 => '503 Service Unavailable',
504 => '504 Gateway Timeout',
);
/**
* @var bool
*/
protected $is_success = false;
/**
* @var array
*/
protected $allowed_request_methods = array(
'get',
'put',
'post',
'delete',
);
/**
* @var boolean
*/
protected $ssl_verify = true;
/**
* Constructor
*
* @param string $username Username
* @param string $password Password
*/
public function __construct($username, $password)
{
$this->username = $username;
$this->password = $password;
$validate_params = array
(
false === extension_loaded('curl') => 'The curl extension must be loaded for using this class!',
false === extension_loaded('json') => 'The json extension must be loaded for using this class!'
);
$this->checkForErrors($validate_params);
}
/**
* Set Api URL
*
* @param string $url Api URL
*/
public function setUrl($url)
{
$this->api_url = $url;
}
/**
* Sets SSL verify
*
* @param bool $ssl_verify SSL verify
*/
public function setSSLverify($ssl_verify)
{
$this->ssl_verify = $ssl_verify;
}
/**
* Request state getter
*
* @return bool
*/
public function isSuccess()
{
return $this->is_success;
}
/**
* Performs card sale
*
* @param array $params Sale Params
* @return array
*/
public function cardSale($params)
{
return $this->call(
'cards/sale',
'post',
$params
);
}
/**
* Performs card sale by token
*
* @param array $params Sale Params
* @return array
*/
public function cardSaleByToken($params)
{
return $this->call(
'cards/saleByToken',
'post',
$params
);
}
/**
* Card authorization
*
* @param array $params Authorization params
* @return array
*/
public function cardAuthorization($params)
{
return $this->call(
'cards/authorization',
'post',
$params
);
}
/**
* Card authorization by token
*
* @param array $params Authorization params
* @return array
*/
public function cardAuthorizationByToken($params)
{
return $this->call(
'cards/authorizationByToken',
'post',
$params
);
}
/**
* PayPal authorization
*
* @param $params
* @return array
*/
public function paypalAuthorization($params)
{
return $this->call(
'paypal/authorization',
'post',
$params
);
}
/**
* Performs capture from authorized card
*
* @param array $params Capture authorization params
* @return array
*/
public function captureAuthorization($params)
{
return $this->call(
'authorizations/capture',
'post',
$params
);
}
/**
* Performs closing of card authorization, basing on authorization card ID
*
* @param array $params Close authorization params
* @return array
*/
public function closeAuthorization($params)
{
return $this->call(
'authorizations/close',
'post',
$params
);
}
/**
* Performs refund
*
* @param array $params Refund params
* @return array
*/
public function refund($params)
{
return $this->call(
'refunds',
'post',
$params
);
}
/**
* Get sale info
*
* @param array $params Get sale info params
* @return array
*/
public function getSaleInfo($params)
{
return $this->call(
'sales/info',
'get',
$params
);
}
/**
* Get sale authorization info
*
* @param array $params Get sale authorization info params
* @return array
*/
public function getAuthorizationInfo($params)
{
return $this->call(
'authorizations/info',
'get',
$params
);
}
/**
* Performs sale status check
*
* @param array $params Check sale status
* @return array
*/
public function checkSaleStatus($params)
{
return $this->call(
'sales/status',
'get',
$params
);
}
/**
* Direct debit sale
*
* @param array $params Direct debit params
* @return array
*/
public function directDebitSale($params)
{
return $this->call(
'directdebits/sale',
'post',
$params
);
}
/**
* Sofort sale
*
* @param array $params Sofort params
* @return array
*/
public function sofortSale($params)
{
return $this->call(
'sofort/sale',
'post',
$params
);
}
/**
* iDeal sale
*
* @param $params iDeal transaction params
* @return array
*/
public function idealSale($params)
{
return $this->call(
'ideal/sale',
'post',
$params
);
}
/**
* iDeal banks list
*
* @return array
*/
public function idealBankCodes()
{
return $this->call(
'ideal/bankcodes',
'get',
array()
);
}
/**
* Bank transfer sale
*
* @param array $params Bank transfer sale params
* @return array
*/
public function bankTransferSale($params)
{
return $this->call(
'banktransfers/sale',
'post',
$params
);
}
/**
* PayPal sale
*
* @param array $params Paypal sale params
* @return array
*/
public function paypalSale($params)
{
return $this->call(
'paypal/sale',
'post',
$params
);
}
/**
* Cancels Paypal recurring profile
*
* @param array $params Paypal params
* @return array
*/
public function paypalStopRecurring($params)
{
return $this->call(
'paypal/stopRecurring',
'post',
$params
);
}
/**
* Performs resale by sale ID
*
* @param array $params Resale by sale params
* @return array
*/
public function resaleBySale($params)
{
return $this->call(
'resales/sale',
'post',
$params
);
}
/**
* Performs resale by authorization ID
*
* @param array $params Resale by authorization params
* @return array
*/
public function resaleByAuthorization($params)
{
return $this->call(
'resales/authorization',
'post',
$params
);
}
/**
* Checks if a card is enrolled in the 3D-Secure program.
*
* @param array $params Is card 3d secure params
* @return array
*/
public function checkCard3DSecure($params)
{
return $this->call(
'3DSecure/checkCard',
'get',
$params
);
}
/**
* Checks if a card is enrolled in the 3D-Secure program, based on the card's token.
*
* @param array $params Is card 3d secure params
* @return array
*/
public function checkCard3DSecureByToken($params)
{
return $this->call(
'3DSecure/checkCardByToken',
'get',
$params
);
}
/**
* Performs sale by ID 3d secure authorization
*
* @param array $params Sale by 3d secure authorization params
* @return array
*/
public function saleBy3DSecureAuthorization($params)
{
return $this->call(
'3DSecure/authSale',
'post',
$params
);
}
/**
* Perform check card
*
* @param array $params Check card params
* @return array
*/
public function checkCard($params)
{
return $this->call(
'cards/check',
'get',
$params
);
}
/**
* Perform check card by token
*
* @param array $params Check card params
* @return array
*/
public function checkCardByToken($params)
{
return $this->call(
'cards/checkByToken',
'get',
$params
);
}
/**
* Performs Apple Pay sale
*
* @param array $params Apple Pay sale params
* @return array
*/
public function applePaySale(array $params)
{
return $this->call(
'applepay/sale',
'post',
$params
);
}
public function googlePaySale(array $params)
{
return $this->call(
'googlepay/sale',
'post',
$params
);
}
public function blikSale(array $params)
{
return $this->call(
'blik/sale',
'post',
$params
);
}
/**
* Performs Apple Pay authorization
*
* @param array $params Apple Pay authorization params
* @return array
*/
public function applePayAuthorization(array $params)
{
return $this->call(
'applepay/authorization',
'post',
$params
);
}
public function googlePayAuthorization(array $params)
{
return $this->call(
'googlepay/authorization',
'post',
$params
);
}
public function blikAuthorization(array $params)
{
return $this->call(
'blik/authorization',
'post',
$params
);
}
/**
* Method responsible for preparing, setting state and returning answer from rest server
*
* @param string $method
* @param string $request
* @param array $params
* @return array
*/
protected function call($method, $request, $params)
{
$this->is_success = false;
if (is_object($params))
{
$params = (array) $params;
}
$validate_params = array
(
false === is_string($method) => 'Method name must be string',
false === $this->checkRequestMethod($request) => 'Not allowed request method type',
);
$this->checkForErrors($validate_params);
$params_encoded = json_encode($params);
$response = $this->pushData($method, $request, $params_encoded);
$response = json_decode($response, true);
if (isset($response['success']) && $response['success'] === true)
{
$this->is_success = true;
}
return $response;
}
/**
* Checking error mechanism
*
* @param array $validate_params
* @throws \Exception
*/
protected function checkForErrors($validate_params)
{
foreach ($validate_params as $key => $error)
{
if ($key)
{
throw new \Exception($error);
}
}
}
/**
* Check if method is allowed
*
* @param string $method_type
* @return bool
*/
protected function checkRequestMethod($method_type)
{
$request_method = strtolower($method_type);
if(in_array($request_method, $this->allowed_request_methods))
{
return true;
}
return false;
}
/**
* Method responsible for pushing data to REST server
*
* @param string $method
* @param string $method_type
* @param string $request - JSON
* @return array
* @throws \Exception
*/
protected function pushData($method, $method_type, $request)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->api_url . $method);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method_type));
curl_setopt($ch, CURLOPT_HTTPAUTH, 1);
curl_setopt($ch, CURLOPT_USERPWD, $this->username . ':' . $this->password);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->ssl_verify);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (isset($this->http_errors[$http_code]))
{
throw new \Exception('Response Http Error - ' . $this->http_errors[$http_code]);
}
if (0 < curl_errno($ch))
{
throw new \Exception('Unable to connect to ' . $this->api_url . ' Error: ' . curl_error($ch));
}
curl_close($ch);
return $response;
}
}

BIN
modules/paylane/logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
modules/paylane/paylane.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1645
modules/paylane/paylane.php Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,256 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{paylane}prestashop>paylane_6c051d0b219a9b6d9b49642db330219c'] = 'Paylane';
$_MODULE['<{paylane}prestashop>paylane_9f7fac333181f4352876fcbb0510e4ee'] = 'Paylane';
$_MODULE['<{paylane}prestashop>paylane_ffb0fea938f3bd790ef1208ec338244d'] = 'Accepts payments by Paylane';
$_MODULE['<{paylane}prestashop>paylane_ce74dba7a25e676be64963e115795c1d'] = 'Are you sure you want to delete your details ?';
$_MODULE['<{paylane}prestashop>paylane_0238b4ec167be3b14f09513e62bdd2c8'] = 'There was an Error installing the module.';
$_MODULE['<{paylane}prestashop>paylane_2edeeafca5193109064b155e6cf6fbf9'] = 'There was an Error creating a custom table.';
$_MODULE['<{paylane}prestashop>paylane_2c8a6e47c36e54cfad8aa30bc3ee4c18'] = 'There was an error creating a custom order status.';
$_MODULE['<{paylane}prestashop>paylane_2b010779e5ec1d29582549c0278e59aa'] = 'Secure Form';
$_MODULE['<{paylane}prestashop>paylane_57e45e68f5f250345cc161a696ea41c6'] = 'Credit Card';
$_MODULE['<{paylane}prestashop>paylane_d13ca667cfe2bd1b1bf7e8374dd2a14d'] = 'Bank Transfer';
$_MODULE['<{paylane}prestashop>paylane_1887c9fa056cb3b53c3270b55c5b7ab5'] = 'PayPal';
$_MODULE['<{paylane}prestashop>paylane_de049e69c9759f30a9189aa1435e07a4'] = 'Direct Debit';
$_MODULE['<{paylane}prestashop>paylane_69067f38e9bdbb6193474acb385090e8'] = 'Sofort';
$_MODULE['<{paylane}prestashop>paylane_508ff8926d05e6a6ca8112fe461537d2'] = 'iDeal';
$_MODULE['<{paylane}prestashop>paylane_d6f7cbab7e8386bd0647fd79941b357c'] = 'Apple Pay';
$_MODULE['<{paylane}prestashop>paylane_b9d54194c8151efffe48874a0e5547cb'] = 'Google Pay';
$_MODULE['<{paylane}prestashop>paylane_3ba3a67db7953fcb473f7251c885e80a'] = 'Blik';
$_MODULE['<{paylane}prestashop>paylane_84528f5c0881d411ea090f76e4f50455'] = 'Secure Form ';
$_MODULE['<{paylane}prestashop>paylane_a71af3104ee061cc02c2b6fb68125502'] = 'Credit Card';
$_MODULE['<{paylane}prestashop>paylane_f70c11c224755a265b1164f4f604cce9'] = 'Bank Transfer';
$_MODULE['<{paylane}prestashop>paylane_d612298096bc585cc61fd429f8ceb105'] = 'PayPal';
$_MODULE['<{paylane}prestashop>paylane_927f4ac609a862ebaa3e78c910e0704e'] = 'Direct Debit';
$_MODULE['<{paylane}prestashop>paylane_0b7ba93377fafafa35b527bfe5ef43d5'] = 'Sofort';
$_MODULE['<{paylane}prestashop>paylane_952cb1f9be601b5fc7f8d77e195ecf48'] = 'iDeal';
$_MODULE['<{paylane}prestashop>paylane_2e81e8204756a88e749dcc949400fb8f'] = 'Apple Pay';
$_MODULE['<{paylane}prestashop>paylane_0a7cf97fec11ec221909346effad93c9'] = 'Google Pay';
$_MODULE['<{paylane}prestashop>paylane_b716dda5e273e408cdd1c26ee3392979'] = 'Blik';
$_MODULE['<{paylane}prestashop>paylane_dcb8ee74280b538a8c38f57eaee2a00f'] = 'Pending';
$_MODULE['<{paylane}prestashop>paylane_a7c9dd27df6c3415fb84206dc822f059'] = 'Performed';
$_MODULE['<{paylane}prestashop>paylane_bd115a8ece4d19d78d9326d03ad5881f'] = 'Cleared';
$_MODULE['<{paylane}prestashop>paylane_e41c9728e44286b4431cfcad90a6646f'] = 'Cancelled';
$_MODULE['<{paylane}prestashop>paylane_991c9f7c8699939ac8ff9b78856e7ff2'] = 'Failed';
$_MODULE['<{paylane}prestashop>paylane_832c26d8fad93d4b0fc35a88bdd0bd03'] = 'Chargeback';
$_MODULE['<{paylane}prestashop>paylane_2a1da4e344bbfb90574e50e996c8c8c6'] = 'Abandoned by user';
$_MODULE['<{paylane}prestashop>paylane_721ae78a43d0a7698bffedb67b7e39ef'] = 'Unfortunately, the confirmation of your payment failed. Please contact your merchant for clarification.';
$_MODULE['<{paylane}prestashop>paylane_d9b85d7f3f1b104a75840466c49a010f'] = 'Unfortunately, there was an error while processing your order. In case a payment has been made, it will be automatically refunded.';
$_MODULE['<{paylane}prestashop>paylane_6c77ee60b717714505de57d5a714abfa'] = 'ERROR99';
$_MODULE['<{paylane}prestashop>paylane_26f845d686ee28f8bc6c2f17d471f6c4'] = 'Error before redirect';
$_MODULE['<{paylane}prestashop>paylane_5f522f24e24f1e3c09fe89af4b887d2c'] = 'With our offer you will sail out into wide waters!';
$_MODULE['<{paylane}prestashop>paylane_bfc8f3bb9010d96d4f02f898cdfbd3be'] = 'Our goal is to create solutions perfectly matched to your business model.';
$_MODULE['<{paylane}prestashop>paylane_d30620e5725a6ef0ab446abb7135eec3'] = 'For years, we have been helping companies boldly navigate the ocean of possibilities created by modern solutions in online payments.';
$_MODULE['<{paylane}prestashop>paylane_5bb2c867a0fdaa3b6386cd973557cb4a'] = 'Check how many solutions can support your business.';
$_MODULE['<{paylane}prestashop>paylane_1ec6e2144bf5db5da162edba5616abb8'] = 'SIGN UP NOW';
$_MODULE['<{paylane}prestashop>paylane_f36b63f5b3b053820a659e995efa0a46'] = 'How to turn on Apple Pay:';
$_MODULE['<{paylane}prestashop>paylane_2b484cbf5c21483307def70d1808db51'] = '1. Let us know at support@paylane.com that you wish to add Apple Pay to your account.';
$_MODULE['<{paylane}prestashop>paylane_5010dcb900e691ded829ae812ec9592d'] = '2. Paste the Apple Pay Certificate into the designated form in Apple Pay Configuration tab.';
$_MODULE['<{paylane}prestashop>paylane_d48eb3cbe33911a2705617a3bb4a5e32'] = '3. Let us know once you completed all of the above.';
$_MODULE['<{paylane}prestashop>paylane_9a0d15fa21b0b906856266beb3b20b44'] = 'How to turn on Notifications:';
$_MODULE['<{paylane}prestashop>paylane_f81cf5a474331d2577ce6857ac5d96d7'] = '1. Chose individual login and password and enter them below (it should be a safe login and password, not the same one as API login/ password or merchant panel login/password.';
$_MODULE['<{paylane}prestashop>paylane_0127262082ef8d0aad594851ed973679'] = '2. Send to us on e- mail (support@paylane.com) containing your notification login, password and notification address. We will reply you token to fill the form below';
$_MODULE['<{paylane}prestashop>paylane_2a94082b582d0620bae922fc14c36444'] = 'Basic Settings';
$_MODULE['<{paylane}prestashop>paylane_76d8f3c00672f61b39846b2112d356a8'] = 'Notification Settings';
$_MODULE['<{paylane}prestashop>paylane_521c36a31c2762741cf0f8890cbe05e3'] = 'On';
$_MODULE['<{paylane}prestashop>paylane_d15305d7a4e34e02489c74a5ef542f36'] = 'Off';
$_MODULE['<{paylane}prestashop>paylane_88294b4c31a9927c108160891c3d7625'] = 'Secure Form';
$_MODULE['<{paylane}prestashop>paylane_38eb0c13548927ec00e0c21389f9fd3b'] = 'Credit Card';
$_MODULE['<{paylane}prestashop>paylane_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
$_MODULE['<{paylane}prestashop>paylane_2b74b9202d5677ae834a921c261449bd'] = 'Direct Debit';
$_MODULE['<{paylane}prestashop>paylane_9ca50bdec53227b0e50ee53d20edcb4a'] = 'Sofort';
$_MODULE['<{paylane}prestashop>paylane_22b7c2abfb7dcf0f672899fb2b6f1670'] = 'iDeal';
$_MODULE['<{paylane}prestashop>paylane_b406ad549c48678d89a06ec2f1e633ae'] = 'ApplePay';
$_MODULE['<{paylane}prestashop>paylane_81d1c1d1c8e6a330af12300fc80e2d6c'] = 'GooglePay';
$_MODULE['<{paylane}prestashop>paylane_d2171f86cc8b21fe0168a719d39d2999'] = 'BLIK';
$_MODULE['<{paylane}prestashop>paylane_1bb8ec1f73b06df52f45289e6aefc9f4'] = 'Bank Transfer';
$_MODULE['<{paylane}prestashop>paylane_17eb86812c7a32ff63b293f0ebb6afd4'] = 'Missing data';
$_MODULE['<{paylane}prestashop>paylane_03308b7921122bb389d0f8731eb5dd13'] = 'is required. please fill out this field';
$_MODULE['<{paylane}prestashop>paylane_8442dbebae73a69bd7e7ca8d26e27812'] = 'Congratulations, your payments configuration were successfully updated.';
$_MODULE['<{paylane}prestashop>paylane_0a50cf495f14c4c8f1c2d6ec38682361'] = 'Congratulations, your payments configuration were successfully updated.';
$_MODULE['<{paylane}prestashop>paylane_abbc18e40a32ac71be7828483169a8e0'] = 'Presentation';
$_MODULE['<{paylane}prestashop>paylane_544adae772c27af59f57424ec176d094'] = 'General Settings';
$_MODULE['<{paylane}prestashop>paylane_60a554eb6ff3e498de9e3034678ab33d'] = 'Payment Configuration';
$_MODULE['<{paylane}prestashop>paylane_59c7c20083361745de2fdbb31645dc7b'] = 'Basic Settings';
$_MODULE['<{paylane}prestashop>paylane_27d8d22be440afe4b96203503ba7018c'] = 'Merchant ID';
$_MODULE['<{paylane}prestashop>paylane_34d3373f9469f5fc56199e15fcee7e1d'] = 'Hash salt';
$_MODULE['<{paylane}prestashop>paylane_bef7005ce81fc71d43f051cd5beafec8'] = 'Login API';
$_MODULE['<{paylane}prestashop>paylane_de152267e3a7737d5514a1e8c794246f'] = 'Public Key Api';
$_MODULE['<{paylane}prestashop>paylane_783b5855cef1bcd23dc05eecf6bc8a11'] = 'Password API';
$_MODULE['<{paylane}prestashop>paylane_d3dfbd92a8b2ad8c28a9df7e752f5f77'] = 'Notification URL';
$_MODULE['<{paylane}prestashop>paylane_66710ff19532aa337f1e00d5e34554df'] = 'Notification User';
$_MODULE['<{paylane}prestashop>paylane_c6274c6fd3394fcaa4940d0100466fbe'] = 'Notification Password';
$_MODULE['<{paylane}prestashop>paylane_d368c2642908a88bb8c70e4f8ae9b5cb'] = 'Notification Token';
$_MODULE['<{paylane}prestashop>paylane_c9c0fbf5f1a6ffbd7e1ac25cd2d1b1a8'] = 'Paylane customer ID';
$_MODULE['<{paylane}prestashop>paylane_afa1df8d5cb073dae02e6a5025fe8cf3'] = 'Paylane hash salt';
$_MODULE['<{paylane}prestashop>paylane_737713850a87881ece5ca28e6bc19e72'] = 'Paylane login API';
$_MODULE['<{paylane}prestashop>paylane_ffe60c2d96c2f47301f8eca8417b46ad'] = 'Paylane public key API';
$_MODULE['<{paylane}prestashop>paylane_a0402bf67268240fbdd2b2adf7b5be4d'] = 'Paylane password API';
$_MODULE['<{paylane}prestashop>paylane_36dd4a109a501ea3672cdd887b04f730'] = 'Paylane notification URL';
$_MODULE['<{paylane}prestashop>paylane_6d30009abbf6f792d37341625e6ca9c7'] = 'Paylane notification user';
$_MODULE['<{paylane}prestashop>paylane_92af9ad5200a41d89f2a12ecfede8442'] = 'Paylane notification password';
$_MODULE['<{paylane}prestashop>paylane_ddca87408639b3180117cb7505d8d4a1'] = 'Paylane notification token';
$_MODULE['<{paylane}prestashop>paylane_afc78b030739f5a0eeafc4149b32532e'] = 'Save';
$_MODULE['<{paylane}prestashop>paylane_5eed70e7aa25fa25909dabeeaa8673e0'] = 'Enabled';
$_MODULE['<{paylane}prestashop>paylane_4d4bf1bd18c6ac1058dbba2236713546'] = 'Works globally';
$_MODULE['<{paylane}prestashop>paylane_b7a920ba73eadd28dab899b3359ba596'] = 'On';
$_MODULE['<{paylane}prestashop>paylane_94b5e5b3ac5951d87b8314ae65d7bab4'] = 'Off';
$_MODULE['<{paylane}prestashop>googlepay_a02e8227d524da3f74497cbf1212cc0d'] = 'Label';
$_MODULE['<{paylane}prestashop>googlepay_7a2ec9bceb8d52d447d10f6d1bb77ef7'] = 'Google Pay';
$_MODULE['<{paylane}prestashop>googlepay_d566f7ae78b73f970581a8b607ce5261'] = 'Show payment method image';
$_MODULE['<{paylane}prestashop>directdebit_8067ccd4d85b3b2f277d3c9df78e962c'] = 'Label';
$_MODULE['<{paylane}prestashop>directdebit_d66809501454368b03175098da94d2c4'] = 'Direct Debit';
$_MODULE['<{paylane}prestashop>directdebit_e5d4a66e15a2d6db0370679d083158fa'] = 'Show payment method image';
$_MODULE['<{paylane}prestashop>directdebit_3634257b71cdec408db48baad161d6b7'] = 'Mandate ID';
$_MODULE['<{paylane}prestashop>directdebit_64b8f92de4dcb1e2952be6764442ab55'] = 'Your Mandate ID';
$_MODULE['<{paylane}prestashop>sofort_dc0a2eec0db681073c4fe13393a132a8'] = 'Label';
$_MODULE['<{paylane}prestashop>sofort_ac9602eb0b69576601eac191677a2f7f'] = 'Sofort';
$_MODULE['<{paylane}prestashop>sofort_942dfe2e1c376d1234b06fd95a421328'] = 'Show payment method image';
$_MODULE['<{paylane}prestashop>paypal_031ab6fa6c3289ceb77dbd42a7bbeec3'] = 'Label';
$_MODULE['<{paylane}prestashop>paypal_96b97177b8db076df54a9f745832e7d9'] = 'PayPal';
$_MODULE['<{paylane}prestashop>paypal_aaf3d91559f3b05c31630b1eaf483f5e'] = 'Show payment method image';
$_MODULE['<{paylane}prestashop>banktransfer_124a30a0661b0a0904c65d15074de7a4'] = 'Label';
$_MODULE['<{paylane}prestashop>banktransfer_14d2945721b36c01082a4fa27b97b5ea'] = 'Bank Transfer';
$_MODULE['<{paylane}prestashop>banktransfer_8f71f2e45e54b9a41bc5f784702d1cd8'] = 'Show payment method image';
$_MODULE['<{paylane}prestashop>applepay_7e5b47af5e50d9aa6cf3b471fa7d416d'] = 'Label';
$_MODULE['<{paylane}prestashop>applepay_0f2c59eac0792b5e2e9971487243bf83'] = 'Apple Pay';
$_MODULE['<{paylane}prestashop>applepay_6614152bba993afa2e4a2d4371eb6e7d'] = 'Show payment method image';
$_MODULE['<{paylane}prestashop>applepay_3289163ffd2defc8ba3eeb368bc892e5'] = 'Apple Pay Certificate';
$_MODULE['<{paylane}prestashop>applepay_76d9640fc625e6e35776d7b59b22dbd9'] = 'Your Apple Pay Certificate';
$_MODULE['<{paylane}prestashop>creditcard_382d791ff4e87b06b8a007afc7089c7f'] = 'Label';
$_MODULE['<{paylane}prestashop>creditcard_ce9090102a440bcd9154cdc424ed9620'] = 'Credit Card';
$_MODULE['<{paylane}prestashop>creditcard_17c980516a6d90de80a2d4439431eb93'] = 'Show payment method image ';
$_MODULE['<{paylane}prestashop>creditcard_d6e4bdad784153e1f08d545c7dd63c64'] = 'Override Fraud Check';
$_MODULE['<{paylane}prestashop>creditcard_42d0d87a60f76aec7320917c78606b55'] = 'Fraud Check';
$_MODULE['<{paylane}prestashop>creditcard_988903c9e36f365edb154e656afd77af'] = 'AVS Override';
$_MODULE['<{paylane}prestashop>creditcard_b77af2bf5f6147a87035ddfdfe95c936'] = 'AVS Level ';
$_MODULE['<{paylane}prestashop>creditcard_6faf1d8591db3b49000ea89a227f24e9'] = '3DS Check';
$_MODULE['<{paylane}prestashop>creditcard_78245b008cff325d1f2b0d11f43e482d'] = 'Amount to block during the authorization process';
$_MODULE['<{paylane}prestashop>blik_08cbf4071caf520a042616f7391a1bdb'] = 'Label';
$_MODULE['<{paylane}prestashop>blik_f17ae1e5f4e913bd7823d95de233896a'] = 'Blik';
$_MODULE['<{paylane}prestashop>blik_c3e7bacf78de69bc8c412c5c11e640c5'] = 'Show payment method image ';
$_MODULE['<{paylane}prestashop>ideal_9f6ffbba754af19ecd7513f2bec3c30e'] = 'Label';
$_MODULE['<{paylane}prestashop>ideal_0992d77d5749704af2b3628a36ec5813'] = 'iDeal';
$_MODULE['<{paylane}prestashop>ideal_b265044a2bc5a3de5b54e29e0ef88b58'] = 'Show payment method image';
$_MODULE['<{paylane}prestashop>secureform_62d9e98633a8abbea9e6fdafeadf46f5'] = 'Label';
$_MODULE['<{paylane}prestashop>secureform_bf20b54ddf628d80d5f3f61a2687564d'] = 'Secure Form';
$_MODULE['<{paylane}prestashop>secureform_fc069edbbd049112b0c351eadd3b69a1'] = 'Amount to block during authorization process';
$_MODULE['<{paylane}prestashop>displayadminorder_2e8619ed2fa7b354da73037ee6bbbaa9'] = 'Payment Information';
$_MODULE['<{paylane}prestashop>displayadminorder_09aa4dba49a302978bfa85791459feea'] = 'by Paylane';
$_MODULE['<{paylane}prestashop>displayadminorder_9eac228762bb77a1a0ce1688af42ee8a'] = 'Payment Status';
$_MODULE['<{paylane}prestashop>displayadminorder_4db8dc58684e4993154019a8f3549cd7'] = 'Payment Method';
$_MODULE['<{paylane}prestashop>displayadminorder_4c1c754fed5471ee7941c128890a6f10'] = 'Order origin';
$_MODULE['<{paylane}prestashop>displayadminorder_0f1215cfbb43a9bcf9b0fa85f1738f1c'] = 'Country ';
$_MODULE['<{paylane}prestashop>displayadminorder_2280605aa9ff639a0a800369c08052f6'] = 'Currency';
$_MODULE['<{paylane}prestashop>displayadminorder_05964d915c5c88eeacec82f016e35f31'] = 'Transaction ID';
$_MODULE['<{paylane}prestashop>displayadminorder_32180e6601377012e7fa40a535fcaa8b'] = 'E-mail account';
$_MODULE['<{paylane}prestashop>payment_return_8476f851894c75edcb03d42b24a8c4fa'] = 'Your order on';
$_MODULE['<{paylane}prestashop>payment_return_f86fa8c2dc301cc6447d25bca3c7dc85'] = 'is complete.';
$_MODULE['<{paylane}prestashop>payment_return_57bec6bff0d784f7fb6dbeb646fd6b40'] = 'Thank you for your purchase!';
$_MODULE['<{paylane}prestashop>payment_return16_296baea265dc573ea7726f2c0ca58254'] = 'Payment processed successfully';
$_MODULE['<{paylane}prestashop>payment_return16_eee9d304cbb9217b9f916dfb2aab3206'] = 'Payment not successful';
$_MODULE['<{paylane}prestashop>paylane_paypal_48974a85469f4039b56dca155b342eb4'] = ' You will be redirected to PayPal website to pay for the order';
$_MODULE['<{paylane}prestashop>paylane_paypal_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods';
$_MODULE['<{paylane}prestashop>paylane_paypal_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order';
$_MODULE['<{paylane}prestashop>paylane_banktransfer_48fa0f621f79f451e58f200957da5b52'] = ' Choose your bank';
$_MODULE['<{paylane}prestashop>paylane_banktransfer_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods';
$_MODULE['<{paylane}prestashop>paylane_banktransfer_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order';
$_MODULE['<{paylane}prestashop>paylane_blik_3fbde0d01e8119d7a05204e26f4e6397'] = 'Blik code';
$_MODULE['<{paylane}prestashop>paylane_blik_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>paylane_blik_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>payment_return_0861274ea243869c15e945f55028d65e'] = 'is in the process';
$_MODULE['<{paylane}prestashop>payment_return_7ae6b8e486b14d2115eb1cda64fba3f7'] = 'Please try again later and check your order history. ';
$_MODULE['<{paylane}prestashop>paylane_ideal_db0492617a97b3e15b4a5abb27ab5ce3'] = 'Choose bank';
$_MODULE['<{paylane}prestashop>paylane_ideal_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods';
$_MODULE['<{paylane}prestashop>paylane_ideal_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order';
$_MODULE['<{paylane}prestashop>paylane_applepay_2c3efa9620fdfc879e6e7719d9301a68'] = 'You will be redirected to Apple Pay payment sheet after clicking button below. You have to agree to the Terms of Service also.';
$_MODULE['<{paylane}prestashop>paylane_applepay_c3535f771415a68de47deed379b51ff5'] = 'This payment method is not available for your device';
$_MODULE['<{paylane}prestashop>paylane_creditcard_9363753610927679868903d4ab39f11a'] = 'Choose your credit card';
$_MODULE['<{paylane}prestashop>paylane_creditcard_837487ddf1e42af555e6adf1cf84a6fc'] = 'Add new credit card';
$_MODULE['<{paylane}prestashop>paylane_creditcard_a44217022190f5734b2f72ba1e4f8a79'] = 'Card number';
$_MODULE['<{paylane}prestashop>paylane_creditcard_c2b63e85bd5e4dc9b6cf5a4693847e06'] = 'Name on card';
$_MODULE['<{paylane}prestashop>paylane_creditcard_8ff37e706d00e426c3ab5cf3772cbb0c'] = 'Expiration month';
$_MODULE['<{paylane}prestashop>paylane_creditcard_efd6182a966d1d6fb93058c00e86aa6c'] = 'Expiration year';
$_MODULE['<{paylane}prestashop>paylane_creditcard_8c65891209d5c09da98b0e531365e0aa'] = 'CVV/CVC';
$_MODULE['<{paylane}prestashop>paylane_creditcard_f320d73aca153c666f79d6dc3ccd3db7'] = 'User authorized earlier - no additional data required';
$_MODULE['<{paylane}prestashop>paylane_creditcard_af5703d070a35f471974e287f64bd654'] = 'Using Single-click method - get card data from earlier order';
$_MODULE['<{paylane}prestashop>paylane_creditcard_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>paylane_creditcard_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>paylane_secureform_c1371ee2297b32150a8f561bb9eff02b'] = 'You will be redirected to PayLane Secure Form to pay for the order ';
$_MODULE['<{paylane}prestashop>paylane_googlepay_9eaa124e4f9ed6eb17407c58d796311f'] = 'GooglePay';
$_MODULE['<{paylane}prestashop>paylane_sofort_41307c447d7784995fd48b1552cc2f9c'] = 'You will be redirected to SOFORT website to pay for the order ';
$_MODULE['<{paylane}prestashop>paylane_sofort_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>paylane_sofort_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>paylane_directdebit_070ea8d9ff342bfbf960ee9394518dba'] = 'Account holder ';
$_MODULE['<{paylane}prestashop>paylane_directdebit_b8b92eb2bb3a5eacbcd0d22bbaddcbbf'] = 'Bank account country ';
$_MODULE['<{paylane}prestashop>paylane_directdebit_16a2e1ec6004f4fbc797f385bb62cbed'] = 'IBAN Number ';
$_MODULE['<{paylane}prestashop>paylane_directdebit_2d48ef5a001ee5cba250992c60496fd8'] = 'Bank Identifier Code (BIC) ';
$_MODULE['<{paylane}prestashop>paylane_directdebit_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>paylane_directdebit_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>google_pay16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>google_pay16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout';
$_MODULE['<{paylane}prestashop>google_pay16_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary ';
$_MODULE['<{paylane}prestashop>google_pay16_2c3efa9620fdfc879e6e7719d9301a68'] = 'You will be redirected to Apple Pay payment sheet after clicking button below. You have to agree to the Terms of Service also. ';
$_MODULE['<{paylane}prestashop>google_pay16_c3535f771415a68de47deed379b51ff5'] = 'This payment method is not available for your device ';
$_MODULE['<{paylane}prestashop>sofort16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>sofort16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout';
$_MODULE['<{paylane}prestashop>sofort16_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary ';
$_MODULE['<{paylane}prestashop>sofort16_41307c447d7784995fd48b1552cc2f9c'] = 'You will be redirected to SOFORT website to pay for the order ';
$_MODULE['<{paylane}prestashop>sofort16_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>sofort16_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>ideal16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>ideal16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout ';
$_MODULE['<{paylane}prestashop>ideal16_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary ';
$_MODULE['<{paylane}prestashop>ideal16_db0492617a97b3e15b4a5abb27ab5ce3'] = 'Choose bank ';
$_MODULE['<{paylane}prestashop>ideal16_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>ideal16_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>credit_card16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>credit_card16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout ';
$_MODULE['<{paylane}prestashop>credit_card16_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary ';
$_MODULE['<{paylane}prestashop>credit_card16_9363753610927679868903d4ab39f11a'] = 'Choose your credit card ';
$_MODULE['<{paylane}prestashop>credit_card16_837487ddf1e42af555e6adf1cf84a6fc'] = 'Add new credit card ';
$_MODULE['<{paylane}prestashop>credit_card16_a44217022190f5734b2f72ba1e4f8a79'] = 'Card number ';
$_MODULE['<{paylane}prestashop>credit_card16_c2b63e85bd5e4dc9b6cf5a4693847e06'] = 'Name on card ';
$_MODULE['<{paylane}prestashop>credit_card16_8ff37e706d00e426c3ab5cf3772cbb0c'] = 'Expiration month ';
$_MODULE['<{paylane}prestashop>credit_card16_efd6182a966d1d6fb93058c00e86aa6c'] = 'Expiration year ';
$_MODULE['<{paylane}prestashop>credit_card16_8c65891209d5c09da98b0e531365e0aa'] = 'CVV/CVC ';
$_MODULE['<{paylane}prestashop>credit_card16_f320d73aca153c666f79d6dc3ccd3db7'] = 'User authorized earlier - no additional data required ';
$_MODULE['<{paylane}prestashop>credit_card16_af5703d070a35f471974e287f64bd654'] = 'Using Single-click method - get card data from earlier order ';
$_MODULE['<{paylane}prestashop>credit_card16_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>credit_card16_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>paypal16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>paypal16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout ';
$_MODULE['<{paylane}prestashop>paypal16_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary ';
$_MODULE['<{paylane}prestashop>paypal16_48974a85469f4039b56dca155b342eb4'] = 'You will be redirected to PayPal website to pay for the order ';
$_MODULE['<{paylane}prestashop>paypal16_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>paypal16_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>bank_transfer16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>bank_transfer16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout ';
$_MODULE['<{paylane}prestashop>bank_transfer16_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary ';
$_MODULE['<{paylane}prestashop>bank_transfer16_48fa0f621f79f451e58f200957da5b52'] = 'Choose your bank ';
$_MODULE['<{paylane}prestashop>bank_transfer16_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>bank_transfer16_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>direct_debit16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>direct_debit16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout ';
$_MODULE['<{paylane}prestashop>direct_debit16_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary ';
$_MODULE['<{paylane}prestashop>direct_debit16_070ea8d9ff342bfbf960ee9394518dba'] = 'Account holder ';
$_MODULE['<{paylane}prestashop>direct_debit16_b8b92eb2bb3a5eacbcd0d22bbaddcbbf'] = 'Bank account country ';
$_MODULE['<{paylane}prestashop>direct_debit16_16a2e1ec6004f4fbc797f385bb62cbed'] = 'IBAN Number ';
$_MODULE['<{paylane}prestashop>direct_debit16_2d48ef5a001ee5cba250992c60496fd8'] = 'Bank Identifier Code (BIC) ';
$_MODULE['<{paylane}prestashop>direct_debit16_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>direct_debit16_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>secure_form16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>secure_form16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout ';
$_MODULE['<{paylane}prestashop>secure_form16_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary ';
$_MODULE['<{paylane}prestashop>secure_form16_c1371ee2297b32150a8f561bb9eff02b'] = 'You will be redirected to PayLane Secure Form to pay for the order ';
$_MODULE['<{paylane}prestashop>secure_form16_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods ';
$_MODULE['<{paylane}prestashop>secure_form16_7395559a94fa7a25907a155cda78afa0'] = 'Confirm order ';
$_MODULE['<{paylane}prestashop>apple_pay16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>apple_pay16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout ';
$_MODULE['<{paylane}prestashop>apple_pay16_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary ';
$_MODULE['<{paylane}prestashop>apple_pay16_2c3efa9620fdfc879e6e7719d9301a68'] = 'You will be redirected to Apple Pay payment sheet after clicking button below. You have to agree to the Terms of Service also. ';
$_MODULE['<{paylane}prestashop>apple_pay16_c3535f771415a68de47deed379b51ff5'] = 'This payment method is not available for your device ';
$_MODULE['<{paylane}prestashop>blik16_644818852b4dd8cf9da73543e30f045a'] = 'Go back to the Checkout ';
$_MODULE['<{paylane}prestashop>blik16_6ff063fbc860a79759a7369ac32cee22'] = 'Checkout ';

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,259 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{paylane}prestashop>paylane_6c051d0b219a9b6d9b49642db330219c'] = 'Polskie ePłatności';
$_MODULE['<{paylane}prestashop>paylane_9f7fac333181f4352876fcbb0510e4ee'] = 'Polskie ePłatności';
$_MODULE['<{paylane}prestashop>paylane_ffb0fea938f3bd790ef1208ec338244d'] = 'Przetwarzanie płatności internetowych przez Polskie ePłatności';
$_MODULE['<{paylane}prestashop>paylane_ce74dba7a25e676be64963e115795c1d'] = 'Czy na pewno chcesz usunąć swoje dane?';
$_MODULE['<{paylane}prestashop>paylane_0238b4ec167be3b14f09513e62bdd2c8'] = 'Wystąpił błąd podczas instalacji modułu.';
$_MODULE['<{paylane}prestashop>paylane_2edeeafca5193109064b155e6cf6fbf9'] = 'Wystąpił błąd podczas tworzenia niestandardowej tabeli.';
$_MODULE['<{paylane}prestashop>paylane_2c8a6e47c36e54cfad8aa30bc3ee4c18'] = 'Wystąpił błąd podczas tworzenia zamównienia. ';
$_MODULE['<{paylane}prestashop>paylane_2d13df6f8b5e4c5af9f87e0dc39df69d'] = 'Oczekuje na realizację';
$_MODULE['<{paylane}prestashop>paylane_916b54ec8bd2d9be03994b6486310ed3'] = 'Płatność rozpoczęta';
$_MODULE['<{paylane}prestashop>paylane_a3b087a75730395ff9ff9d3dd307295e'] = 'Płatność zaakceptowana';
$_MODULE['<{paylane}prestashop>paylane_902b0d55fddef6f8d651fe1035b7d4bd'] = 'Błąd';
$_MODULE['<{paylane}prestashop>paylane_2b010779e5ec1d29582549c0278e59aa'] = 'Formularz płatniczy Polskie ePłatności';
$_MODULE['<{paylane}prestashop>paylane_57e45e68f5f250345cc161a696ea41c6'] = 'Karty Kredytowe Paylane';
$_MODULE['<{paylane}prestashop>paylane_d13ca667cfe2bd1b1bf7e8374dd2a14d'] = 'Przelew Bankowy';
$_MODULE['<{paylane}prestashop>paylane_1887c9fa056cb3b53c3270b55c5b7ab5'] = 'Paypal';
$_MODULE['<{paylane}prestashop>paylane_de049e69c9759f30a9189aa1435e07a4'] = 'Direct Debit';
$_MODULE['<{paylane}prestashop>paylane_69067f38e9bdbb6193474acb385090e8'] = 'Sofort';
$_MODULE['<{paylane}prestashop>paylane_508ff8926d05e6a6ca8112fe461537d2'] = 'Ideal';
$_MODULE['<{paylane}prestashop>paylane_d6f7cbab7e8386bd0647fd79941b357c'] = 'Apple Pay';
$_MODULE['<{paylane}prestashop>paylane_b9d54194c8151efffe48874a0e5547cb'] = 'Google Pay';
$_MODULE['<{paylane}prestashop>paylane_3ba3a67db7953fcb473f7251c885e80a'] = 'Blik';
$_MODULE['<{paylane}prestashop>paylane_84528f5c0881d411ea090f76e4f50455'] = 'Formularz płatniczy Polskie ePłatności';
$_MODULE['<{paylane}prestashop>paylane_a71af3104ee061cc02c2b6fb68125502'] = 'Karty Płatnicze';
$_MODULE['<{paylane}prestashop>paylane_f70c11c224755a265b1164f4f604cce9'] = 'Przelew Bankowy';
$_MODULE['<{paylane}prestashop>paylane_d612298096bc585cc61fd429f8ceb105'] = 'PayPal';
$_MODULE['<{paylane}prestashop>paylane_927f4ac609a862ebaa3e78c910e0704e'] = 'Direct Debit';
$_MODULE['<{paylane}prestashop>paylane_0b7ba93377fafafa35b527bfe5ef43d5'] = 'Sofort';
$_MODULE['<{paylane}prestashop>paylane_952cb1f9be601b5fc7f8d77e195ecf48'] = 'iDeal';
$_MODULE['<{paylane}prestashop>paylane_2e81e8204756a88e749dcc949400fb8f'] = 'Apple Pay';
$_MODULE['<{paylane}prestashop>paylane_0a7cf97fec11ec221909346effad93c9'] = 'Google Pay';
$_MODULE['<{paylane}prestashop>paylane_b716dda5e273e408cdd1c26ee3392979'] = 'Blik';
$_MODULE['<{paylane}prestashop>paylane_dcb8ee74280b538a8c38f57eaee2a00f'] = 'Oczekuje na realizację';
$_MODULE['<{paylane}prestashop>paylane_a7c9dd27df6c3415fb84206dc822f059'] = 'Transakcja pomyślnie zrealizowana';
$_MODULE['<{paylane}prestashop>paylane_bd115a8ece4d19d78d9326d03ad5881f'] = 'Środki zostały pobrane';
$_MODULE['<{paylane}prestashop>paylane_e41c9728e44286b4431cfcad90a6646f'] = 'Anulowano';
$_MODULE['<{paylane}prestashop>paylane_991c9f7c8699939ac8ff9b78856e7ff2'] = 'Transakcja nie powiodła się';
$_MODULE['<{paylane}prestashop>paylane_832c26d8fad93d4b0fc35a88bdd0bd03'] = 'Chargeback';
$_MODULE['<{paylane}prestashop>paylane_2a1da4e344bbfb90574e50e996c8c8c6'] = 'Transakcja przerwana przez użytkownika';
$_MODULE['<{paylane}prestashop>paylane_721ae78a43d0a7698bffedb67b7e39ef'] = 'Niestety, nie udało się potwierdzić Twojej metody płatności. Skontaktuj się ze sprzedawcą, aby uzyskać więcej informacji.';
$_MODULE['<{paylane}prestashop>paylane_d9b85d7f3f1b104a75840466c49a010f'] = 'Niestety, podczas realizacji Twojego zamówienia wystąpił błąd. W przypadku dokonania płatności, zostanie ona automatycznie zwrócona.';
$_MODULE['<{paylane}prestashop>paylane_6c77ee60b717714505de57d5a714abfa'] = 'Error99, brak danych. ';
$_MODULE['<{paylane}prestashop>paylane_26f845d686ee28f8bc6c2f17d471f6c4'] = 'Błąd przekierowania.';
$_MODULE['<{paylane}prestashop>paylane_5f522f24e24f1e3c09fe89af4b887d2c'] = 'Z naszą ofertą wypłyniesz na szerokie wody!';
$_MODULE['<{paylane}prestashop>paylane_bfc8f3bb9010d96d4f02f898cdfbd3be'] = 'Naszym celem jest tworzenie rozwiązań idealnie dobranych pod Twój model biznesowy.';
$_MODULE['<{paylane}prestashop>paylane_d30620e5725a6ef0ab446abb7135eec3'] = 'Od lat pomagamy firmom śmiało płynąć po oceanie możliwości, jakie tworzą nowoczesne rozwiązania w płatnościach online.';
$_MODULE['<{paylane}prestashop>paylane_5bb2c867a0fdaa3b6386cd973557cb4a'] = 'Sprawdź, jak wiele rozwiązań może wesprzeć Twój biznes.';
$_MODULE['<{paylane}prestashop>paylane_1ec6e2144bf5db5da162edba5616abb8'] = 'Załóż konto';
$_MODULE['<{paylane}prestashop>paylane_f36b63f5b3b053820a659e995efa0a46'] = 'Co zrobić aby włączyć Apple Pay:';
$_MODULE['<{paylane}prestashop>paylane_2b484cbf5c21483307def70d1808db51'] = '1. Wyślij nam na adres support@paylane.com prośbę o uruchomienie Apple Pay na swoim koncie.';
$_MODULE['<{paylane}prestashop>paylane_5010dcb900e691ded829ae812ec9592d'] = '2. Wklej certyfikat w pole certyfikat.';
$_MODULE['<{paylane}prestashop>paylane_d48eb3cbe33911a2705617a3bb4a5e32'] = '3. Poinformuj nas o wykonaniu powyższych czynności.';
$_MODULE['<{paylane}prestashop>paylane_9a0d15fa21b0b906856266beb3b20b44'] = 'Co zrobić aby włączyć notyfikacje:';
$_MODULE['<{paylane}prestashop>paylane_f81cf5a474331d2577ce6857ac5d96d7'] = '1. Wymyśl i wpisz poniżej login notyfikacji, hasło notyfikacji i token notyfikacji (nie ma być to login i hasło do logowania do sklepu ani do merchant panelu, ani też do API - ma to być zupełnie nowy login i hasło).';
$_MODULE['<{paylane}prestashop>paylane_0127262082ef8d0aad594851ed973679'] = '2. Wyślij nam na adres support@paylane.com login notyfikacji, hasło notyfikacji oraz adres notyfikacji.';
$_MODULE['<{paylane}prestashop>paylane_2a94082b582d0620bae922fc14c36444'] = 'Ustawienia Podstawowe ';
$_MODULE['<{paylane}prestashop>paylane_76d8f3c00672f61b39846b2112d356a8'] = 'Ustawienia Powiadomień';
$_MODULE['<{paylane}prestashop>paylane_521c36a31c2762741cf0f8890cbe05e3'] = 'Włącz';
$_MODULE['<{paylane}prestashop>paylane_d15305d7a4e34e02489c74a5ef542f36'] = 'Wyłącz';
$_MODULE['<{paylane}prestashop>paylane_88294b4c31a9927c108160891c3d7625'] = 'Secure Form / Formularz Płatniczy Polskie ePłatności';
$_MODULE['<{paylane}prestashop>paylane_38eb0c13548927ec00e0c21389f9fd3b'] = 'Karty Płatnicze';
$_MODULE['<{paylane}prestashop>paylane_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal';
$_MODULE['<{paylane}prestashop>paylane_2b74b9202d5677ae834a921c261449bd'] = 'DirectDebit';
$_MODULE['<{paylane}prestashop>paylane_9ca50bdec53227b0e50ee53d20edcb4a'] = 'Sofort';
$_MODULE['<{paylane}prestashop>paylane_22b7c2abfb7dcf0f672899fb2b6f1670'] = 'iDeal';
$_MODULE['<{paylane}prestashop>paylane_b406ad549c48678d89a06ec2f1e633ae'] = 'Apple Pay';
$_MODULE['<{paylane}prestashop>paylane_81d1c1d1c8e6a330af12300fc80e2d6c'] = 'Google Pay';
$_MODULE['<{paylane}prestashop>paylane_d2171f86cc8b21fe0168a719d39d2999'] = 'BLIK';
$_MODULE['<{paylane}prestashop>paylane_1bb8ec1f73b06df52f45289e6aefc9f4'] = 'Przelew Bankowy ';
$_MODULE['<{paylane}prestashop>paylane_17eb86812c7a32ff63b293f0ebb6afd4'] = 'Brakuje tłumaczenia';
$_MODULE['<{paylane}prestashop>paylane_03308b7921122bb389d0f8731eb5dd13'] = 'Wartość jest wymagana, proszę uzupełnić pole. ';
$_MODULE['<{paylane}prestashop>paylane_8442dbebae73a69bd7e7ca8d26e27812'] = 'Gratulacje! Twoje ustawienia Paylane zostały pomyślnie zaktualizowane.';
$_MODULE['<{paylane}prestashop>paylane_0a50cf495f14c4c8f1c2d6ec38682361'] = 'Gratulacje! Twoje ustawienia Paylane zostały pomyślnie zaktualizowane. ';
$_MODULE['<{paylane}prestashop>paylane_abbc18e40a32ac71be7828483169a8e0'] = 'Prezentacja';
$_MODULE['<{paylane}prestashop>paylane_544adae772c27af59f57424ec176d094'] = 'Ustawienia ogólne';
$_MODULE['<{paylane}prestashop>paylane_60a554eb6ff3e498de9e3034678ab33d'] = 'Konfiguracja';
$_MODULE['<{paylane}prestashop>paylane_59c7c20083361745de2fdbb31645dc7b'] = 'Ustawienia';
$_MODULE['<{paylane}prestashop>paylane_27d8d22be440afe4b96203503ba7018c'] = 'Merchant ID';
$_MODULE['<{paylane}prestashop>paylane_34d3373f9469f5fc56199e15fcee7e1d'] = 'Hash salt';
$_MODULE['<{paylane}prestashop>paylane_bef7005ce81fc71d43f051cd5beafec8'] = 'Login API';
$_MODULE['<{paylane}prestashop>paylane_de152267e3a7737d5514a1e8c794246f'] = 'Publiczny Klucz API';
$_MODULE['<{paylane}prestashop>paylane_783b5855cef1bcd23dc05eecf6bc8a11'] = 'Hasło API';
$_MODULE['<{paylane}prestashop>paylane_d3dfbd92a8b2ad8c28a9df7e752f5f77'] = 'URL Powiadomień';
$_MODULE['<{paylane}prestashop>paylane_66710ff19532aa337f1e00d5e34554df'] = 'Użytkownik Powiadomień ';
$_MODULE['<{paylane}prestashop>paylane_c6274c6fd3394fcaa4940d0100466fbe'] = 'Hasło Powiadomień';
$_MODULE['<{paylane}prestashop>paylane_d368c2642908a88bb8c70e4f8ae9b5cb'] = 'Token Powiadomień';
$_MODULE['<{paylane}prestashop>paylane_c9c0fbf5f1a6ffbd7e1ac25cd2d1b1a8'] = 'Znajdziesz go w swoim Merchant Panelu Paylane w zakładce Administracja -> Integracja.';
$_MODULE['<{paylane}prestashop>paylane_afa1df8d5cb073dae02e6a5025fe8cf3'] = 'Znajdziesz go w swoim Merchant Panelu Paylane w zakładce Administracja -> Integracja.';
$_MODULE['<{paylane}prestashop>paylane_737713850a87881ece5ca28e6bc19e72'] = 'Znajdziesz go w swoim Merchant Panelu Paylane w zakładce Administracja -> Integracja.';
$_MODULE['<{paylane}prestashop>paylane_ffe60c2d96c2f47301f8eca8417b46ad'] = 'Znajdziesz go w swoim Merchant Panelu Paylane w zakładce Administracja -> Integracja.';
$_MODULE['<{paylane}prestashop>paylane_a0402bf67268240fbdd2b2adf7b5be4d'] = 'Znajdziesz je w swoim Merchant Panelu Paylane w zakładce Administracja -> Integracja.';
$_MODULE['<{paylane}prestashop>paylane_36dd4a109a501ea3672cdd887b04f730'] = 'Instrukcję jak włączyć powiadomienia znajdziesz poniżej. ';
$_MODULE['<{paylane}prestashop>paylane_6d30009abbf6f792d37341625e6ca9c7'] = 'Instrukcję jak włączyć powiadomienia znajdziesz poniżej. ';
$_MODULE['<{paylane}prestashop>paylane_92af9ad5200a41d89f2a12ecfede8442'] = 'Instrukcję jak włączyć powiadomienia znajdziesz poniżej. ';
$_MODULE['<{paylane}prestashop>paylane_ddca87408639b3180117cb7505d8d4a1'] = 'Instrukcję jak włączyć powiadomienia znajdziesz poniżej. ';
$_MODULE['<{paylane}prestashop>paylane_afc78b030739f5a0eeafc4149b32532e'] = 'Zapisz konfigurację';
$_MODULE['<{paylane}prestashop>paylane_5eed70e7aa25fa25909dabeeaa8673e0'] = 'Aktywne';
$_MODULE['<{paylane}prestashop>paylane_4d4bf1bd18c6ac1058dbba2236713546'] = 'Przekierowuje na zewnętrzyny formularz płatniczy ';
$_MODULE['<{paylane}prestashop>paylane_b7a920ba73eadd28dab899b3359ba596'] = 'Włącz';
$_MODULE['<{paylane}prestashop>paylane_94b5e5b3ac5951d87b8314ae65d7bab4'] = 'Wyłącz';
$_MODULE['<{paylane}prestashop>googlepay_a02e8227d524da3f74497cbf1212cc0d'] = 'Etykieta';
$_MODULE['<{paylane}prestashop>googlepay_7a2ec9bceb8d52d447d10f6d1bb77ef7'] = 'Zapłać za pomocą Google Pay';
$_MODULE['<{paylane}prestashop>googlepay_d566f7ae78b73f970581a8b607ce5261'] = 'Pokaż ikonę płatności';
$_MODULE['<{paylane}prestashop>directdebit_8067ccd4d85b3b2f277d3c9df78e962c'] = 'Etykieta';
$_MODULE['<{paylane}prestashop>directdebit_d66809501454368b03175098da94d2c4'] = 'Zapłać za pomocą Direct Debit';
$_MODULE['<{paylane}prestashop>directdebit_e5d4a66e15a2d6db0370679d083158fa'] = 'Pokaż ikonę metody płatności';
$_MODULE['<{paylane}prestashop>directdebit_3634257b71cdec408db48baad161d6b7'] = 'Mandate ID';
$_MODULE['<{paylane}prestashop>directdebit_64b8f92de4dcb1e2952be6764442ab55'] = 'Twój Mandate ID';
$_MODULE['<{paylane}prestashop>sofort_dc0a2eec0db681073c4fe13393a132a8'] = 'Etykieta';
$_MODULE['<{paylane}prestashop>sofort_ac9602eb0b69576601eac191677a2f7f'] = 'Zapłać za pomocą Sofort';
$_MODULE['<{paylane}prestashop>sofort_942dfe2e1c376d1234b06fd95a421328'] = 'Pokaż ikonę metody płatności';
$_MODULE['<{paylane}prestashop>paypal_031ab6fa6c3289ceb77dbd42a7bbeec3'] = 'Etykieta';
$_MODULE['<{paylane}prestashop>paypal_96b97177b8db076df54a9f745832e7d9'] = 'Zapłać za pomocą PayPal';
$_MODULE['<{paylane}prestashop>paypal_aaf3d91559f3b05c31630b1eaf483f5e'] = 'Pokaż ikonę metody płatności';
$_MODULE['<{paylane}prestashop>banktransfer_124a30a0661b0a0904c65d15074de7a4'] = 'Etykieta';
$_MODULE['<{paylane}prestashop>banktransfer_14d2945721b36c01082a4fa27b97b5ea'] = 'Zapłać za pomocą Przelewu Bankowego';
$_MODULE['<{paylane}prestashop>banktransfer_8f71f2e45e54b9a41bc5f784702d1cd8'] = 'Pokaż ikonę metody płatności ';
$_MODULE['<{paylane}prestashop>applepay_7e5b47af5e50d9aa6cf3b471fa7d416d'] = 'Etykieta Apple Pay';
$_MODULE['<{paylane}prestashop>applepay_0f2c59eac0792b5e2e9971487243bf83'] = 'Zapłać za pomocą Apple Pay';
$_MODULE['<{paylane}prestashop>applepay_6614152bba993afa2e4a2d4371eb6e7d'] = 'Pokaż ikonę metody płatności';
$_MODULE['<{paylane}prestashop>applepay_3289163ffd2defc8ba3eeb368bc892e5'] = 'Certyfikat Apple Pay';
$_MODULE['<{paylane}prestashop>applepay_76d9640fc625e6e35776d7b59b22dbd9'] = 'Twój certyfikat Apple Pay';
$_MODULE['<{paylane}prestashop>creditcard_382d791ff4e87b06b8a007afc7089c7f'] = 'Etykieta';
$_MODULE['<{paylane}prestashop>creditcard_ce9090102a440bcd9154cdc424ed9620'] = 'Zapłać za pomocą Kart Płatniczych';
$_MODULE['<{paylane}prestashop>creditcard_17c980516a6d90de80a2d4439431eb93'] = 'Pokaż ikonę metody płatności';
$_MODULE['<{paylane}prestashop>creditcard_d6e4bdad784153e1f08d545c7dd63c64'] = 'Override fraud check';
$_MODULE['<{paylane}prestashop>creditcard_42d0d87a60f76aec7320917c78606b55'] = 'Fraud check';
$_MODULE['<{paylane}prestashop>creditcard_988903c9e36f365edb154e656afd77af'] = 'Override AVS level';
$_MODULE['<{paylane}prestashop>creditcard_b77af2bf5f6147a87035ddfdfe95c936'] = 'AVS level';
$_MODULE['<{paylane}prestashop>creditcard_6faf1d8591db3b49000ea89a227f24e9'] = 'Sprawdzanie 3DS';
$_MODULE['<{paylane}prestashop>creditcard_78245b008cff325d1f2b0d11f43e482d'] = 'Kwota do zablokowania podczas autoryzacji ';
$_MODULE['<{paylane}prestashop>blik_08cbf4071caf520a042616f7391a1bdb'] = 'Etykieta';
$_MODULE['<{paylane}prestashop>blik_f17ae1e5f4e913bd7823d95de233896a'] = 'Zapłać za pomocą BLIK';
$_MODULE['<{paylane}prestashop>blik_c3e7bacf78de69bc8c412c5c11e640c5'] = 'Pokaż ikonę metody płatności ';
$_MODULE['<{paylane}prestashop>ideal_9f6ffbba754af19ecd7513f2bec3c30e'] = 'Etykieta';
$_MODULE['<{paylane}prestashop>ideal_0992d77d5749704af2b3628a36ec5813'] = 'Zapłać za pomocą iDeal';
$_MODULE['<{paylane}prestashop>ideal_b265044a2bc5a3de5b54e29e0ef88b58'] = 'Pokaż ikonę metody płatności';
$_MODULE['<{paylane}prestashop>secureform_62d9e98633a8abbea9e6fdafeadf46f5'] = 'Etykieta';
$_MODULE['<{paylane}prestashop>secureform_bf20b54ddf628d80d5f3f61a2687564d'] = 'Zapłać za pomocą Formularza płatniczego Polskie ePłatności';
$_MODULE['<{paylane}prestashop>secureform_fc069edbbd049112b0c351eadd3b69a1'] = 'Pokaż ikonę metody płatności';
$_MODULE['<{paylane}prestashop>displayadminorder_2e8619ed2fa7b354da73037ee6bbbaa9'] = 'Informacje o płatności';
$_MODULE['<{paylane}prestashop>displayadminorder_09aa4dba49a302978bfa85791459feea'] = 'Polskie ePłatności';
$_MODULE['<{paylane}prestashop>displayadminorder_9eac228762bb77a1a0ce1688af42ee8a'] = 'Status płatności';
$_MODULE['<{paylane}prestashop>displayadminorder_4db8dc58684e4993154019a8f3549cd7'] = 'Forma płatności';
$_MODULE['<{paylane}prestashop>displayadminorder_4c1c754fed5471ee7941c128890a6f10'] = 'Źródło płatności';
$_MODULE['<{paylane}prestashop>displayadminorder_0f1215cfbb43a9bcf9b0fa85f1738f1c'] = 'Kraj płatności';
$_MODULE['<{paylane}prestashop>displayadminorder_2280605aa9ff639a0a800369c08052f6'] = 'Waluta płatności';
$_MODULE['<{paylane}prestashop>displayadminorder_05964d915c5c88eeacec82f016e35f31'] = 'Nr ID transakcji';
$_MODULE['<{paylane}prestashop>displayadminorder_32180e6601377012e7fa40a535fcaa8b'] = 'Adres e-mail ';
$_MODULE['<{paylane}prestashop>payment_return_8476f851894c75edcb03d42b24a8c4fa'] = 'Twoje zamówienie';
$_MODULE['<{paylane}prestashop>payment_return_f86fa8c2dc301cc6447d25bca3c7dc85'] = 'zostało zrealizowane. ';
$_MODULE['<{paylane}prestashop>payment_return_57bec6bff0d784f7fb6dbeb646fd6b40'] = 'Dziękujemy za zakup!';
$_MODULE['<{paylane}prestashop>payment_return16_296baea265dc573ea7726f2c0ca58254'] = 'Płatność przetworzona pomyślnie';
$_MODULE['<{paylane}prestashop>payment_return16_eee9d304cbb9217b9f916dfb2aab3206'] = 'Płatność nie została pomyślnie przetworzona';
$_MODULE['<{paylane}prestashop>paylane_paypal_48974a85469f4039b56dca155b342eb4'] = 'Zostaniesz przekierowany na stronę PayPal, aby zapłacić za zamówienie';
$_MODULE['<{paylane}prestashop>paylane_paypal_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>paylane_paypal_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>paylane_banktransfer_48fa0f621f79f451e58f200957da5b52'] = 'Wybierz bank';
$_MODULE['<{paylane}prestashop>paylane_banktransfer_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>paylane_banktransfer_7395559a94fa7a25907a155cda78afa0'] = 'Potwierdź zamówienie';
$_MODULE['<{paylane}prestashop>paylane_blik_3fbde0d01e8119d7a05204e26f4e6397'] = 'Twój kod Blik';
$_MODULE['<{paylane}prestashop>paylane_blik_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>paylane_blik_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności ';
$_MODULE['<{paylane}prestashop>payment_return_0861274ea243869c15e945f55028d65e'] = 'Przetwarzanie';
$_MODULE['<{paylane}prestashop>payment_return_7ae6b8e486b14d2115eb1cda64fba3f7'] = 'Proszę spróbować ponownie, oraz sprawdzić historię zamówień. ';
$_MODULE['<{paylane}prestashop>paylane_ideal_db0492617a97b3e15b4a5abb27ab5ce3'] = 'Wybierz bank';
$_MODULE['<{paylane}prestashop>paylane_ideal_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>paylane_ideal_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>paylane_applepay_2c3efa9620fdfc879e6e7719d9301a68'] = 'Zostaniesz przekierowany do arkusza płatności Apple Pay po kliknięciu przycisku poniżej. Musisz wyrazić zgodę na Warunki korzystania z usługi.';
$_MODULE['<{paylane}prestashop>paylane_applepay_c3535f771415a68de47deed379b51ff5'] = 'Ta metoda płatności jest niedostępna na Twoim urządzeniu';
$_MODULE['<{paylane}prestashop>paylane_creditcard_9363753610927679868903d4ab39f11a'] = 'Wybierz swoją kartę';
$_MODULE['<{paylane}prestashop>paylane_creditcard_837487ddf1e42af555e6adf1cf84a6fc'] = 'Dodaj nową kartę';
$_MODULE['<{paylane}prestashop>paylane_creditcard_a44217022190f5734b2f72ba1e4f8a79'] = 'Numer Karty';
$_MODULE['<{paylane}prestashop>paylane_creditcard_c2b63e85bd5e4dc9b6cf5a4693847e06'] = 'Imię i Nazwisko';
$_MODULE['<{paylane}prestashop>paylane_creditcard_8ff37e706d00e426c3ab5cf3772cbb0c'] = 'Data ważności: Miesiąc';
$_MODULE['<{paylane}prestashop>paylane_creditcard_efd6182a966d1d6fb93058c00e86aa6c'] = 'Data ważności: Rok';
$_MODULE['<{paylane}prestashop>paylane_creditcard_8c65891209d5c09da98b0e531365e0aa'] = 'Kod CVC';
$_MODULE['<{paylane}prestashop>paylane_creditcard_f320d73aca153c666f79d6dc3ccd3db7'] = 'Użytkownik autoryzowany wcześniej - żadne dodatkowe dane nie są wymagane';
$_MODULE['<{paylane}prestashop>paylane_creditcard_af5703d070a35f471974e287f64bd654'] = 'Metoda SingleClick - pobierz dane karty z wcześniejszego zamówienia';
$_MODULE['<{paylane}prestashop>paylane_creditcard_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>paylane_creditcard_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>paylane_secureform_c1371ee2297b32150a8f561bb9eff02b'] = 'Zostaniesz przekierowany do Formularza płatniczego Polskie ePłatności, aby zapłacić za zamówienie';
$_MODULE['<{paylane}prestashop>paylane_googlepay_9eaa124e4f9ed6eb17407c58d796311f'] = 'Googlepay';
$_MODULE['<{paylane}prestashop>paylane_sofort_41307c447d7784995fd48b1552cc2f9c'] = 'Zostaniesz przekierowany na stronę SOFORT, aby zapłacić za zamówienie';
$_MODULE['<{paylane}prestashop>paylane_sofort_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>paylane_sofort_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>paylane_directdebit_070ea8d9ff342bfbf960ee9394518dba'] = 'Właściciel rachunku';
$_MODULE['<{paylane}prestashop>paylane_directdebit_b8b92eb2bb3a5eacbcd0d22bbaddcbbf'] = 'Kraj w jakim otwarto rachunek bankowy';
$_MODULE['<{paylane}prestashop>paylane_directdebit_16a2e1ec6004f4fbc797f385bb62cbed'] = 'Numer IBAN';
$_MODULE['<{paylane}prestashop>paylane_directdebit_2d48ef5a001ee5cba250992c60496fd8'] = 'Numer BIC';
$_MODULE['<{paylane}prestashop>paylane_directdebit_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>paylane_directdebit_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>sofort16_644818852b4dd8cf9da73543e30f045a'] = 'Wróć do koszyka';
$_MODULE['<{paylane}prestashop>sofort16_6ff063fbc860a79759a7369ac32cee22'] = 'Sprawdź';
$_MODULE['<{paylane}prestashop>sofort16_f1d3b424cd68795ecaa552883759aceb'] = 'Podsumowanie zamówienia';
$_MODULE['<{paylane}prestashop>sofort16_41307c447d7784995fd48b1552cc2f9c'] = 'Zostaniesz przekierowany na stronę SOFORT, aby zapłacić za zamówienie';
$_MODULE['<{paylane}prestashop>sofort16_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>sofort16_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>ideal16_644818852b4dd8cf9da73543e30f045a'] = 'Wróć do koszyka';
$_MODULE['<{paylane}prestashop>ideal16_6ff063fbc860a79759a7369ac32cee22'] = 'Sprawdź';
$_MODULE['<{paylane}prestashop>ideal16_f1d3b424cd68795ecaa552883759aceb'] = 'Podsumowanie zamówienia';
$_MODULE['<{paylane}prestashop>ideal16_db0492617a97b3e15b4a5abb27ab5ce3'] = 'Wybierz bank';
$_MODULE['<{paylane}prestashop>ideal16_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>ideal16_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>credit_card16_644818852b4dd8cf9da73543e30f045a'] = 'Wróć do koszyka';
$_MODULE['<{paylane}prestashop>credit_card16_6ff063fbc860a79759a7369ac32cee22'] = 'Sprawdź';
$_MODULE['<{paylane}prestashop>credit_card16_f1d3b424cd68795ecaa552883759aceb'] = 'Podsumowanie zamowienia';
$_MODULE['<{paylane}prestashop>credit_card16_9363753610927679868903d4ab39f11a'] = 'Wybierz swoją kartę kredytową';
$_MODULE['<{paylane}prestashop>credit_card16_837487ddf1e42af555e6adf1cf84a6fc'] = 'Dodaj nową kartę kredytową';
$_MODULE['<{paylane}prestashop>credit_card16_a44217022190f5734b2f72ba1e4f8a79'] = 'Numer Karty';
$_MODULE['<{paylane}prestashop>credit_card16_c2b63e85bd5e4dc9b6cf5a4693847e06'] = 'Imię i Nazwisko';
$_MODULE['<{paylane}prestashop>credit_card16_8ff37e706d00e426c3ab5cf3772cbb0c'] = 'Data ważności: Miesiąc';
$_MODULE['<{paylane}prestashop>credit_card16_efd6182a966d1d6fb93058c00e86aa6c'] = 'Data ważności: Rok';
$_MODULE['<{paylane}prestashop>credit_card16_8c65891209d5c09da98b0e531365e0aa'] = 'Kod CVC';
$_MODULE['<{paylane}prestashop>credit_card16_f320d73aca153c666f79d6dc3ccd3db7'] = 'Użytkownik autoryzowany wcześniej - żadne dodatkowe dane nie są wymagane';
$_MODULE['<{paylane}prestashop>credit_card16_af5703d070a35f471974e287f64bd654'] = 'Metoda SingleClick - pobierz dane karty z wcześniejszego zamówienia';
$_MODULE['<{paylane}prestashop>credit_card16_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>credit_card16_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>paypal16_644818852b4dd8cf9da73543e30f045a'] = 'Wróć do koszyka';
$_MODULE['<{paylane}prestashop>paypal16_6ff063fbc860a79759a7369ac32cee22'] = 'Sprawdź';
$_MODULE['<{paylane}prestashop>paypal16_f1d3b424cd68795ecaa552883759aceb'] = 'Podsumowanie zamówienia';
$_MODULE['<{paylane}prestashop>paypal16_48974a85469f4039b56dca155b342eb4'] = 'Zostaniesz przekierowany na stronę PayPal, aby zapłacić za zamówienie';
$_MODULE['<{paylane}prestashop>paypal16_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>paypal16_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>bank_transfer16_644818852b4dd8cf9da73543e30f045a'] = 'Wróć do koszyka';
$_MODULE['<{paylane}prestashop>bank_transfer16_6ff063fbc860a79759a7369ac32cee22'] = 'Sprawdź';
$_MODULE['<{paylane}prestashop>bank_transfer16_f1d3b424cd68795ecaa552883759aceb'] = 'Podsumowanie zamówienia';
$_MODULE['<{paylane}prestashop>bank_transfer16_48fa0f621f79f451e58f200957da5b52'] = 'Wybierz bank';
$_MODULE['<{paylane}prestashop>bank_transfer16_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>bank_transfer16_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>direct_debit16_644818852b4dd8cf9da73543e30f045a'] = 'Wróć do koszyka';
$_MODULE['<{paylane}prestashop>direct_debit16_6ff063fbc860a79759a7369ac32cee22'] = 'Sprawdź';
$_MODULE['<{paylane}prestashop>direct_debit16_f1d3b424cd68795ecaa552883759aceb'] = 'Podsumowanie zamówienia';
$_MODULE['<{paylane}prestashop>direct_debit16_070ea8d9ff342bfbf960ee9394518dba'] = 'Posiadacz rachunku';
$_MODULE['<{paylane}prestashop>direct_debit16_b8b92eb2bb3a5eacbcd0d22bbaddcbbf'] = 'Kraj w którym otwarto rachunek';
$_MODULE['<{paylane}prestashop>direct_debit16_16a2e1ec6004f4fbc797f385bb62cbed'] = 'Numer IBAN';
$_MODULE['<{paylane}prestashop>direct_debit16_2d48ef5a001ee5cba250992c60496fd8'] = 'Numer BIC';
$_MODULE['<{paylane}prestashop>direct_debit16_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>direct_debit16_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>secure_form16_644818852b4dd8cf9da73543e30f045a'] = 'Wróć do koszyka';
$_MODULE['<{paylane}prestashop>secure_form16_6ff063fbc860a79759a7369ac32cee22'] = 'Sprawdź';
$_MODULE['<{paylane}prestashop>secure_form16_f1d3b424cd68795ecaa552883759aceb'] = 'Podsumowanie zamówienia';
$_MODULE['<{paylane}prestashop>secure_form16_c1371ee2297b32150a8f561bb9eff02b'] = 'Zostaniesz przekierowany do formularza płatniczego Polskie ePłatności, aby zapłacić za zamówienie';
$_MODULE['<{paylane}prestashop>secure_form16_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>secure_form16_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';
$_MODULE['<{paylane}prestashop>apple_pay16_644818852b4dd8cf9da73543e30f045a'] = 'Wróć do koszyka';
$_MODULE['<{paylane}prestashop>apple_pay16_6ff063fbc860a79759a7369ac32cee22'] = 'Sprawdź';
$_MODULE['<{paylane}prestashop>apple_pay16_f1d3b424cd68795ecaa552883759aceb'] = 'Podsumowanie zamowienia';
$_MODULE['<{paylane}prestashop>apple_pay16_2c3efa9620fdfc879e6e7719d9301a68'] = 'Zostaniesz przekierowany do płatności Apple Pay po kliknięciu poniższego przycisku. Musisz wyrazić zgodę na Warunki korzystania z usługi.';
$_MODULE['<{paylane}prestashop>apple_pay16_c3535f771415a68de47deed379b51ff5'] = 'Ta metoda płatności jest niedostępna na Twoim urządzeniu';
$_MODULE['<{paylane}prestashop>blik16_644818852b4dd8cf9da73543e30f045a'] = 'Wróć do koszyka';
$_MODULE['<{paylane}prestashop>blik16_6ff063fbc860a79759a7369ac32cee22'] = 'Potwierdź zamówienie';
$_MODULE['<{paylane}prestashop>blik16_f1d3b424cd68795ecaa552883759aceb'] = 'Podsumowanie zamówienia';
$_MODULE['<{paylane}prestashop>blik16_3fbde0d01e8119d7a05204e26f4e6397'] = 'Kod Blik';
$_MODULE['<{paylane}prestashop>blik16_569fd05bdafa1712c4f6be5b153b8418'] = 'Inne metody płatności';
$_MODULE['<{paylane}prestashop>blik16_7395559a94fa7a25907a155cda78afa0'] = 'Przejdź do płatności';

View File

@@ -0,0 +1,169 @@
.cart_navigation {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 20px;
}
.paylane-form {
padding: 2px 0 20px 0;
font-size: 15px;
}
.paylane-form__field {
padding: 5px 0;
}
.paylane-form--bank-transfer .paylane-form__payment-types-list {
display: flex;
flex-wrap: wrap;
}
.paylane-form--bank-transfer .paylane-form__payment-types-list > li {
margin-left: 10px;
margin-bottom: 10px;
flex: 1 0 20%;
text-align: center;
}
.paylane-form--bank-transfer .paylane-form__payment-types-list > li > label {
display: inline-flex !important;
cursor: pointer;
opacity: 0.5;
transition: 0.2s opacity ease-in-out;
width: 150px;
height: 100px;
padding: 10px;
border: 1px solid #ccc;
align-items: center;
flex-wrap: wrap;
}
.paylane-form--bank-transfer .paylane-form__payment-types-list > li > label:hover,
.paylane-form--bank-transfer .paylane-form__payment-types-list > li > label.checked,
.paylane-form--bank-transfer .paylane-form__payment-types-list > li input:checked + label {
opacity: 1;
}
.paylane-form--bank-transfer .paylane-form__payment-types-list > li input,
.paylane-form--bank-transfer .paylane-form__payment-types-list > li .radio
{
position: fixed;
opacity: 0;
}
.paylane-form--bank-transfer .paylane-form__payment-types-list > li > label > img {
display: block;
margin: 0 auto;
max-width: 125px;
max-height: 50px;
}
.paylane-form--bank-transfer .paylane-form__payment-types-list > li > label > span {
display: block;
width: 100%;
font-size: 11px;
padding-top: 5px;
margin: 0 auto;
text-align: center;
line-height: 1.25em;
}
.apple-pay-button {
-webkit-appearance: -apple-pay-button;
-apple-pay-button-type: buy;
visibility: visible;
display: inline-block;
width: 200px;
min-height: 30px;
border: 1px solid black;
background-image: -webkit-named-image(apple-pay-logo-black);
background-size: 100% calc(60% + 2px);
background-repeat: no-repeat;
background-color: white;
background-position: 50% 50%;
border-radius: 5px;
padding: 0px;
margin: 5px auto;
transition: background-color .15s;
}
.paylane-input-wrapper {
position: relative;
}
.blik-button {
-webkit-appearance: -apple-pay-button;
-apple-pay-button-type: buy;
visibility: visible;
display: inline-block;
width: 200px;
min-height: 30px;
border: 1px solid black;
background-image: -webkit-named-image(apple-pay-logo-black);
background-size: 100% calc(60% + 2px);
background-repeat: no-repeat;
background-color: white;
background-position: 50% 50%;
border-radius: 5px;
padding: 0px;
margin: 5px auto;
transition: background-color .15s;
}
.payment-options .payment-option {
display: flex;
align-items: center;
}
.payment-options .payment-option label {
display: flex !important;
align-items: center;
flex-direction: row-reverse;
}
.payment-options .payment-option label img {
max-height: 50px;
margin-right: 20px;
}
body#checkout .additional-information {
margin-bottom: 1.25rem;
}
.paylane-form .button-set-bottom {
text-align: right;
}
.paylane-form button[type="submit"] {
}
.paylane-credit-card-hide-form{
display: none !important;
}
#paylane_payment_button a {
padding: 10px;
padding-top: 30px;
padding-bottom: 30px;
background-color: #FBFBFB;
}
#paylane_payment_button a:hover {
background-color: #f6f6f6;
}
#paylane_payment_button a:after {
display: block;
content: "\f054";
position: absolute;
right: 15px;
margin-top: -11px;
top: 50%;
font-family: "FontAwesome";
font-size: 25px;
height: 22px;
width: 14px;
color: #777777;
}

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,30 @@
#cnpIframe {
border: none;
display: none !important;
}
.cnpForm {
display: block !important;
}
div.payment_module {
margin-bottom: 10px; }
div.payment_module {
display: block;
border: 1px solid #d6d4d4;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
font-size: 17px;
line-height: 23px;
color: #333333;
font-weight: bold;
padding: 30px 40px 12px 99px;
letter-spacing: -1px;
position: relative;
}
div.payment_module:hover {
background-color: #f6f6f6;
}
div.payment_module button {
font-weight: bold;
font-size: 17px;
}

View File

@@ -0,0 +1,280 @@
.panel-presentation {
padding-left: 0px !important;
padding-right: 0px !important;
}
.paylane-tabs {
margin: 0;
padding: 0;
}
.paylane-tabs nav {
padding: 0;
margin: 30px 0 0 0;
display: block;
}
.paylane-tabs nav a {
padding: 8px 12px;
background-color: none;
color: #00aff0;
text-decoration: none;
margin: 0 5px 0 1px;
font-size: 15px;
vertical-align: top;
position: relative;
top: -5px;
font-family: "Ubuntu Condensed",Helvetica,Arial,sans-serif;
text-transform: uppercase;
}
.paylane-tabs nav a:hover {
border: 1px solid #ddd;
border-bottom: none;
border-radius: 3px 3px 0 0;
margin: 0 4px 0 0;
text-decoration: none;
color: #0077a4;
}
.paylane-tabs nav a.active {
border-radius: 3px 3px 0 0;
background-color: #F5F8F9;
text-decoration: none;
border: 1px solid #ccc;
border-bottom: none;
margin: 0 4px 0 0;
font-size: 15px;
color: #000;
}
.paylane-tabs .content {
margin: 0;
padding: 10px;
background-color: #F5F8F9;
border: 1px solid #ccc;
border-radius: 0 3px 3px 3px;
}
.payment-config-logo {
height: 35px !important;
}
.payment-config-tooltip {
height: 30px;
width: 30px;
padding: 0 0 10px 10px;
cursor: pointer;
}
.border-none {
border: none !important;
}
.payment-label {
margin-bottom: 0 !important;
padding-top: 7px;
font-size: 13px;
font-weight: normal !important;
color: #666;
}
.form-group {
border-top: 1px solid #eee;
padding: 15px 0;
margin: 0 !important;
}
.logo-wrapper {
text-align:right;
padding-right: 10px;
}
.switch-label {
padding-right: 20px !important;
}
.general-tooltip {
font: 12px "Open Sans",Helvetica,Arial,sans-serif;
font-style: italic;
color: #959595;
font-weight: normal !important;
margin-top: 5px;
}
.clear {
clear: both;
}
.align-right {
text-align: right;
}
.pres-header-logo {
border-bottom: 1px solid #eee;
padding-bottom: 25px;
text-align: center;
}
.pres-header-group {
margin-top: 10px;
}
.pres-logo {
height: 100px !important;
}
.pres-content {
padding-top: 25px;
}
.pres-content-img {
text-align: center;
}
.pres-content-wrapper {
padding-bottom: 40px;
}
.pres-content-bottom {
border-top: 1px solid #eee;
}
.pres-header-text {
font-family: "Ubuntu Condensed",Helvetica,Arial,sans-serif;
font-size: 21px;
}
.pres-about-image {
width: 100%;
max-width: 400px;
}
.pres-content-wrapper p {
padding: 15px 0 0;
font-size: 13px !important;
line-height: 24px;
}
.pres-content ul{
padding: 0 0 0 20px;
font-size: 13px !important;
line-height: 24px;
}
.pres-signup {
text-decoration: none;
}
.pres-signup:hover {
color: #2aa9ee !important;
text-decoration: none !important;
}
.pres-btn-signup {
width: auto;
height: 40px;
margin-top: 20px;
padding: 12px 40px 12px 40px;
background-color: #2aa9ee;
font-size: 16px !important;
font-weight: bold;
color: #fff !important;
text-align: center;
text-decoration: none;
text-transform: uppercase;
}
.pres-btn-signup:hover {
background-color: #53bcc2;
color: #fff !important;
text-decoration: none !important;
transition: all 0.3s;
}
.pres-footer {
font-family: "Ubuntu Condensed",Helvetica,Arial,sans-serif;
font-size: 16px;
font-weight: 400;
padding-top: 30px;
text-align: right;
text-transform: lowercase;
background: none !important;
}
.padtop-20 {
padding-top: 20px !important;
}
.pres-circle {
width: 130px;
height: 130px;
margin:0 auto;
margin-top: 5px;
font-size: 61px;
font-weight: bold;
text-align: center
}
.pres-uppercase {
text-transform: uppercase;
}
.pres-firt-uppercase {
display: block;
text-transform: uppercase;
}
.step-title {
font-family: "Ubuntu Condensed",Helvetica,Arial,sans-serif;
font-size: 21px;
font-weight: bold;
color: #2aa9ee;
text-align: center;
cursor: pointer;
padding-top: 40px;
height: 100px;
}
.step-title a {
font-family: "Ubuntu Condensed",Helvetica,Arial,sans-serif;
font-size: 21px;
font-weight: bold;
color: #2aa9ee;
text-align: center;
cursor: pointer;
text-decoration: none;
}
.step-title a:hover {
text-decoration: none;
}
.step-text {
display: none;
text-align: center;
padding-top: 40px !important;
opacity: 0;
-webkit-transition: opacity 5s ease-in;
-moz-transition: opacity 5s ease-in;
-o-transition: opacity 5s ease-in;
-ms-transition: opacity 5s ease-in;
transition: opacity 5s ease-in;
}
.step-title:hover ~ .step-text,
.pres-circle:hover ~ .step-text {
text-decoration: none;
display: block;
cursor: pointer;
opacity: 0.9;
}
.panel-footer button {
border: none !important;
color: #ffffff !important;
background-color: #2aa9ee !important;
width: 40%;
margin: 0 30%;
}
.panel-footer button i {
color: #ffffff !important;
}
.panel-footer button:hover {
background-color: #53bcc2 !important;
transition: all 0.3s;
}
@media only screen and (max-width: 1199px) {
.logo-wrapper {
padding: 0 !important;
text-align: left !important;
}
.switch-label {
padding: 10px 0 0 0 !important;
text-align: left !important;
width: 75% !important;
}
}
@media only screen and (min-width: 1200px) and (max-width: 1309px) {
.switch-label {
padding: 0 !important;
text-align: left !important;
width: 75% !important;
}
}
@media only screen and (max-width: 1200px) {
.pres-header-text {
text-align: center;
}
.pres-content-text {
padding-left: 20px !important;
padding-right: 20px !important;
}
}

View File

@@ -0,0 +1,8 @@
.payment-option {
margin-bottom: 1.5em !important;
width: 105%;
}
.payment-option img {
height: 40px;
margin-top: -5px;
}

View File

@@ -0,0 +1,4 @@
p {
font: 28px Arial;
background-color: yellow;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,33 @@
<?php
/*
* 2007-2016 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-2016 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: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 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: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

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,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,24 @@
$(document).ready(function () {
$('.paylane-tabs nav .tab-title').click(function () {
var elem = $(this);
var target = $(elem.data('target'));
elem.addClass('active').siblings().removeClass('active');
target.show().siblings().hide();
})
if ($('.paylane-tabs nav .tab-title.active').length == 0) {
$('.paylane-tabs nav .tab-title:first').trigger("click");
}
$('[data-toggle="tooltip"]').tooltip();
});

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,35 @@
<form id="module_form" class="defaultForm form-horizontal" action="{$currentIndex|escape:'htmlall':'UTF-8'}" method="post" enctype="multipart/form-data">
<div class="panel">
{foreach from=$payments key=sort item=payment}
<div class="form-group">
<div class="col-lg-2 logo-wrapper">
<img src="{$thisPath|escape:'htmlall':'UTF-8'}views/img/{$payment.type|escape:'htmlall':'UTF-8'}.png" alt="{$payment.type|escape:'htmlall':'UTF-8'}" class="payment-config-logo">
</div>
<label class="payment-label col-lg-3">
{$payment.title|escape:'htmlall':'UTF-8'}
{if !empty($payment.tooltips)}
<img src="{$thisPath|escape:'htmlall':'UTF-8'}views/img/questionmark.jpg" alt="{$payment.type|escape:'htmlall':'UTF-8'}" data-toggle="tooltip" title="{$payment.tooltips|escape:'htmlall':'UTF-8'}" class="payment-config-tooltip paylane-{$payment.type|escape:'htmlall':'UTF-8'}-tooltip">
{/if}
</label>
<div class="col-lg-3">
<div class="col-lg-4 control-label switch-label">{$label.active|escape:'htmlall':'UTF-8'}</div>
<div class="col-lg-6 switch prestashop-switch fixed-width-lg">
<input type="radio" name="PAYLANE_{$payment.brand|escape:'htmlall':'UTF-8'}_ACTIVE" id="PAYLANE_{$payment.brand|escape:'htmlall':'UTF-8'}_ACTIVE_on" value="1" {if ($payment.active == 1)}checked="checked"{/if}>
<label for="PAYLANE_{$payment.brand|escape:'htmlall':'UTF-8'}_ACTIVE_on">{$button.yes|escape:'htmlall':'UTF-8'}</label>
<input type="radio" name="PAYLANE_{$payment.brand|escape:'htmlall':'UTF-8'}_ACTIVE" id="PAYLANE_{$payment.brand|escape:'htmlall':'UTF-8'}_ACTIVE_off" value="0" {if empty($payment.active)}checked="checked"{/if}>
<label for="PAYLANE_{$payment.brand|escape:'htmlall':'UTF-8'}_ACTIVE_off">{$button.no|escape:'htmlall':'UTF-8'}</label>
<a class="slide-button btn"></a>
</div>
</div>
<div style="clear: both"></div>
</div>
<div style="clear: both"></div>
{/foreach}
<div class="panel-footer">
<button type="submit" value="1" name="btnSubmitPaymentConfig" class="btn btn-default pull-right">
<i class="process-icon-save"></i> {$button.save|escape:'htmlall':'UTF-8'}
</button>
</div>
</div>
</form>

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