Gracias por tu visita. Esta página solo está disponible en inglés.

Step 2: Configure

This section covers SDK setup requirements, like setting up config files and Amazon MWS endpoints.

Procedure

Complete the following steps to configure your website for Amazon Pay:

  1. Ensure that you have followed the setup steps in Adding allowed JavaScript origins or allowed return URLs.
  2. Set up Sandbox MWS endpoints and other URLs.

Best practice recommendation: All API calls should be submitted to the Sandbox for test purposes before being moved live to your production systems.

The table below shows the Sandbox-Endpoints. For a list of production endpoints, see Taking your integration live.

Payments API endpoint
https://mws.amazonservices.com/OffAmazonPayments_Sandbox/2013-01-01
Login API URL
https://api.sandbox.amazon.com
Profile API URL
https://api.sandbox.amazon.com/user/profile

You can set up your Notification endpoints in Seller Central on the Settings > Integration Settings page.

Requirements for PHP are:
  • PHP 5.3 or higher
  • Curl 7.18 or higher
More information on setup can be found on the Amazon Pay PHP SDK (https://github.com/amzn/amazon-pay-sdk-php). Here is an example of how to set the configuration while instantiating the Client object. Note that the Sandbox parameter is defaulted to false if not specified.

<?php namespace PayWithAmazon;

$config = array('merchant_id'   => 'YOUR_MERCHANT_ID',
  'access_key'   => 'YOUR_ACCESS_KEY',
  'secret_key'   => 'YOUR_SECRET_KEY',
  'client_id'   => 'YOUR_LOGIN_WITH_AMAZON_CLIENT_ID',
  'region'   => 'REGION',
  'sandbox'   => true
);

$client = new Client($config);

// Also you can set the sandbox variable in the config() array of the Client class by

$client->setSandbox(true);
Requirements for Python are:
  • Python 3.2 or higher
  • pyOpenSSL 0.11 or higher
  • Requests 2.6.0 or higher
More information on setup can be found on the Amazon Pay Python SDK (https://github.com/amzn/amazon-pay-sdk-python).

See also