Blame | Last modification | View Log | RSS feed
<?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 } ?>