Beginner amazon payments integration API add code to wordpress

246 views Asked by At

I would like to add an Amazon Payments button to my WordPress website. I have begun reading the API Integration guide and I need to add the following code to the head section of my website 'shop' - I am knowledge of navigating SFTP through my remote directories - where does this code go? My understanding is, the data of my WordPress pages' is stored in my hosting company's database? If I were to create a 'Shop' page, where would I navigate to insert the following code?

<head>
// your head section here
<script type='text/javascript'>
  window.onAmazonLoginReady = function() {
    amazon.Login.setClientId('YOUR_CLIENT_ID_HERE');
  };
</script>
<script type='text/javascript'
  src='https://static-na.payments-amazon.com/OffAmazonPayments/us/sandbox/js/Widgets.js'>
</script>
// your head section here
</head>
1

There are 1 answers

0
Robert Jamison On

I wouldn't recommend doing a direct integration with the APIs if you're a beginner. You could try this simple plugin for WordPress to add a button without having to write any code:

https://github.com/amzn/pay-with-amazon-express-wordpress-plugin