1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
<?php
declare(strict_types=1);
/**
* @author: daniel
* @date: 04.03.24
* @time: 11:56
*/
namespace wpsgKlarna;
?>
<?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']); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_admin_active', __('Zahlungsart nur für Admins aktiv', 'wpsg'), $this->get_option('wpsg_mod_klarna_admin_active'), ['help' => 'wpsg_mod_klarna_admin_active']); ?>
<?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']); ?>
<?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']); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_klarna_sandbox'), ['help' => 'wpsg_mod_klarna_sandbox']); ?>
<div id="wpsg_mod_klarna_sandbox_layer">
<?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']); ?>
<?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']); ?>
</div>
<?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']); ?>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_checkout', __('Zahlungen im Checkout vorautorisieren', 'wpsg'), $this->get_option('wpsg_mod_klarna_checkout'), array('help' => 'wpsg_mod_klarna_checkout')); ?>
<br />
<script>
const el_wpsg_mod_klarna_sandbox = document.getElementById('wpsg_mod_klarna_sandbox');
const el_wpsg_mod_klarna_sandbox_layer = document.getElementById('wpsg_mod_klarna_sandbox_layer');
el_wpsg_mod_klarna_sandbox.addEventListener('change', (event) => {
if (event.target.checked) el_wpsg_mod_klarna_sandbox_layer.style.display = 'block';
else el_wpsg_mod_klarna_sandbox_layer.style.display = 'none';
});
el_wpsg_mod_klarna_sandbox.dispatchEvent(new Event('change'));
</script>
<br />
<?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').' / %')); ?>
<?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')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_mod_klarna_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_klarna_hint'), array('help' => 'wpsg_mod_klarna_hint')); ?>
|