Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ipay

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipay

  • 0.2.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

iPay

Ruby gem for interfacing with the iPay XML API

Changelog

v0.2.0

  • Updated tests
  • Included example certification file for CC/Wallet Services
  • Added countries yaml for converting iso 3166 2 char country codes to iPay 3 char country code and currency codes
  • Cleaned up some constants

v0.1.1

  • Added certification mode

v0.1.0

  • CC (credit/debit) and Wallet (client/account) requests
  • Tests

v0.0.1

  • Initial commit

Dependencies

  • libxml-ruby for processing xml responses

Setup

Create a configuration file 'ipay.yml' and place it in your apps config/ folder. The configuration file is automatically loaded for you and values are accessible via iPay::config struct.

Example configuration:

:url: "https://uap.txngw.com/"
:company_key: 6990
:terminal_id: 6177
:pin: 1234

You can also configure IPay via a block:

IPay::config do |c|
  c.url = 'https://uap.txngw.com/'
  c.company_key = 6990
  c.terminal_id = 6177
  c.pin = 1234
end

Usage

require 'ipay'
resp = IPay::CC::Debit.sale(
	:amount => '4.99', 
	:account_number => '4000009999999991',
	:cvv => 123,
	:expiration => '0614', 
	:first_name => 'nick', 
	:last_name => 'wilson',
	:address => '123 fake st', 
	:city => 'sometown', 
	:state => 'NY', 
	:postal_code => '90210', 
	:country => IPay::Countries.country_code(:us)
)

if resp.success?
	puts resp.data[:transaction_id]
end

Certification

IPay requires that test accounts submit an xml file of compiled responses before allowing an account to be used in production mode. The IPay gem has a certification mode that will compile all responses into the appropriate file/format for you automatically:

IPay::Certification.capture do
	# ... all responses for api requests are now logged and saved when the block ends
end

FAQs

Package last updated on 19 May 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc