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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4350b82a28ede98ad2cb36313cb18e1c3035a95f6b3b675507cd5eef6c49039e
4
- data.tar.gz: 2ac802c57e4180ddc1451450535531538f2b81dcfd1b627f8eec7fb8e91bca7e
3
+ metadata.gz: c15f764cff692f16b73afb364a659203bd7fd9fdb43bccb1deb86862aaca2bf3
4
+ data.tar.gz: d4e61f8cadf408aabc649c9cf46fcf4f1bf900ea1a8997757ad0c9a2f5f6c39a
5
5
  SHA512:
6
- metadata.gz: '0628ea60dc8aae62e8777417a8f132632f9c5e518ce879b5ac8bf21fd8ec81bfa021d8f795db38134f0ade165c87fd3abbd581585985c5e5f6321b38e796e3ec'
7
- data.tar.gz: bde7d2a7872afa11f875e6a92ce8666930634252b3531748b53004f45a184ec5fdd4c4e1f73f666970880dfc693773dcb523ded5ce83e4a236b7ec82d216ba70
6
+ metadata.gz: 593a0864d02c64ef199e3468d5dcbfb31843a0a640dcf16597eb17c1bbe822c49f511c86e7dfd75a5bec38701fc8737da3a60b349106a49027773db94c1e329a
7
+ data.tar.gz: cee02577620b84fe1e2ac66718cc0acba952eeed2c443a42199625ab328875d9977751a4db9b383269cf2c84625e6891917fae5b3016380bf9bc097ff1e5eebb
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.1
2
+ TargetRubyVersion: 2.3
3
3
 
4
4
  Documentation:
5
5
  Enabled: false
@@ -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
- return nil if SUPPORTED_BANK[card_bank].nil?
264
- "<CardBank>#{format('%04d', SUPPORTED_BANK[card_bank])}</CardBank>"
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)
@@ -1,3 +1,3 @@
1
1
  module CmbPay
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
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.1
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-04-27 00:00:00.000000000 Z
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