module Paymax1::Charge
Public Class Methods
createCharge(opts={})
click to toggle source
下单接口 opts={
:amount=>'0.01', :subject=> 'test_subject_nodejs版本', :body=> 'this is a body', :order_no=> randomSerize(20), :channel=> 'alipay_app', :client_ip=> '127.0.0.1', :app=> 'app_06m9Q26zL61ee55a', :currency=> 'cny', :extra=> {}, :description=> 'this is a description描述'
}
# File lib/paymax1/charge.rb, line 23 def createCharge (opts={}) path='/v1/charges' data=opts.to_json url= Config.settings[:host]+path header= Header.new().getHeader('post',path,'',data); return Http.post(url,header,data); end
queryCharge(orderNo)
click to toggle source
下单查询接口 param orderNo
# File lib/paymax1/charge.rb, line 35 def queryCharge (orderNo) path='/v1/charges/'+orderNo url= Config.settings[:host]+path header= Header.new().getHeader('get',path,'',''); return Http.get(url,header); end