first commit

This commit is contained in:
2024-10-25 14:16:28 +02:00
commit 925276dbb2
33795 changed files with 4780077 additions and 0 deletions

View File

@@ -0,0 +1,153 @@
<style>
#sandbox_text_enabled {
color:red;
}
</style>
<div class="imoje-wrap bootstrap">
{if $imoje_msg != ''}
<div class="bootstrap">
<div class="{if $imoje_msg.type == 'error'}alert alert-danger{else}alert alert-success{/if}">{$imoje_msg.message}</div>
</div>
{/if}
<div class="imoje-header">
<span class="imoje-intro">
<img width="85" alt="imoje" src="{$module_dir}logo.svg"/>
</span>
</div>
<div class="imoje-half">
<form id="imoje-configuration" method="post" name="imoje-configuration">
<h3>
<img src="{$module_dir}assets/img/icon-config.gif" alt="config icon"
class="config-icon"/>{l s='Configuration' mod='imoje'}
</h3>
<p class="MB10">{l s='The module requires a configuration in the imoje administration panel. Go to imoje.ingbank.pl and log in to the administration panel. Go to stores tab and enter the notification address in the appropriate field and copy the configuration keys. Copy the keys into the fields described below.' mod='imoje'}</p>
<hr/>
{if $imoje_sandbox == 1}
<h3 id="sandbox_text_enabled">{l s='Sandbox mode is enabled' mod='imoje'}!</h3>
<hr/>
<br>
{/if}
<div id="imoje">
<label for="imoje_sandbox">{l s='Sandbox' mod='imoje'}</label>
<div class="margin-form">
<select name="imoje_sandbox" class="imoje-sel-en">
<option value="0" {if $imoje_sandbox == 0}selected{/if}>{l s='Off' mod='imoje'}</option>
<option value="1" {if $imoje_sandbox == 1}selected{/if}>{l s='On' mod='imoje'}</option>
</select>
</div><br/>
<div id="imoje_data">
<label for="imoje_merchant_id">{l s='Merchant ID' mod='imoje'}</label>
<div class="margin-form">
<input type="text" class="text" name="imoje_merchant_id" id="imoje_merchant_id"
value="{$imoje_merchant_id|escape:'htmlall':'UTF-8'}" required
data-error-msg="{l s='Merchant ID is not a valid key' mod='imoje'}"/>
</div>
<label for="imoje_service_id">{l s='Service ID' mod='imoje'}</label>
<div class="margin-form">
<input type="text" class="text" name="imoje_service_id" id="imoje_service_id"
value="{$imoje_service_id|escape:'htmlall':'UTF-8'}" required
data-error-msg="{l s='Service ID is not a valid key' mod='imoje'}"/>
</div>
<label for="imoje_service_id">{l s='Service key' mod='imoje'}</label>
<div class="margin-form">
<input type="text" class="text" name="imoje_service_key" id="imoje_service_key"
value="{$imoje_service_key|escape:'htmlall':'UTF-8'}" required
data-error-msg="{l s='Service Key is not a valid key' mod='imoje'}"/>
</div><br/>
<label for="imoje_token">{l s='Authorization token' mod='imoje'}</label>
<div class="margin-form">
<input type="text" class="text" name="imoje_token" id="imoje_token"
value="{$imoje_token|escape:'htmlall':'UTF-8'}" required/>
</div><br/>
<label for="imoje_payment_title">{l s='Payment title - imoje' mod='imoje'}</label>
<div class="margin-form">
<input type="text" class="text" name="imoje_payment_title" id="imoje_payment_title"
placeholder="{$imoje_payment_title_default}" value="{if $imoje_payment_title}{$imoje_payment_title|escape:'htmlall':'UTF-8'}{/if}"/>
</div>
<label for='imoje_button'>{l s='Show payment button imoje (checkout)' mod='imoje'}</label>
<div class="margin-form">
<input value="0"
name='imoje_imoje_button' type="hidden">
<input {if $imoje_imoje_button}checked{/if} value="1" class="checkbox"
name='imoje_imoje_button' type="checkbox">
{l s='Enable' mod='imoje'}
</div><br/>
<label for="imoje_payment_title">{l s='Payment title - BLIK' mod='imoje'}</label>
<div class="margin-form">
<input type="text" class="text" name="imoje_blik_payment_title" id="imoje_blik_payment_title"
placeholder="{$imoje_blik_payment_title_default}" value="{if $imoje_blik_payment_title}{$imoje_blik_payment_title|escape:'htmlall':'UTF-8'}{/if}"/>
</div>
<label for='imoje_button'>{l s='Show payment button BLIK (checkout)' mod='imoje'}</label>
<div class="margin-form">
<input value="0"
name='imoje_blik_button' type="hidden">
<input {if $imoje_blik_button}checked{/if} value="1" class="checkbox"
name='imoje_blik_button' type="checkbox">
{l s='Enable' mod='imoje'}
</div><br/>
<label for="imoje_ga_key">{l s='Google Analytics key' mod='imoje'}</label>
<div class="margin-form">
<input type="text" class="text" name="imoje_ga_key" id="imoje_ga_key"
value="{$imoje_ga_key|escape:'htmlall':'UTF-8'}"
data-error-msg="{l s='Google Analytics key is not a valid' mod='imoje'}"/>
</div>
{if $imoje_service_key && $imoje_service_id && $imoje_merchant_id}
<div id="imoje_payment_methods">
<br>
<div class="margin-form">
<a class="btn btn-danger"
href="{$imoje_payment_methods_url}">{l s='Activate Twisto' mod='imoje'}</a>
</div>
{if !empty($imoje_payment_methods)}
<br>
<label for='twisto'>Twisto</label>
<div class="margin-form">
<input value="0"
name='imoje_twisto' type="hidden">
<input {if $imoje_twisto}checked{/if} value="1" class="checkbox"
name='imoje_twisto' type="checkbox">
{l s='Enable' mod='imoje'}
</div>
{if $imoje_twisto}
<label for='twisto_button'>{l s='Show payment button Twisto (checkout)' mod='imoje'}</label>
<div class="margin-form">
<input value="0"
name='imoje_twisto_button' type="hidden">
<input {if $imoje_twisto_button}checked{/if} value="1" class="checkbox"
name='imoje_twisto_button' type="checkbox">
{l s='Enable' mod='imoje'}
</div>
<div style="{if !$imoje_twisto_button}display:none;{/if}">
<label for="imoje_twisto_payment_title">{l s='Payment title - Twisto' mod='imoje'}</label>
<div class="margin-form">
<input type="text" class="text" name="imoje_twisto_payment_title" id="imoje_twisto_payment_title"
placeholder="{$imoje_twisto_payment_title_default}" value="{if $imoje_twisto_payment_title}{$imoje_twisto_payment_title|escape:'htmlall':'UTF-8'}{/if}"/>
</div>
</div>
{/if}
{/if}
<br>
<p>
{l s='Your addres for notifications' mod='imoje'}: <span
class="imoje-text-bold">{$imoje_notification_url}</span>
</p>
</div>
{/if}
<hr/>
</div>
<div class="margin-form">
<input id="submit-imoje-configuration" type="submit" class="btn btn-primary" name="submitiMoje"
value="{l s='Save' mod='imoje'}"/>
</div>
</div>
</form>
</div>
</div>

