I am missing something, but I can't figure out what. I am implementing the Pay with Amazon on my website and have followed their implementation guide step by step, but I am still having issues.
I have get the address and wallet widget to render, but instead of looking like , instead it looks like
I am trying to get the order details so that when the address is selected the shipping options show and then the cart when the payment option is selected.
But I am having no luck. I have researched various sites and documentation and they all say the same, I can't see where I am going wrong.
Here is the address widget:
<div id="addressBookWidgetDiv" style="width:400px; height:240px;padding-top:20pt"></div>
<script>
new OffAmazonPayments.Widgets.AddressBook({
sellerId: 'SELLER_ID',
onOrderReferenceCreate: function(orderReference) {
orderReference.getAmazonOrderReferenceId();
},
onAddressSelect: function(orderReference) {
GetOrderReferenceDetails();
},
design: {
designMode: 'responsive'
},
onError: function(error) {
// your error handling code
}
}).bind("addressBookWidgetDiv");
</script>
Here is the wallet:
<div id="walletWidgetDiv">
</div>
<script>
new OffAmazonPayments.Widgets.Wallet({
sellerId: 'YOUR_SELLER_ID_HERE',
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) {
// your error handling code
}
}).bind("walletWidgetDiv");
</script>
Any help would be appreciated.
Thanks.