This commit is contained in:
2025-03-21 20:24:43 +01:00
parent 224398df90
commit f34c9162d4
12427 changed files with 5329941 additions and 373384 deletions

View File

@@ -1,36 +1,7 @@
<?php
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;
/**
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*/
header('Location: ../');

View File

@@ -5,12 +5,12 @@
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="p24-sortable-contener" name="paymethod_list{$suffix}">
<div class="p24-sortable-contener p24-payment-description{$altSuffix}"" name="paymethod_list{$suffix}">
<div class="p24-container">
<div class="available" data-name="list{$suffix}" style="float:left; width: 100%">
{foreach $p24_paymethod_description{$suffix} as $bank_id => $bank_name}
<div class="bank-box" data-id="{$bank_id}" style="height: 90px;">
<div class="bank-logo bank-logo-{$bank_id}"></div>
<div class="bank-logo" style="background-image: url({$p24_paymethod_cache{$suffix}[$bank_id]['mobileImgUrl']})"></div>
<div class="bank-name">
<input type="text" value="{$bank_name}" name="P24_PAYMENT_DESCRIPTION_{$bank_id}{$suffix}"/>
</div>

View File

@@ -5,7 +5,8 @@
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="p24-sortable-contener" name="paymethod_list{$suffix}">
<div class="p24-sortable-contener p24-for-confirm{$altSuffix}" name="paymethod_list{$suffix}">
<div class="p24-container">
<p>
{l s='Visable payment methods' mod='przelewy24'}:
@@ -16,7 +17,7 @@
{foreach $p24_paymethod_list_first{$suffix} as $bank_id => $bank_name}
{if !empty($bank_name)}
<div class="draggable-item bank-box" data-id="{$bank_id}">
<div class="bank-logo bank-logo-{$bank_id}"></div>
<div class="bank-logo" style="background-image: url({$p24_paymethod_cache{$suffix}[$bank_id]['mobileImgUrl']})"></div>
<div class="bank-name">{$bank_name}</div>
</div>
{/if}
@@ -36,7 +37,7 @@
{foreach $p24_paymethod_list_second{$suffix} as $bank_id => $bank_name}
{if !empty($bank_name)}
<div class="draggable-item bank-box" data-id="{$bank_id}">
<div class="bank-logo bank-logo-{$bank_id}"></div>
<div class="bank-logo" style="background-image: url({$p24_paymethod_cache{$suffix}[$bank_id]['mobileImgUrl']})"></div>
<div class="bank-name">{$bank_name}</div>
</div>
{/if}

View File

@@ -5,7 +5,7 @@
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="p24-sortable-contener" name="paymethod_list{$suffix}">
<div class="p24-sortable-contener p24-for-checkout{$altSuffix}" name="paymethod_list{$suffix}">
<div class="p24-container">
<p>
@@ -17,7 +17,7 @@
{foreach $p24_paymethod_list_promote{$suffix} as $bank_id => $bank_name}
{if !empty($bank_name)}
<div class="draggable-item bank-box" data-id="{$bank_id}">
<div class="bank-logo bank-logo-{$bank_id}"></div>
<div class="bank-logo" style="background-image: url({$p24_paymethod_cache{$suffix}[$bank_id]['mobileImgUrl']})"></div>
<div class="bank-name">{$bank_name}</div>
</div>
{/if}
@@ -37,7 +37,7 @@
{foreach $p24_paymethod_list_promote_2{$suffix} as $bank_id => $bank_name}
{if !empty($bank_name)}
<div class="draggable-item bank-box" data-id="{$bank_id}">
<div class="bank-logo bank-logo-{$bank_id}"></div>
<div class="bank-logo" style="background-image: url({$p24_paymethod_cache{$suffix}[$bank_id]['mobileImgUrl']})"></div>
<div class="bank-name">{$bank_name}</div>
</div>
{/if}

View File

@@ -75,33 +75,6 @@
<div id="p24-card-loader"></div>
<div id="p24-card-alert" style="display: none"></div>
</div>
<div class="row p24-register-card-wrapper"
data-dictionary='{
"cardHolderLabel":"{l s='Cardholder name' mod='przelewy24'}",
"cardNumberLabel":"{l s='Card number' mod='przelewy24'}",
"cvvLabel":"{l s='cvv' mod='przelewy24'}",
"expDateLabel":"{l s='Expiry date' mod='przelewy24'}",
"payButtonCaption":"{l s='Save card data' mod='przelewy24'}",
"description":"{l s='Register card' mod='przelewy24'}"
}'
data-card-action="cardRegister"
data-successCallback="registerCardInPanelSuccess"
data-failureCallback="registerCardInPanelFailure"
data-action-register-card-form="{$link->getModuleLink('przelewy24', 'ajaxRegisterCardForm', [], true)|escape:'html'}">
{*<div class="col-lg-4 col-md-6 col-sm-6 col-xs-12 p24-register-card-row">*}
{*<p>*}
{*{l s='Register new credit card' mod='przelewy24'}:*}
{*</p>*}
{*<div id="p24-register-card-form" class="p24-register-card-form"></div>*}
{*<div class="p24-loader"></div>*}
{*<div class="p24-loader-bg"></div>*}
{*<p>*}
{*<a href="#" onclick="showPayJsPopup();hideRegisterCardButton();" class="btn btn-primary p24-add-credit-card">*}
{*{l s='Add credit card' mod='przelewy24'}*}
{*</a>*}
{*</p>*}
{*</div>*}
</div>
<p class="p24-account-bottom-nav">
<a class="btn btn-primary" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
@@ -113,4 +86,4 @@
</p>
</div>
</section>
{/block}
{/block}

View File

@@ -1,36 +1,7 @@
<?php
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;
/**
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*/
header('Location: ../');

View File

