allpay 0.0.5 → 0.0.6

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/allpay.rb +10 -12
  3. data/lib/allpay/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ad2949ec1d520b6c53ec6ef0216bd5c27a9f6f6
4
- data.tar.gz: 53a05c5ff488e4e977d426099d311b9fc6795845
3
+ metadata.gz: e1bbd5230ddd19f0fd7d0fe33cf7d4a28602fd07
4
+ data.tar.gz: 7920311f5f4dcfaa52178dc6fcab885838f87ee6
5
5
  SHA512:
6
- metadata.gz: 0bc82207a82d45b7e703ab6aea65ef8ab012b3acc95b6e263d88e342415d91d14bda7c0b83e7b6a300a353445ecdd4c06f2faceb3307e02ae7b772e6a9a0a1ec
7
- data.tar.gz: 6af50f7de0741062167ce0f09c3db56ae9a3cecb388632f95bbeb3f7ab2dcf7ef5d31e8e28792ec2affca480fd0b6bcd1051e20a154126e09391a1c68235c757
6
+ metadata.gz: bd6c352546c5f9e184ba24f7f36db1d1b803d577f9e2089565e4d597d39be28f127ba6ca22d49ec029b34b81bf0625a43351ddd454b94d47fbb51f317841dd09
7
+ data.tar.gz: 98876f892bdb49c41b7d8cddd3c5c872e863d0a28aaea06353fd8e93a37cad032b8de93746139afc2badd40277939f40ef6b52a3bfaff80ff9f0440fa0139415
data/lib/allpay.rb CHANGED
@@ -12,21 +12,19 @@ module Allpay
12
12
  class Client
13
13
  attr_accessor :merchant_id, :rest, :http, :api, :all_key, :all_iv, :key, :iv
14
14
 
15
- def initialize(merchant_id, options = {})
16
- @merchant_id = merchant_id
17
- begin
18
- env = ENV.try("fetch", "RAILS_ENV")
19
- rescue
20
- env = "development"
21
- end
15
+ def initialize(options = {})
22
16
 
23
- if env == 'production'
24
- @api = 'pay.allpay.com.tw'
25
- else
17
+ if options[:merchant_id].nil?
18
+ @merchant_id = 2000132
19
+ @key = "ejCk326UnaZWKisg"
20
+ @iv = "q9jcZX8Ib9LM8wYk"
26
21
  @api = 'pay-stage.allpay.com.tw'
22
+ else
23
+ @merchant_id = options[:merchant_id]
24
+ @key = options[:key]
25
+ @iv = options[:iv]
26
+ @api = 'pay.allpay.com.tw'
27
27
  end
28
- @key = options[:key]
29
- @iv = options[:iv]
30
28
  end
31
29
 
32
30
  def get_vaccount(options = {})
@@ -1,3 +1,3 @@
1
1
  module Allpay
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - odin1in
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-20 00:00:00.000000000 Z
11
+ date: 2014-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler