Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: REL-0.1.1
Fetching contributors…

Cannot retrieve contributors at this time

file 95 lines (62 sloc) 2.961 kb

simplepay (Rails Amazon Simple Pay Interface)

simplepay.rubyforge.org

DESCRIPTION:

This gem provides a Rails interface to the Amazon Simple Pay payment service.

FEATURES/PROBLEMS:

Supports the following Amazon Simple Pay services:

  • Standard

  • Subscription

The following services are coming someday (hopefully soon):

  • Donation

  • Marketplace

SYNOPSIS:

Set up the gem requirement in your environment:

(in config/environment.rb)

config.gem "simplepay"

Configure the gem with your Amazon credentials:

(in config/initializers/simplepay.rb)

Simplepay.aws_access_key_id     = 'MYAMAZONACCESSKEYID'
Simplepay.aws_secret_access_key = 'MYAMAZONSECRETACCESSKEY'
Simplepay.account_id            = 'ACCOUNTIDFORAMAZONPAYMENTS'

Then, let Rails know about the Simplepay::Helpers:

(potentially in app/controllers/application[_controller].rb or really anywhere else)

require 'simplepay/rails'

Generating your Simple Pay forms

Generally, this library will then be used directly from one (or more) of your views. Depending on the type of Simple Pay service you're using (see Simplepay::Services), some form values will be required, while others may be optional. This is done like so:

<%= simplepay_form_for(:standard, {
  :amount       => 10.95,
  :description  => "Profit!"
}) %>

<%= simplepay_form_for(:subscription, {
  :amount                 => 10.95,
  :description            => "MORE Profit!",
  :recurring_frequency    => "1 month"
}) %>

REQUIREMENTS:

  1. You must have an Amazon Payments business account.

  2. You must know your Amazon Payments account identifier [instructions to come]

  3. You must know your Amazon Web Services access key and secret access key.

INSTALL:

sudo gem install simplepay

LICENSE:

(The MIT License)

Copyright © 2008 Nathaniel E. Bibler

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.