8426 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
declare(strict_types=1);
|
|
|
4 |
|
|
|
5 |
/**
|
|
|
6 |
* @author: daniel
|
|
|
7 |
* @date: 04.03.24
|
|
|
8 |
* @time: 11:56
|
|
|
9 |
*/
|
|
|
10 |
|
|
|
11 |
namespace wpsgKlarna;
|
|
|
12 |
|
|
|
13 |
?>
|
|
|
14 |
|
|
|
15 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_active', __('Zahlungsart für neue Bestellungen aktiv', 'wpsg'), $this->get_option('wpsg_mod_klarna_active'), ['help' => 'wpsg_mod_klarna_active']); ?>
|
|
|
16 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_admin_active', __('Zahlungsart nur für Admins aktiv', 'wpsgPayone'), $this->get_option('wpsg_mod_klarna_admin_active'), ['help' => 'wpsg_mod_klarna_admin_active']); ?>
|
|
|
17 |
|
|
|
18 |
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_api_user', __('API Benutzername', 'wpsg'), $this->get_option('wpsg_mod_klarna_api_user'), ['help' => 'wpsg_mod_klarna_api_user']); ?>
|
|
|
19 |
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_api_password', __('API Passwort', 'wpsg'), $this->get_option('wpsg_mod_klarna_api_password'), ['help' => 'wpsg_mod_klarna_api_password']); ?>
|
|
|
20 |
|
|
|
21 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_klarna_sandbox'), ['help' => 'wpsg_mod_klarna_sandbox']); ?>
|
|
|
22 |
|
|
|
23 |
<div id="wpsg_mod_klarna_sandbox_layer">
|
|
|
24 |
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_sandbox_user', __('(Sandbox) API Benutzername', 'wpsg'), $this->get_option('wpsg_mod_klarna_sandbox_user'), ['help' => 'wpsg_mod_klarna_sandbox_user']); ?>
|
|
|
25 |
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_sandbox_password', __('(Sandbox) API Passwort', 'wpsg'), $this->get_option('wpsg_mod_klarna_sandbox_password'), ['help' => 'wpsg_mod_klarna_sandbox_password']); ?>
|
|
|
26 |
</div>
|
|
|
27 |
|
|
|
28 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_debug', __('API Anfragen im Bestellprotokoll protokollieren', 'wpsg'), $this->get_option('wpsg_mod_klarna_debug'), ['help' => 'wpsg_mod_klarna_debug']); ?>
|
|
|
29 |
|
|
|
30 |
<br />
|
|
|
31 |
|
|
|
32 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_checkout', __('Zahlungen im Checkout vorauthorisieren', 'wpsg'), $this->get_option('wpsg_mod_klarna_checkout'), array('help' => 'wpsg_mod_klarna_checkout')); ?>
|
|
|
33 |
|
|
|
34 |
<br />
|
|
|
35 |
|
|
|
36 |
<script>
|
|
|
37 |
|
|
|
38 |
const el_wpsg_mod_klarna_sandbox = document.getElementById('wpsg_mod_klarna_sandbox');
|
|
|
39 |
const el_wpsg_mod_klarna_sandbox_layer = document.getElementById('wpsg_mod_klarna_sandbox_layer');
|
|
|
40 |
|
|
|
41 |
el_wpsg_mod_klarna_sandbox.addEventListener('change', (event) => {
|
|
|
42 |
|
|
|
43 |
if (event.target.checked) el_wpsg_mod_klarna_sandbox_layer.style.display = 'block';
|
|
|
44 |
else el_wpsg_mod_klarna_sandbox_layer.style.display = 'none';
|
|
|
45 |
|
|
|
46 |
});
|
|
|
47 |
|
|
|
48 |
el_wpsg_mod_klarna_sandbox.dispatchEvent(new Event('change'));
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
</script>
|
|
|
52 |
|
|
|
53 |
<br />
|
|
|
54 |
|
|
|
55 |
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_fee', __('Gebühr', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_klarna_fee'), true), array('help' => 'wpsg_mod_klarna_fee','unit' => $this->get_option('wpsg_currency').' / %')); ?>
|
|
|
56 |
<?php echo wpsg_drawForm_Select('wpsg_mod_klarna_tax_key', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_klarna_tax_key'), array('help' => 'wpsg_mod_klarna_tax_key')); ?>
|
|
|
57 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_notaxcountry', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_klarna_notaxcountry'), array('help' => 'wpsg_mod_klarna_notaxcountry')); ?>
|
|
|
58 |
<?php echo wpsg_drawForm_Textarea('wpsg_mod_klarna_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_klarna_hint'), array('help' => 'wpsg_mod_klarna_hint')); ?>
|