About the library

Before you begin

Extract the contents of amazon-fps-2008-09-17-php5-library.zip to a folder. The folder "amazon-fps-2008-09-17-php5-library" will be created. This folder will be referred to as <ROOT> from this point onwards. This folder should contain the following sub-directories:

Prerequisites

Software Version Download location
PHP 5.2.6 http://www.php.net/downloads.php

Configuration

  1. Update the keys required to make the API call. This is one time activity and should be same for all APIs
  2. Update the FPS endpoint (only required for sandbox environment, for prodouction no changes are required)

Steps to make a payment

Description : Making a payment involves two parts. First, you obtain a payment authorization from buyers by redirecting them to co-branded pages hosted by Amazon FPS. When buyers return to your web site, you receive a payment authorization(also called a sender token) as part of the return URL. Second, you use this payment authorization or sender token in a 'Pay' API call to make a payment.

  1. Setup an app server at your side to receive HTTP redirect from Cobranded UI.
  2. Get the authorization from the buyer
  3. Now we need to make the payment
  4. If the response status is Pending, you can use GetTransactionStatus API to get latest transaction status

Congratulations!! You made first call go through

Trouble shooting

  1. The signature received in response doesn't match.
  2. Fatal error: require_once(): Failed opening required 'Crypt/HMAC.php'

Related resources

Amazon Flexible Payments Service
Resources