AbanteCart Community

AbanteCart Development => Customization help => Topic started by: flyn on November 24, 2014, 11:56:24 AM

Title: Amazon Login and Pay
Post by: flyn on November 24, 2014, 11:56:24 AM
I asked this awhile back I believe but I will ask here. Is there a way to get this to work with the cart system?

They provide code snippet like below. I just have to change and put our account info in there. I want to test this at least.

What file should I edit to test this on the cart and where in the file should I place this?

Thank You

  <script type='text/javascript'>
    window.onAmazonLoginReady = function() {
  <script type='text/javascript'

<!-- Place this where you would like the Payment Button to appear -->
<div id="AmazonPayButton"></div>
<script type="text/javascript">
  var authRequest;
  OffAmazonPayments.Button("AmazonPayButton", "YOUR_SELLER_ID_HERE", {
    type:  "PwA",
    color: "Gold",
    size:  "medium",
    useAmazonAddressBook: true,
    authorization: function() {
      var loginOptions = {scope: 'profile payments:widget'};
      authRequest = amazon.Login.authorize(loginOptions, "YOUR_REDIRECT_URL_HERE");
    onError: function(error) {
      // Write your custom error handling
Title: Re: Amazon Login and Pay
Post by: abantecart on December 01, 2014, 11:09:00 AM
You can try to put this to head.tpl