diff options
| author | daniel <noreply@maennchen1.de> | 2026-09-30 13:12:16 +0200 |
|---|---|---|
| committer | daniel <noreply@maennchen1.de> | 2026-09-30 13:12:37 +0200 |
| commit | ea77830018e15ab662fb0cfb2958857e3b3de532 (patch) | |
| tree | 9634013e7a45c0f9da6891dd6bf0541801f6e3a2 /views/mods/mod_amazon_v2 | |
| parent | ee163b01c6bdf3da7c2a8f3ee1be25b02cb760b4 (diff) | |
- Amazon Modul vereinheitlicht und moderniesiert
Diffstat (limited to 'views/mods/mod_amazon_v2')
| -rw-r--r-- | views/mods/mod_amazon_v2/basket_inner_prebutton.phtml | 44 | ||||
| -rw-r--r-- | views/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml | 133 | ||||
| -rw-r--r-- | views/mods/mod_amazon_v2/gfx/logo_100x25.png | bin | 810 -> 0 bytes | |||
| -rw-r--r-- | views/mods/mod_amazon_v2/order_done.phtml | 54 | ||||
| -rw-r--r-- | views/mods/mod_amazon_v2/order_view_afterpayment.phtml | 75 | ||||
| -rw-r--r-- | views/mods/mod_amazon_v2/overview_button.phtml | 47 | ||||
| -rw-r--r-- | views/mods/mod_amazon_v2/settings_edit.phtml | 47 |
7 files changed, 0 insertions, 400 deletions
diff --git a/views/mods/mod_amazon_v2/basket_inner_prebutton.phtml b/views/mods/mod_amazon_v2/basket_inner_prebutton.phtml deleted file mode 100644 index e65c569..0000000 --- a/views/mods/mod_amazon_v2/basket_inner_prebutton.phtml +++ /dev/null @@ -1,44 +0,0 @@ -<?php
-
- /**
- * Template für die Integration von "Bezahlen mit Amazon" in den Warenkorb
- */
-
- $view = $this->view['wpsg_mod_amazon'];
-
- // https://amazonpaycheckoutintegrationguide.s3.amazonaws.com/amazon-pay-checkout/introduction.html
-
-?>
-
-<?php if ($this->get_option('wpsg_mod_amazon_v2_login') === '1') { ?>
-
- <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml'); ?>
-
-<?php } else { ?>
-
- <script src="https://static-eu.payments-amazon.com/checkout.js"></script>
-
- <div id="AmazonPayButton_wrap">
- <div id="AmazonPayButton"></div>
- </div>
-
- <script>
-
- amazon.Pay.renderButton('#AmazonPayButton', {
- merchantId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>',
- ledgerCurrency: 'EUR',
- sandbox: <?php echo (($this->get_option('wpsg_mod_amazon_v2_sandbox') === '1')?'true':'false'); ?>,
- checkoutLanguage: 'de_DE',
- productType: 'PayAndShip',
- placement: 'Cart',
- buttonColor: 'Gold',
- createCheckoutSessionConfig: {
- payloadJSON: '<?php echo $view['payload']; ?>',
- signature: '<?php echo $view['signature']; ?>',
- publicKeyId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_public_key_id'); ?>'
- }
- });
-
- </script>
-
-<?php } ?>
diff --git a/views/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml b/views/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml deleted file mode 100644 index 85359cf..0000000 --- a/views/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml +++ /dev/null @@ -1,133 +0,0 @@ -<?php
-
- /**
- *
- */
-
-?>
-
-<script async="async" src="https://static-eu.payments-amazon.com/OffAmazonPayments/de/sandbox/lpa/js/Widgets.js"></script>
-
-<div id="AmazonLoginButton_wrap">
- <div id="AmazonLoginButton"></div>
-</div>
-
-<div id="addressBookWidgetDiv"></div>
-<div id="walletWidgetDiv"></div>
-
-<input type="text" name="amazon[OrderReference]" id="wpsg_mod_amazon_OrderReference" value="" />
-
-<script>
-
- window.onAmazonLoginReady = function() {
-
- amazon.Login.setClientId('<?php echo $this->get_option('wpsg_mod_amazon_v2_store_id'); ?>');
-
- };
-
- window.onAmazonPaymentsReady = function() {
-
- var authRequest;
-
- OffAmazonPayments.Button('AmazonLoginButton', '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>', {
-
- type: 'PwA',
- color: 'Gold',
- size: 'small',
- language: 'de-DE',
-
- authorization: function() {
-
- loginOptions = {
- scope: "profile payments:widget payments:shipping_address payments:billing_address",
- popup: true
- };
-
- authRequest = amazon.Login.authorize (loginOptions, '<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_amazon_v2', 'login', [], true) ?>');
-
- }
- });
-
- <?php if (isset($_SESSION['wpsg_mod_amazon_v2_access_token'])) { ?>
-
- new OffAmazonPayments.Widgets.AddressBook({
- sellerId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>',
- scope: 'profile payments:widget payments:shipping_address payments:billing_address',
- onOrderReferenceCreate: function(orderReference) {
-
- var oID = orderReference.getAmazonOrderReferenceId();
-
- jQuery('#wpsg_mod_amazon_OrderReference').val(oID);
-
- },
- onAddressSelect: function(orderReference) {
- // Replace the following code with the action that you want
- // to perform after the address is selected. The
- // amazonOrderReferenceId can be used to retrieve the address
- // details by calling the GetOrderReferenceDetails operation.
- },
- design: {
- designMode: 'responsive'
- },
- onReady: function(orderReference) {
- // Enter code here you want to be executed
- // when the AddressBook widget has been rendered.
- },
-
- onError: function(error) {
-
- console.log(error);
-
- // Your error handling code.
- // During development you can use the following
- // code to view error messages:
- // console.log(error.getErrorCode() + ': ' + error.getErrorMessage());
- // See "Handling Errors" for more information.
- }
- }).bind("addressBookWidgetDiv");
-
- new OffAmazonPayments.Widgets.Wallet({
- sellerId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>',
- onPaymentSelect: function(orderReference) {
-
- // Replace this code with the action that you want to perform
- // after the payment method is selected.
-
- },
- design: {
- designMode: 'responsive'
- },
- onError: function(error) {
- alert("Wallet: Es ist folgender Fehler aufgetreten: " + error.getErrorCode() + ' - ' + error.getErrorMessage());
- }
- }).bind("walletWidgetDiv");
-
- <?php } ?>
-
- }
-
-</script>
-
-<style>
-
- #addressBookWidgetDiv {
- min-width: 300px;
- width: 100%;
- max-width: 900px;
- min-height: 228px;
- height: 240px;
- max-height: 400px;
- margin-bottom:2rem;
- }
-
- #walletWidgetDiv {
- min-width: 300px;
- width: 100%;
- max-width: 900px;
- min-height: 228px;
- height: 240px;
- max-height: 400px;
- margin-bottom:2rem;
- }
-
-</style>
\ No newline at end of file diff --git a/views/mods/mod_amazon_v2/gfx/logo_100x25.png b/views/mods/mod_amazon_v2/gfx/logo_100x25.png Binary files differdeleted file mode 100644 index bb16b5b..0000000 --- a/views/mods/mod_amazon_v2/gfx/logo_100x25.png +++ /dev/null diff --git a/views/mods/mod_amazon_v2/order_done.phtml b/views/mods/mod_amazon_v2/order_done.phtml deleted file mode 100644 index ba16642..0000000 --- a/views/mods/mod_amazon_v2/order_done.phtml +++ /dev/null @@ -1,54 +0,0 @@ -<?php
-
- /**
- * Template, welches bei Bestellungen mit Amazon Pay nach der Bestellung angezeigt wird
- */
-
- $view = $this->view['wpsg_mod_amazon_v2'];
-
- // https://pay.amazon.de/help/JE5KSJW4SFH2UM8
- // https://developer.amazon.com/de/docs/eu/amazon-pay-onetime/sca-upgrade.html?ld=NSGoogle
- // https://sellercentral.amazon.com/forums/t/what-is-the-amazonorderreferenceid/286349/2
-
-?>
-
-<?php if ($view['state'] === 'Completed') { ?>
-
- <p><?php echo __('Bestellung wurde mit Amazon Payment bezahlt.', 'wpsg'); ?></p>
-
-<?php } else if ($view['state'] === 'Unpayed') { ?>
-
- <script src="https://static-eu.payments-amazon.com/checkout.js"></script>
-
- <div id="AmazonPayButton"></div>
-
- <script>
-
- amazon.Pay.renderButton('#AmazonPayButton', {
- merchantId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>',
- ledgerCurrency: 'EUR',
- sandbox: <?php echo (($this->get_option('wpsg_mod_amazon_v2_sandbox') === '1')?'true':'false'); ?>,
- checkoutLanguage: 'de_DE',
- productType: 'PayAndShip',
- placement: 'Cart',
- buttonColor: 'Gold',
- createCheckoutSessionConfig: {
- payloadJSON: '<?php echo $view['payload']; ?>',
- signature: '<?php echo $view['signature']; ?>',
- publicKeyId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_public_key_id'); ?>'
- }
- });
-
- </script>
-
-<?php } else if ($view['state'] === 'Open') { ?>
-
- <p><?php echo __('Zahlen Sie Ihre Bestellung jetzt mit AmazonPay, indem sie auf folgenden Button klicken.', 'wpsg'); ?></p>
-
-
- <a href="<?php echo $view['payURL']; ?>" title="<?php echo __('Jetzt mit AmazonPay bezahlen', 'wpsg'); ?>">
- <img src="<?php echo $this->getRessourceURL('mods/mod_amazon_v2/gfx/logo_100x25.png'); ?>" alt="<?php echo __('Jetzt mit AmazonPay bezahlen', 'wpsg'); ?>" />
- </a>
-
-
-<?php } ?>
diff --git a/views/mods/mod_amazon_v2/order_view_afterpayment.phtml b/views/mods/mod_amazon_v2/order_view_afterpayment.phtml deleted file mode 100644 index 940bc5c..0000000 --- a/views/mods/mod_amazon_v2/order_view_afterpayment.phtml +++ /dev/null @@ -1,75 +0,0 @@ -<?php
-
- /**
- * Template für die Integration von AmazonPay in die Bestellverwaltung
- */
-
- $view = $this->view['wpsg_mod_amazon_v2'];
-
-?>
-
- <?php if (wpsg_isSizedString($view['referenceID'])) { ?>
- <?php echo wpsg_drawForm_Input(false, __('Amazon-Referenznummer', 'wpsg'), wpsg_getStr($view['referenceID']), ['readonly' => true]); ?>
- <?php } ?>
-
- <?php if (wpsg_isSizedString($view['sesion_id'])) { ?>
- <?php echo wpsg_drawForm_Input(false, __('Session ID', 'wpsg'), wpsg_getStr($view['sesion_id']), ['readonly' => true]); ?>
- <?php } ?>
-
- <?php if (wpsg_isSizedString($view['chargeId'])) { ?>
- <?php echo wpsg_drawForm_Input(false, __('Charge ID', 'wpsg'), wpsg_getStr($view['chargeId']), ['readonly' => true]); ?>
- <?php } ?>
-
- <?php if (wpsg_isSizedString($view['refundId'])) { ?>
- <?php echo wpsg_drawForm_Input(false, __('Refund ID', 'wpsg'), wpsg_getStr($view['refundId']), ['readonly' => true]); ?>
- <?php } ?>
-
- <div class="form-group form-group-text form-group-sm">
- <label class="col-sm-6 control-label" for=""><?php echo __('Status', 'wpsg'); ?> [<a href="<?php
-
- echo wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'mod' => 'wpsg_mod_amazon_v2', 'do' => 'update', 'edit_id' => $this->view['oOrder']->getId()], ['noheader' => '1']);
-
- ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
- <div class="col-sm-6">
- <div class="wpsg_field_wrap">
- <p class="form-control-static">
-
- <?php echo wpsg_translate(__('#1#', 'wpsg'), $view['state']); ?>
-
- </p>
- </div>
- </div>
- </div>
-
- <?php if (wpsg_isSizedString($view['chargeId']) && !wpsg_isSizedString($view['refundId'])) { ?>
-
- <br />
-
- <?php echo wpsg_drawForm_TextStart(); ?>
-
- <a href="<?php echo wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'mod' => 'wpsg_mod_amazon_v2', 'do' => 'refund', 'edit_id' => $this->view['oOrder']->getId()], ['noheader' => '1']); ?>" class="button">
- <?php echo __('Zurückzahlen', 'wpsg'); ?>
- </a>
-
- <?php echo wpsg_drawForm_TextEnd(); ?>
-
- <?php } else if (wpsg_isSizedString($view['refundId'])) { ?>
-
- <div class="form-group form-group-text form-group-sm">
- <label class="col-sm-6 control-label" for=""><?php echo __('Erstattungsstatus', 'wpsg'); ?> [<a href="<?php
-
- echo wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'mod' => 'wpsg_mod_amazon_v2', 'do' => 'updateRefund', 'edit_id' => $this->view['oOrder']->getId()], ['noheader' => '1']);
-
- ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
- <div class="col-sm-6">
- <div class="wpsg_field_wrap">
- <p class="form-control-static">
-
- <?php echo wpsg_translate(__('#1#', 'wpsg'), $view['refundState']); ?>
-
- </p>
- </div>
- </div>
- </div>
-
- <?php } ?>
diff --git a/views/mods/mod_amazon_v2/overview_button.phtml b/views/mods/mod_amazon_v2/overview_button.phtml deleted file mode 100644 index 8f2c96c..0000000 --- a/views/mods/mod_amazon_v2/overview_button.phtml +++ /dev/null @@ -1,47 +0,0 @@ -<?php
-
- /**
- *
- */
-
-?>
-
-<script async="async" src="https://static-eu.payments-amazon.com/OffAmazonPayments/de/sandbox/lpa/js/Widgets.js"></script>
-
-<div id="buy-now">JETZT kaufen</div>
-
-<script>
-
- var sellerId = '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>';
- var id = '<?php echo $_SESSION['wpsg_mod_amazon_v2_amazonCheckoutSessionId']; ?>';
- var buyNowBtn = document.getElementById("buy-now");
-
- buyNowBtn.addEventListener('click', function () {
-
- OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {
-
- placeOrder(confirmationFlow);
-
- });
-
- });
-
- function placeOrder(confirmationFlow) {
-
- jQuery.ajax({
- url: '<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_amazon_v2', 'placeOrder', [], true) ?>',
-success: function (data) {
-confirmationFlow.success(); // continue Amazon Pay hosted site
-},
-error: function (data) { // called on ajax error and timeout
-confirmationFlow.error(); // abort Amazon Pay initConfirmationFlow
-// you might want to add additional error handling
-},
-timeout: "your timeout value" //specify your timeout value (for example, 3000)
-//If the ajax request takes longer than this timeout (in ms), the error callback
-//will be called
-});
-
- }
-
-</script>
\ No newline at end of file diff --git a/views/mods/mod_amazon_v2/settings_edit.phtml b/views/mods/mod_amazon_v2/settings_edit.phtml deleted file mode 100644 index da9b3a6..0000000 --- a/views/mods/mod_amazon_v2/settings_edit.phtml +++ /dev/null @@ -1,47 +0,0 @@ -<?php
-
- /**
- * Einstellungen des Moduls "AmazonPay"
- */
-
-?>
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_seller_id', __('Händler-ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_seller_id'), array('help' => 'wpsg_mod_amazon_v2_seller_id')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_store_id', __('Store ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_store_id'), []); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_public_key_id', __('ID des öffentlichen Schlüssels / Public Key ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_public_key_id'), []); ?>
-<?php echo wpsg_drawForm_Upload('wpsg_mod_amazon_v2_private_key', __('Privater Schlüssel (.pem Datei)', 'wpsg')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_v2_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_sandbox'), array('help' => 'wpsg_mod_amazon_v2_sandbox')); ?>
-
-<script>
-
- jQuery('#wpsg_mod_amazon_v2_login').on('click', function() {
-
- if (jQuery(this).prop('checked')) {
-
- jQuery('#wpsg_mod_amazon_v2_login_1').show();
-
- } else {
-
- jQuery('#wpsg_mod_amazon_v2_login_1').hide();
-
- }
-
- });
-
-</script>
-
-<br />
-
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_v2_aktiv', __('Zahlungsart für neue Bestellungen aktiv', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_aktiv')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_name', __('Name der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_name'), array('help' => 'wpsg_mod_amazon_v2_name')); ?>
-<?php echo wpsg_drawForm_Textarea('wpsg_mod_amazon_v2_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_hint'), array('help' => 'wpsg_shippay_hint')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_subject', __('Betreff (Auf Abrechnungen für Verkäufer sichtbar)', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_subject'), array('help' => 'wpsg_mod_amazon_v2_subject')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_amazon_v2_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_amazon_v2_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_amazon_v2_mwst'), array('help' => 'wpsg_mod_amazon_v2_mwst')); ?>
-
|
