0.0
No commit activity in last 3 years
No release in over 3 years
transaction,getauthor,modifytransaction,pdrequest,cancel
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.4
>= 0.8

Runtime

 Project Readme

nissen スマート接続 API wrapper

ニッセン社の後払いサービス「@後払い」をスマート接続APIから利用するためのラッパーです。

link; rubygems

link; travis

link; gemasium

link; nissen

link; php module@nissen

Installation 導入

gem install nissen-collect

Configuration 設定

nissen-collect requires you to authenticate via https. So, you'll need to configure enviroment varuables.

ニッセン社より付与されたID,PASSを環境変数に設定してください。

ENV['NISSEN_COLLECT_SHOPCODE'] = #shopCode from nissen
ENV['NISSEN_COLLECT_PASSWORD'] = #shopPassword from nissen
ENV['NISSEN_COLLECT_TERMINALID'] = #terminalId: from nissen

Usage 使用法

Next 5 APIs can call.(only production server@nissen)

次の5個のAPIを叩けます。

  • Transaction(注文情報登録)
request = NissenCollect:Transaction.new
request.body
=> {"shopInfo"=>{"shopCode"=> , "shopPassword"=> , "terminalId"=> },
 "httpInfo"=>{"httpHeader"=> , "deviceInfo"=> },
 "buyer"=>
  {"shopTransactionId"=> ,
   "shopOrderDate"=> ,
   "fullName"=> ,
   "firstName"=> ,
   "lastName"=> ,
   "fullKanaName"=> ,
   "firstKanaName"=> ,
   "lastKanaName"=> ,
   "tel"=> ,
   "mobile"=> ,
   "email"=> ,
   "mobileEmail"=> ,
   "zipCode"=> ,
   "address1"=> ,
   "address2"=> ,
   "address3"=> ,
   "companyName"=> ,
   "departmentName"=> ,
   "billedAmount"=> ,
   "paymentType"=> },
 "deliveries"=>
  {"delivery"=>
    {"deliveryCustomer"=> ,
     "fullName"=> ,
     "firstName"=> ,
     "lastName"=> ,
     "fullKanaName"=> ,
     "firstKanaName"=> ,
     "lastKanaName"=> ,
     "zipCode"=> ,
     "address1"=> ,
     "address2"=> ,
     "address3"=> ,
     "companyName"=> ,
     "departmentName"=> ,
     "tel"=> ,
     "email"=> },
   "details"=>
    {"detail"=>{"detailId"=> , "detailName"=> , "detailQuantity"=> }}}
}

request.call
  • Getauthor(与信結果取得)
request = NissenCollect::Getauthor.new

request.body
=> {"shopInfo"=>{"shopCode"=> , "shopPassword"=> , "terminalId"=> },
 "buyer"=>
  {"shopTransactionId"=> ,
   "shopOrderDate"=> ,
   "fullName"=> ,
   "firstName"=> ,
   "lastName"=> ,
   "fullKanaName"=> ,
   "firstKanaName"=> ,
   "lastKanaName"=> ,
   "tel"=> ,
   "mobile"=> ,
   "email"=> ,
   "mobileEmail"=> ,
   "zipCode"=> ,
   "address1"=> ,
   "address2"=> ,
   "address3"=> ,
   "companyName"=> ,
   "departmentName"=> ,
   "billedAmount"=> ,
   "paymentType"=> }}

request.call
  • Modifytransaction(注文情報修正)
request = NissenCollect::Modifytransaction.new

request.body
=> {"shopInfo"=>{"shopCode"=> , "shopPassword"=> , "terminalId"=> },
 "buyer"=>
  {"shopTransactionId"=> ,
   "shopOrderDate"=> ,
   "fullName"=> ,
   "firstName"=> ,
   "lastName"=> ,
   "fullKanaName"=> ,
   "firstKanaName"=> ,
   "lastKanaName"=> ,
   "tel"=> ,
   "mobile"=> ,
   "email"=> ,
   "mobileEmail"=> ,
   "zipCode"=> ,
   "address1"=> ,
   "address2"=> ,
   "address3"=> ,
   "companyName"=> ,
   "departmentName"=> ,
   "billedAmount"=> ,
   "paymentType"=> },
 "deliveries"=>
  {"delivery"=>
    {"deliveryCustomer"=> ,
     "fullName"=> ,
     "firstName"=> ,
     "lastName"=> ,
     "fullKanaName"=> ,
     "firstKanaName"=> ,
     "lastKanaName"=> ,
     "zipCode"=> ,
     "address1"=> ,
     "address2"=> ,
     "address3"=> ,
     "companyName"=> ,
     "departmentName"=> ,
     "tel"=> ,
     "email"=> },
   "details"=>
    {"detail"=>{"detailId"=> , "detailName"=> , "detailQuantity"=> }}}}

request.call
  • Pdrequest(発送情報登録)
request = NissenCollect::Pdrequest.new

request.body
=> {"shopInfo"=>{"shopCode"=> , "shopPassword"=> , "terminalId"=> },
 "transaction"=>
  {"nissenTransactionId"=> , "shopTransactionId"=> , "billedAmount"=> },
 "PdRequest"=>
  {"pdcompanycode"=> ,
   "slipno"=> ,
   "address1"=> ,
   "address2"=> ,
   "address3"=> }}

request.call
  • Cancel(キャンセル登録)
request = NissenCollect::Cancel.new

request.body
=> {"shopInfo"=>{"shopCode"=> , "shopPassword"=> , "terminalId"=> },
 "transaction"=>
  {"nissenTransactionId"=> , "shopTransactionId"=> , "billedAmount"=> }}

request.call

Copyright

Copyright (c) 2013 Yuichi Sano. See LICENSE for details.