struggle 1.3.5 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/struggle/pay_gateway.rb +16 -5
- data/struggle.gemspec +2 -2
- 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: 68f728a5c07b423ef59b480f033b77e46bc6997e
|
4
|
+
data.tar.gz: 1332ba0c0e124ed7553387e2273a185a17b55db9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f91492c32042a41b477184150ab4b51fee5839bd859db1133e17046dde5c94ad7750c536643541c9d9a5fb93fb76ae3a42f3d381bf5a7765f4d233c363c3dfea
|
7
|
+
data.tar.gz: ec3dfbfdbdba4db96141b053e42f794de1988833e7f24308f54452acc953068778f8cf0b363a425f28d17e4223975eeaafa7f755d7a2cd38aec8e3cfaf75e8cc
|
data/lib/struggle/pay_gateway.rb
CHANGED
@@ -18,12 +18,23 @@ module Struggle
|
|
18
18
|
# v_moneytype:支付货币类型
|
19
19
|
def self.pay(v_mid, key, v_url, remark2, v_oid, v_amount, v_moneytype = "CNY")
|
20
20
|
v_md5info = Digest::MD5.hexdigest(v_amount.to_s + v_moneytype + v_oid + v_mid + v_url + key).upcase
|
21
|
-
|
22
|
-
html =
|
23
|
-
|
24
|
-
|
21
|
+
html = '<html><head></head><body>'
|
22
|
+
html += '<form method="post" name="cb_form" action="' + URL_UTF8 + '">'
|
23
|
+
parameter = {
|
24
|
+
'v_oid' => v_oid,
|
25
|
+
'v_amount' => v_amount,
|
26
|
+
'v_moneytype' => v_moneytype,
|
27
|
+
'v_mid' => v_mid,
|
28
|
+
'v_url' => v_url,
|
29
|
+
'key' => key,
|
30
|
+
'v_md5info' => v_md5info,
|
31
|
+
'remark2' => remark2
|
32
|
+
}
|
33
|
+
parameter.each do |key, val|
|
34
|
+
html += "<input type='hidden' name='#{key}' value='#{val}' />"
|
25
35
|
end
|
26
|
-
html
|
36
|
+
html += '</form><script type="text/javascript">document.cb_form.submit();</script>'
|
37
|
+
html += '</body></html>'
|
27
38
|
end
|
28
39
|
|
29
40
|
# 功能:自动验证结果
|
data/struggle.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'struggle'
|
3
|
-
s.version = '1.
|
4
|
-
s.date = '2015-07-
|
3
|
+
s.version = '1.4.0'
|
4
|
+
s.date = '2015-07-15'
|
5
5
|
s.summary = "struggle!"
|
6
6
|
s.description = "vcode,fileupload,pager,func,logistic,pay_gateway,tmagick,html_extend;"
|
7
7
|
s.authors = ["lean"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: struggle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lean
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iconv
|