Home   |   Get it Now   |    User Login   |    About Us   |    Contact Us    |    Newsletter   |    Company Blog   |   Careers
 
 
Payments | Invoicing | Marketing | CRM | Gift Cards | Affiliates | Developers  

Ruby Plugin

 
The Ruby plugin tutorial can be downloaded here. ruby tutorial
 

For direct integration support:
Phone: 1.800.763.6358 ext. 808 Email:  Developer Support
Join:    Developer Forum

 

1. Begin by downloading the GoToBilling Ruby Plugin (Download Here)


2. Unzip and copy the plugin files to a location that you will be using them from within Rails or just Ruby.


3. Create a new Ruby or Rails app, or open an existing one, and add the following lines at the top:

          require "GoToBillingLibrary.rb"
          include GoToBillingLibrary

4. Next, decide when the transaction processing action will take place, and begin to insert the following code in     that location. First, we will create a new GoToBilling object:

          gotob = GoToBilling.new

5. Set the appropriate parameters for your transaction, for example, you are required to send your Merchant ID and     Pin:

          gotob.SetMerchantId(MyMerchantId)
          gotob.SetMerchantPin(MyMerchantPin)

6. Once you've set all the parameters for the transaction, submit it:

          gotob.process

7. Verify whether the transaction succeeded by checking the Status:

          if gotob.GetStatus == "R"
                puts "Order Number: " + gotob.GetOrderNumber
          end

A full demo example with debugging and code documentation is included in the plugin package that can be downloaded above.

Note: Once you are ready to test your integration, please contact GoToBilling to set up a test account for certification with your application.

 
 

Copyright © 2007 - 2008 GoToBilling, Inc.        Home   |   User Login   |    Forums   |    Company Blog   |   About Us   |    Newsletter   |    Affiliates
All Rights Reserved