tappay 0.3.1 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21493887adfa6b88dd60cada47e4a83c0fc87947
4
- data.tar.gz: 2d4428ccbee61216c781e738530294390fd6a2e0
3
+ metadata.gz: 88a8732b0d11ec325ad9a319ea1cf5af289238d0
4
+ data.tar.gz: d33b7d21f5215506ff4c5f4b2095e94654f6bd60
5
5
  SHA512:
6
- metadata.gz: 9ba03c79565d636ffe34fd7309ec3be526cd0f022cd55d55c22d27f19b9d61b8ed9f8d32ad8cbacd442b3c0c0d15b8cab6ade0026fc7fc299a6928042f115dce
7
- data.tar.gz: cfee2a276f9b0179be238c14e5649c0eba0bf36b3fbc855f0fded219f5c00116b6e876ed24d35349178259e9c71a18a6fe55301315b1a0528abc3880aed72e6e
6
+ metadata.gz: 1d93da6d15870ba7a31ea7c5774c9119bdd2d68c2fd49b3d99de2999872c6a00816fe9c8c6dbb55241c1e5c29912cb526df4c6328753720869b5589755bca911
7
+ data.tar.gz: aeaa173b34abe589cf64fadbd753018fdc03bb834334832bc4bdb1130c55c434ff4c24983bfd8b485543a3add3d800d0d12ee553f2187ce38234a72f2884136a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TapPay
2
2
 
3
- A very simple [TapPay](https://www.tappaysdk.com/tch) API Wrapper.
3
+ A very simple [TapPay](https://www.tappaysdk.com/tch) API wrapper written in the Ruby language.
4
4
 
5
5
  ## Installation
6
6
 
@@ -23,12 +23,14 @@ See [TapPay Backend API](https://docs.tappaysdk.com/tutorial/zh/back.html#back).
23
23
 
24
24
  ## Usage
25
25
 
26
- You need to setup env, partner_key and merchant_id.
27
- The partner_key and merchant_id are optional, you could also specify them in request params.
26
+ You can setup env, partner_key and merchant_id. It requests sandbox server or production server by env.
27
+ The partner_key and merchant_id are optional, thay could also be specified in request params.
28
28
 
29
29
  ```ruby
30
+ # sandbox or production
31
+ TapPay.env = :sandbox
32
+
30
33
  TapPay.setup do |config|
31
- config.env = 'test' # default: sandbox
32
34
  config.partner_key = 'your_partner_key' # optional
33
35
  config.merchant_id = 'your_merchant_id' # optional
34
36
  end
@@ -7,7 +7,7 @@ require 'tappay/pay_by_token'
7
7
  require 'tappay/refund'
8
8
 
9
9
  module TapPay
10
- @@env = 'sandbox'
10
+ @@env = :sandbox
11
11
  @@partner_key = ''
12
12
  @@merchant_id = ''
13
13
 
@@ -17,7 +17,7 @@ module TapPay
17
17
  end
18
18
 
19
19
  def env=(env)
20
- @@env = env.to_s
20
+ @@env = env
21
21
  end
22
22
 
23
23
  def partner_key=(partner_key)
@@ -1,7 +1,7 @@
1
1
  module TapPay
2
2
  module APIResource
3
3
  def self.base_url
4
- if TapPay.env == 'production'
4
+ if TapPay.env == :production
5
5
  'https://prod.tappaysdk.com'
6
6
  else
7
7
  'https://sandbox.tappaysdk.com'
@@ -1,3 +1,3 @@
1
1
  module TapPay
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tappay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - HzChris