qtpay 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/qtpay/service.rb CHANGED
@@ -58,6 +58,16 @@ module Qtpay
58
58
  make_request(:post, create_order_url(params, options))
59
59
  end
60
60
 
61
+ # ==== params ====
62
+ # (required)
63
+ # auth_code: customer's authentication code being scanned
64
+ #
65
+ # other params are same as +create_order+
66
+
67
+ def self.micropay_order(params, options = {})
68
+ make_request(:post, micropay_order_url(params, options))
69
+ end
70
+
61
71
  # ==== params ====
62
72
  # (optional)
63
73
  # token: auth token created in get_user_token, required when caller is app or h5
@@ -100,6 +110,13 @@ module Qtpay
100
110
  request_uri('/order/v1/create', params, options)
101
111
  end
102
112
 
113
+ MICROPAY_ORDER_REQUIRED_PARAMS = %w( token order_token total_amt pay_type pay_source goods_name auth_code )
114
+ def self.micropay_order_url(params, options = {})
115
+ params = handle_params(params, MICROPAY_ORDER_REQUIRED_PARAMS, options)
116
+
117
+ request_uri('/order/v1/micropay', params, options)
118
+ end
119
+
103
120
  GET_ORDER_REQUIRED_PARAMS = %w()
104
121
  def self.get_order_url(params, options = {})
105
122
  params = handle_params(params, GET_ORDER_REQUIRED_PARAMS, options)
data/lib/qtpay/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qtpay
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
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.2
4
+ version: 0.0.3
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: 2015-12-29 00:00:00.000000000 Z
12
+ date: 2016-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler