I'm integrating amazon-pay-SDK-python for the web.
I have done reading all documentation of amazon-pay, but I didn't get any idea about how to give or create a button signature in Frontend/backend code. Here is my code of frontend to create a button of amazon-pay One-time-checkout.
If anyone implemented this, give your valuable answer..
<body>
<div id="AmazonPayButton"></div>
<script src="https://static-na.payments-amazon.com/checkout.js"></script>
<script type="text/javascript" charset="utf-8">
amazon.Pay.renderButton('#AmazonPayButton', {
// set checkout environment
merchantId: 'merchant_id',
publicKeyId: 'SANDBOX-xxxxxxxxxx',
ledgerCurrency: 'USD',
// customize the buyer experience
checkoutLanguage: 'en_US',
productType: 'PayAndShip',
placement: 'Cart',
buttonColor: 'Gold',
// configure Create Checkout Session request
createCheckoutSessionConfig: {
payloadJSON: 'payload', // string generated in step 2
signature: 'xxxx' // signature generated in step 3
}
});
</script>
</body>