From ea77830018e15ab662fb0cfb2958857e3b3de532 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 30 Sep 2026 13:12:16 +0200 Subject: - Amazon Modul vereinheitlicht und moderniesiert --- views/mods/mod_amazon/settings_edit.phtml | 155 ++++++++++++++++++++++++++---- 1 file changed, 136 insertions(+), 19 deletions(-) (limited to 'views/mods/mod_amazon/settings_edit.phtml') diff --git a/views/mods/mod_amazon/settings_edit.phtml b/views/mods/mod_amazon/settings_edit.phtml index 827c68f..35020eb 100644 --- a/views/mods/mod_amazon/settings_edit.phtml +++ b/views/mods/mod_amazon/settings_edit.phtml @@ -1,32 +1,149 @@ view['wpsg_mod_amazon']; + $bSandbox = (bool)$arView['bSandbox']; + + $arStornoStatus = (array)$this->get_option('wpsg_mod_amazon_stornostate'); + + // Anmeldung für Amazon-Pay-Händler, führt direkt in den Amazon-Pay-Bereich der Seller Central + $strSellerCentralURL = 'https://pay.amazon.de/signin'; + + $strBadge = '%s'; + + $arEnvLabel = [ + wpsg_mod_amazon::ENV_LIVE => __('Zugangsdaten Live-System', 'wpsg'), + wpsg_mod_amazon::ENV_SANDBOX => __('Zugangsdaten Sandbox (Testbetrieb)', 'wpsg') + ]; + + if ($bSandbox) { + + $strMode = sprintf($strBadge, 'warning', esc_html__('Sandbox (Testbetrieb)', 'wpsg')); + + } else { + + $strMode = sprintf($strBadge, 'success', esc_html__('Live', 'wpsg')); + + } + ?> -get_option('wpsg_mod_amazon_seller_id'), array('help' => 'wpsg_mod_amazon_seller_id')); ?> -get_option('wpsg_mod_amazon_mws_access_key_id'), array('help' => 'wpsg_mod_amazon_mws_access_key_id')); ?> -get_option('wpsg_mod_amazon_mws_access_key'), array('help' => 'wpsg_mod_amazon_mws_access_key')); ?> -get_option('wpsg_mod_amazon_lwa_client_id'), array('help' => 'wpsg_mod_amazon_lwa_client_id')); ?> -get_option('wpsg_mod_amazon_lwa_client_secret'), array('help' => 'wpsg_mod_amazon_lwa_client_secret')); ?> -get_option('wpsg_mod_amazon_sandbox'), array('help' => 'wpsg_mod_amazon_sandbox')); ?> + + +
+ +
+ + + + + + __('Live-System', 'wpsg'), '1' => __('Sandbox (Testbetrieb)', 'wpsg')], (($bSandbox)?'1':'0'), ['help' => 'wpsg_mod_amazon_sandbox', 'hint' => esc_html__('Neue Zahlungen laufen über die Zugangsdaten der aktiven Umgebung. In der Sandbox werden keine echten Zahlungen ausgeführt. Bestehende Zahlungen fragt der Shop weiterhin in der Umgebung ab, in der sie angelegt wurden.', 'wpsg')]); ?> + + + + + $arEnv) { ?> + + '.esc_html($arStatus['message']).''; + + } + + if ($bActive) $strConnection .= ' '.sprintf($strBadge, 'info', esc_html__('aktiv', 'wpsg')); + + $strKey = sprintf($strBadge, (($arEnv['bKey'])?'success':'danger'), (($arEnv['bKey'])?esc_html__('Hinterlegt', 'wpsg'):esc_html__('Fehlt', 'wpsg'))); + + ?> + + + + + + + + + + + + + + +
+ + + + 'wpsg_mod_amazon_seller_id']); ?> + 'wpsg_mod_amazon_store_id', 'hint' => esc_html__('Beginnt mit "amzn1.application-oa2-client.". Das "Client Secret" daneben wird nicht benötigt.', 'wpsg')]); ?> + 'wpsg_mod_amazon_public_key_id', 'hint' => wpsg_translate(__('Händler-ID, Client-ID/Store-ID und API-Schlüssel finden bzw. erzeugen Sie in der Seller Central unter "Integration → Integration Central".', 'wpsg'), esc_url($strSellerCentralURL))]); ?> + '.pem', 'help' => 'wpsg_mod_amazon_private_key']); ?> + + + + + + + + get_option('wpsg_mod_amazon_aktiv'), ['help' => 'wpsg_shippay_activ']); ?> + get_option('wpsg_mod_amazon_name'), ['help' => 'wpsg_mod_amazon_name']); ?> + get_option('wpsg_mod_amazon_hint'), ['help' => 'wpsg_shippay_hint']); ?> + get_option('wpsg_mod_amazon_gebuehr'), true), ['help' => 'wpsg_shippay_gebuehr', 'unit' => $this->get_option('wpsg_currency').' / %']); ?> + get_option('wpsg_mod_amazon_mwst'), ['help' => 'wpsg_mod_amazon_mwst']); ?> + + + + + + get_option('wpsg_mod_amazon_basket'), ['help' => 'wpsg_mod_amazon_basket']); ?> + get_option('wpsg_mod_amazon_autostart'), ['help' => 'wpsg_mod_amazon_autostart']); ?> + get_option('wpsg_mod_amazon_buttoncolor'), ['help' => 'wpsg_mod_amazon_buttoncolor']); ?> + get_option('wpsg_mod_amazon_subject'), ['help' => 'wpsg_mod_amazon_subject']); ?> + + + + + + true, 'help' => 'wpsg_mod_amazon_ipn_url', 'hint' => esc_html__('Tragen Sie diese URL in der Seller Central unter "Integration → Integration Central → IPN-Einstellungen" ein. Amazon meldet darüber Zahlungen, die erst später eingezogen werden, und den Stand von Erstattungen. Die URL muss per HTTPS von außen erreichbar sein.', 'wpsg')]); ?> + + -
+ -get_option('wpsg_mod_amazon_aktiv')); ?> -get_option('wpsg_mod_amazon_name'), array('help' => 'wpsg_mod_amazon_name')); ?> -get_option('wpsg_mod_amazon_hint'), array('help' => 'wpsg_shippay_hint')); ?> -get_option('wpsg_mod_amazon_subject'), array('help' => 'wpsg_mod_amazon_subject')); ?> -get_option('wpsg_mod_amazon_basket'), array('help' => 'wpsg_mod_amazon_basket')); ?> +

-
+ arStatus as $status_id => $status_label) { ?> -get_option('wpsg_mod_amazon_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?> -get_option('wpsg_mod_amazon_mwst'), array('help' => 'wpsg_mod_amazon_mwst')); ?> + -
+ -view['ipnURL'], array('readonly' => true)); ?> -view['jsOrigin'], array('readonly' => true)); ?> \ No newline at end of file + -- cgit v1.2.3