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

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>

View File

@@ -0,0 +1,17 @@
<div class="panel">
<div class="col-lg-12">
<p><img src="{$thisPath|escape:'htmlall':'UTF-8'}views/img/paylane.png" alt="Paylane" class="pres-logo"></p>
<h2>{$presentation.about.title|escape:'htmlall':'UTF-8'}</h2>
<p>{$presentation.about.text1|escape:'htmlall':'UTF-8'}</p>
<p>{$presentation.about.text2|escape:'htmlall':'UTF-8'}</p>
<p>{$presentation.about.text3|escape:'htmlall':'UTF-8'}</p>
<br />
<p>
<a href="{$signUpUrl|escape:'htmlall':'UTF-8'}" target="_blank" class="pres-btn-signup">
{$presentation.signup.title|escape:'htmlall':'UTF-8'}
</a>
</p>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>

View File

@@ -0,0 +1,45 @@
<script type='text/javascript' src="{$backOfficeJsUrl|escape:'htmlall':'UTF-8'}"></script>
<link href="{$backOfficeCssUrl|escape:'htmlall':'UTF-8'}" rel="stylesheet" type="text/css">
{if $message}
{if $message.success}
{assign var="alert" value="alert-success"}
{else}
{assign var="alert" value="alert-danger"}
{/if}
<div class="bootstrap">
<div class="module_confirmation conf confirm alert {$alert|escape:'htmlall':'UTF-8'}">
<button type="button" class="close" data-dismiss="alert">×</button>
{$message.text|escape:'htmlall':'UTF-8'}
</div>
</div>
{/if}
<div class="paylane-tabs">
{if $tabs}
<nav>
{foreach $tabs as $tab}
<a class="tab-title {if isset($selectedTab) && $tab.id==$selectedTab}active{/if}" href="#" id="{$tab.id|escape:'htmlall':'UTF-8'}" data-target="#paylane-tabs-{$tab.id|escape:'htmlall':'UTF-8'}">{$tab.title|escape:'htmlall':'UTF-8'}</a>
{/foreach}
</nav>
<div class="content">
{foreach $tabs as $tab}
<div class="tab-content" id="paylane-tabs-{$tab.id|escape:'htmlall':'UTF-8'}" style="display:{if isset($selectedTab) && $tab.id==$selectedTab}block{else}none{/if}">
{html_entity_decode($tab.content|escape:'htmlall':'UTF-8')}
<h2>{$presentation.about.title2|escape:'htmlall':'UTF-8'}</h2>
<p>{$presentation.about.text4|escape:'htmlall':'UTF-8'}</p>
<p>{$presentation.about.text5|escape:'htmlall':'UTF-8'}</p>
<p>{$presentation.about.text6|escape:'htmlall':'UTF-8'}</p>
<br>
<h2>{$presentation.about.title3|escape:'htmlall':'UTF-8'}</h2>
<p>{$presentation.about.text7|escape:'htmlall':'UTF-8'}</p>
<p>{$presentation.about.text8|escape:'htmlall':'UTF-8'}</p>
</div>
{/foreach}
</div>
{/if}
</div>

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,155 @@
{extends file='page.tpl'}
{block name="content"}
<div class="center-block col-lg-3"></div>
<div class="center-block col-sm-12 col-lg-6">
<h3>{{$postParameters.applePayLabel}}</h3>
<div id="paylane_message" style="display: none">
<div class="alert alert-danger" id="paylane_message_alert" role="alert"></div>
</div>
<form action="{$postParameters.action}" method="POST" class="paylane-form paylane-applepay">
<div id="apple-pay-active">
<input type="hidden" name="payment_type" value="ApplePay">
<input type="hidden" name="payment[additional_information][type]" value="ApplePay">
<input id="payment_params_token" type="hidden" name="payment[additional_information][token]" value="">
{l s='You will be redirected to Apple Pay payment sheet after clicking button below. You have to agree to the Terms of Service also.' mod='paylane'}
<div id="apple-pay-button" class="apple-pay-button" title="Pay with Apple Pay"></div>
</div>
<div id="apple-pay-disabled">
{l s='This payment method is not available for your device' mod='paylane'}
</div>
</form>
<script>
try {
var paymentRadios = document.querySelectorAll(".payment-option input[type=\"radio\"]");
var applePayButton = document.getElementById("apple-pay-button");
function isApplePayChecked() {
var checkedRadioId = null;
for(var i=0; i < paymentRadios.length; i++) {
if (paymentRadios[i].checked) {
checkedRadioId = paymentRadios[i].id;
break;
}
};
if (checkedRadioId) {
var labelSpan = document.querySelector("label[for=\""+checkedRadioId+"\"] span");
return labelSpan && labelSpan.innerText === "{$postParameters.applePayLabel}";
} else {
return false;
}
}
function hideApplePayRadioButton() {
var container = document.querySelector('.paylane-applepay-wrapper');
if (container) {
container.style.display = "none";
}
}
function handleTermsOfService() {
var termsOfService = document.getElementById("conditions_to_approve[terms-and-conditions]");
if (termsOfService && termsOfService.checked) {
applePayButton.style.visibility = "visible";
} else {
applePayButton.style.visibility = "hidden";
}
}
PayLane.setPublicApiKey('{$postParameters.public_key_api}');
for(var i=0; i < paymentRadios.length; i++) {
paymentRadios[i].addEventListener('click', function() {
if (isApplePayChecked()) {
document.querySelector("#payment-confirmation .ps-shown-by-js button").style.display = "none";
handleTermsOfService();
} else {
document.querySelector("#payment-confirmation .ps-shown-by-js button").style.display = "inline-block";
}
})
};
var payLaneApplePayOnAuthorized = function(paymentResult, completion) {
try {
console.info('Apple Pay result', paymentResult);
// perform PayLane sale/authorization on server side
var data = JSON.stringify(paymentResult);
var headers = {
'user-agent': 'Mozilla/4.0 MDN Example',
'content-type': 'application/json'
};
var fetchData = {
method: 'POST',
headers: headers,
body: data
};
if (paymentResult && paymentResult.card && paymentResult.card.token) {
document.getElementById("payment_params_token").value = paymentResult.card.token;
completion(ApplePaySession.STATUS_SUCCESS);
setTimeout(function() {
document.querySelector("form.paylane-applepay").submit();
}, 2500);
} else {
completion(ApplePaySession.STATUS_FAILURE);
}
} catch (e) {
alert(JSON.stringify(e.message));
}
}
var payLaneApplePayPaymentRequest = {
countryCode: "{$postParameters.countryCode}",
currencyCode: "{$postParameters.currencyCode}",
total: {
label: "{$postParameters.paymentDescription}",
amount: "{$postParameters.amount}"
}
};
var payLaneApplePayOnError = function(result) {
console.error(result)
};
applePayButton.addEventListener('click', function() {
try {
var applePaySession = PayLane.applePay.createSession(
payLaneApplePayPaymentRequest,
payLaneApplePayOnAuthorized,
payLaneApplePayOnError
);
} catch (e) {
alert(JSON.stringify(e.message));
}
});
setTimeout(function() {
PayLane.applePay.checkAvailability((available) => {
if (!available) {
hideApplePayRadioButton();
document.getElementById("apple-pay-active").style.display = "none";
document.getElementById("apple-pay-disabled").style.display = "none";
var paylane_message_alert = document.getElementById('paylane_message_alert');
paylane_message.style.display = 'block';
paylane_message_alert.innerHTML = 'Apple Pay not available';
return console.warn('Apple Pay not available');
} else {
document.getElementById("apple-pay-active").style.display = "block";
document.getElementById("apple-pay-disabled").style.display = "none";
}
});
}, 2500);
} catch (e) {
console.error(e);
}
</script>
</div>
<div class="center-block col-lg-3"></div>
{/block}

