Module: Allinpay::Account
Overview
TODO:
-
添加历史余额查询
-
账户提现
通联支付 账户查询接口
具体文档请查看 113.108.182.3:8282/techsp/helper/interapi/tlt/interapi1.html
Instance Method Summary collapse
-
#account(account_number = nil) ⇒ Object
账户信息查询 交易代码:300000 查询商户在通联的虚拟账户基本信息.
-
#charge(bank_account, amount, business_code = '19900', options = {}) ⇒ Object
账户充值接口.
Instance Method Details
#account(account_number = nil) ⇒ Object
账户信息查询 交易代码:300000 查询商户在通联的虚拟账户基本信息
20 21 22 23 24 25 26 |
# File 'lib/allinpay/account.rb', line 20 def account(account_number = nil) params = set_infomation('300000', { REQTIME: , LEVEL: 9 }) params[:ACQUERYREQ] = { ACCTNO: account_number} if account_number res = conn.request(params) return result_wrap(:fail, res, params) if res["INFO"]["RET_CODE"] != "0000" return result_wrap(:success, res, params) end |
#charge(bank_account, amount, business_code = '19900', options = {}) ⇒ Object
账户充值接口
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/allinpay/account.rb', line 39 def charge(bank_account, amount, business_code = '19900', = {}) params = set_infomation('300006', { REQTIME: , LEVEL: 9 }) charge_info = { BUSINESS_CODE: business_code, BANKACCT: bank_account, AMOUNT: amount } charge_info[:SUMMARY] = [:summary] if [:summary] charge_info[:REMARK] = [:remark] if [:remark] params[:CHARGEREQ] = charge_info res = conn.request(params) return result_wrap(:fail, res, params) if res["INFO"]["RET_CODE"] != "0000" return result_wrap(:success, res, params) end |