RAA - payment

payment / 0.9

Short description: Process credit cards and checks using merchant accounts
Category: Library/e-commerce
Status: beta
Created: 2005-02-05 22:05:59 GMT
Last update: 2005-02-05 22:05:59 GMT
Owner: Lucas Carlson (Projects of this owner)
Homepage: http://payment.rufy.com/
Download: http://rubyforge.org/projects/payment/
License: Ruby's
Dependency:
None
Description:

Payment is used to process credit cards and electronic cash through merchant accounts.

To choose a gateway, require ‘payment/gateway_name’. For example, if you want to use Authorize.net, do a require ‘payment/authorize_net’. If you would like to use multiple gateways in the same code, simply do a require ‘payment’ and it will grab each gateway’s code for you.

Payment was inspired by and has borrowed much of its infrastructure from the Business::OnlinePayment Perl module (search.cpan.org/~jasonk/Business-OnlinePayment-2.01/OnlinePayment.pm).

If you would like to loosely check the validity of a credit card without using a merchant account, look at the CreditCard module (rubyforge.org/projects/creditcard/).

Example

    require 'payment/authorize_net'

    transaction = Payment::AuthorizeNet.new (
                      :login       => 'username',
                      :password    => 'password',
                      :amount      => '49.95',
                      :card_number => '1234123412341238',
                      :expiration  => '03/05',
                      :first_name  => 'John',
                      :last_name   => 'Doe'
                     )
    transaction.submit

    if transaction.success?
        puts "Card processed successfully: #{transaction.authorization}";
    else
        puts "Card was rejected: #{transaction.error_message}";
    end

Currently Supported Gateways

Planned Support for the Following Gateways

About

Author:Lucas Carlson (lucas@rufy.com)
Copyright:Copyright © 2005 Lucas Carlson
License:Distributes under the same terms as Ruby

Edit this project (for project owner)

back to RAA top