@@ -9,279 +9,9 @@
{capture name=path}{l s='Pay with Przelewy24' mod='przelewy24'}{/capture}
{assign var='current_step' value='payment'}
{block name='page_content'}
<div class="p24-payment-return-page przelewy-24">
<a href="http://przelewy24.pl" target="_blank">
<img src="{$logo_url}"
alt="{l s='Pay with Przelewy24' mod='przelewy24'}">
</a>
{if 'ok' === $status}
<p>{l s='Your order is ready.' mod='przelewy24'}
<br><br>- {l s='Total amount' mod='przelewy24'}:
<span class="price"><strong>{$total_to_pay}</strong></span>
<br><br>{l s='We sent for you email with this information.' mod='przelewy24'}
<br><br>{l s='For any questions or information, contact with' mod='przelewy24'}
<a href="{$link->getPageLink('contact', true)|escape:'html'}">{l s='customer service' mod='przelewy24'}</a>.
</p>
{if $P24_PAYMENT_METHOD_LIST}
<p>
{l s='Select payment method' mod='przelewy24'}:
</p>
{elseif $payment_method_selected_id > 0}
<p>
{l s='Your payment method' mod='przelewy24'}:
<strong>
{$payment_method_selected_name}
</strong>
</p>
<p>
<img alt="{$payment_method_selected_name}"
src="https://secure.przelewy24.pl/template/201312/bank/logo_{$payment_method_selected_id}.gif">
</p>
{/if}
{if $card_remember_input}
{if $customer_cards|sizeof > 0}
<div class="p24-recurring">
<p>
{l s='Your stored credit cards' mod='przelewy24'}:
</p>
{foreach from=$customer_cards key=id item=card}
<a class="bank-box recurring"
data-id="{$card.card_type_md5}"
data-card-id="{$card.id}"
data-action="{$charge_card_url}">
<div class="bank-logo bank-logo-{$card.card_type_md5}">
<span>{$card.mask_substr}</span>
</div>
<div class="bank-name">{$card.card_type}</div>
</a>
{/foreach}
</div>
{/if}
{if !$customer_is_guest}
<div class="">
<label>
<input data-action="{$p24_ajax_notices_url}" {if $remember_customer_cards}checked="checked"{/if}
type="checkbox"
id="p24-remember-my-card"
class="p24-remember-my-card"
name="p24-remember-my-card" value="1">
<span>{l s='Remember my payment card' mod='przelewy24'}</span>
</label>
</div>
{/if}
{/if}
{include file='module:przelewy24/views/templates/hook/payment_block.tpl'}
{if $P24_PAYMENT_METHOD_LIST}
{if $p24_paymethod_graphics}
<div class="pay-method-list pay-method-graphics pay-method-list-first">
{if $p24_paymethod_list_first|sizeof > 0}
{foreach $p24_paymethod_list_first as $bank_id => $bank_name}
{if !empty($bank_name)}
<a class="bank-box" {if (145 === ($bank_id|intval) || 218 === ($bank_id|intval)) && $pay_card_inside_shop}onclick="showPayJsPopup()"{/if}
data-id="{$bank_id}">
<div class="bank-logo bank-logo-{$bank_id}"></div>
<div class="bank-name">{$bank_name}</div>
</a>
{/if}
{/foreach}
{/if}
</div>
<div class="p24-text-center">
<div class="p24-stuff-nav">
<div class="p24-more-stuff p24-stuff">
{l s='More payment methods' mod='przelewy24'}
</div>
<div class="p24-less-stuff p24-stuff">
{l s='Less payment methods' mod='przelewy24'}
</div>
</div>
</div>
<div class="pay-method-list pay-method-graphics pay-method-list-second" style="display: none">
{if $p24_paymethod_list_second|sizeof > 0}
{foreach $p24_paymethod_list_second as $bank_id => $bank_name}
{if !empty($bank_name)}
<a class="bank-box" {if (145 === ($bank_id|intval) || 218 === ($bank_id|intval)) && $pay_card_inside_shop}onclick="showPayJsPopup()"{/if}
data-id="{$bank_id}">
<div class="bank-logo bank-logo-{$bank_id}"></div>
<div class="bank-name">{$bank_name}</div>
</a>
{/if}
{/foreach}
{/if}
</div>
{else}
<ul class="pay-method-list pay-method-text-list pay-method-list-first">
{if $p24_paymethod_list_first|sizeof > 0}
{foreach $p24_paymethod_list_first as $bank_id => $bank_name}
{if !empty($bank_name)}
<li>
<input type="radio" class="bank-box"
{if (145 === ($bank_id|intval) || 218 === ($bank_id|intval)) && $pay_card_inside_shop}onclick="showPayJsPopup()"{/if} data-id="{$bank_id}"
id="paymethod-bank-id-{$bank_id}"
name="paymethod-bank">
<label for="paymethod-bank-id-{$bank_id}"
style="font-weight:normal;position:relative; top:-3px;">
{$bank_name}
</label>
</li>
{/if}
{/foreach}
{/if}
</ul>
<div class="p24-text-center">
<div class="p24-stuff-nav">
<div class="p24-more-stuff p24-stuff">
{l s='More payment methods' mod='przelewy24'}
</div>
<div class="p24-less-stuff p24-stuff">
{l s='Less payment methods' mod='przelewy24'}
</div>
</div>
</div>
<ul class="pay-method-list pay-method-text-list pay-method-list-second" style="display: none">
{if $p24_paymethod_list_second|sizeof > 0}
{foreach $p24_paymethod_list_second as $bank_id => $bank_name}
{if !empty($bank_name)}
<li>
<input type="radio" class="bank-box"
{if (145 === ($bank_id|intval) || 218 === ($bank_id|intval)) && $pay_card_inside_shop}onclick="showPayJsPopup()"{/if} data-id="{$bank_id}"
id="paymethod-bank-id-{$bank_id}"
name="paymethod-bank">
<label for="paymethod-bank-id-{$bank_id}"
style="font-weight:normal;position:relative; top:-3px;">
{$bank_name}
</label>
</li>
{/if}
{/foreach}
{/if}
</ul>
{/if}
{/if}
<form action="{$p24_url}" method="post" id="przelewy24Form" name="przelewy24Form"
accept-charset="utf-8">
<input type="hidden" name="p24_merchant_id" value="{$p24_merchant_id}">
<input type="hidden" name="p24_session_id" value="{$p24_session_id}">
<input type="hidden" name="p24_pos_id" value="{$p24_pos_id}">
<input type="hidden" name="p24_amount" value="{$p24_amount}">
<input type="hidden" name="p24_currency" value="{$p24_currency}">
<input type="hidden" name="p24_description" value="{$p24_description}">
<input type="hidden" name="p24_email" value="{$p24_email}">
<input type="hidden" name="p24_client" value="{$p24_client}">
<input type="hidden" name="p24_address" value="{$p24_address}">
<input type="hidden" name="p24_zip" value="{$p24_zip}">
<input type="hidden" name="p24_city" value="{$p24_city}">
<input type="hidden" name="p24_country" value="{$p24_country}">
<input type="hidden" name="p24_encoding" value="UTF-8">
<input type="hidden" name="p24_url_status" value="{$p24_url_status}">
<input type="hidden" name="p24_url_return" value="{$p24_url_return}">
<input type="hidden" name="p24_api_version" value="{$p24_api_version}">
<input type="hidden" name="p24_ecommerce" value="{$p24_ecommerce}">
<input type="hidden" name="p24_ecommerce2" value="{$p24_ecommerce2}">
<input type="hidden" name="p24_language" value="{$p24_language}">
<input type="hidden" name="p24_sign" value="{$p24_sign}">
<input type="hidden" name="p24_wait_for_result" value="{$p24_wait_for_result}">
<input type="hidden" name="p24_shipping" value="{$p24_shipping}">
<input type="hidden" name="p24_method" value="{$payment_method_selected_id}">
<input type="hidden" name="p24_card_customer_id" value="">
{p24_print_hook_display_order_confirmation}
{foreach $p24ProductItems as $name => $value}
<input type="hidden" name="{$name}" value="{$value}">
{/foreach}
<br>
{if 'blik_uid' === $p24_method}
<div class="p24-loader"></div>
<div class="p24-loader-bg"></div>
<input type="hidden" name="p24_blik_method" value="{$p24_method}">
{if $p24_blik_alias}
<p id="blikAlias">
<strong>
{l s='You have existing alias, please proceed with your order' mod='przelewy24'}
</strong>
</p>
<div id="blikAliasAlternativeKeys">
<strong>
{l s='You have alternative aplications key, please chose one' mod='przelewy24'}
</strong>
</div>
{/if}
<div id="blikCodeContainer" class="form-group" {if $p24_blik_alias}style="display: none;"{/if}
data-websocket-url="{$p24_blik_websocket}"
data-shop-order-id="{$p24_shop_order_id}"
data-payment-failed-url="{$p24_payment_failed_url}"
data-ajax-verify-blik-url="{$p24_blik_ajax_verify_url}"
data-ajax-blik-error-url="{$p24_blik_error_url}"
>
<div class="alert alert-warning" id="blikAliasError"></div>
<div class="alert alert-warning" id="declinedAlias">
{l s='Your Blik alias was declined, please provide BlikCode' mod='przelewy24'}
</div>
<input type="text" class="form-control" id="blikCode" name="p24_blik_code"
placeholder="{l s='Your BlikCode' mod='przelewy24'}" autocomplete="off" maxlength="6">
<span id="blikCodeError" class="help-block"></span>
<span id="wrongBlikCode" class="help-block">
{l s='BlikCode needs to be exactly 6 digits' mod='przelewy24'}
</span>
</div>
<br>
<p>
<strong>{l s='Please get your mobile device with BLIK application ready to confirm payment' mod='przelewy24'}</strong>
</p>
{/if}
<br>
{if $payment_method_selected_id > 0}
<button data-validation-required="{$validationRequired}" data-text-oneclick="{l s='Pay by OneClick' mod='przelewy24'}" id="submitButton" class="btn btn-primary" {if 2 === ($validationRequired|intval)}data-validation-link="{$validationLink}" type="button" onclick="proceedPayment({$cartId})"{else} onclick="formSend();" type="submit"{/if} >{l s='Pay' mod='przelewy24'}</button>
{elseif isset($p24_blik_code)}
<button onclick="formSend();" class="btn btn-primary">{l s='Pay by Blik' mod='przelewy24'}</button>
{else}
<button id="submitButton" data-validation-required="{$validationRequired}" data-text-oneclick="{l s='Pay by OneClick' mod='przelewy24'}" class="btn btn-primary" {if 2 === ($validationRequired|intval)}data-validation-link="{$validationLink}" type="button" onclick="proceedPayment({$cartId})"{else} onclick="formSend();" type="submit"{/if}>{l s='Pay by Przelewy24' mod='przelewy24'}</button>
{/if}
</form>
{if !isset($p24_blik_code)}
<p class="p24-small-text">
{l s='Now you will be redirected to the Przelewy24 to process payments.' mod='przelewy24'}
</p>
{/if}
{elseif 'payment' === $status}
<p class="warning">
{l s='Thank you for your order' mod='przelewy24'}
</p>
{else}
<p class="warning">
{l s='There was an error. Contact with' mod='przelewy24'}
<a href="{$link->getPageLink('contact', true)|escape:'html'}">{l s='customer service' mod='przelewy24'}</a>.
</p>
{/if}
</div>
<div id="P24FormAreaHolder" onclick="hidePayJsPopup();" style="display: none">
<div id="P24FormArea" class="popup" style="visibility: hidden"></div>
<div id="p24-card-loader"></div>
<div id="p24-card-alert" style="display: none"></div>
</div>
<div class="row p24-register-card-wrapper"
data-dictionary='{
"cardHolderLabel":"{l s='Name and surname' mod='przelewy24'}",
"cardNumberLabel":"{l s='Card number' mod='przelewy24'}",
"cvvLabel":"{l s='cvv' mod='przelewy24'}",
"expDateLabel":"{l s='Expired date' mod='przelewy24'}",
"payButtonCaption":"{l s='Pay' mod='przelewy24'}",
"description":"{l s='Register card and payment' mod='przelewy24'}",
"threeDSAuthMessage":"{l s='Click to redirect to 3ds payment.' mod='przelewy24'}",
"registerCardLabel":"{l s='Register card' mod='przelewy24'}"
}'
data-card-action="cardCharge"
data-card-cart-id="{$cartId}"
data-successCallback="payInShopSuccess"
data-failureCallback="payInShopFailure"
data-action-payment-success="{$link->getModuleLink('przelewy24', 'paymentSuccessful', [], true)|escape:'html'}"
data-action-payment-failed="{$link->getModuleLink('przelewy24', 'paymentFailed', [], true)|escape:'html'}"
data-action-register-card-form="{$link->getModuleLink('przelewy24', 'ajaxChargeCardForm', [], true)|escape:'html'}"
data-action-remember_order_id="{$link->getModuleLink('przelewy24', 'ajaxRememberOneclickOrderId', [], true)|escape:'html'}"
data-action-payment-check="{$link->getModuleLink('przelewy24', 'ajaxPaymentCheck', [], true)|escape:'html'}">
</div>
{/block}
{/block}

