unionpay 0.0.7 → 0.0.8

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: c330478dd7bddd9619bcd800e66926d355d20ca1
4
- data.tar.gz: 8f3f0baa67df1ee8943f61e9956e4ea36f2cf406
3
+ metadata.gz: 2201e9cc21e0208b8f6ce5b33d01296f886a62cf
4
+ data.tar.gz: fbb15cbac71e62c000493939ffd57199b89ddf54
5
5
  SHA512:
6
- metadata.gz: e1aefe1ba238eb936e61337dd8884f8ccbd034d95f6825954a7d9c84acfbb997d36bc31143f661bb66e85b98b26a5d989cf9ab614f3c62f3c46f47efec297c5f
7
- data.tar.gz: 75e0ad1e18b10857592377d592c2ceadb20ad6ccd9003984363cb4fa65fbabf4c44b580538a81d619602852695e6aca3ddba9bfab32d8ff746e0df8708410441
6
+ metadata.gz: 5e52ab3b4bc5aae5f7e284591ee52a24f2cbc3a5146b4a4bb971e7fffef7ec5e4976b9784be2e7bb2edf3663ec3957e6be36813453374a9702f513f9a0aab572
7
+ data.tar.gz: 75421cdb09e0174d6538b943d2b60b2243d8c8a0894c261c564d0db96b3f43f2c542ab248240a4c17c09e2726027fc46fc7cb982c3475f21ca4e32261c37ac89
data/README.md CHANGED
@@ -102,5 +102,4 @@ elsif resp_code==UnionPay::RESP_SUCCESS && query_result == UnionPay::QUERY_SUCCE
102
102
  elsif resp_code==UnionPay::RESP_SUCCESS && query_result == UnionPay::QUERY_WAIT
103
103
  puts '交易处理中,下次再查!'
104
104
  end
105
- #
106
105
  ```
@@ -88,8 +88,8 @@ module UnionPay
88
88
  raise('merId and acqCode can\'t be both empty')
89
89
  end
90
90
  if !UnionPay.empty?(UnionPay::PayParams['acqCode'])
91
- acqCode = UnionPay::PayParams['acqCode']
92
- param['merReserved'] = "{acqCode=#{acqCode}}"
91
+ acq_code = UnionPay::PayParams['acqCode']
92
+ param['merReserved'] = "{acqCode=#{acq_code}}"
93
93
  else
94
94
  param['merReserved'] = ''
95
95
  end
@@ -101,8 +101,8 @@ module UnionPay
101
101
  end
102
102
  end
103
103
 
104
- def self.sign(args)
105
- sign_str = args.sort.map do |k,v|
104
+ def self.sign(param)
105
+ sign_str = param.sort.map do |k,v|
106
106
  "#{k}=#{v}&" unless UnionPay::SignIgnoreParams.include? k
107
107
  end.join
108
108
  Digest::MD5.hexdigest(sign_str + Digest::MD5.hexdigest(UnionPay.security_key))
@@ -1,3 +1,3 @@
1
1
  module UnionPay
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/lib/unionpay.rb CHANGED
@@ -24,9 +24,9 @@ module UnionPay
24
24
  self.query_url = "http://58.246.226.99/UpopWeb/api/Query.action"
25
25
  ## 预上线环境
26
26
  when :pre_production
27
- self.front_pay_url = "https://www.epay.lxdns.com/UpopWeb/api/Pay.action"
28
- self.back_pay_url = "https://www.epay.lxdns.com/UpopWeb/api/BSPay.action"
29
- self.query_url = "https://www.epay.lxdns.com/UpopWeb/api/Query.action"
27
+ self.front_pay_url = "http://www.epay.lxdns.com/UpopWeb/api/Pay.action"
28
+ self.back_pay_url = "http://www.epay.lxdns.com/UpopWeb/api/BSPay.action"
29
+ self.query_url = "http://www.epay.lxdns.com/UpopWeb/api/Query.action"
30
30
  ## 线上环境
31
31
  else
32
32
  self.front_pay_url = "https://unionpaysecure.com/api/Pay.action"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unionpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-30 00:00:00.000000000 Z
11
+ date: 2013-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curb