first commit
This commit is contained in:
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
33
modules/paylane/views/templates/front/payment_form/index.php
Normal file
33
modules/paylane/views/templates/front/payment_form/index.php
Normal 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;
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user