Amazon FPS: Ruby "SimplePay" Widget return URL validation Utility

Sample Code & Libraries>Ruby>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

Submitted By: Philip@AWS
AWS Products Used: Amazon FPS
Language(s): Ruby
License: Apache License 2.0
Created On: October 6, 2008 10:31 PM GMT
Last Updated: February 5, 2009 3:20 AM GMT
Download

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

  1. You must have Rails 2.1+ installed
  2. Create a rails application skeleton with 'rails your_app_name'
  3. Sign into your Amazon Web Services developer account and retrieve your Access Key ID and Secret Access Key from here.
  4. Enter your Access Key ID and Secret Access Key values in amazon_simplepay.yml
  5. Enter your publicly accessible host's fully qualified host name in amazon_simplepay.yml
  6. Enter 'Sandbox' or 'Production' under environment: in amazon_simplepay.yml
  7. Copy amazon_simplepay.yml to your_app_name/config/
  8. Copy the 'aws' directory to your_app_name/lib/aws/
  9. Enter an email address that is already associated with an Amazon Payments (Sandbox or Production) account for 'RECIPIENT_EMAIL' in ipn_controller.rb
  10. Copy ipn_controller.rb to your_app_name/app/controllers/
  11. cd your_app_name
  12. script/server -p 80
  13. Open 'http://your_host_name/ipn' in your browser
  14. 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
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.