Giter Site home page Giter Site logo

sbpayment.rb's Introduction

sbpayment.rb Circle CI Rubygems

A client library for sbpayment (SB Payment Service) written in Ruby.

This library is not an official library, please use at your own risk.

Installation

gem 'sbpayment'

Usage

Example

See example.

Configure Options

Sbpayment.configure do |x|
  x.sandbox = true
  ...
end
Properties Description Default Required Type
sandbox when this option is true, endpoint will be SBPS Developer Console's one false false Boolean
basic_auth_user use basic auth user given by sbpayment "" false String
basic_auth_password user basic auth password given by sbpayment "" false String
merchant_id merchant_id for a params to request "" true String
service_id service_id for a params to request "" true String
cipher_code use cipher_code given by sbpayment "" false String
cipher_iv use cipher_iv given by sbpayment "" false String
hashkey use hashkey given by sbpayment "" true String
proxy_uri set forward proxy uri if you need "" false String
proxy_user set forward proxy's user if you need "" false String
proxy_password set forward proxy's password if you need "" false String
retry_max_counts set max retry counts if you need 3 false Integer
open_timeout set number of seconds to wait for the connection to open nil false Integer
timeout set number of seconds to wait for reading nil false Integer

Supported Actions

Implemented actions are only for what we needed so far. Feel free to add here if you need it.

Caveat

Currently client side encoding is supported only for UTF-8. (UTF-8 to Shift-JIS)

API

Credit
Action Name sps-api-request id Request class
与信要求 ST01-00111-101 Sbpayment::API::Credit::AuthorizationRequest
与信要求(トークン) ST01-00131-101 Sbpayment::API::Credit::AuthorizationTokenRequest
再与信要求 ST01-00113-101 Sbpayment::API::Credit::ReAuthorizationRequest
コミット (確定処理) ST02-00101-101 Sbpayment::API::Credit::CommitRequest
売り上げ連携 ST02-00201-101 Sbpayment::API::Credit::SalesRequest
決済結果参照 MG01-00101-101 Sbpayment::API::Credit::InquireAuthorizationRequest
継続課金(簡易)解約要求 ST02-00302-101 Sbpayment::API::Credit::SimplifiedCancelRequest
取消要求 ST02-00305-101 Sbpayment::API::Credit::CancelAuthorizationRequest
返金要求 ST02-00303-101 Sbpayment::API::Credit::RefundRequest
部分返金要求 ST02-00307-101 Sbpayment::API::Credit::PartlyRefundRequest
顧客情報登録 MG02-00101-101 Sbpayment::API::Credit::CreateCustomerRequest
顧客情報更新 MG02-00102-101 Sbpayment::API::Credit::UpdateCustomerRequest
顧客情報登録(トークン) MG02-00131-101 Sbpayment::API::Credit::CreateCustomerTokenRequest
顧客情報更新(トークン) MG02-00132-101 Sbpayment::API::Credit::UpdateCustomerTokenRequest
顧客情報削除 MG02-00103-101 Sbpayment::API::Credit::DeleteCustomerRequest
顧客情報参照 MG02-00104-101 Sbpayment::API::Credit::ReadCustomerRequest
Carrier
Docomo
Action Name sps-api-request id Request class
ドコモケータイ払い 継続課金(簡易)解約要求 ST02-00302-401 Sbpayment::API::Docomo::SimplifiedCancelRequest
ドコモケータイ払い 取消・返金要求処理 (簡易継続) ST02-00303-401 Sbpayment::API::Docomo::SimplifiedCancelRefundRequest
ドコモケータイ払い 購入要求要求処理 (継続課金(定期・従量)) ST01-00104-401 Sbpayment::API::Docomo::AuthorizationRequest
ドコモケータイ払い 売上要求処理 (継続課金(定期・従量)) ST02-00201-401 Sbpayment::API::Docomo::SalesRequest
au
Action Name sps-api-request id Request class
auかんたん決済 取消・返金要求処理 ST02-00303-402 Sbpayment::API::Au::CancelRefundRequest
auかんたん決済 継続課金(簡易)解約要求 ST02-00302-402 Sbpayment::API::Au::SimplifiedCancelRequest
auかんたん決済 購入要求要求処理 (継続課金(定期・従量)) ST01-00104-402 Sbpayment::API::Au::AuthorizationRequest
auかんたん決済 売上要求処理 (継続課金(定期・従量)) ST02-00201-402 Sbpayment::API::Au::SalesRequest
Softbank
Action Name sps-api-request id Request class
ソフトバンクまとめて支払い B 継続課金(定期) 要求処理 ST01-00104-405 Sbpayment::API::Softbank::AuthorizationRequest
ソフトバンクまとめて支払い B 継続課金(定期) 売上要求 ST02-00201-405 Sbpayment::API::Softbank::SalesRequest
ソフトバンクまとめて支払い(B)継続課金(定期) 取消返金要求 ST02-00303-405 Sbpayment::API::Softbank::CancelRefundRequest
Webcvs
Action Name sps-api-request id Request class
WEBコンビニ決済要求 ST01-00101-701 Sbpayment::API::Webcvs::PaymentRequest
WEBコンビニ決済結果参照 ST01-00101-701 Sbpayment::API::Webcvs::ReadPaymentResultRequest
WEBコンビニ入金通知 NT01-00103-701 Sbpayment::API::Webcvs::NoticeRequest
WEBコンビニキャンセル通知 NT01-00104-701 Sbpayment::API::Webcvs::CancelRequest
Payeasy
Action Name sps-api-request id Request class
PayEasy 決済要求 ST01-00101-703 Sbpayment::API::Payeasy::PaymentRequest
PayEasy 入金通知 NT01-00103-703 Sbpayment::API::Payeasy::NoticeRequest
PayEasy キャンセル通知 NT01-00104-703 Sbpayment::API::Payeasy::CancelRequest

Tips

Check error codes for debugging

./bin/console
2.3.3 (main):0 > Sbpayment::APIError.parse("99990999")
=> #<Sbpayment::API99990Error: 99990999>: method: 999(共通), type: 90(API システムエラー), item: 999(該当項目なし)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release to create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Development on Docker (optional)

When you faced any troubles in setup (e.g. failed to build gem native extension), please try to use Docker as below.

docker container run --user=root --volume="$(pwd)/:/usr/src/sbpayment.rb/" --workdir='/usr/src/sbpayment.rb/' -it 'circleci/ruby:latest-browsers' '/bin/bash'

Contributing

  1. Fork it ( https://github.com/quipper/sbpayment.rb/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

sbpayment.rb's People

Contributors

banyan avatar kachick avatar dependabot-preview[bot] avatar hamadata avatar kyanny avatar wozaki avatar tashirosota avatar mitsuboshi avatar miyucy avatar a2ikm avatar dependabot-support avatar mopp avatar motchang avatar sakuro avatar kechol avatar ma2gedev avatar cedretaber avatar dependabot[bot] avatar zeneffect-kei-goto avatar ohbarye avatar mtsmfm avatar sat0yu avatar yuya-takeyama avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.