cmb_pay 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.rubocop.yml +1 -1
- data/lib/cmb_pay.rb +33 -2
- data/lib/cmb_pay/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c15f764cff692f16b73afb364a659203bd7fd9fdb43bccb1deb86862aaca2bf3
|
4
|
+
data.tar.gz: d4e61f8cadf408aabc649c9cf46fcf4f1bf900ea1a8997757ad0c9a2f5f6c39a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 593a0864d02c64ef199e3468d5dcbfb31843a0a640dcf16597eb17c1bbe822c49f511c86e7dfd75a5bec38701fc8737da3a60b349106a49027773db94c1e329a
|
7
|
+
data.tar.gz: cee02577620b84fe1e2ac66718cc0acba952eeed2c443a42199625ab328875d9977751a4db9b383269cf2c84625e6891917fae5b3016380bf9bc097ff1e5eebb
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.rubocop.yml
CHANGED
data/lib/cmb_pay.rb
CHANGED
@@ -63,6 +63,35 @@ module CmbPay
|
|
63
63
|
'上海银行' => 313
|
64
64
|
}.freeze
|
65
65
|
|
66
|
+
SUPPORTED_BANK_EN = {
|
67
|
+
'China Merchants Bank' => nil,
|
68
|
+
'Industrial Bank Co.,Ltd' => 309,
|
69
|
+
'China Citic Bank' => 302,
|
70
|
+
'China Minsheng Bank' => 305,
|
71
|
+
'China Everbright Bank' => 303,
|
72
|
+
'Huaxia Bank' => 304,
|
73
|
+
'Beijing Rural Commercial Bank' => 1418,
|
74
|
+
'Shenzhen Development Bank' => 307,
|
75
|
+
'Bank of China' => 104,
|
76
|
+
'Bank of Beijing' => 403,
|
77
|
+
'Postal Savings Bank of China' => 100,
|
78
|
+
'SPD Bank' => 310,
|
79
|
+
'BEA Bank of East Asia Limited' => 2502,
|
80
|
+
'CGB China Guangfa Bank' => 306,
|
81
|
+
'Bank of Nanjing' => 424,
|
82
|
+
'Bank of Communications' => 301,
|
83
|
+
'Ping An Bank' => 410,
|
84
|
+
'ICBC Industrial And Commercial Bank of China' => 102,
|
85
|
+
'HCCB Bank of Hangzhou' => 423,
|
86
|
+
'China Construction Bank' => 105,
|
87
|
+
'Bank of Ningbo' => 408,
|
88
|
+
'ABC Agricultural Bank of China' => 103,
|
89
|
+
'China Zheshang Bank' => 316,
|
90
|
+
'China Bohai Bank' => 318,
|
91
|
+
'Shanghai Rural Commercial Bank Co., Ltd.' => 402,
|
92
|
+
'Bank of Shanghai' => 313
|
93
|
+
}.freeze
|
94
|
+
|
66
95
|
GOODS_TYPE = {
|
67
96
|
'网上支付' => 54_011_600,
|
68
97
|
'充值缴费' => 54_011_610,
|
@@ -260,8 +289,10 @@ module CmbPay
|
|
260
289
|
|
261
290
|
def self.generate_cmb_card_bank_xml(card_bank)
|
262
291
|
return "<CardBank>#{format('%04d', card_bank.to_i)}</CardBank>" if /^\d+$/ =~ card_bank.to_s
|
263
|
-
|
264
|
-
|
292
|
+
card_back_id = SUPPORTED_BANK[card_bank]
|
293
|
+
card_back_id = SUPPORTED_BANK_EN[card_bank] if card_back_id.nil?
|
294
|
+
return nil if card_back_id.nil?
|
295
|
+
"<CardBank>#{format('%04d', card_back_id)}</CardBank>"
|
265
296
|
end
|
266
297
|
|
267
298
|
def self.encode_goods_type(goods_type)
|
data/lib/cmb_pay/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmb_pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Guo
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
fGxGnQhzVaW07NKOCRrAZlrF8iqso4JR7Vm9bhFdzxUPLr70njwHLtDS2CHgo1VW
|
31
31
|
1xAjN8ZXXpAmVv7V6cI9RTmQHPu/fFn+E0sG9w==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
33
|
+
date: 2018-05-15 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: http
|
metadata.gz.sig
CHANGED
Binary file
|