View File

@@ -0,0 +1,55 @@
{extends file='page.tpl'}
{block name="content"}
<div class="center-block col-lg-3"></div>
<div class="center-block col-sm-12 col-lg-6">
<h3>{{$postParameters.paymentMethodLabel}}</h3>
<form action="{$postParameters.action}" method="POST" class="paylane-form paylane-form--bank-transfer">
<input type="hidden" name="payment[additional_information][type]" value="BankTransfer">
<input type="hidden" name="payment_type" value="BankTransfer">
<input type="hidden" name="payment[additional_information][back_url]" value="{$postParameters['return_url']|escape:'htmlall':'UTF-8'}" />
<div class="paylane-form__container-title">{l s='Choose your bank' mod='paylane'}:</div>
<ul class="form-list paylane-form__payment-types-list">
{foreach $postParameters.paymentTypes as $code => $data}
<li>
<input type="radio" name="payment[additional_information][payment_type]" id="payment_type_{$code}" value="{$code}">
<label for="payment_type_{$code}">
<img src="{$smarty.const._MODULE_DIR_}paylane/views/img/banks/{$code}.png" title="{$data['label']}" alt="{$data['label']}" />
<span>{$data['label']}</span>
</label>
</li>
{/foreach}
</ul>
<div class="clearfix"></div>
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>
<script>
var bankInputs = document.querySelectorAll('.paylane-form--bank-transfer .paylane-form__payment-types-list input[type="radio"]');
for (var i = 0; i < bankInputs.length; i++) {
bankInputs[i].addEventListener('click', function(ev) {
var labels = document.querySelectorAll('.paylane-form--bank-transfer .paylane-form__payment-types-list label');
for (var j = 0; j < labels.length; j++) {
labels[j].classList.remove('checked');
}
document.querySelector('label[for="'+this.id+'"]').classList.add('checked');
});
}
</script>
</div>
<div class="center-block col-lg-3"></div>
{/block}

View File

@@ -0,0 +1,82 @@
{extends file='page.tpl'}
{block name="content"}
<div class="center-block col-lg-3"></div>
<div class="center-block col-sm-12 col-lg-6">
<h3>{{$postParameters.paymentMethodLabel}}</h3>
<form action="{$postParameters['return_url']}" method="POST" class="paylane-form paylane-blik" name="paylane-form-blik">
<input type="hidden" name="payment_type" value="BLIK">
<input type="hidden" name="payment[additional_information][back_url]" value="{$postParameters['return_url']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="payment[additional_information][type]" value="BLIK">
<input type="hidden" name="currency" value="{$postParameters['currency']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="amount" value="{$postParameters['amount']|escape:'htmlall':'UTF-8'}" />
<div class="form-list">
<div class="form-group" id="fg-payment_params:BLIK">
<label for="payment_params:BLIK" class="control-label">{l s='Blik code' mod='paylane'}</label>
<div class="input-box">
<input type="text"
id="payment_params:BLIK"
data-paylane="BLIK"
name="payment[additional_information][code]"
size="6"
class="form-control">
</div>
</div>
</div>
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit" id="button_paylane" onclick="$('#loading').show();">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
<div id="loading" style="display:none;"><img src="modules/paylane/views/img/loading.gif" width="40" height="40" alt="Processing" /></div>
</button>
</div>
</form>
</div>
<div class="center-block col-lg-3"></div>
<script>
try {
document.getElementById("button_paylane").addEventListener("click", paylane_validate);
function paylane_validate(e) {
e.preventDefault();
var payLaneInputs = document.querySelectorAll('[data-paylane]');
var paylane_cc_error = {};
for (var i=0; i < payLaneInputs.length; i++) {
var paylaneInput = payLaneInputs[i];
paylaneInput.addEventListener('focus', function(e) {
var el = document.getElementById('fg-' + e.target.id);
if (el) {
el.classList.remove("has-error");
}
});
var el = document.getElementById('fg-' + paylaneInput.id);
if (paylaneInput.value.trim() === '' && el) {
el.classList.add("has-error");
paylane_cc_error[paylaneInput.id] = true;
} else if (el) {
el.classList.remove("has-error");
delete paylane_cc_error[paylaneInput.id];
}
}
if (Object.keys(paylane_cc_error).length === 0) {
document['paylane-form-blik'].submit();
}
}
} catch (e) {
console.error(e);
}
</script>
{/block}

View File

