Implementing amazon pay widget without address referring doc https://developer.amazon.com/docs/eu/amazon-pay-onetime/no-address-widget.html
Replaced the clientid and sellerid with the registered application values from seller central, but getting error as "You cannot use the username and password associated with your seller account. Please use a different buyer account."
This is the code used
<script type='text/javascript'
src='https://static-na.payments-amazon.com/OffAmazonPayments/us/sandbox/js/Widgets.js'>
<script>
window.onAmazonLoginReady = function() {
amazon.Login.setClientId('yyyyyyyyy');
};
</script>
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0"/>
<!-- Place this code in your HTML where you want the -->
<div id="walletWidgetDiv">
</div>
<script>
var orderReferenceId = null;
new OffAmazonPayments.Widgets.Wallet({
sellerId: 'xxxx',
// Add the onOrderReferenceCreate function to
// generate an Order Reference ID.
onOrderReferenceCreate: function(orderReference) {
// Use the following cod to get the generated Order Reference ID.
orderReferenceId = orderReference.getAmazonOrderReferenceId();
},
design: {
designMode: 'responsive'
},
onPaymentSelect: function(orderReference) {
// Replace this code with the action that you want to perform
// after the payment method is selected.
// Ideally this would enable the next action for the buyer
// such as a "Continue" or "Place Order" button.
},
onError: function(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("walletWidgetDiv");
</script>