first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<div class="tpay-insidebg" id="tpay-transfers-form">
<input name="tpay-channel-input" id="tpay-channel-input" type="hidden">
<input name="tpay-regulations-input" id="tpay-regulations-input" type="hidden">
<div class="tpay-header-wrapper">
<div class="tpay-header-logo">
<img class="tpay-logo" src="https://tpay.com/img/banners/tpay_logo_white.svg"
style="float: left; padding: 35px 0 0 15px; max-height: 100%"/>
</div>
<div class="tpay-header-belt"></div>
</div>
<div id="groups_v" class="tpay-panel-inside-content">
<div id="bank-selection-form" class="tpay-groups-wrapper">
<?php
if ($data['small_list'] === true) { ?>
<select name="bank_list" id="tpay-bank-list" class="tpay-select"></select>
<?php
} ?>
</div>
<?php
if (isset($data['form'])) {
echo $data['form'];
} ?>
</div>
</div>
<div class="tpay-row">
<div class="tpay-amPmCheckbox">
<input id="tpay-accept-regulations-checkbox" type="checkbox" value="0">
<label for="tpay-accept-regulations-checkbox" class="tpay-info-label">
<?php
$lang->l('accept') ?> <a href="<?php
echo $data['regulation_url'] ?>"
target="_blank"><?php
$lang->l('regulations_url') ?></a>
<?php
$lang->l('regulations'); ?>
<?php
$lang->l('privacy_policy'); ?>
<a href="<?php
echo $data['policy_privacy_url'] ?>" target="_blank"><?php
$lang->l('privacy_policy_href') ?></a>
</label>
</div>
</div>

View File

@@ -0,0 +1,7 @@
<script type="text/javascript">
jQuery(document).ready(function ($) {
$(document.body).on('change', 'input[name="payment_method"]', function () {
$('body').trigger('update_checkout');
});
});
</script>

View File

