qtpay 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,6 +68,21 @@ module Qtpay
68
68
  make_request(:post, micropay_order_url(params, options))
69
69
  end
70
70
 
71
+ # ==== params ====
72
+ # (required)
73
+ # total_amt: total payment amount in cents
74
+ # out_sn: order serial number, must be uniq in all requests
75
+ # goods_name: name of goods
76
+ # token: auth token created in get_user_token
77
+ #
78
+ # (optional)
79
+ # expire_time: order expires time, format YYYY-mm-dd HH:MM:SS
80
+ # goods_info
81
+
82
+ def self.create_simple_order(params, options = {})
83
+ make_request(:post, create_simple_order_url(params, options))
84
+ end
85
+
71
86
  # ==== params ====
72
87
  # (optional)
73
88
  # token: auth token created in get_user_token, required when caller is app or h5
@@ -117,6 +132,14 @@ module Qtpay
117
132
  request_uri('/order/v1/micropay', params, options)
118
133
  end
119
134
 
135
+ CREATE_SIMPLE_ORDER_REQUIRED_PARAMS = %w( out_sn total_amt goods_name token )
136
+ def self.create_simple_order_url(params, options = {})
137
+ params = handle_params(params, CREATE_SIMPLE_ORDER_REQUIRED_PARAMS, options)
138
+
139
+ request_uri('/order/v1/simple_create', params, options)
140
+ end
141
+
142
+
120
143
  GET_ORDER_REQUIRED_PARAMS = %w()
121
144
  def self.get_order_url(params, options = {})
122
145
  params = handle_params(params, GET_ORDER_REQUIRED_PARAMS, options)
@@ -1,3 +1,3 @@
1
1
  module Qtpay
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qtpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-17 00:00:00.000000000 Z
12
+ date: 2016-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler