Subversion Repositories wpShopGermany4

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7787 daniel 1
<?php
2
 
3
    /**
4
     * Template für die Integration von "Bezahlen mit Amazon" in den Warenkorb
5
     */
6
 
7
    $view = $this->view['wpsg_mod_amazon'];
8
 
9
    // https://amazonpaycheckoutintegrationguide.s3.amazonaws.com/amazon-pay-checkout/introduction.html
10
 
11
?>
12
 
13
<?php if ($this->get_option('wpsg_mod_amazon_v2_login') === '1') { ?>
14
 
15
    <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml'); ?>
16
 
17
<?php } else { ?>
18
 
19
    <script src="https://static-eu.payments-amazon.com/checkout.js"></script>
20
 
21
    <div id="AmazonPayButton_wrap">
22
        <div id="AmazonPayButton"></div>
23
    </div>
24
 
25
    <script>
26
 
27
        amazon.Pay.renderButton('#AmazonPayButton', {
28
            merchantId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>',
29
            ledgerCurrency: 'EUR',
30
            sandbox: <?php echo (($this->get_option('wpsg_mod_amazon_v2_sandbox') === '1')?'true':'false'); ?>,
31
            checkoutLanguage: 'de_DE',
32
            productType: 'PayAndShip',
33
            placement: 'Cart',
34
            buttonColor: 'Gold',
35
            createCheckoutSessionConfig: {
36
                payloadJSON: '<?php echo $view['payload']; ?>',
37
                signature: '<?php echo $view['signature']; ?>',
38
                publicKeyId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_public_key_id'); ?>'
39
            }
40
        });
41
 
42
    </script>
43
 
44
<?php } ?>