Skip to content

Gem to interface with GPG Merchant Processing API in a Ruby on Rails application

Notifications You must be signed in to change notification settings

alexanderreiff/gpg_payment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

gpg_payment

Gem to interface with Global Payment Gateway (GPG)'s Merchant Processing API in a Ruby on Rails application.

Installation

Add the following to your Gemfile:

gem 'gpg_payment', git: 'git://github.com/alexanderreiff/gpg_payment.git'

and run bundle install

Configuration

Create a gpg_payment.yml file in the config directory of your Rails app, and enter your credentials provided by GPG in the following format:

production: 
  apiusername: myusername
  apipassword: mypassword
  clientid: 1234

Example Usage

card = GPGPayment::CreditCard.new(
  name: 'Cardholder Name',
  card_number: 4111111111111111,
  exp_month: 10,
  exp_year: 2016,
  billing_zip: 12345
)
trans = GPGPayment::Transaction.new(card, 'InvoiceID', 'Invoice Desc')
auth = trans.authorize 1
puts 'Approved!' if auth.approved?

About

Gem to interface with GPG Merchant Processing API in a Ruby on Rails application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages