summaryrefslogtreecommitdiff
path: root/views/mods/mod_mollie/settings_edit.phtml
diff options
context:
space:
mode:
authordaniel <noreply@maennchen1.de>2026-09-17 10:48:32 +0200
committerdaniel <noreply@maennchen1.de>2026-09-17 10:48:32 +0200
commitdcfb01e514b41f8b09d0a994b3ee9297b0474ecd (patch)
tree0f839f4ee286915e2a9737fbadfff63c77d63c59 /views/mods/mod_mollie/settings_edit.phtml
parent32c0b971707d90d4c2643b58a81170b8b5065fa9 (diff)
parentb6fa7e0ff9988363fbf300bc0a67e1bd7f52d4b7 (diff)
Merge branch 'wero'
Diffstat (limited to 'views/mods/mod_mollie/settings_edit.phtml')
-rw-r--r--views/mods/mod_mollie/settings_edit.phtml88
1 files changed, 88 insertions, 0 deletions
diff --git a/views/mods/mod_mollie/settings_edit.phtml b/views/mods/mod_mollie/settings_edit.phtml
new file mode 100644
index 0000000..01b0f8e
--- /dev/null
+++ b/views/mods/mod_mollie/settings_edit.phtml
@@ -0,0 +1,88 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Mollie Moduls
+ */
+
+ $view = $this->view['wpsg_mod_mollie'];
+
+?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_mollie_testmode', __('Testmodus', 'wpsg'), $this->get_option('wpsg_mod_mollie_testmode'), ['hint' => __('Im Testmodus wird der Test-API-Schlüssel verwendet. Mollie unterscheidet Test- und Livebetrieb allein über den Schlüssel.', 'wpsg')]); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_mollie_apikey_test', __('API-Schlüssel (Test)', 'wpsg'), $this->get_option('wpsg_mod_mollie_apikey_test'), ['hint' => __('Beginnt mit test_', 'wpsg')]); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_mollie_apikey_live', __('API-Schlüssel (Live)', 'wpsg'), $this->get_option('wpsg_mod_mollie_apikey_live'), ['hint' => __('Beginnt mit live_', 'wpsg')]); ?>
+<?php echo wpsg_drawForm_Input('', __('Webhook URL', 'wpsg'), $view['webhookURL'], ['readonly' => true, 'hint' => __('Mollie ruft diese URL bei jeder Statusänderung auf. Sie wird bei jeder Zahlung automatisch mitgesendet und muss von außen erreichbar sein.', 'wpsg')]); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_mollie_currency', __('Währung', 'wpsg'), $this->get_option('wpsg_mod_mollie_currency'), ['hint' => __('ISO-4217-Code, z.B. EUR', 'wpsg')]); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_mollie_locale', __('Sprache der Bezahlseite', 'wpsg'), [
+ 'auto' => __('Automatisch (Sprache von WordPress)', 'wpsg'),
+ 'de_DE' => __('Deutsch (Deutschland)', 'wpsg'),
+ 'de_AT' => __('Deutsch (Österreich)', 'wpsg'),
+ 'de_CH' => __('Deutsch (Schweiz)', 'wpsg'),
+ 'en_GB' => __('Englisch (Großbritannien)', 'wpsg'),
+ 'en_US' => __('Englisch (USA)', 'wpsg'),
+ 'nl_NL' => __('Niederländisch', 'wpsg'),
+ 'fr_FR' => __('Französisch', 'wpsg'),
+ 'it_IT' => __('Italienisch', 'wpsg'),
+ 'es_ES' => __('Spanisch', 'wpsg'),
+ 'pl_PL' => __('Polnisch', 'wpsg')
+], $this->get_option('wpsg_mod_mollie_locale')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_mollie_description', __('Beschreibung der Zahlung', 'wpsg'), $this->get_option('wpsg_mod_mollie_description'), ['hint' => __('Erscheint auf dem Kontoauszug des Kunden, maximal 255 Zeichen. Platzhalter wie %order_id% oder %kunde_id% sind möglich.', 'wpsg')]); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_mollie_notaxcountry', __('Keine MwSt. auf die Gebühr, wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_mollie_notaxcountry'), ['help' => 'wpsg_shippay_mwstland']); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_mollie_successPage', __('Seite nach erfolgreicher Zahlung', 'wpsg'), $view['arPages'], $this->get_option('wpsg_mod_mollie_successPage')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_mollie_errorPage', __('Seite nach fehlgeschlagener Zahlung', 'wpsg'), $view['arPages'], $this->get_option('wpsg_mod_mollie_errorPage')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_mollie_debug', __('Debugmodus', 'wpsg'), $this->get_option('wpsg_mod_mollie_debug'), ['hint' => __('Schreibt die Kommunikation mit Mollie in das Bestellprotokoll.', 'wpsg')]); ?>
+
+<br />
+
+<?php if (!$view['hasApiKey']) { ?>
+<div class="wpsg_hinweis"><?php echo esc_html__('Es ist kein gültiger API-Schlüssel für die aktive Umgebung hinterlegt. Speichern Sie zuerst den Schlüssel, danach werden hier die bei Mollie freigeschalteten Zahlungsmethoden angezeigt.', 'wpsg'); ?></div>
+<?php } else if (!wpsg_isSizedArray($view['arMollieMethods'])) { ?>
+<div class="wpsg_hinweis"><?php echo esc_html__('Mollie hat keine freigeschalteten Zahlungsmethoden gemeldet. Prüfen Sie den API-Schlüssel und die Freischaltung im Mollie Dashboard.', 'wpsg'); ?></div>
+<?php } ?>
+
+<br />
+
+<?php foreach ($view['arMethods'] as $index => $arMethod) { ?>
+
+ <?php
+
+ $key_active = 'wpsg_mod_mollie_m'.$index.'_active';
+ $bActive = ($this->get_option($key_active) === '1');
+
+ $method_id = (string)$arMethod['id'];
+ $method_min = (string)($view['arMollieMethods'][$method_id]['min'] ?? '');
+
+ // Methoden, die Mollie für dieses Konto nicht freigeschaltet hat, werden gekennzeichnet
+ $bAtMollie = (($method_id === '') || array_key_exists($method_id, (array)$view['arMollieMethods']));
+
+ $title = $arMethod['name'];
+
+ if (!$bAtMollie) $title .= ' <span style="color:#a00;">('.esc_html__('bei Mollie nicht freigeschaltet', 'wpsg').')</span>';
+
+ ?>
+
+ <?php echo wpsg_drawForm_AdminboxStart($title, 'wpsg_mod_mollie_m'.$index, ['collapsable' => true, 'collapsed' => !$bActive]); ?>
+
+ <?php echo wpsg_drawForm_Checkbox($key_active, __('Zahlungsart aktiv', 'wpsg'), $this->get_option($key_active)); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_mollie_m'.$index.'_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_mollie_m'.$index.'_name'), ['placeholder' => $arMethod['name']]); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_mollie_m'.$index.'_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_mollie_m'.$index.'_hint')); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_mollie_m'.$index.'_fee', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_mollie_m'.$index.'_fee'), true), ['unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_mollie_m'.$index.'_tax_key', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_mollie_m'.$index.'_tax_key')); ?>
+
+ <?php if ($method_min !== '') { ?>
+ <div class="wpsg_hinweis"><?php echo wpsg_translate(esc_html__('Mollie erlaubt diese Methode ab #1#.', 'wpsg'), esc_html($method_min).' '.esc_html($this->get_option('wpsg_mod_mollie_currency'))); ?></div>
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php } ?>
+
+<div class="wpsg_hinweis"><?php echo esc_html__('Welche Methoden Ihnen zur Verfügung stehen, entscheidet Ihr Mollie Dashboard. Logos und Betragsgrenzen werden bei jedem Speichern neu von Mollie gelesen.', 'wpsg'); ?></div>