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 +4 -4
- data/README.md +0 -1
- data/lib/unionpay/service.rb +4 -4
- data/lib/unionpay/version.rb +1 -1
- data/lib/unionpay.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2201e9cc21e0208b8f6ce5b33d01296f886a62cf
|
|
4
|
+
data.tar.gz: fbb15cbac71e62c000493939ffd57199b89ddf54
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e52ab3b4bc5aae5f7e284591ee52a24f2cbc3a5146b4a4bb971e7fffef7ec5e4976b9784be2e7bb2edf3663ec3957e6be36813453374a9702f513f9a0aab572
|
|
7
|
+
data.tar.gz: 75421cdb09e0174d6538b943d2b60b2243d8c8a0894c261c564d0db96b3f43f2c542ab248240a4c17c09e2726027fc46fc7cb982c3475f21ca4e32261c37ac89
|
data/README.md
CHANGED
data/lib/unionpay/service.rb
CHANGED
|
@@ -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
|
-
|
|
92
|
-
param['merReserved'] = "{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(
|
|
105
|
-
sign_str =
|
|
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))
|
data/lib/unionpay/version.rb
CHANGED
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 = "
|
|
28
|
-
self.back_pay_url = "
|
|
29
|
-
self.query_url = "
|
|
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.
|
|
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-
|
|
11
|
+
date: 2013-12-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: curb
|