Subversion Repositories wpShopGermany4

Rev

Blame | Last modification | View Log | RSS feed

<?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', 'wpsgPayone'), $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 vorauthorisieren', '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_Checkbox('wpsg_mod_klarna_notaxcountry', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_klarna_notaxcountry'), array('help' => 'wpsg_mod_klarna_notaxcountry')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_mod_klarna_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_klarna_hint'), array('help' => 'wpsg_mod_klarna_hint')); ?>