lib/suning_pay/service.rb in suning_pay-0.3.2 vs lib/suning_pay/service.rb in suning_pay-0.3.3
- old
+ new
@@ -57,12 +57,12 @@
#调用查询接口
msg = SuningPay::Util.send_post('cancel', post_params)
msg
end
- #5.支付订单请求
- def self.post_pay(contract_no, out_order_no, order_type, order_amount, order_time, saler_merchant_no, goods_type, goods_name, pay_timeout, remark, tunnel_data = '', options = {})
+ #5.支付订单请求(默认使用2.0版本)
+ def self.post_pay(contract_no, out_order_no, order_type, order_amount, order_time, saler_merchant_no, goods_type, goods_name, pay_timeout, remark, tunnel_data = '', options = {:version => '2.0'})
input_hash = {:contractNo => contract_no,
:outOrderNo => out_order_no,
:orderType => order_type,
:orderAmount => order_amount,
:orderTime => order_time,
@@ -79,10 +79,10 @@
msg = SuningPay::Util.send_post('pay', post_params)
msg
end
#6.支付订单查询接口
- def self.post_query_merchant_order(out_order_no, order_time, options = {})
+ def self.post_query_merchant_order(out_order_no, order_time, options = {:version => '1.2'})
input_hash = {:outOrderNo => out_order_no,
:orderTime => order_time}
post_params = SuningPay.client_options.merge(options).merge(input_hash)
#调用查询接口