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:
- Ensure that you have followed the setup steps in Adding allowed JavaScript origins or allowed return URLs.
- 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
<?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