@@ -0,0 +1,214 @@
{extends file='page.tpl'}
{block name="content"}
<div class="center-block col-lg-3"></div>
<div class="center-block col-sm-12 col-lg-6">
<h2>{$postParameters['paymentMethodLabel']|escape:'htmlall':'UTF-8'}</h2>
<div id="paylane_message" style="display: none">
<div class="alert alert-danger" id="paylane_message_alert" role="alert"></div>
</div>
<form action="{$postParameters['return_url']}" method="POST" id="paylane-form-credit-card" class="paylane-form paylane-credit-card" name="paylane-form-credit-card">
<input type="hidden" name="payment[additional_information][type]" value="CreditCard">
<input type="hidden" name="payment[additional_information][back_url]" value="{$postParameters['3dsreturn_url']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="payment_type" value="CreditCard">
<input id="paylane-payment-token" type="hidden" name="payment[additional_information][token]" value="">
<input id="paylane-payment-creditCardString" type="hidden" name="payment[additional_information][creditCardString]" value="">
<input id="paylane-payment-credit-card-validate" type="hidden" value="1">
<input type="hidden" name="amount" value="{$postParameters['amount']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="currency_code" value="{$postParameters['currency']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="back_url" value="{$postParameters['return_url']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="description" value="{$postParameters['transaction_id']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="hash" value="{$postParameters['hash']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="currency" value="{$postParameters['currency']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="transaction_description" value="{$postParameters['transaction_description']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="language" value="{$postParameters['language']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_name" value="{$postParameters['customer_firstname']|escape:'htmlall':'UTF-8'} {$postParameters['customer_lastname']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_email" value="{$postParameters['customer_email']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_address" value="{$postParameters['customer_address']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_zip" value="{$postParameters['customer_zip']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_city" value="{$postParameters['customer_city']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_country" value="{$postParameters['customer_country']|escape:'htmlall':'UTF-8'}" />
{if !$postParameters.isSingleClickActive || ($postParameters.isSingleClickActive && $postParameters.isFirstOrder)}
{if $postParameters.creditCardsArray}
<div class="field">
<label for="payment_params:id_sale" class="control-label">{l s='Choose your credit card' mod='paylane'}</label>
<div class="input-box">
<select id="payment_params:id_sale" data-paylane="id-sale" class="form-control" name="payment[additional_information][id_sale]" onchange="dropdownHideOrShowForm()">
{foreach from=$postParameters.creditCardsArray item=creditCardSingle}
<option value={$creditCardSingle.id_sale}|{$creditCardSingle.credit_card_number}>{$creditCardSingle.credit_card_number}</option>
{/foreach}
<option value="addNewCard">{l s='Add new credit card' mod='paylane'}</option>
</select>
</div>
</div>
{/if}
<div id="payment_form_paylane_creditcard">
<div class="form-list">
<div class="form-group" id="fg-payment_params:card_numer">
<label for="payment_params:card_numer" class="control-label">{l s='Card number' mod='paylane'}</label>
<div class="input-box">
<input type="text" id="payment_params:card_numer" data-paylane="cc-number" size="19" class="form-control">
</div>
</div>
<div class="form-group" id="fg-payment_params:name_on_card">
<label for="payment_params:name_on_card" class="control-label">{l s='Name on card' mod='paylane'}</label>
<div class="input-box">
<input type="text" id="payment_params:name_on_card" data-paylane="cc-name-on-card" size="50" class="form-control">
</div>
</div>
<div class="form-group" id="fg-payment_params:expiration_month">
<label for="payment_params:expiration_month" class="control-label">{l s='Expiration month' mod='paylane'}</label>
<div class="input-box">
<select id="payment_params:expiration_month" data-paylane="cc-expiry-month" class="form-control form-control-select">
{foreach from=$postParameters.months item=month}
<option value="{$month}">{$month}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group" id="fg-payment_params:expiration_month">
<label for="payment_params:expiration_year" class="control-label">{l s='Expiration year' mod='paylane'}</label>
<div class="input-box">
<select id="payment_params:expiration_year" data-paylane="cc-expiry-year" class="form-control form-control-select">
{foreach from=$postParameters.years item=year}
<option value="{$year}">{$year}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group" id="fg-payment_params:card_code">
<label for="payment_params:card_code" class="control-label">{l s='CVV/CVC' mod='paylane'}</label>
<div class="input-box">
<input type="text" id="payment_params:card_code" data-paylane="cc-cvv" size="4" class="form-control">
</div>
</div>
</div>
</div>
{else}
{if $postParameters.authorizeId}
<input type="hidden" id="payment_params:authorization_id" name="payment[additional_information][authorization_id]" value="{$postParameters.authorizeId}">
{l s='User authorized earlier - no additional data required' mod='paylane'}
{else}
<input type="hidden" id="payment_params:sale_id" name="payment[additional_information][sale_id]" value="{$postParameters.lastSaleId}">
{l s='Using Single-click method - get card data from earlier order' mod='paylane'}
{/if}
{/if}
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="btn btn-primary">{l s='Other payment methods' mod='paylane'}</a>
<button class="btn btn-primary float-xs-right" type="submit" id="button_paylane">{l s='Confirm order' mod='paylane'}</button>
</div>
<div class="row">&nbsp;</div>
</form>
<div class="center-block col-lg-3"></div>
</div>
{if $postParameters.creditCardsArray}
<script>
document.getElementById("paylane-payment-credit-card-validate").value = 0;
</script>
{/if}
<script>
try {
document.getElementById("button_paylane").addEventListener("click", paylane_validate);
function paylane_validate(e) {
if (document.getElementById("paylane-payment-credit-card-validate").value === '0') {
document['paylane-form-credit-card'].submit();
return;
}
e.preventDefault();
var payLaneInputs = document.querySelectorAll('[data-paylane]');
var paylane_cc_error = {};
for (var i=0; i < payLaneInputs.length; i++) {
var paylaneInput = payLaneInputs[i];
paylaneInput.addEventListener('focus', function(e) {
var el = document.getElementById('fg-' + e.target.id);
if (el) {
el.classList.remove("has-error");
}
});
var el = document.getElementById('fg-' + paylaneInput.id);
if (paylaneInput.value.trim() === '' && el) {
el.classList.add("has-error");
paylane_cc_error[paylaneInput.id] = true;
} else if (el) {
el.classList.remove("has-error");
delete paylane_cc_error[paylaneInput.id];
}
}
if (Object.keys(paylane_cc_error).length === 0) {
paylane_generateToken();
}
}
document.addEventListener('DOMContentLoaded', function() {
try{
var val = document.getElementById("payment_params:id_sale").value;
if(val!="addNewCard"){
var creditCardForm = document.getElementById("payment_form_paylane_creditcard");
creditCardForm.classList.add('paylane-credit-card-hide-form');
document.getElementById("paylane-payment-credit-card-validate").value = 0
}
}catch(e){
console.log("Single-click not available");
}
}, false);
function dropdownHideOrShowForm() {
var val = document.getElementById("payment_params:id_sale").value;
var creditCardForm = document.getElementById("payment_form_paylane_creditcard");
if(val != 'addNewCard') {
creditCardForm.classList.add('paylane-credit-card-hide-form');
document.getElementById("paylane-payment-credit-card-validate").value = 0;
}else{
creditCardForm.classList.remove('paylane-credit-card-hide-form');
document.getElementById("paylane-payment-credit-card-validate").value = 1;
}
}
function paylane_generateToken() {
var creditCardNumber = document.getElementById("payment_params:card_numer").value.trim();
var creditCardArray = creditCardNumber.split('');
for(i=4;i<creditCardArray.length-4;i++){
creditCardArray[i] = '*';
}
document.getElementById('paylane-payment-creditCardString').value = creditCardArray.join("");
PayLane.setPublicApiKey('{$postParameters["public_key_api"]}');
PayLane.card.generateToken({
cardNumber: document.getElementById("payment_params:card_numer").value.trim(),
expirationMonth: document.getElementById("payment_params:expiration_month").value.trim(),
expirationYear: document.getElementById("payment_params:expiration_year").value.trim(),
nameOnCard: document.getElementById("payment_params:name_on_card").value.trim(),
cardSecurityCode: document.getElementById("payment_params:card_code").value.trim(),
},
function(token) {
document.getElementById('paylane-payment-token').value = token;
document['paylane-form-credit-card'].submit();
},
function(error) {
console.error(error);
var paylane_message = document.getElementById('paylane_message');
var paylane_message_alert = document.getElementById('paylane_message_alert');
paylane_message.style.display = 'block';
paylane_message_alert.innerHTML = 'Error code: ' + JSON.stringify(error);
});
}
} catch (e) {
console.error(e);
}
</script>
{/block}

View File

@@ -0,0 +1,94 @@
{extends file='page.tpl'}
{block name="content"}
<div class="center-block col-lg-3"></div>
<div class="center-block col-sm-12 col-lg-6">
<h3>{{$postParameters.paymentMethodLabel}}</h3>
<form action="{$postParameters.action}" method="POST" class="paylane-form paylane-direct-debit" name="paylane-form-directdebit">
<input type="hidden" name="payment_type" value="DirectDebit">
<input type="hidden" name="payment[additional_information][type]" value="DirectDebit">
<div class="form-list">
<div class="form-group" id="fg-payment_params:account_holder">
<label for="payment_params:account_holder" class="required">{l s='Account holder' mod='paylane'}</label>
<div class="input-box">
<input type="text" data-paylane="account_holder" id="payment_params:account_holder" name="payment[additional_information][account_holder]" size="30" class="form-control">
</div>
</div>
<div class="form-group" id="fb-payment_params:account_country">
<label for="payment_params:account_country" class="required">{l s='Bank account country' mod='paylane'}</label>
<div class="input-box" id="fg-payment_params:account_country">
<select data-paylane="account_country" id="payment_params:account_country" name="payment[additional_information][account_country]" class="form-control form-control-select">
{foreach $postParameters.countries as $code => $label}
<option value="{$code}">{l s=$label mod='paylane'}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group" id="fg-payment_params:iban">
<label for="payment_params:iban" class="required">{l s='IBAN Number' mod='paylane'}</label>
<div class="input-box">
<input type="text" data-paylane="iban" id="payment_params:iban" name="payment[additional_information][iban]" size="31" class="form-control">
</div>
</div>
<div class="form-group" id="fg-payment_params:bic">
<label for="payment_params:bic" class="required">{l s='Bank Identifier Code (BIC)' mod='paylane'}</label>
<div class="input-box">
<input type="text" data-paylane="bic" id="payment_params:bic" name="payment[additional_information][bic]" size="4" class="form-control">
</div>
</div>
</div>
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit" id="button_paylane">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>
</div>
<div class="center-block col-lg-3"></div>
<script>
try {
document.getElementById("button_paylane").addEventListener("click", paylane_validate);
function paylane_validate(e) {
e.preventDefault();
var payLaneInputs = document.querySelectorAll('[data-paylane]');
var paylane_cc_error = {};
for (var i=0; i < payLaneInputs.length; i++) {
var paylaneInput = payLaneInputs[i];
paylaneInput.addEventListener('focus', function(e) {
var el = document.getElementById('fg-' + e.target.id);
if (el) {
el.classList.remove("has-error");
}
});
var el = document.getElementById('fg-' + paylaneInput.id);
if (paylaneInput.value.trim() === '' && el) {
el.classList.add("has-error");
paylane_cc_error[paylaneInput.id] = true;
} else if (el) {
el.classList.remove("has-error");
delete paylane_cc_error[paylaneInput.id];
}
}
if (Object.keys(paylane_cc_error).length === 0) {
document['paylane-form-directdebit'].submit();
}
}
} catch (e) {
console.error(e);
}
</script>
{/block}

View File

@@ -0,0 +1,26 @@
{extends file='page.tpl'}
{block name="content"}
<div class="center-block col-lg-3"></div>
<div class="center-block col-sm-12 col-lg-6">
<h3>{{$postParameters.googlePayLabel}}</h3>
<form action="{$postParameters.action}" method="POST" class="paylane-form paylane-googlepay">
<div id="google-pay-active">
<input id="payment_params_token" type="hidden" name="payment[additional_information][token]" value="">
{l s=' GOOGLEPAY' mod='paylane'}
</div>
</form>
<script>
</script>
</div>
<div class="center-block col-lg-3"></div>
{/block}

View File

@@ -0,0 +1,41 @@
{extends file='page.tpl'}
{block name="content"}
<div class="center-block col-lg-3"></div>
<div class="center-block col-sm-12 col-lg-6">
<h3>{{$postParameters.paymentMethodLabel}}</h3>
<form action="{$postParameters.action}" method="POST" class="paylane-form paylane-ideal" name="paylane-form-ideal">
<input type="hidden" name="payment_type" value="Ideal">
<input type="hidden" name="payment[additional_information][type]" value="Ideal">
<input type="hidden" name="payment[additional_information][back_url]" value="{$postParameters['return_url']|escape:'htmlall':'UTF-8'}" />
<div class="paylane-form__container-title">{l s='Choose bank' mod='paylane'}:</div>
<div class="form-list">
<div class="form-group">
<div class="input-box" fg="fg-payment_params:bank_code">
<select data-paylane="bank_code" id="payment_params:bank_code" name="payment[additional_information][bank_code]" class="form-control form-control-select">
{foreach $postParameters.banks as $bank}
<option value="{$bank['bank_code']}">{$bank['bank_name']}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit" id="button_paylane">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>
</div>
<div class="center-block col-lg-3"></div>
{/block}

View File

@@ -0,0 +1,29 @@
{extends file='page.tpl'}
{block name="content"}
<div class="center-block col-lg-3"></div>
<div class="center-block col-sm-12 col-lg-6">
<h3>{{$postParameters.paymentMethodLabel}}</h3>
<form action="{$postParameters.action}" method="POST" class="paylane-form paylane-paypal">
<input type="hidden" name="payment_type" value="PayPal">
<input type="hidden" name="payment[additional_information][type]" value="PayPal">
<input type="hidden" name="payment[additional_information][back_url]" value="{$postParameters['return_url']|escape:'htmlall':'UTF-8'}" />
{l s='You will be redirected to PayPal website to pay for the order' mod='paylane'}
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>
</div>
<div class="center-block col-lg-3"></div>
{/block}

View File

@@ -0,0 +1,31 @@
{extends file='page.tpl'}
{block name="content"}
<section>
<h3>PayLane SecureForm</h3>
{l s='You will be redirected to PayLane Secure Form to pay for the order' mod='paylane'}
<form action="{$redirectUrl}" method="post" id="paylane_form" class="paylane-form paylane-secureform">
<input type="hidden" name="merchant_id" value="{$postParameters['merchant_id']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="amount" value="{$postParameters['amount']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="currency" value="{$postParameters['currency']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="transaction_type" value="S" />
<input type="hidden" name="back_url" value="{$postParameters['return_url']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="description" value="{$postParameters['transaction_id']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="transaction_description" value="{$postParameters['transaction_description']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="language" value="{$postParameters['language']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="hash" value="{$postParameters['hash']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_name" value="{$postParameters['customer_firstname']|escape:'htmlall':'UTF-8'} {$postParameters['customer_lastname']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_email" value="{$postParameters['customer_email']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_address" value="{$postParameters['customer_address']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_zip" value="{$postParameters['customer_zip']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_city" value="{$postParameters['customer_city']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="customer_country" value="{$postParameters['customer_country']|escape:'htmlall':'UTF-8'}" />
</form>
<script type="text/javascript">
{literal}
document.forms["paylane_form"].submit();
{/literal}
</script>
</section>
{/block}

View File

@@ -0,0 +1,29 @@
{extends file='page.tpl'}
{block name="content"}
<div class="center-block col-lg-3"></div>
<div class="center-block col-sm-12 col-lg-6">
<h3>{{$postParameters.paymentMethodLabel}}</h3>
<form action="{$postParameters.action}" method="POST" class="paylane-form paylane-sofort">
<input type="hidden" name="payment_type" value="Sofort">
<input type="hidden" name="payment[additional_information][type]" value="Sofort">
<input type="hidden" name="payment[additional_information][back_url]" value="{$postParameters['return_url']|escape:'htmlall':'UTF-8'}" />
{l s='You will be redirected to SOFORT website to pay for the order' mod='paylane'}
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>
</div>
<div class="center-block col-lg-3"></div>
{/block}

View File

@@ -0,0 +1,147 @@
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" title="{l s='Go back to the Checkout' mod='paylane'}">{l s='Checkout' mod='paylane'}</a><span class="navigation-pipe">{$navigationPipe}</span>{{$applePayLabel}}
{/capture}
<h2>{l s='Order summary' mod='paylane'}</h2>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<h3>{{$applePayLabel}}</h3>
<div id="paylane-message-applepay"></div>
<form action="{$action}" method="POST" class="paylane-form paylane-applepay">
<div id="apple-pay-active">
<input type="hidden" name="payment_type" value="ApplePay">
<input type="hidden" name="payment[additional_information][type]" value="ApplePay">
<input id="payment_params_token" type="hidden" name="payment[additional_information][token]" value="">
{l s='You will be redirected to Apple Pay payment sheet after clicking button below. You have to agree to the Terms of Service also.' mod='paylane'}
<div id="apple-pay-button" class="apple-pay-button" title="Pay with Apple Pay"></div>
</div>
<div id="apple-pay-disabled">
{l s='This payment method is not available for your device' mod='paylane'}
</div>
</form>
<script>
try {
var paymentRadios = document.querySelectorAll(".payment-option input[type=\"radio\"]");
var applePayButton = document.getElementById("apple-pay-button");
function isApplePayChecked() {
var checkedRadioId = null;
for(var i=0; i < paymentRadios.length; i++) {
if (paymentRadios[i].checked) {
checkedRadioId = paymentRadios[i].id;
break;
}
};
if (checkedRadioId) {
var labelSpan = document.querySelector("label[for=\""+checkedRadioId+"\"] span");
return labelSpan && labelSpan.innerText === "{$applePayLabel}";
} else {
return false;
}
}
function hideApplePayRadioButton() {
var container = document.querySelector('.paylane-applepay-wrapper');
if (container) {
container.style.display = "none";
}
}
function handleTermsOfService() {
var termsOfService = document.getElementById("conditions_to_approve[terms-and-conditions]");
if (termsOfService && termsOfService.checked) {
applePayButton.style.visibility = "visible";
} else {
applePayButton.style.visibility = "hidden";
}
}
PayLane.setPublicApiKey('{$apiKey}');
for(var i=0; i < paymentRadios.length; i++) {
paymentRadios[i].addEventListener('click', function() {
if (isApplePayChecked()) {
document.querySelector("#payment-confirmation .ps-shown-by-js button").style.display = "none";
handleTermsOfService();
} else {
document.querySelector("#payment-confirmation .ps-shown-by-js button").style.display = "inline-block";
}
})
};
var payLaneApplePayOnAuthorized = function(paymentResult, completion) {
try {
console.info('Apple Pay result', paymentResult);
// perform PayLane sale/authorization on server side
var data = JSON.stringify(paymentResult);
var headers = {
'user-agent': 'Mozilla/4.0 MDN Example',
'content-type': 'application/json'
};
var fetchData = {
method: 'POST',
headers: headers,
body: data
};
if (paymentResult && paymentResult.card && paymentResult.card.token) {
document.getElementById("payment_params_token").value = paymentResult.card.token;
completion(ApplePaySession.STATUS_SUCCESS);
setTimeout(function() {
document.querySelector("form.paylane-applepay").submit();
}, 2500);
} else {
completion(ApplePaySession.STATUS_FAILURE);
}
} catch (e) {
alert(JSON.stringify(e.message));
}
}
var payLaneApplePayPaymentRequest = {
countryCode: "{$countryCode}",
currencyCode: "{$currencyCode}",
total: {
label: "{$paymentDescription}",
amount: "{$amount}"
}
};
var payLaneApplePayOnError = function(result) {
console.error(result)
};
applePayButton.addEventListener('click', function() {
try {
var applePaySession = PayLane.applePay.createSession(
payLaneApplePayPaymentRequest,
payLaneApplePayOnAuthorized,
payLaneApplePayOnError
);
} catch (e) {
alert(JSON.stringify(e.message));
}
});
setTimeout(function() {
PayLane.applePay.checkAvailability((available) => {
if (!available) {
hideApplePayRadioButton();
document.getElementById("apple-pay-active").style.display = "none";
document.getElementById("apple-pay-disabled").style.display = "none";
document.getElementById("paylane-message-applepay").innerHTML = "Apple Pay not available";
return console.warn('Apple Pay not available');
} else {
document.getElementById("apple-pay-active").style.display = "block";
document.getElementById("apple-pay-disabled").style.display = "none";
}
});
}, 2500);
} catch (e) {
console.error(e);
}
</script>

View File

@@ -0,0 +1,50 @@
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" title="{l s='Go back to the Checkout' mod='paylane'}">{l s='Checkout' mod='paylane'}</a><span class="navigation-pipe">{$navigationPipe}</span>{{$paymentMethodLabel}}
{/capture}
<h2>{l s='Order summary' mod='paylane'}</h2>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<h3>{{$paymentMethodLabel}}</h3>
<form action="{$action}" method="POST" class="paylane-form paylane-form--bank-transfer">
<input type="hidden" name="payment_type" value="BankTransfer">
<input type="hidden" name="payment[additional_information][type]" value="BankTransfer">
<div class="paylane-form__container-title">{l s='Choose your bank' mod='paylane'}:</div>
<ul class="form-list paylane-form__payment-types-list">
{foreach $paymentTypes as $code => $data}
<li>
<input type="radio" name="payment[additional_information][payment_type]" id="payment_type_{$code}" value="{$code}">
<label for="payment_type_{$code}">
<img src="{$smarty.const._MODULE_DIR_}paylane/views/img/banks/{$code}.png" title="{$data['label']}" alt="{$data['label']}" />
<span>{$data['label']}</span>
</label>
</li>
{/foreach}
</ul>
<div class="clearfix"></div>
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>
<script>
var bankInputs = document.querySelectorAll('.paylane-form--bank-transfer .paylane-form__payment-types-list input[type="radio"]');
for (var i = 0; i < bankInputs.length; i++) {
bankInputs[i].addEventListener('click', function(ev) {
var labels = document.querySelectorAll('.paylane-form--bank-transfer .paylane-form__payment-types-list label');
for (var j = 0; j < labels.length; j++) {
labels[j].classList.remove('checked');
}
document.querySelector('label[for="'+this.id+'"]').classList.add('checked');
});
}
</script>

View File

@@ -0,0 +1,85 @@
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" title="{l s='Go back to the Checkout' mod='paylane'}">{l s='Checkout' mod='paylane'}</a><span class="navigation-pipe">{$navigationPipe}</span>{{$paymentMethodLabel}}
{/capture}
<h2>{l s='Order summary' mod='paylane'}</h2>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<h3>{{$paymentMethodLabel}}</h3>
<form action="{$action}" method="POST" class="paylane-form paylane-blik" name="paylane-form-blik">
<input type="hidden" name="payment_type" value="BLIK">
<input type="hidden" name="payment[additional_information][back_url]" value="{$postParameters['return_url']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="payment[additional_information][type]" value="BLIK">
<input type="hidden" name="currency" value="{$postParameters['currency']|escape:'htmlall':'UTF-8'}" />
<input type="hidden" name="amount" value="{$postParameters['amount']|escape:'htmlall':'UTF-8'}" />
<div class="form-list">
<div class="form-group" id="fg-payment_params:BLIK">
<label for="payment_params:BLIK" class="control-label">{l s='Blik code' mod='paylane'}</label>
<div class="input-box">
<input type="text"
id="payment_params:BLIK"
data-paylane="BLIK"
name="payment[additional_information][code]"
size="6"
placeholder="000000"
class="blik-button">
</div>
</div>
</div>
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit" id="button_paylane" onclick="$('#loading').show();">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
<div id="loading" style="display:none;"><img src="{$thisPath|escape:'htmlall':'UTF-8'}modules/paylane/views/img/loading.gif" width="40" height="40" alt="Processing" /></div>
</button>
</div>
</form>
</div>
<div class="center-block col-lg-3"></div>
<script>
try {
document.getElementById("button_paylane").addEventListener("click", paylane_validate);
function paylane_validate(e) {
e.preventDefault();
var payLaneInputs = document.querySelectorAll('[data-paylane]');
var paylane_cc_error = {};
for (var i=0; i < payLaneInputs.length; i++) {
var paylaneInput = payLaneInputs[i];
paylaneInput.addEventListener('focus', function(e) {
var el = document.getElementById('fg-' + e.target.id);
if (el) {
el.classList.remove("has-error");
}
});
var el = document.getElementById('fg-' + paylaneInput.id);
if (paylaneInput.value.trim() === '' && el) {
el.classList.add("has-error");
paylane_cc_error[paylaneInput.id] = true;
} else if (el) {
el.classList.remove("has-error");
delete paylane_cc_error[paylaneInput.id];
}
}
if (Object.keys(paylane_cc_error).length === 0) {
document['paylane-form-blik'].submit();
}
}
} catch (e) {
console.error(e);
}
</script>

View File

@@ -0,0 +1,175 @@
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" title="{l s='Go back to the Checkout' mod='paylane'}">{l s='Checkout' mod='paylane'}</a><span class="navigation-pipe">{$navigationPipe}</span>{{$paymentMethodLabel}}
{/capture}
<h2>{l s='Order summary' mod='paylane'}</h2>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<h3>{{$paymentMethodLabel}}</h3>
<form action="{$action}" method="POST" id="paylane-form-credit-card" class="paylane-form paylane-credit-card">
<input type="hidden" name="payment_type" value="CreditCard">
{* <input type="hidden" name="payment[additional_information][back_url]" value="{$postParameters['3dsreturn_url']|escape:'htmlall':'UTF-8'}" /> *}
<input type="hidden" id="payment_params:back_url" name="payment[additional_information][back_url]" value="{$postParameters['3dsreturn_url']}">
<input type="hidden" name="payment[additional_information][type]" value="CreditCard">
<input id="paylane-payment-token" type="hidden" name="payment[additional_information][token]" value="">
<input id="paylane-payment-creditCardString" type="hidden" name="payment[additional_information][creditCardString]" value="">
{if !$isSingleClickActive || ($isSingleClickActive && $isFirstOrder)}
{if $creditCardsArray}
<div class="field">
<label for="payment_params:id_sale" class="required"><em>*</em>{l s='Choose your credit card' mod='paylane'}</label>
<div class="input-box">
<select id="payment_params:id_sale" data-paylane="id-sale" class="required-entry" name="payment[additional_information][id_sale]" onchange="dropdownHideOrShowForm()">
{foreach from=$creditCardsArray item=creditCardSingle}
<option value={$creditCardSingle.id_sale}|{$creditCardSingle.credit_card_number}>{$creditCardSingle.credit_card_number}</option>
{/foreach}
<option value="addNewCard">{l s='Add new credit card' mod='paylane'}</option>
</select>
</div>
</div>
{/if}
<div id="payment_form_paylane_creditcard">
<div class="form-list">
<div class="field">
<label for="payment_params:card_numer" class="required">{l s='Card number' mod='paylane'}</label>
<div class="input-box">
<input type="text" id="payment_params:card_numer" data-paylane="cc-number" size="19" class="input-text required-entry">
</div>
</div>
<div class="field">
<label for="payment_params:name_on_card" class="required">{l s='Name on card' mod='paylane'}</label>
<div class="input-box">
<input type="text" id="payment_params:name_on_card" data-paylane="cc-name-on-card" size="50" class="input-text required-entry">
</div>
</div>
<div class="field">
<label for="payment_params:expiration_month" class="required">{l s='Expiration month' mod='paylane'}</label>
<div class="input-box">
<select id="payment_params:expiration_month" data-paylane="cc-expiry-month" class="required-entry">
{foreach from=$months item=month}
<option value="{$month}">{$month}</option>
{/foreach}
</select>
</div>
</div>
<div class="field">
<label for="payment_params:expiration_year" class="required">{l s='Expiration year' mod='paylane'}</label>
<div class="input-box">
<select id="payment_params:expiration_year" data-paylane="cc-expiry-year" class="required-entry">
{foreach from=$years item=year}
<option value="{$year}">{$year}</option>
{/foreach}
</select>
</div>
</div>
<div class="field">
<label for="payment_params:card_code" class="required">{l s='CVV/CVC' mod='paylane'}</label>
<div class="input-box">
<input type="text" id="payment_params:card_code" data-paylane="cc-cvv" size="4" class="input-text required-entry">
</div>
</div>
</div>
</div>
{else}
{if $authorizeId}
<input type="hidden" id="payment_params:authorization_id" name="payment[additional_information][authorization_id]" value="{$authorizeId}">
{l s='User authorized earlier - no additional data required' mod='paylane'}
{else}
<input type="hidden" id="payment_params:sale_id" name="payment[additional_information][sale_id]" value="{$lastSaleId}">
{l s='Using Single-click method - get card data from earlier order' mod='paylane'}
{/if}
{/if}
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>
<script>
document.addEventListener('DOMContentLoaded', function() {
try{
var val = document.getElementById("payment_params:id_sale").value;
if(val!="addNewCard"){
var creditCardForm = document.getElementById("payment_form_paylane_creditcard");
creditCardForm.classList.add('paylane-credit-card-hide-form');
submitBtn.disabled = false;
}
}catch(e){
console.log("Single-Click not available");
}
}, false);
function dropdownHideOrShowForm() {
var val = document.getElementById("payment_params:id_sale").value;
var creditCardForm = document.getElementById("payment_form_paylane_creditcard");
if(val != 'addNewCard'){
creditCardForm.classList.add('paylane-credit-card-hide-form');
submitBtn.disabled = false;
}else{
creditCardForm.classList.remove('paylane-credit-card-hide-form');
submitBtn.disabled = true;
}
}
try {
PayLane.setPublicApiKey('{$apiKey}');
var submitBtn = document.querySelector('.cart_navigation button[type="submit"]');
if (submitBtn) {
submitBtn.disabled = true;
}
var payLaneInputs = document.querySelectorAll('[data-paylane]');
for (var i=0; i < payLaneInputs.length; i++) {
var paylaneInput = payLaneInputs[i];
paylaneInput.addEventListener('blur', function() {
var filled = true;
for (var j=0; j < payLaneInputs.length; j++) {
var paylaneElem = payLaneInputs[j];
if (!paylaneElem.value) {
filled = false;
break;
}
}
if (filled) {
var creditCardNumber = document.getElementById("payment_params:card_numer").value;;
var creditCardArray = creditCardNumber.split('');
for(i=4;i<creditCardArray.length-4;i++){
creditCardArray[i] = '*';
}
document.getElementById('paylane-payment-creditCardString').value = creditCardArray.join("");
PayLane.card.generateToken({
cardNumber: document.getElementById("payment_params:card_numer").value,
expirationMonth: document.getElementById("payment_params:expiration_month").value,
expirationYear: document.getElementById("payment_params:expiration_year").value,
nameOnCard: document.getElementById("payment_params:name_on_card").value,
cardSecurityCode: document.getElementById("payment_params:card_code").value
},
function(token) {
document.getElementById('paylane-payment-token').value = token;
submitBtn.disabled = false;
},
function(error) {
console.error(error);
});
}
});
}
} catch (e) {
console.error(e);
}
</script>

View File

@@ -0,0 +1,54 @@
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" title="{l s='Go back to the Checkout' mod='paylane'}">{l s='Checkout' mod='paylane'}</a><span class="navigation-pipe">{$navigationPipe}</span>{{$paymentMethodLabel}}
{/capture}
<h2>{l s='Order summary' mod='paylane'}</h2>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<h3>{{$paymentMethodLabel}}</h3>
<form action="{$action}" method="POST" class="paylane-form paylane-direct-debit">
<input type="hidden" name="payment_type" value="DirectDebit">
<input type="hidden" name="payment[additional_information][type]" value="DirectDebit">
<div class="form-list">
<div class="field">
<label for="payment_params:account_holder" class="required"><em>*</em>{l s='Account holder' mod='paylane'}</label>
<div class="input-box">
<input type="text" id="payment_params:account_holder" name="payment[additional_information][account_holder]" size="30" class="input-text required-entry">
</div>
</div>
<div class="field">
<label for="payment_params:account_country" class="required"><em>*</em>{l s='Bank account country' mod='paylane'}</label>
<div class="input-box">
<select id="payment_params:account_country" name="payment[additional_information][account_country]" class="required-entry">
{foreach $countries as $code => $label}
<option value="{$code}">{l s=$label mod='paylane'}</option>
{/foreach}
</select>
</div>
</div>
<div class="field">
<label for="payment_params:iban" class="required"><em>*</em>{l s='IBAN Number' mod='paylane'}</label>
<div class="input-box">
<input type="text" id="payment_params:iban" name="payment[additional_information][iban]" size="31" class="input-text required-entry">
</div>
</div>
<div class="field">
<label for="payment_params:bic" class="required"><em>*</em>{l s='Bank Identifier Code (BIC)' mod='paylane'}</label>
<div class="input-box">
<input type="text" id="payment_params:bic" name="payment[additional_information][bic]" size="4" class="input-text required-entry">
</div>
</div>
</div>
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>

View File

@@ -0,0 +1,36 @@
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" title="{l s='Go back to the Checkout' mod='paylane'}">{l s='Checkout' mod='paylane'}</a><span class="navigation-pipe">{$navigationPipe}</span>{{$paymentMethodLabel}}
{/capture}
<h2>{l s='Order summary' mod='paylane'}</h2>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<h3>{{$paymentMethodLabel}}</h3>
<form action="{$action}" method="POST" class="paylane-form paylane-ideal">
<input type="hidden" name="payment_type" value="Ideal">
<input type="hidden" name="payment[additional_information][type]" value="Ideal">
<div class="paylane-form__container-title">{l s='Choose bank' mod='paylane'}:</div>
<div class="form-list">
<div class="field">
<div class="input-box">
<select id="payment_params:bank_code" name="payment[additional_information][bank_code]" class="required-entry">
{foreach $banks as $bank}
<option value="{$bank['bank_code']}">{$bank['bank_name']}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>

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,25 @@
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" title="{l s='Go back to the Checkout' mod='paylane'}">{l s='Checkout' mod='paylane'}</a><span class="navigation-pipe">{$navigationPipe}</span>{{$paymentMethodLabel}}
{/capture}
<h2>{l s='Order summary' mod='paylane'}</h2>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<h3>{{$paymentMethodLabel}}</h3>
<form action="{$action}" method="POST" class="paylane-form paylane-paypal">
<input type="hidden" name="payment_type" value="PayPal">
<input type="hidden" name="payment[additional_information][type]" value="PayPal">
{l s='You will be redirected to PayPal website to pay for the order' mod='paylane'}
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>

View File

@@ -0,0 +1,45 @@
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" title="{l s='Go back to the Checkout' mod='paylane'}">{l s='Checkout' mod='paylane'}</a><span class="navigation-pipe">{$navigationPipe}</span>{{$paymentMethodLabel}}
{/capture}
<h2>{l s='Order summary' mod='paylane'}</h2>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<h3>{{$paymentMethodLabel}}</h3>
<form id="paylane-form" action="{$action}" method="POST" class="paylane-form paylane-secureform">
<input type="hidden" name="payment_type" value="SecureForm">
{foreach from=$data key=name item=elem}
<input type="hidden" name="{$name}" value="{$elem}">
{/foreach}
{l s='You will be redirected to PayLane Secure Form to pay for the order' mod='paylane'}
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button id="submit-paylane" name="submitOrder" class="button btn btn-primary button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>
<script type="application/javascript">
$(document).on('click', '#submit-paylane', function(e){
e.preventDefault();
$.ajax({
type: 'POST',
url: window.location,
async: false,
data: $('#paylane-form').serializeArray()
}).done(function () {
$('#paylane-form').submit();
}).fail(function () {
alert('Error in request');
});
});
</script>

View File

@@ -0,0 +1,25 @@
{capture name=path}
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" title="{l s='Go back to the Checkout' mod='paylane'}">{l s='Checkout' mod='paylane'}</a><span class="navigation-pipe">{$navigationPipe}</span>{{$paymentMethodLabel}}
{/capture}
<h2>{l s='Order summary' mod='paylane'}</h2>
{assign var='current_step' value='payment'}
{include file="$tpl_dir./order-steps.tpl"}
<h3>{{$paymentMethodLabel}}</h3>
<form action="{$action}" method="POST" class="paylane-form paylane-sofort">
<input type="hidden" name="payment_type" value="Sofort">
<input type="hidden" name="payment[additional_information][type]" value="Sofort">
{l s='You will be redirected to SOFORT website to pay for the order' mod='paylane'}
<div class="cart_navigation">
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html'}" class="button-exclusive btn btn-primary">
<i class="icon-chevron-left"></i>
{l s='Other payment methods' mod='paylane'}
</a>
<button class="button btn btn-primary1 button-medium" type="submit">
<span>{l s='Confirm order' mod='paylane'}<i class="icon-chevron-right right"></i></span>
</button>
</div>
</form>

View File

@@ -0,0 +1,7 @@
{assign var=params value=['payment_type' => 'ApplePay']}
<p class="payment_module paylane-applepay-wrapper" id="paylane_payment_button">
<a class="paylane-expander applepay{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$applePayLabel}}">
{if $withImage}<img src="{$thisPath|escape:'htmlall':'UTF-8'}modules/paylane/views/img/applepay.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$applePayLabel}}
</a>
</p>

View File

@@ -0,0 +1,7 @@
{assign var=params value=['payment_type' => 'BankTransfer']}
<p class="payment_module paylane-bank-transfer-wrapper" id="paylane_payment_button">
<a class="paylane-expander bank-transfer{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$paymentMethodLabel}}">
{if $withImage}<img src="{$thisPath|escape:'htmlall':'UTF-8'}modules/paylane/views/img/banktransfer.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$paymentMethodLabel}}
</a>
</p>

View File

@@ -0,0 +1,7 @@
{assign var=params value=['payment_type' => 'Blik']}
<p class="payment_module paylane-blik-wrapper" id="paylane_payment_button">
<a class="paylane-expander blik{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$blikLabel}}">
{if $withImage}<img src="{$thisPath|escape:'htmlall':'UTF-8'}modules/paylane/views/img/blik.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$blikLabel}}
</a>
</p>

View File

@@ -0,0 +1,7 @@
{assign var=params value=['payment_type' => 'CreditCard']}
<p class="payment_module paylane-credit-card-wrapper" id="paylane_payment_button">
<a class="paylane-expander credit-card{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$paymentMethodLabel}}">
{if $withImage}<img src="{$thisPath|escape:'htmlall':'UTF-8'}modules/paylane/views/img/creditcard.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$paymentMethodLabel}}
</a>
</p>

View File

@@ -0,0 +1,7 @@
{assign var=params value=['payment_type' => 'DirectDebit']}
<p class="payment_module paylane-direct-debit-wrapper" id="paylane_payment_button">
<a class="paylane-expander direct-debit{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$paymentMethodLabel}}">
{if $withImage}<img src="{$thisPath|escape:'htmlall':'UTF-8'}modules/paylane/views/img/directdebit.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$paymentMethodLabel}}
</a>
</p>

View File

@@ -0,0 +1,7 @@
{assign var=params value=['payment_type' => 'GooglePay']}
<p class="payment_module paylane-googlepay-wrapper" id="paylane_payment_button">
<a class="paylane-expander googlepay{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$googlePayLabel}}">
{if $withImage}<img src="{$thisPath|escape:'htmlall':'UTF-8'}modules/paylane/views/img/googlepay.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$googlePayLabel}}
</a>
</p>

View File

@@ -0,0 +1,7 @@
{assign var=params value=['payment_type' => 'Ideal']}
<p class="payment_module paylane-ideal-wrapper" id="paylane_payment_button">
<a class="paylane-expander ideal{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$paymentMethodLabel}}">
{if $withImage}<img src="/modules/paylane/views/img/ideal.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$paymentMethodLabel}}
</a>
</p>

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,7 @@
{assign var=params value=['payment_type' => 'PayPal']}
<p class="payment_module paylane-paypal-wrapper" id="paylane_payment_button">
<a class="paylane-expander paypal{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$paymentMethodLabel}}">
{if $withImage}<img src="{$thisPath|escape:'htmlall':'UTF-8'}modules/paylane/views/img/paypal.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$paymentMethodLabel}}
</a>
</p>

View File

@@ -0,0 +1,7 @@
{assign var=params value=['payment_type' => 'SecureForm']}
<p class="payment_module" id="paylane_payment_button">
<a class="paylane-expander secureform{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$paymentMethodLabel}}">
{if $withImage}<img src="{$thisPath|escape:'htmlall':'UTF-8'}modules/paylane/views/img/secureform.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$paymentMethodLabel}}
</a>
</p>

View File

@@ -0,0 +1,7 @@
{assign var=params value=['payment_type' => 'Sofort']}
<p class="payment_module paylane-sofort-wrapper" id="paylane_payment_button">
<a class="paylane-expander sofort{if $withImage} with-image{/if}" href="{$link->getModuleLink('paylane', 'payment', $params)|escape:'html'}" title="{{$paymentMethodLabel}}">
{if $withImage}<img src="/modules/paylane/views/img/sofort.png" alt="Zapłać przez moduł płatności" width="80" height="auto">{/if}
{{$paymentMethodLabel}}
</a>
</p>

View File

@@ -0,0 +1,16 @@
{extends file='page.tpl'}
{block name="content"}
<section id="content-payment-return" class="card definition-list">
<div class="card-block">
<div class="row">
<div class="col-md-12">
<p>
{if {l s='FRONTEND_MESSAGE_YOUR_ORDER' mod='paylane'} == "FRONTEND_MESSAGE_YOUR_ORDER"}Your order on{else}{l s='FRONTEND_MESSAGE_YOUR_ORDER' mod='paylane'}{/if} {$shop_name|escape:'htmlall':'UTF-8'} {if {l s='FRONTEND_MESSAGE_INPROCESS' mod='paylane'} == "FRONTEND_MESSAGE_INPROCESS"}is in the process.{else}{l s='FRONTEND_MESSAGE_INPROCESS' mod='paylane'}{/if}<br/>
{if {l s='FRONTEND_MESSAGE_PLEASE_BACK_AGAIN' mod='paylane'} == "FRONTEND_MESSAGE_PLEASE_BACK_AGAIN"}Please back again after a minutes and check your order histoy{else}{l s='FRONTEND_MESSAGE_PLEASE_BACK_AGAIN' mod='paylane'}{/if}
</p>
</div>
</div>
</div>
</section>
{/block}

View File

@@ -0,0 +1,56 @@
<div class="row">
<div class="col-lg-12">
<div class="panel">
<div class="panel-heading">
<i class="icon-credit-card"></i>
{if {l s='BACKEND_GENERAL_INFORMATION' mod='paylane'} == "BACKEND_GENERAL_INFORMATION"}PAYMENT INFORMATION{else}{l s='BACKEND_GENERAL_INFORMATION' mod='paylane'}{/if}
<span class="badge">{if {l s='BACKEND_TT_BY_PAYLANE' mod='paylane'} == "BACKEND_TT_BY_PAYLANE"}by Paylane{else}{l s='BACKEND_TT_BY_PAYLANE' mod='paylane'}{/if}</span>
</div>
<div id="paymentinfos" class="well col-xs-12">
<form method='POST' action="">
<div id="paymentinfo">
<div class="form-group">
<label class="col-lg-12">{$paymentInfo.name|escape:'htmlall':'UTF-8'}</label>
</div>
<div class="form-group">
<label class="col-lg-3">{if {l s='PAYLANE_BACKEND_ORDER_STATUS' mod='paylane'} == "PAYLANE_BACKEND_ORDER_STATUS"}Payment status{else}{l s='PAYLANE_BACKEND_ORDER_STATUS' mod='paylane'}{/if}</label>
<label class="control-label col-lg-9">{$paymentInfo.status|escape:'htmlall':'UTF-8'}</label>
</div>
<div class="form-group">
<label class="col-lg-3">{if {l s='PAYLANE_BACKEND_ORDER_PM' mod='paylane'} == "PAYLANE_BACKEND_ORDER_PM"}Used payment method{else}{l s='PAYLANE_BACKEND_ORDER_PM' mod='paylane'}{/if}</label>
<label class="control-label col-lg-9">{$paymentInfo.method|escape:'htmlall':'UTF-8'}</label>
</div>
{if isset($paymentInfo.order_origin)}
<div class="form-group">
<label class="col-lg-3">{if {l s='PAYLANE_BACKEND_ORDER_ORIGIN' mod='paylane'} == "PAYLANE_BACKEND_ORDER_ORIGIN"}Order originated from{else}{l s='PAYLANE_BACKEND_ORDER_ORIGIN' mod='paylane'}{/if}</label>
<label class="control-label col-lg-9">{$paymentInfo.order_origin|escape:'htmlall':'UTF-8'}</label>
</div>
{/if}
{if isset($paymentInfo.order_country)}
<div class="form-group">
<label class="col-lg-3">{if {l s='PAYLANE_BACKEND_ORDER_COUNTRY' mod='paylane'} == "PAYLANE_BACKEND_ORDER_COUNTRY"}Country (of the card-issuer){else}{l s='PAYLANE_BACKEND_ORDER_COUNTRY' mod='paylane'}{/if}</label>
<label class="control-label col-lg-9">{$paymentInfo.order_country|escape:'htmlall':'UTF-8'}</label>
</div>
{/if}
<div class="form-group">
<label class="col-lg-3">{if {l s='PAYLANE_BACKEND_ORDER_CURRENCY' mod='paylane'} == "PAYLANE_BACKEND_ORDER_CURRENCY"}Currency{else}{l s='PAYLANE_BACKEND_ORDER_CURRENCY' mod='paylane'}{/if}</label>
<label class="control-label col-lg-9">{$paymentInfo.currency|escape:'htmlall':'UTF-8'}</label>
</div>
<div class="form-group">&nbsp;</div>
<div class="form-group">
<label class="col-lg-3">{if {l s='BACKEND_TT_TRANSACTION_ID' mod='paylane'} == "BACKEND_TT_TRANSACTION_ID"}Transaction ID{else}{l s='BACKEND_TT_TRANSACTION_ID' mod='paylane'}{/if}</label>
<label class="control-label col-lg-9">{$paymentInfo.transaction_id|escape:'htmlall':'UTF-8'}</label>
</div>
{if isset($paymentInfo.paylane_account)}
<div class="form-group">
<label class="col-lg-3">{if {l s='PAYLANE_BACKEND_EMAIL_ACCOUNT' mod='paylane'} == "PAYLANE_BACKEND_EMAIL_ACCOUNT"}Email address of paylane account{else}{l s='PAYLANE_BACKEND_EMAIL_ACCOUNT' mod='paylane'}{/if}</label>
<label class="control-label col-lg-9">{$paymentInfo.paylane_account|escape:'htmlall':'UTF-8'}</label>
</div>
{/if}
</div>
</form>
</div>
<div style="clear:both"></div>
</div>
</div>
</div>

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,21 @@
{*
* prestashop 1.6
*}
<script>
setTimeout(function() {
var paymentOptions = document.querySelector(".payment-option");
if (paymentOptions !== undefined && paymentOptions.length === undefined) { // only one payment method active
var inputId = paymentOptions.id.replace('-container', '');
document.getElementById(inputId).checked = true;
var additionalInformation = document.getElementById(inputId + '-additional-information');
if (additionalInformation) {
additionalInformation.style.display = "block";
}
var formObj = document.getElementById('pay-with-' + inputId + '-form');
if (formObj) {
formObj.style.display = "block";
}
}
}, 500);
</script>

View File

@@ -0,0 +1,6 @@
{if $status == 'ok'}
<p>
{if {l s='FRONTEND_MESSAGE_YOUR_ORDER' mod='paylane'} == "FRONTEND_MESSAGE_YOUR_ORDER"}Your order on{else}{l s='FRONTEND_MESSAGE_YOUR_ORDER' mod='paylane'}{/if} {$shop_name|escape:'htmlall':'UTF-8'} {if {l s='FRONTEND_MESSAGE_COMPLETE' mod='paylane'} == "FRONTEND_MESSAGE_COMPLETE"}is complete.{else}{l s='FRONTEND_MESSAGE_COMPLETE' mod='paylane'}{/if}<br/>
{if {l s='FRONTEND_MESSAGE_THANK_YOU' mod='paylane'} == "FRONTEND_MESSAGE_THANK_YOU"}Thank you for your purchase!{else}{l s='FRONTEND_MESSAGE_THANK_YOU' mod='paylane'}{/if}
</p>
{/if}

View File

@@ -0,0 +1,7 @@
{if $status == 'ok'}
<p style="color: #458a45;">{l s='Payment processed successfully' mod='paylane'}</p>
{else}
<p style="color: #ff0000;">{l s='Payment not processed successfully' mod='paylane'}</p>
<p>{l mod='paylane' s="Please contact shop administrator for further information."}</p>
{/if}

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;