Project

gmo-pg

0.0
No commit activity in last 3 years
No release in over 3 years
GMO-PG is No.1 Payment Gateway in Japan. See https://www.gmo-pg.com for details.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

GMO-PG

GitHub

Gem Version wercker status License

The GMO-PG Ruby bindings provide a simple SDK for convenient access to the GMO-PG Multi-Payment API from application written in the Ruby language.

Installation

Add this line to your application's Gemfile:

gem 'gmo-pg'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gmo-pg

Usage

For example, to check card availability, like this:

GMO::PG.base_url = 'https://...' # required

GMO::PG.connect do |dispatcher|
  dispatcher #=> #<GMO::PG::Dispatcher>

  credential = dispatcher.dispatch_entry_tran(
    shop_id:   YOUR_SHOP_ID,
    shop_pass: YOUR_SHOP_PASS,
    order_id:  order_id,
    job_cd:    :CHECK,
  )
  credential #=> #<GMO::PG::EntryTran::Response>

  result = dispatcher.dispatch_entry_tran(
    access_id:     credential.access_id,
    access_pass:   credential.access_pass,
    order_id:      order_id,
    card_no:       '...',
    expire:        '...',
    security_code: '...',
  )
  result #=> #<GMO::PG::ExecTran::Response>
end

Development

After checking out the repo, install dependencies via bundler. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kissy2go/gmo-pg. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.