@@ -0,0 +1,39 @@
<div class="tpay-insidebg" id="main-payment">
<div class="tpay-header-wrapper">
<div class="tpay-header-logo">
<img class="tpay-logo" src="https://tpay.com/img/banners/tpay_logo_white.svg"
style="float: left; padding: 35px 0 0 15px; max-height: 100%"/>
</div>
<div class="tpay-header-belt"></div>
</div>
<div class="tpay-panel-inside-content">
<div class="tpay-channel-form-wrapper tpay-content-wrapper-class">
<p><?php $lang->l('blik_info') ?></p>
<p><?php $lang->l('blik_info2') ?></p>
<center>
<img src="https://secure.tpay.com/_/banks/b64.png" style="max-height: 100%; float: none"/>
</center>
<div class="tpay-row">
<center>
<div class="tpay-input-blik-code">
<div class="tpay-input-wrapper" style="max-width: 220px">
<div class="tpay-input-label"><?php $lang->l('codeInputText') ?></div>
<input id="blik_code"
name="blik_code"
pattern="\d*"
type="tel"
autocomplete="off"
maxlength="6"
minlength="6"
placeholder="000000"
tabindex="1"
value=""
class="tpay-input-value tpay-blik-input"
/>
</div>
</div>
</center>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,135 @@
<?php
$path = $this->pluginUrl;
?>
<link href="https://fonts.googleapis.com/css?family=Lato&display=swap" rel="stylesheet">
<p><?php echo $this->description; ?></p>
<div class="tpay-insidebg">
<div class="tpay-header-wrapper">
<div class="tpay-header-logo">
<img class="tpay-logo" src="https://tpay.com/img/banners/tpay_logo_white.svg" style="float: left; padding: 35px 0 0 15px; max-height: 100%"/>
</div>
<div class="tpay-header-belt"></div>
</div>
<p id="tpayRSA" style="display: none"><?php echo $this->keyRSA; ?></p>
<div class="tpay-panel-inside-content">
<input name="tpay-cards-regulations-input" id="tpay-cards-regulations-input" type="hidden">
<div id="card_payment_form" class="tpay-cards-choice">
<?php if (!empty($data['userCards'])) { ?>
<div id="saved_card_payment" style="visibility: visible">
<?php
foreach ($data['userCards'] as $card) { ?>
<div>
<input type="radio" name="savedId"
id="cardN<?php echo $card['cardId'] ?>"
value="<?php echo $card['cardId'] ?>"/>
<label for="cardN<?php echo $card['cardId'] ?>"><?php $lang->l('saved_card_label');
echo $card['shortCode'];
if (isset($card['vendor'])) { ?>
<div id="saved_icon" class="tpay-<?php echo $card['vendor'] ?>-icon"></div>
<?php } ?>
</label>
</div>
<?php } ?>
</div>
<div class="tpay-new-card-section">
<input type="radio" name="savedId" id="newCard" value="new"/>
<label for="newCard"> <?php $lang->l('new_card_label'); ?></label>
</div>
<div id="card_form" style="display: none">
<?php } ?>
<input type="hidden" name="card_data" id="card_data" value=""/>
<input type="hidden" name="card_vendor" id="card_vendor" value=""/>
<div class="tpay-channel-form-wrapper tpay-content-wrapper-class">
<div id="card_payment" class="tpay-input-wrapper">
<div class="tpay-col">
<div class="tpay-row">
<div class="tpay-input-wrapper">
<div class="tpay-input-credit-card-number">
<div class="tpay-input-label"><?php $lang->l('card_number') ?></div>
<input id="card_number"
pattern="\d*"
autocompletetype="cc-number"
size="30"
type="tel"
autocomplete="off"
maxlength="23"
placeholder="XXXX XXXX XXXX XXXX"
tabindex="1"
value=""
class="tpay-input-value"
/>
<div class="tpay-card-icon "></div>
</div>
</div>
</div>
</div>
<div class="tpay-col">
<div class="tpay-row">
<div class="tpay-expiration-date-input tpay-input-wrapper">
<div class="tpay-input-label"><?php $lang->l('expiration_date') ?></div>
<input id="expiry_date"
maxlength="9"
type="tel"
placeholder="01 / 2020"
autocomplete="off"
autocompletetype="cc-exp"
tabindex="2"
value=""
class="tpay-input-value"
/>
</div>
<div class="tpay-cvv-input tpay-input-wrapper">
<div class="tpay-input-label tpay-input-cvc" title="<?php $lang->l('signature') ?>">
CVC
</div>
<input id="cvc"
maxlength="4"
type="tel"
autocomplete="off"
autocompletetype="cc-cvc"
placeholder="XXX"
tabindex="3"
value=""
class="tpay-input-value"
/>
</div>
</div>
</div>
</div>
</div>
<div class="tpay-row" style="width: 10px; height: 10px;"></div>
<div class="tpay-row">
<div class="tpay-amPmCheckbox">
<input type="checkbox" id="card_save" name="card_save"/>
<label for="card_save"
class="tpay-info-label"
title="<?php $lang->l('save_card_info') ?>"><?php $lang->l('save_card') ?>
</label>
</div>
</div>
<p id="info_msg_not_supported" style="display: none"><?php $lang->l('not_supported_card') ?></p>
<p id="info_msg_not_valid" style="display: none"><?php $lang->l('not_valid_card') ?></p>
<div id="loading_scr" style="display:none">
<img src="<?php echo $path ?>/lib/src/common/_img/loading.gif"
style="vertical-align: middle;"/><?php $lang->l('processing') ?>
</div>
<input type="hidden" name="tpayID" value="<?php echo $this->midId; ?>">
<?php if (!empty($data['userCards'])) { ?>
</div>
<?php } ?>
</div>
</div>
</div>
<div class="tpay-row">
<div class="tpay-amPmCheckbox">
<input id="tpay-cards-accept-regulations-checkbox" type="checkbox" value="0">
<label for="tpay-cards-accept-regulations-checkbox" class="tpay-info-label">
<?php $lang->l('accept') ?> <a href="<?php echo $data['regulation_url'] ?>"
target="_blank"><?php $lang->l('regulations_url') ?></a>
<?php $lang->l('regulations'); ?>
<?php $lang->l('privacy_policy');?>
<a href="<?php echo $data['policy_privacy_url']?>" target="_blank"><?php $lang->l('privacy_policy_href')?></a>
</label>
</div>
</div>

