Amazon FPS: Ruby "SimplePay" Widget return URL validation Utility
Community Contributed Software
-
Amazon Web Services provides links to these packages as a convenience for our customers,
but software not authored by an "@AWS" account has not been reviewed or screened by AWS.
-
Please review this software to ensure it meets your needs before using it.
This is a simple Ruby code sample to validate a SimplePay IPN post
Details
Prerequisites
- You must have an Amazon Payments Sandbox Business Account.
- You must have an Amazon Web Services developer account.
- You must use the same email address and password for your Amazon Payments Business Account and your Amazon Web Services developer account.
- You must have Ruby 1.8.6+ installed
- You must have the 'openssl' ruby gem installed
Using the Sample
- You must have Rails 2.1+ installed
- Create a rails application skeleton with 'rails your_app_name'
- Sign into your Amazon Web Services developer account and retrieve your Access Key ID and Secret Access Key from here.
- Enter your Access Key ID and Secret Access Key values in amazon_simplepay.yml
- Enter your publicly accessible host's fully qualified host name in amazon_simplepay.yml
- Enter 'Sandbox' or 'Production' under environment: in amazon_simplepay.yml
- Copy amazon_simplepay.yml to your_app_name/config/
- Copy the 'aws' directory to your_app_name/lib/aws/
- Enter an email address that is already associated with an Amazon Payments (Sandbox or Production) account for 'RECIPIENT_EMAIL' in ipn_controller.rb
- Copy ipn_controller.rb to your_app_name/app/controllers/
- cd your_app_name
- script/server -p 80
- Open 'http://your_host_name/ipn' in your browser
- Use 'tail -f log/development.log' to follow your use of the SimplePay button and see the notification in your log after you've completed a transaction