diff options
| author | daniel <noreply@maennchen1.de> | 2026-10-01 13:30:48 +0200 |
|---|---|---|
| committer | daniel <noreply@maennchen1.de> | 2026-10-01 13:30:48 +0200 |
| commit | 59c26c3384c4c5389a2123401c82b20a09db7906 (patch) | |
| tree | 3933638043a43e53c23e99461c883f520ea61ac3 /views/mods/mod_girocheckout/settings_edit.phtml | |
| parent | 1a90b3f0d59f8db10f90f8a3c64dde404f0767c4 (diff) | |
| parent | bd1b103a8ac2b0e7a351613bcaada5002e9c9316 (diff) | |
Merge remote-tracking branch 'origin/main'
# Conflicts:
# src/lang/wpsg-en_US.mo
# tests/bootstrap.php
# tests/doubles/wpsg_ShopController.php
Diffstat (limited to 'views/mods/mod_girocheckout/settings_edit.phtml')
| -rw-r--r-- | views/mods/mod_girocheckout/settings_edit.phtml | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/views/mods/mod_girocheckout/settings_edit.phtml b/views/mods/mod_girocheckout/settings_edit.phtml new file mode 100644 index 0000000..10ba400 --- /dev/null +++ b/views/mods/mod_girocheckout/settings_edit.phtml @@ -0,0 +1,85 @@ +<?php
+
+ /**
+ * Einstellungen des Moduls GiroCheckout
+ */
+
+ if (!defined('ABSPATH')) exit;
+
+ $arView = $this->view['wpsg_mod_girocheckout'];
+ $arStatus = (array)($arView['arStatus']??[]);
+ $arStornoStatus = (array)$this->get_option('wpsg_mod_girocheckout_stornostate');
+ $oMod = $this->arModule['wpsg_mod_girocheckout'];
+
+ $strBadge = '<span class="label label-%s" style="font-size:12px;">%s</span>';
+
+?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Zugang zu GiroCheckout', 'wpsg'), 'wpsg_mod_girocheckout_access'); ?>
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_girocheckout_merchantid', __('Händler-ID', 'wpsg'), $this->get_option('wpsg_mod_girocheckout_merchantid'), ['help' => 'wpsg_mod_girocheckout_merchantid', 'hint' => wpsg_translate(__('Händler-ID, Projekt-IDs und Projektkennwörter stehen im <a target="_blank" href="#1#">GiroCockpit</a>. Jede Zahlart ist dort ein eigenes Projekt.', 'wpsg'), 'https://www.girocockpit.de/')]); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php foreach ($arView['arMethods'] as $index => $arMethod) { ?>
+
+ <?php
+
+ $bCredentials = ((string)$this->get_option('wpsg_mod_girocheckout_merchantid') !== '' && (string)$this->get_option($oMod->getMethodOptionKey($index, 'projectid')) !== '' && (string)$this->get_option($oMod->getMethodOptionKey($index, 'projectpw')) !== '');
+ $arMethodStatus = ($arStatus['methods'][$index]??null);
+
+ if (!$bCredentials) {
+
+ $strConnection = sprintf($strBadge, 'default', esc_html__('Keine Zugangsdaten hinterlegt', 'wpsg'));
+
+ } else if (!is_array($arMethodStatus)) {
+
+ $strConnection = sprintf($strBadge, 'default', esc_html__('Noch nicht geprüft, bitte speichern', 'wpsg'));
+
+ } else if ($arMethodStatus['ok'] === true) {
+
+ $strConnection = sprintf($strBadge, 'success', esc_html__('Verbindung erfolgreich', 'wpsg')).' <small class="text-muted">'.esc_html(wpsg_formatTimestamp($arStatus['time'])).'</small>';
+
+ } else {
+
+ $strConnection = sprintf($strBadge, 'danger', esc_html__('Anmeldung fehlgeschlagen', 'wpsg')).'<br /><small class="text-danger">'.esc_html($arMethodStatus['message']).'</small>';
+
+ }
+
+ $strPwHint = (((string)$this->get_option($oMod->getMethodOptionKey($index, 'projectpw')) !== '')?__('Gespeichert. Zum Ändern neu eingeben, sonst leer lassen.', 'wpsg'):'');
+
+ ?>
+
+ <?php wpsg_drawForm_AdminboxStart($arMethod['name'], 'wpsg_mod_girocheckout_method_'.$index); ?>
+
+ <?php echo wpsg_drawForm_Checkbox($oMod->getMethodOptionKey($index, 'active'), __('Aktiv', 'wpsg'), $this->get_option($oMod->getMethodOptionKey($index, 'active')), ['help' => 'wpsg_shippay_activ']); ?>
+ <?php echo wpsg_drawForm_Text(__('Verbindung', 'wpsg'), $strConnection); ?>
+ <?php echo wpsg_drawForm_Input($oMod->getMethodOptionKey($index, 'projectid'), __('Projekt-ID', 'wpsg'), $this->get_option($oMod->getMethodOptionKey($index, 'projectid')), ['help' => 'wpsg_mod_girocheckout_projectid']); ?>
+ <?php echo wpsg_drawForm_Input($oMod->getMethodOptionKey($index, 'projectpw'), __('Projektkennwort', 'wpsg'), '', ['type' => 'password', 'help' => 'wpsg_mod_girocheckout_projectpw', 'hint' => esc_html($strPwHint)]); ?>
+ <?php echo wpsg_drawForm_Input($oMod->getMethodOptionKey($index, 'name'), __('Bezeichnung', 'wpsg'), $this->get_option($oMod->getMethodOptionKey($index, 'name')), ['help' => 'wpsg_shippay_name']); ?>
+ <?php echo wpsg_drawForm_Textarea($oMod->getMethodOptionKey($index, 'hint'), __('Hinweistext', 'wpsg'), $this->get_option($oMod->getMethodOptionKey($index, 'hint')), ['help' => 'wpsg_shippay_hint']); ?>
+ <?php echo wpsg_drawForm_Input($oMod->getMethodOptionKey($index, 'fee'), __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option($oMod->getMethodOptionKey($index, 'fee')), true), ['help' => 'wpsg_shippay_gebuehr', 'unit' => $this->get_option('wpsg_currency').' / %']); ?>
+ <?php echo wpsg_drawForm_Select($oMod->getMethodOptionKey($index, 'tax_key'), __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option($oMod->getMethodOptionKey($index, 'tax_key')), ['help' => 'wpsg_shippay_mwst']); ?>
+
+ <?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php } ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Zahlungsablauf', 'wpsg'), 'wpsg_mod_girocheckout_process'); ?>
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_girocheckout_subject', __('Verwendungszweck', 'wpsg'), $this->get_option('wpsg_mod_girocheckout_subject'), ['help' => 'wpsg_mod_girocheckout_subject', 'hint' => esc_html__('Höchstens 27 Zeichen, längere werden gekürzt.', 'wpsg')]); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_girocheckout_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_girocheckout_autostart'), ['help' => 'wpsg_shippay_paystart', 'hint' => esc_html__('Leitet den Kunden direkt nach dem Bestellabschluss zur Zahlung weiter. Sonst bezahlt er über den Knopf auf der Abschlussseite oder den Link in der Bestellmail.', 'wpsg')]); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Erstattung bei Statuswechsel', 'wpsg'), 'wpsg_mod_girocheckout_storno'); ?>
+
+ <p class="text-muted"><?php echo esc_html__('Wechselt eine über GiroCheckout bezahlte Bestellung in einen der markierten Status, wird der noch nicht erstattete Betrag automatisch erstattet.', 'wpsg'); ?></p>
+
+ <?php foreach ($this->arStatus as $status_id => $status_label) { ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_girocheckout_stornostate['.$status_id.']', __($status_label, 'wpsg'), ($arStornoStatus[$status_id]??'0')); ?>
+
+ <?php } ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
|