View File

@@ -0,0 +1,17 @@
<?php
/*
* @author imoje
* @copyright Copyright (c) 2018 imoje
*
* https://imoje.pl
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../');
exit;

View File

@@ -0,0 +1,11 @@
<style>
#blik_img {
height:50px;
margin-right:30px;
}
</style>
<p class="payment_module">
<img id="blik_img" src="{$blik_logo}"
alt="{l s='BLIK' mod='imoje'}"/>
</p>

View File

@@ -0,0 +1,11 @@
<style>
#imoje_img {
height:75px;
margin-right:30px;
}
</style>
<p class="payment_module">
<img id="imoje_img" src="{$imoje_logo}"
alt="{l s='Pay by imoje' mod='imoje'}"/>
</p>

View File

@@ -0,0 +1,138 @@
<style>
#twisto_img {
height:35px;
margin-right:30px;
}
.hidden {
display:none;
}
</style>
<p class="payment_module">
<img id="twisto_img" src="{$twisto_logo}"
alt="{l s='Pay by Twisto' mod='imoje'}"/>
</p>
<div id="twisto_loading" class="hidden" style="position:fixed; top:0; left:0; right:0; bottom:0; z-index:50000; background: rgba(0,0,0,.5)">
<div style="background: #fbfbfb none; border: 1px solid #d6d4d4; border-radius: 4px; transform:translate(-50%, -50%); position:absolute; top:50%; left:50%; color:black;padding:20px;">
<img id="loading-gif"
src="{$loading_gif}" alt="Loading"
style="display: block; margin-left: auto; margin-right: auto;"/><br/>
{$twisto_hint}
</div>
</div>
<script type="text/javascript">
var twistoConfig = {
public_key: '{$imoje_payment_methods.twisto.pk}',
script: '{$imoje_twisto_script_url}'
},
$form,
twistoTimeout,
twistoTimeoutFlag = false,
timeBeforeCheck,
isClicked = false,
$button,
$twistoData;
(function (e, g, a) {
function h(a) {
return function () {
b._.push([a, arguments])
}
}
var f = ["check"], b = e || {}, c = document.createElement(a);
a = document.getElementsByTagName(a)[0];
b._ = [];
for (var d = 0; d < f.length; d++) {
b[f[d]] = h(f[d]);
}
this[g] = b;
c.type = "text/javascript";
c.async = !0;
c.src = e.script;
a.parentNode.insertBefore(c, a);
delete e.script
}).call(window, twistoConfig, "Twisto", "script");
function timeout() {
return setTimeout(function () {
processForm({
"details": "timeout"
});
}, {$imoje_payment_methods.twisto.timeout});
}
function processForm(response) {
clearTimeout(twistoTimeout);
response.timeResponse = (new Date()).getTime() - timeBeforeCheck;
$button = $('<button type="submit" id="twisto-send-form" class="hidden"></button>');
$twistoData = $('<input name="twistoData" type="hidden" id="twisto-data" />');
$form.append($button, $twistoData);
$twistoData.val(JSON.stringify(response));
$button[0].click();
}
document.addEventListener("DOMContentLoaded", function (event) {
$form = $("form[action='{$imoje_link_twisto}']");
$form[0].onsubmit = function (e) {
if (!$(`[data-module-name='twisto']`)[0].checked || isClicked) {
return;
}
e.preventDefault();
document.getElementById('twisto_loading').classList.remove("hidden");
// region support for one-page checkout
var cgv = document.getElementById("cgv");
if (cgv && !cgv.checked) {
return false;
}
// endregion
if (isClicked) {
return false;
}
isClicked = true;
timeBeforeCheck = (new Date()).getTime();
twistoTimeout = timeout();
Twisto.check("{$imoje_twisto_payload}", function (response) {
processForm(response);
}, function (response) {
if (!response) {
response = {
"details": "errorCallback"
}
}
processForm(response);
}, {
"processingStarted": function () {
if (twistoTimeoutFlag) {
return;
}
twistoTimeoutFlag = true;
clearTimeout(twistoTimeout);
twistoTimeout = timeout();
}
}
);
}
})
</script>