Module: Paymax1::Charge
- Defined in:
- lib/paymax1/charge.rb
Class Method Summary collapse
-
.createCharge(opts = {}) ⇒ Object
下单接口 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描述’ }.
-
.queryCharge(orderNo) ⇒ Object
下单查询接口 param orderNo.
Class Method Details
.createCharge(opts = {}) ⇒ Object
下单接口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描述'
}
23 24 25 26 27 28 29 |
# 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 |