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

net_registry

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

net_registry

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

NetRegistry

Build
Status Gem Version Coverage Status

This gem serves as a Ruby wrapper for the NetRegistry Payment Gateway's API. Official documentation can be found http://www.netregistry.com.au/ee-images/uploads/support/NR-ecom-gateway8.pdf

Installation

Add this line to your application's Gemfile:

gem 'net_registry'

And then execute:

$ bundle

Or install it yourself as:

$ gem install net_registry

Quick start

client   = NetRegistry::Client.new(merchant_id: 1234, password: 1234)
response = client.purchase(AMOUNT: 100, CCNUM: "111111111111", CCEXP: "10/15")

Usage

This gem currently support "purchase", "refund", "status", "preauth", and each of these methods take a hash parameter. The required keys are specified in the following:

Purchase

Input:

{
  AMOUNT: "(Integer, Float, or String). The amount you would like to
  charge. Don't add '$', just the numerical amount.",

  CCNUM: "(Integer, String). The credit card number. NO SPACES OR
  DASH",

  CCEXP: "(String). Credit card expiry date. Must be in the format of
  'mm/yy'."
}

Returns: NetRegistry::Response object.

Refund

Input:

{
  AMOUNT: "(Integer, Float, or String). The amount you would like to
  charge. Don't add '$', just the numerical amount.",

  TXNREF: "(String). Transaction reference number"
}

Returns: NetRegistry::Response object.

Preauth

Input:

{
  AMOUNT: "(Integer, Float, or String). The amount you would like to
  charge. Don't add '$', just the numerical amount.",

  CCNUM: "(Integer, String). The credit card number. NO SPACES OR
  DASH",

  CCEXP: "(String). Credit card expiry date. Must be in the format of
  'mm/yy'".
}

Returns: NetRegistry::Response object.

Status

Input:

{
  TXNREF: "(String). Transaction reference number"
}

Returns: NetRegistry::Response object.

Contributing

  1. Fork it ( https://github.com/carnextdoor/net_registry/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

FAQs

Package last updated on 17 Aug 2015

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