View File

@@ -17,6 +17,11 @@
</a>
{l s='Payment failed!' mod='przelewy24'}
</h2>
<div style="text-align: center;">
<p class="alert alert-danger" style="font-size: 1.4em; font-weight: bold;">
{l s='Payment has failed. Try agian.' mod='przelewy24'}
</p>
</div>
<p class="warning">
{l s='Your payment was not confirmed by Przelewy24. Contact with your seller for more information.' mod='przelewy24'}
</p>
@@ -34,7 +39,12 @@
<a class="btn btn-primary" href="{$urls.pages.history}">
{l s='Show order history' mod='przelewy24'}
</a>
{if $extra}
<a class="btn btn-primary add-to-cart" href="{$extra.redirect_url}">
{l s='try again' mod='przelewy24'}
</a>
{/if}
</p>
</div>
</section>
{/block}
{/block}

View File

@@ -6,21 +6,23 @@
*
*}
<section>
<p>
{l s='After ordering you will be redirected to the service Przelewy24 to finish payments' mod='przelewy24'}.
</p>
<img src="{$logo_url}"
alt="{l s='Pay with Przelewy24' mod='przelewy24'}">
<dl>
{if $extracharge > 0}
<dt>{l s='Extracharge Przelewy24' mod='przelewy24'}</dt>
<dd>{$extracharge_formatted} {$tax}</dd>
<dt>{l s='Amount' mod='przelewy24'}</dt>
<dd>{$checkTotal} {$tax}</dd>
{else}
<dt>{l s='Amount' mod='przelewy24'}</dt>
<dd>{$checkTotal} {$tax}</dd>
{/if}
</dl>
{if $enable_intro}
<p>
{l s='After ordering you will be redirected to the service Przelewy24 to finish payments' mod='przelewy24'}.
</p>
<img src="{$logo_url}"
alt="{l s='Pay with Przelewy24' mod='przelewy24'}">
{/if}
<dl>
{if $extracharge > 0}
<dt>{l s='Extracharge Przelewy24' mod='przelewy24'}</dt>
<dd>{$extracharge_formatted} {$tax}</dd>
<dt>{l s='Amount' mod='przelewy24'}</dt>
<dd>{$checkTotal} {$tax}</dd>
{else}
<dt>{l s='Amount' mod='przelewy24'}</dt>
<dd>{$checkTotal} {$tax}</dd>
{/if}
</dl>
{hook h='displayInstallmentPayment'}
</section>

View File

@@ -0,0 +1,32 @@
{*
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="panel">
<div class="panel-heading">
<i class="icon-money"></i> {l s='Przelewy24 Payment' mod='przelewy24'}
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th><span class="title_box">{l s='Date' mod='przelewy24'}</span></th>
<th><span class="title_box">{l s='Link' mod='przelewy24'}</span></th>
<th><span class="title_box">{l s='P24 ID' mod='przelewy24'}</span></th>
<th><span class="title_box">{l s='Amount' mod='przelewy24'}</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>{$p24_order_received}</span></td>
<td><span><a class="" href="{$link}">{$link}</a></span></td>
<td><span>{$p24_order_id|escape:'html':'UTF-8'}</a></span></td>
<td><span>{$p24_order_amount}</span></td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,27 @@
{*
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="tab-pane" id="p24-admin-tab-pane" role="tabpanel" >
<table class="table">
<thead>
<tr>
<th><span class="title_box">{l s='Date' mod='przelewy24'}</span></th>
<th><span class="title_box">{l s='Link' mod='przelewy24'}</span></th>
<th><span class="title_box">{l s='P24 ID' mod='przelewy24'}</span></th>
<th><span class="title_box">{l s='Amount' mod='przelewy24'}</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span>{$p24_order_received|escape:'html':'UTF-8'}</span></td>
<td><span><a class="" href="{$link}">{$link}</a></span></td>
<td><span>{$p24_order_id|escape:'html':'UTF-8'}</a></span></td>
<td><span>{$p24_order_amount|escape:'html':'UTF-8'}</span></td>
</tr>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,12 @@
{*
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<li class="nav-item" role="presentation">
<a class="nav-link" href="#p24-admin-tab-pane" data-toggle="tab" role="tab">
{l s='Przelewy24 Payment' mod='przelewy24'}
</a>
</li>

View File

@@ -5,9 +5,31 @@
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="box hidden-sm-down">
<div class="box hidden-sm-down" id="extracharge_data_wrap">
<input type="hidden" name="extracharge_text" id="extracharge_text" value="{$extracharge_text}">
<input type="hidden" name="extracharge" id="extracharge" value="{$extracharge}">
<input type="hidden" name="extrachargeFormatted" id="extrachargeFormatted" value="{$extrachargeFormatted}">
<input type="hidden" name="currencySign" id="currencySign" value="{$currencySign}">
</div>
{*
see hookDisplayAdminOrderTabContent for reasons why it is here:
*}
<script>
$(document).ready(function () {
if($("#extracharge_data_wrap").length > 0){
p24AddExtrachargeAdmin($('#extracharge_text').val(), $('#extrachargeFormatted').val(), $('#currencySign').val());
}
});
function p24AddExtrachargeAdmin(extrachargeText, extrachargeReturnFormatted, currency)
{
if ('undefined' !== typeof currency && 0 !== $("#orderProductsPanel").find("#orderTotal").length) {
$("#orderProductsPanel").find("#orderTotal").parent().before(
'<div class="col-sm text-center">' +
'<p class="text-muted mb-0"><strong>' + extrachargeText + '</strong></p>' +
'<strong id="p24-extra-charge-amount">' + extrachargeReturnFormatted + ' ' + currency + '</strong>' +
'</div>'
);
}
}
</script>

View File

@@ -1,36 +1,7 @@
<?php
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;
/**
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*/
header('Location: ../');

View File

@@ -0,0 +1,19 @@
{*
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
{if $isMultiOrder }
{*<input id="order-list-data-json" type="hidden" value="{$orderData}">*}
<p class="alert alert-info">{l s='Multi warehouse order. Cart may contain additional products, not listed below.' mod='przelewy24'}</p>
{/if}
{if not $isPaid }
<div style="text-align: center;">
<p class="alert alert-danger" style="font-size: 1.4em; font-weight: bold;">
{l s='Payment has failed. Try agian.' mod='przelewy24'}
</p>
</div>
{/if}

View File

@@ -0,0 +1,48 @@
{*
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*}
<div
id="p24-blik-config-element"
data-ajaxurl="{$p24_charge_blik_url|escape:'html':'UTF-8'}"
data-pagetype="{$p24_page_type|escape:'html':'UTF-8'}"
data-cartid="{$p24_cart_id|escape:'html':'UTF-8'}"
></div>
<div style="display: none;">
<div>
<div id="p24-blik-section" class="p24-inside-section">
<h1>{l s='Enter BLIK code' mod='przelewy24'}</h1>
<form method="post">
<div>
<p>{l s='Enter 6-digit BLIK code from Your bank application.' mod='przelewy24'}</p>
<p>
<input
minlength="6"
maxlength="6"
pattern="^\d{'{6}'|escape:'htmlall':'UTF-8'}$"
type="text"
name="blik"
placeholder="______"
>
</p>
{if $p24_blik_needs_term_accept }
<p>
<input type="checkbox" name="terms" id="p24-blik-regulation-accept" value="1">
{l s='Please accept' mod='przelewy24'}
<a href="http://www.przelewy24.pl/regulamin.htm" target="_blank">
{l s='the Przelewy24 Terms' mod='przelewy24'}
</a>
</p>
{/if}
<p class="error error-code">{l s='Invalid BLIK code.' mod='przelewy24'}</p>
<p class="error error-regulation">{l s='Terms not accepted.' mod='przelewy24'}</p>
<p class="error error-pr-regulation">{l s='Terms of this shop not accepted.' mod='przelewy24'}</p>
<p>
<button>{l s='Pay by BLIK' mod='przelewy24'}</button>
</p>
</div>
</form>
</div>
</div>
</div>

View File

@@ -0,0 +1,49 @@
{*
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*}
<div
id="p24-card-config-element"
data-ajaxurl="{$p24_charge_card_url|escape:'html':'UTF-8'}"
data-pagetype="{$p24_page_type|escape:'html':'UTF-8'}"
data-cartid="{$p24_cart_id|escape:'html':'UTF-8'}"
data-ids="{$p24_card_ids_string|escape:'html':'UTF-8'}"
data-success-url="{$p24_success_url|escape:'html':'UTF-8'}"
data-failure-url="{$p24_failure_url|escape:'html':'UTF-8'}"
data-terms-confirm-required="{if $p24_card_needs_term_accept}true{else}false{/if}"
></div>
<div style="display: none;">
<div>
<div id="p24-card-section" class="p24-inside-section">
<h1>{l s='Register card and payment' mod='przelewy24'}</h1>
{if $p24_card_needs_term_accept}
<p>
<input type="checkbox" name="terms" id="p24-card-regulation-accept" value="1">
{l s='Please accept' mod='przelewy24'}
<a href="http://www.przelewy24.pl/regulamin.htm" target="_blank">
{l s='the Przelewy24 Terms' mod='przelewy24'}
</a>
</p>
{/if}
<div
id="P24FormContainer"
data-successCallback="payInShopSuccess"
data-failureCallback="payInShopFailure"
data-cartid="{$p24_cart_id|escape:'html':'UTF-8'}"
data-dictionary='{
"cardHolderLabel":"{l s='Name and surname' mod='przelewy24'}",
"cardNumberLabel":"{l s='Card number' mod='przelewy24'}",
"cvvLabel":"{l s='cvv' mod='przelewy24'}",
"expDateLabel":"{l s='Expired date' mod='przelewy24'}",
"payButtonCaption":"{l s='Pay by card' mod='przelewy24'}",
"description":"{l s='Register card and payment' mod='przelewy24'}",
"threeDSAuthMessage":"{l s='Click to redirect to 3ds payment.' mod='przelewy24'}",
"registerCardLabel":"{l s='Register card' mod='przelewy24'}"
}'
>
</div>
<div class="p24-card-loader"></div>
</div>
</div>
</div>

View File

@@ -1,36 +1,7 @@
<?php
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;
/**
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*/
header('Location: ../');

View File

@@ -7,7 +7,7 @@
*}
{if $currency.iso_code_num === '985' } {* Polish zloty iso code*}
<div>
<a target="_blank" href="{$installment_payment[constant('Przelewy24InstallmentPayment::LIVE_URL')]|escape:'html'}kalkulator_raty/index.html?{constant('Przelewy24InstallmentPayment::QUERY_PARAMETER_AMOUNT_NAME')|escape:'html'}={$installment_payment[constant('Przelewy24InstallmentPayment::PRODUCT_AMOUNT')]}" title="Raty Alior Bank">
<a target="_blank" href="{$installment_payment[constant('Przelewy24InstallmentPayment::LIVE_URL')]|escape:'html':'UTF-8'}kalkulator_raty/index.html?{constant('Przelewy24InstallmentPayment::QUERY_PARAMETER_AMOUNT_NAME')|escape:'html':'UTF-8'}={$installment_payment[constant('Przelewy24InstallmentPayment::PRODUCT_AMOUNT')]}" title="Raty Alior Bank">
<img class="installment-payment-logo-alior-bank" src="{$urls.base_url}modules/przelewy24/views/img/logo_alior.jpg" alt="Logo Alior Bank">{$installment_payment[constant('Przelewy24InstallmentPayment::PART_COUNT')]} rat x ~{$installment_payment[constant('Przelewy24InstallmentPayment::PART_COST')]}
</a>
<br>

View File

@@ -0,0 +1,9 @@
{*
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*}
<div
id="p24-other-config-element"
data-pagetype="{$p24_page_type|escape:'html':'UTF-8'}"
data-card-ids="{$p24_card_ids_string|escape:'html':'UTF-8'}"
></div>

View File

@@ -0,0 +1,319 @@
{*
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
{* The may_skip varialbe is overwritten if widgets the user can interact with are rendered. *}
<div class="p24-payment-return-page przelewy-24">
<a href="http://przelewy24.pl" target="_blank">
<img src="{$logo_url}"
alt="{l s='Pay with Przelewy24' mod='przelewy24'}">
</a>
{if 'ok' === $status}
<p>{l s='Your order is ready.' mod='przelewy24'}
<br>{l s='Total amount' mod='przelewy24'}:
<span class="price"><strong>{$total_to_pay}</strong></span>
<br>{l s='We sent for you email with this information.' mod='przelewy24'}
<br>{l s='For any questions or information, contact with' mod='przelewy24'}
<a href="{$link->getPageLink('contact', true)|escape:'html':'UTF-8'}">{l s='customer service' mod='przelewy24'}</a>.
</p>
{if $p24_paymethod_list_exists}
<p class="p24-choose">
{l s='Select payment method' mod='przelewy24'}:
</p>
{elseif $payment_method_selected_id > 0}
<p>
{l s='Your payment method' mod='przelewy24'}:
<strong id="p24-one-selected-method" data-methodid="{$payment_method_selected_id}">
{$payment_method_selected_name}
</strong>
</p>
<p>
<img alt="{$payment_method_selected_name}"
class="p24-svg-image-limited"
src="{$payment_methods_map[$payment_method_selected_id]['imgUrl']}">
</p>
{/if}
{if $card_remember_input}
{if $customer_cards|sizeof > 0}
{assign var='may_skip' value=false}
<div class="p24-recurring">
<p>
{l s='Your stored credit cards' mod='przelewy24'}:
</p>
{foreach from=$customer_cards key=id item=card}
<a class="bank-box recurring"
data-card-id="{$card.id}"
data-action="{$charge_card_url}">
<div class="bank-logo bank-logo-none">
<span>{$card.mask_substr}</span>
</div>
<div class="bank-name">{$card.card_type}</div>
</a>
{/foreach}
</div>
{/if}
{if !$customer_is_guest}
{assign var='may_skip' value=false}
<div class="">
<label>
<input data-action="{$p24_ajax_notices_url}" {if $remember_customer_cards}checked="checked"{/if}
type="checkbox"
id="p24-remember-my-card"
class="p24-remember-my-card"
name="p24-remember-my-card" value="1">
<span>{l s='Remember my payment card' mod='przelewy24'}</span>
</label>
</div>
{/if}
{/if}
<div>
{if $p24_paymethod_list_exists}
{assign var='may_skip' value=false}
{if $p24_paymethod_graphics}
{if $p24_paymethod_list_first|sizeof > 0}
{if (isset($p24_paymethod_list_first[266]) || isset($p24_paymethod_list_second[266])) && Configuration::get('P24_NOW_PROMOTE')
&& $p24_amount < 1000000 && $p24_currency == "PLN"}
<div class="pay-method-list pay-method-graphics pay-method-list-first box">
<a class="bank-box link"
data-id="266">
<div class="bank-logo logo-position" style="background-image: url({$payment_methods_map[266]['mobileImgUrl']})"></div>
<div class="bank-name" style="font-size: 14px;">
{if isset($p24_paymethod_list_first[266])}
{$p24_paymethod_list_first[266]}
{/if}
{if isset($p24_paymethod_list_second[266])}
{$p24_paymethod_list_second[266]}
{/if}
</div>
</a>
</div>
{/if}
{/if}
{/if}
{/if}
</div>
{if $p24_paymethod_list_exists}
{assign var='may_skip' value=false}
{if $p24_paymethod_graphics}
<div class="pay-method-list pay-method-graphics pay-method-list-first">
{if $p24_paymethod_list_first|sizeof > 0}
{foreach $p24_paymethod_list_first as $bank_id => $bank_name}
{if !empty($bank_name)}
{if ($bank_id|intval) != 266 && ($bank_id|intval) != 294}
{$showMethod=true}
{elseif ($bank_id|intval) === 266 && ($p24_amount <= 1000000 && $p24_currency == "PLN" && (Configuration::get('P24_NOW_PROMOTE')|intval) === 1)}
{$showMethod=true}
{elseif ($bank_id|intval) === 294 && ($p24_amount >= 15000 && $p24_amount <= 3000000)}
{$showMethod=true}
{else}
{$showMethod=false}
{/if}
{if $showMethod === true}
<a class="bank-box" data-id="{$bank_id}">
<div class="bank-logo" style="background-image: url({$payment_methods_map[$bank_id]['mobileImgUrl']})"></div>
<div class="bank-name">{$bank_name}</div>
</a>
{/if}
{/if}
{/foreach}
{/if}
</div>
<div class="p24-text-center">
<div class="p24-stuff-nav">
<div class="p24-more-stuff p24-stuff">
{l s='More payment methods' mod='przelewy24'}
</div>
<div class="p24-less-stuff p24-stuff">
{l s='Less payment methods' mod='przelewy24'}
</div>
</div>
</div>
<div class="pay-method-list pay-method-graphics pay-method-list-second" style="display: none">
{if $p24_paymethod_list_second|sizeof > 0}
{foreach $p24_paymethod_list_second as $bank_id => $bank_name}
{if !empty($bank_name)}
{if ($bank_id|intval) != 266 && ($bank_id|intval) != 294}
{$showMethod=true}
{elseif ($bank_id|intval) === 266 && ($p24_amount <= 1000000 && $p24_currency == "PLN" && (Configuration::get('P24_NOW_PROMOTE')|intval) === 1)}
{$showMethod=true}
{elseif ($bank_id|intval) === 294 && ($p24_amount >= 15000 && $p24_amount <= 3000000)}
{$showMethod=true}
{else}
{$showMethod=false}
{/if}
{if $showMethod === true}
<a class="bank-box" data-id="{$bank_id}">
<div class="bank-logo" style="background-image: url({$payment_methods_map[$bank_id]['mobileImgUrl']})"></div>
<div class="bank-name">{$bank_name}</div>
</a>
{/if}
{/if}
{/foreach}
{/if}
</div>
{else}
<ul class="pay-method-list pay-method-text-list pay-method-list-first">
{if $p24_paymethod_list_first|sizeof > 0}
{foreach $p24_paymethod_list_first as $bank_id => $bank_name}
{if !empty($bank_name)}
<li>
<input type="radio" class="bank-box"
data-id="{$bank_id}"
id="paymethod-bank-id-{$bank_id}"
name="paymethod-bank">
<label for="paymethod-bank-id-{$bank_id}"
style="font-weight:normal;position:relative; top:-3px;">
{$bank_name}
</label>
</li>
{/if}
{/foreach}
{/if}
</ul>
{include file="module:przelewy24/views/templates/hook/parts/nav_more_less.tpl"}
<ul class="pay-method-list pay-method-text-list pay-method-list-second" style="display: none">
{if $p24_paymethod_list_second|sizeof > 0}
{foreach $p24_paymethod_list_second as $bank_id => $bank_name}
{if !empty($bank_name)}
<li>
<input type="radio" class="bank-box"
data-id="{$bank_id}"
id="paymethod-bank-id-{$bank_id}"
name="paymethod-bank">
<label for="paymethod-bank-id-{$bank_id}"
style="font-weight:normal;position:relative; top:-3px;">
{$bank_name}
</label>
</li>
{/if}
{/foreach}
{/if}
</ul>
{/if}
{/if}
<div id="p24-additional-forms"></div>
<div style="display: none;">
<input id="master-active-payment-method">
</div>
<form action="{$form_action}" method="post" id="przelewy24Form" name="przelewy24Form"
accept-charset="utf-8">
<input type="hidden" name="p24_session_id" value="{$p24_session_id}">
<input type="hidden" name="cart_id" value="{$cartId}">
<input type="hidden" name="p24_method" value="{$payment_method_selected_id}">
<input type="hidden" name="p24_card_customer_id" value="">
<input type="hidden" name="p24_channel" {if $payment_method_selected_id === 266} value="2048" {/if}>
<input type="hidden" name="p24_data_ready" value="1">
{foreach $p24ProductItems as $name => $value}
<input type="hidden" name="{$name}" value="{$value}">
{/foreach}
{if $accept_in_shop}
{assign var='may_skip' value=false}
<div>
<p id="p24_regulation_accept_text" style="color: red;">
{l s='Please accept' mod='przelewy24'}
<a href="http://www.przelewy24.pl/regulamin.htm" target="_blank">
{l s='the Przelewy24 Terms' mod='przelewy24'}
</a>
</p>
<div>
<span class="custom-checkbox">
<input type="checkbox" name="p24_regulation_accept" id="p24_regulation_accept" value="1">
<span><i class="material-icons rtl-no-flip checkbox-checked"></i></span>
</span>
<label for="p24_regulation_accept">
<span>{l s='Yes, I have read and accept Przelewy24.pl terms.' mod='przelewy24'}</span>
</label>
</div>
</div>
{/if}
<br>
{if $accept_in_shop}
{$submitButtonDisabled = 'disabled'}
{else}
{$submitButtonDisabled = ''}
{/if}
{if $payment_method_selected_id > 0}
<button data-validation-required="{$validationRequired}" data-text-oneclick="{l s='Pay by OneClick' mod='przelewy24'}" {$submitButtonDisabled} id="submitButton" class="btn btn-primary" onclick="formSend();" type="submit">{l s='Pay' mod='przelewy24'}</button>
{elseif isset($p24_blik_code)}
<button {$submitButtonDisabled} id="submitButton" onclick="formSend();" class="btn btn-primary">{l s='Pay by Blik' mod='przelewy24'}</button>
{else}
<button {$submitButtonDisabled} id="submitButton" data-validation-required="{$validationRequired}" data-text-oneclick="{l s='Pay by OneClick' mod='przelewy24'}" class="btn btn-primary" onclick="formSend();" type="submit">{l s='Pay by Przelewy24' mod='przelewy24'}</button>
{/if}
</form>
{if !isset($p24_blik_code)}
<p class="p24-small-text">
{l s='Now you will be redirected to the Przelewy24 to process payments.' mod='przelewy24'}
</p>
{/if}
{elseif 'payment' === $status}
<p class="warning">
{l s='Thank you for your order' mod='przelewy24'}
</p>
{else}
<p class="warning">
{l s='There was an error. Contact with' mod='przelewy24'}
<a href="{$link->getPageLink('contact', true)|escape:'html':'UTF-8'}">{l s='customer service' mod='przelewy24'}</a>.
</p>
{/if}
</div>
{if $p24_card_inside_enable and 0 === $payment_method_selected_id}
{assign var='may_skip' value=false}
{include file="module:przelewy24/views/templates/hook/parts/card_html_code.tpl"}
{/if}
{if $p24_blik_inside_enable and 0 === $payment_method_selected_id}
{assign var='may_skip' value=false}
{include file="module:przelewy24/views/templates/hook/parts/blik_html_code.tpl"}
{/if}
{literal}
<style>
.box {
text-align: center;
width: max-content !important;
justify-content: center;
display: flex !important;
align-items: center;
margin: auto;
}
.link {
width: 200px;
height: 120px;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
margin: auto;
}
.logo-position {
width: 100%;
margin-bottom: 1rem;
background-size: auto;
}
</style>
{/literal}
{if $may_skip}
<script>
document.addEventListener("DOMContentLoaded", function() {
jQuery('#submitButton').trigger('click');
});
</script>
{/if}

View File

@@ -5,7 +5,7 @@
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="box hidden-sm-down">
<div class="box">
<img src="{$logo_url}"
alt="{l s='Pay with Przelewy24' mod='przelewy24'}">

View File

@@ -17,78 +17,105 @@
{/foreach}
</div>
{/if}
{if $getRefundInfo}
{if $amount > 0}
{assign var="amountToRefund" value=$amount/100}
{if $amount > 0}
{assign var="amountToRefund" value=$amount/100}
<p>
{l s='Here you can send a refund to the customer. The amount of the refund may not exceed the value of the transaction and the amount of funds available in your account.' mod='przelewy24'}
</p>
<p>{l s='Amount to refund' mod='przelewy24'}: {$amountToRefund} {$sign}</p>
<form class="form-horizontal hidden-print refundAmount" method="post" id="p24-refund-form">
<div class="form-group">
<div class="col-lg-12">
<table class="table">
<tbody>
{foreach $productsPossibleToRefund as $i => $oneProduct}
<tr>
<td>{$oneProduct.name}</td>
<td>
<div class="input-group">
<input type="number"
name="refundProductQuantity[{$oneProduct.productId}]"
class="form-control js-line"
min="0"
max="{$oneProduct.quantity}"
value="{$oneProduct.quantity}"
data-unit-price="{$oneProduct.price}"
>
<div class="input-group-addon">/ {$oneProduct.quantity}</div>
</td>
<td>{$oneProduct.priceFormatted}</td>
<td><!-- empty --></td>
</tr>
{/foreach}
</tbody>
{if !$errorRefunds}
<p>
{l s='The function of generating returns from the store requires additional configuration of Przelewy24 account. To activate this functionality, please contact the Customer Service Department at the address serwis@przelewy24.pl.' mod='przelewy24'}
</p>
{else}
<p>
{l s='Here you can send a refund to the customer. The amount of the refund may not exceed the value of the transaction and the amount of funds available in your account.' mod='przelewy24'}
</p>
<p>{l s='Amount to refund' mod='przelewy24'}: {$amountToRefund} {$sign}</p>
<form class="form-horizontal hidden-print refundAmount" method="post">
<div class="form-group">
<div class="col-lg-2">
<label for="amountToRefund">{l s='Amount' mod='przelewy24'}</label>
<input class="form-control" id="amountToRefund" type="number" name="amountToRefund"
value="{$amountToRefund}" step="0.01">
<input class="btn btn-primary pull-right" type="submit" name="submitRefund" value="{l s='Send' mod='przelewy24'}">
<input type="hidden" id="refundAmountText" value="{l s='This will generate outgoing transfer. Can you confirm the operation?' mod='przelewy24'}">
<input type="hidden" name="refundToken" value="{$refundToken}">
</div>
</div>
</form>
{/if}
{else}
<p>{l s='The payment has already been fully refunded - no funds to make further returns.' mod='przelewy24'}</p>
{/if}
<tfoot>
<tr>
<th>
<label for="p24-amount-to-refund">{l s='Amount' mod='przelewy24'}</label>
</th>
<td colspan="2">
<input class="form-control" id="p24-amount-to-refund" type="number"
data-maximum="{$amountToRefund}"
name="amountToRefund" value="{$amountToRefund}" step="0.01">
</td>
<td>
<input class="btn btn-primary pull-right" type="submit" name="submitRefund"
value="{l s='Send' mod='przelewy24'}">
<input type="hidden" id="refundAmountText"
value="{l s='This will generate outgoing transfer. Can you confirm the operation?' mod='przelewy24'}">
<input type="hidden" name="refundMaximum" value="{$amountToRefund}">
<input type="hidden" name="refundToken" value="{$refundToken}">
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</form>
{else}
<p>{l s='The payment has already been fully refunded - no funds to make further returns.' mod='przelewy24'}</p>
{/if}
{if $refunds}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>
{if $refunds}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>
<span class="title_box">
{l s='Amount refunded' mod='przelewy24'}
</span>
</th>
<th>
</th>
<th>
<span class="title_box">
{l s='Date of refund' mod='przelewy24'}
</span>
</th>
<th>
</th>
<th>
<span class="title_box">
Status
</span>
</th>
</th>
</tr>
</thead>
<tbody>
{foreach from=$refunds item=refund}
<tr>
<td>
{$refund['amount_refunded']/100} {$sign}
</td>
<td>
{$refund['created']}
</td>
<td>
{l s=$refund['status'] mod='przelewy24'}
</td>
</tr>
</thead>
<tbody>
{foreach from=$refunds item=refund}
<tr>
<td>
{$refund['amount_refunded']/100} {$sign}
</td>
<td>
{$refund['created']}
</td>
<td>
{l s=$refund['status'] mod='przelewy24'}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
{else}
<p>{l s='To display refunds balance, please contact the Przelewy24 Customer Service' mod='przelewy24'}</p>
{/foreach}
</tbody>
</table>
</div>
{/if}
<span id="p24-need-reload-refund" data-need="{$p24NeedReloadRefund}"></span>
</div>

View File

@@ -0,0 +1,134 @@
{*
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="card przelewy-24">
<div class="card-header">
<h3 class="card-header-title">{l s='Refunds to Przelewy24' mod='przelewy24'}</h3>
</div>
<div class="card-body">
{if '' !== $refundError}
<div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert">×</button>
{foreach from=$refundError item=singleError}
<p>{l s=$singleError mod='przelewy24'}</p>
{/foreach}
</div>
{/if}
{if $amount > 0}
{assign var="amountToRefund" value=$amount/100}
<p>
{l s='Here you can send a refund to the customer. The amount of the refund may not exceed the value of the transaction and the amount of funds available in your account.' mod='przelewy24'}
</p>
<p>{l s='Amount to refund' mod='przelewy24'}: {$amountToRefund} {$sign}</p>
<form class="form-horizontal hidden-print refundAmount" id="p24-refund-form" method="post">
<div class="row">
<div class="col-lg-12">
<table class="table">
<tbody>
{foreach $productsPossibleToRefund as $i => $oneProduct}
<tr>
<td>{$oneProduct.name}</td>
<td>
<div class="input-group">
<input type="number"
name="refundProductQuantity[{$oneProduct.productId}]"
class="form-control js-line"
min="0"
max="{$oneProduct.quantity}"
value="{$oneProduct.quantity}"
data-unit-price="{$oneProduct.price}"
>
<div class="input-group-append">
<div class="input-group-text">
/ {$oneProduct.quantity}
</div>
</div>
</div>
</td>
<td>{$oneProduct.priceFormatted}</td>
<td><!-- empty --></td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<th>
<label for="p24-amount-to-refund">{l s='Amount' mod='przelewy24'}</label>
</th>
<td colspan="2">
<input class="form-control" id="p24-amount-to-refund" type="number"
data-maximum="{$amountToRefund}"
name="amountToRefund" value="{$amountToRefund}" step="0.01">
</td>
<td>
<input class="btn btn-primary pull-right" type="submit" name="submitRefund"
value="{l s='Send' mod='przelewy24'}">
<input type="hidden" id="refundAmountText"
value="{l s='This will generate outgoing transfer. Can you confirm the operation?' mod='przelewy24'}">
<input type="hidden" name="refundMaximum" value="{$amountToRefund}">
<input type="hidden" name="refundToken" value="{$refundToken}">
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</form>
{else}
<p>{l s='The payment has already been fully refunded - no funds to make further returns.' mod='przelewy24'}</p>
{/if}
{if $refunds}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>
<span class="title_box">
{l s='Amount refunded' mod='przelewy24'}
</span>
</th>
<th>
<span class="title_box">
{l s='Date of refund' mod='przelewy24'}
</span>
</th>
<th>
<span class="title_box">
Status
</span>
</th>
</tr>
</thead>
<tbody>
{foreach from=$refunds item=refund}
<tr>
<td>
{$refund['amount_refunded']/100} {$sign}
</td>
<td>
{$refund['created']}
</td>
<td>
{l s=$refund['status'] mod='przelewy24'}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
<span id="p24-need-reload-refund" data-need="{$p24NeedReloadRefund}"></span>
</div>
</div>

View File

@@ -0,0 +1,22 @@
{*
*
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*
*}
<div class="card przelewy-24">
<div class="card-header">
<h3 class="card-header-title">{l s='Refunds to Przelewy24' mod='przelewy24'}</h3>
</div>
<div class="card-body">
<div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert">×</button>
<p>{l s='Please check if Przelewy24 module is configured. If there is a valid configuration and You still see this alert, please contact with Przelewy24 Customer Service.' mod='przelewy24'}</p>
</div>
</div>
</div>

View File

@@ -1,36 +1,7 @@
<?php
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 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;
/**
* @author Przelewy24
* @copyright Przelewy24
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html
*/
header('Location: ../');