View File

@@ -0,0 +1,66 @@
<h2><?php _e('Tpay', 'woocommerce'); ?></h2>
<table class="form-table">
<?php $this->generate_settings_html(); ?>
</table>
<script type="text/javascript">
function bank_list() {
var a = jQuery("#woocommerce_transferuj_bank_list option:selected").val();
if (a == "1") {
jQuery('label[for="woocommerce_transferuj_bank_view"]').attr("style", "visibility: hidden ")
jQuery("#woocommerce_transferuj_bank_view").attr("style", "visibility: hidden")
jQuery('label[for="woocommerce_transferuj_scroll"]').attr("style", "visibility: hidden ")
jQuery("#woocommerce_transferuj_scroll").attr("style", "visibility: hidden")
}
else {
jQuery('label[for="woocommerce_transferuj_bank_view"]').attr("style", "visibility: ")
jQuery("#woocommerce_transferuj_bank_view").attr("style", "visibility: ")
a = jQuery("#woocommerce_transferuj_bank_view option:selected").val();
if (a == "1") {
jQuery('label[for="woocommerce_transferuj_scroll"]').attr("style", "visibility: hidden ")
jQuery("#woocommerce_transferuj_scroll").attr("style", "visibility: hidden")
}
else {
jQuery('label[for="woocommerce_transferuj_scroll"]').attr("style", "visibility: ")
jQuery("#woocommerce_transferuj_scroll").attr("style", "visibility: ")
}
}
}
bank_list();
jQuery("#woocommerce_transferuj_bank_list").change(function () {
bank_list();
});
jQuery("#woocommerce_transferuj_bank_view").change(function () {
var a = jQuery("#woocommerce_transferuj_bank_view option:selected").val();
if (a == "1") {
jQuery('label[for="woocommerce_transferuj_scroll"]').attr("style", "visibility: hidden ")
jQuery("#woocommerce_transferuj_scroll").attr("style", "visibility: hidden")
}
else {
jQuery('label[for="woocommerce_transferuj_scroll"]').attr("style", "visibility: ")
jQuery("#woocommerce_transferuj_scroll").attr("style", "visibility: ")
}
});
jQuery("#woocommerce_transferuj_doplata").change(function () {
if (jQuery("#woocommerce_transferuj_doplata").val() == "0") {
jQuery("#woocommerce_transferuj_kwota_doplaty").attr("style", "visibility: hidden")
}
else {
if (jQuery("#woocommerce_transferuj_doplata").val() == "2") {
alert("Podaj jaki % kwoty zamówienia ma zostać doliczony do zapłaty")
}
jQuery("#woocommerce_transferuj_kwota_doplaty").attr("style", "visibility: visible ")
}
});
</script>
<?php

View File

@@ -0,0 +1,56 @@
<h2><?php _e('Tpay credit cards', 'woocommerce'); ?></h2>
<table class="form-table">
<?php $this->generate_settings_html(); ?>
</table>
<script type="text/javascript">
jQuery(document).ready(function () {
getValuesTpay();
for (var i = 1; i < 11; i++) {
jQuery("#woocommerce_tpaycards_midType" + i).change(function () {
showCurrency();
});
}
jQuery('#woocommerce_tpaycards_midNumber').change(function () {
getValuesTpay();
});
});
function showCurrency() {
var a = jQuery("#woocommerce_tpaycards_midNumber option:selected").val();
var b = jQuery("#woocommerce_tpaycards_midType" + a).val();
var c = jQuery("#woocommerce_tpaycards_midCurrnecy" + a);
if (b == 0) {
c.attr("style", "visibility: hidden ");
} else {
c.attr("style", "visibility: ");
}
}
var tr = document.getElementsByTagName('tr');
function getValuesTpay() {
var id = jQuery("#woocommerce_tpaycards_midNumber option:selected").val();
var mid = 0;
if (id == 1) {
mid = 7;
} else {
mid = (id - 1) * 13 + 7;
}
var maxMid = mid + 13;
for (var n = 7; n < tr.length; n++) {
tr[n].style.display = "none";
}
for (var o = mid; o < maxMid; o++) {
tr[o].style.display = "";
}
}
</script>
<?php