Skip to content

Instantly share code, notes, and snippets.

@Lkubok
Created June 15, 2020 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lkubok/9d14894606b86ec913207a5919734f95 to your computer and use it in GitHub Desktop.
Save Lkubok/9d14894606b86ec913207a5919734f95 to your computer and use it in GitHub Desktop.
amazon1
<div id="AmazonPayButton"/>
<script type="text/javascript">
var authRequest;
OffAmazonPayments.Button("AmazonPayButton", "YOUR_MERCHANT_ID ", {
type: "ENTER_TYPE_PARAMETER",
color: "ENTER_COLOR_PARAMETER",
size: "ENTER_SIZE_PARAMETER",
authorization: function() {
loginOptions =
{scope: "ENTER_SCOPES", popup: "ENTER_POPUP_PARAMETER"};
authRequest = amazon.Login.authorize (loginOptions,
"YOUR_REDIRECT_URL ");
},
onError: function(error) {
// your error handling code
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment