Created
June 15, 2020 17:11
-
-
Save Lkubok/62ffb6af65c31abafadb375ac312a7d2 to your computer and use it in GitHub Desktop.
amazon2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- please put the style below inside your CSS file --> | |
<style type="text/css"> | |
#addressBookWidgetDiv{width: 400px; height: 228px;} | |
</style> | |
<div id="addressBookWidgetDiv"> | |
</div> | |
<script> | |
new OffAmazonPayments.Widgets.AddressBook({ | |
sellerId: 'YOUR_SELLER_ID_HERE', | |
agreementType: 'BillingAgreement', | |
onReady: function(billingAgreement) { | |
var billingAgreementId = billingAgreement. | |
getAmazonBillingAgreementId(); | |
}, | |
onAddressSelect: function(billingAgreement) { | |
// Replace the following code with the action that you want to perform | |
// after the address is selected. | |
// The amazonBillingAgreementId can be used to retrieve | |
// the address details by calling the GetBillingAgreementDetails operation. | |
// If rendering the AddressBook and Wallet widgets on the same page, you | |
// should wait for this event before you render the Wallet widget for | |
// the first time. | |
// The Wallet widget re-renders itself on all subsequent | |
// onAddressSelect events without any action from you. We don't | |
// recommend that you explicitly refresh it. | |
}, | |
design: { | |
designMode: 'responsive' | |
}, | |
onError: function(error) { | |
// your error handling code | |
} | |
}).bind("addressBookWidgetDiv"); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment