cmb_pay 1.0.1 → 1.2.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: 96dd7210b0606422c2103a318b8dabb9eaaa37ff1af9d932761255e3b6e296c0
4
+ data.tar.gz: 6fd128dfe15254515789febb6fd4b87b757bacd7faf9ab2ce0f446444f91fd4e
5
5
  SHA512:
6
- metadata.gz: '0628ea60dc8aae62e8777417a8f132632f9c5e518ce879b5ac8bf21fd8ec81bfa021d8f795db38134f0ade165c87fd3abbd581585985c5e5f6321b38e796e3ec'
7
- data.tar.gz: bde7d2a7872afa11f875e6a92ce8666930634252b3531748b53004f45a184ec5fdd4c4e1f73f666970880dfc693773dcb523ded5ce83e4a236b7ec82d216ba70
6
+ metadata.gz: 4246126764493b197ab6dcd4ea6890f48cb65bb70a6064fd9f998ad9c7f65063519e90ed666faf990a3ea051c417a803e58b100f6103602ef298229d2796caa6
7
+ data.tar.gz: e476583957a7ff634e61c11f0d19c5d50d4d40f43d5416fbe98642394b237e3cca4ab87ba098d86df06d7d01372826b7310f2305d521142704d9187e90452f6e
checksums.yaml.gz.sig CHANGED
Binary file
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.1
2
+ TargetRubyVersion: 3.0
3
3
 
4
4
  Documentation:
5
5
  Enabled: false
data/.travis.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.4
5
- - 2.4.3
6
- - 2.5.0
7
- before_install: gem install bundler -v 1.13.7
4
+ - 2.6.10
5
+ - 2.7.6
6
+ - 3.0.4
7
+ before_install: gem install bundler -v 2.3.8
8
8
  script:
9
9
  - bundle exec rake
10
10
  - bundle exec codeclimate-test-reporter
@@ -1,3 +1,3 @@
1
1
  module CmbPay
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
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
- 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)
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,36 +1,40 @@
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.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Guo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDAplcmlj
14
- Lmd1b2N6MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj
15
- b20wHhcNMTcwNzI1MDEwMDU1WhcNMTgwNzI1MDEwMDU1WjBBMRMwEQYDVQQDDApl
16
- cmljLmd1b2N6MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
17
- FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDw/v3xTyrXOdzt
18
- 0J3aFwBQ0mnDKW/E4INUekx4xzLnlCaGxZwUiv0tXfmXHPrCBjYcOYzA0viUNElO
19
- jPNn+LvcZsTsiYLai8sIBHeBGlGTKfnMFDXABhLUD0wafCcjKvhcxLzCkvBwQWO3
20
- sWukYhGTW1fPfUybWVRVtswwGIyqqLezKPbYTY56t7RCz1suv32ViAfg8kCSGoMz
21
- hgrp9FLSMKyeYW/LrA8adF+9NLotRleaec75INi+9JJJ190iJU27rwGE9iXOhpJS
22
- BUwYoduU3RJGwEr1HLmq20gZlTv5RKuQ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a6GbdpB4egPZ++peSk/Q
35
+ uaIJtOX6M4VC6u7eZfotARKyUy6EcoN2zNqEAQ==
32
36
  -----END CERTIFICATE-----
33
- date: 2018-04-27 00:00:00.000000000 Z
37
+ date: 2022-06-30 00:00:00.000000000 Z
34
38
  dependencies:
35
39
  - !ruby/object:Gem::Dependency
36
40
  name: http
@@ -41,7 +45,7 @@ dependencies:
41
45
  version: 1.0.4
42
46
  - - "<"
43
47
  - !ruby/object:Gem::Version
44
- version: '4'
48
+ version: '6'
45
49
  type: :runtime
46
50
  prerelease: false
47
51
  version_requirements: !ruby/object:Gem::Requirement
@@ -51,49 +55,49 @@ dependencies:
51
55
  version: 1.0.4
52
56
  - - "<"
53
57
  - !ruby/object:Gem::Version
54
- version: '4'
58
+ version: '6'
55
59
  - !ruby/object:Gem::Dependency
56
- name: bundler
60
+ name: rexml
57
61
  requirement: !ruby/object:Gem::Requirement
58
62
  requirements:
59
- - - "~>"
63
+ - - ">="
60
64
  - !ruby/object:Gem::Version
61
- version: '1.12'
62
- type: :development
65
+ version: '0'
66
+ type: :runtime
63
67
  prerelease: false
64
68
  version_requirements: !ruby/object:Gem::Requirement
65
69
  requirements:
66
- - - "~>"
70
+ - - ">="
67
71
  - !ruby/object:Gem::Version
68
- version: '1.12'
72
+ version: '0'
69
73
  - !ruby/object:Gem::Dependency
70
74
  name: rake
71
75
  requirement: !ruby/object:Gem::Requirement
72
76
  requirements:
73
77
  - - "~>"
74
78
  - !ruby/object:Gem::Version
75
- version: '11.2'
79
+ version: '12.3'
76
80
  type: :development
77
81
  prerelease: false
78
82
  version_requirements: !ruby/object:Gem::Requirement
79
83
  requirements:
80
84
  - - "~>"
81
85
  - !ruby/object:Gem::Version
82
- version: '11.2'
86
+ version: '12.3'
83
87
  - !ruby/object:Gem::Dependency
84
88
  name: rspec
85
89
  requirement: !ruby/object:Gem::Requirement
86
90
  requirements:
87
91
  - - "~>"
88
92
  - !ruby/object:Gem::Version
89
- version: '3.5'
93
+ version: '3.11'
90
94
  type: :development
91
95
  prerelease: false
92
96
  version_requirements: !ruby/object:Gem::Requirement
93
97
  requirements:
94
98
  - - "~>"
95
99
  - !ruby/object:Gem::Version
96
- version: '3.5'
100
+ version: '3.11'
97
101
  description: Helping rubyist integration with cmb (China Merchants Bank) payment service
98
102
  (招商银行一网通支付) easier.
99
103
  email:
@@ -125,24 +129,23 @@ homepage: https://github.com/bayetech/cmb_pay
125
129
  licenses:
126
130
  - MIT
127
131
  metadata: {}
128
- post_install_message:
132
+ post_install_message:
129
133
  rdoc_options: []
130
134
  require_paths:
131
135
  - lib
132
136
  required_ruby_version: !ruby/object:Gem::Requirement
133
137
  requirements:
134
- - - "~>"
138
+ - - ">="
135
139
  - !ruby/object:Gem::Version
136
- version: '2.3'
140
+ version: '2.5'
137
141
  required_rubygems_version: !ruby/object:Gem::Requirement
138
142
  requirements:
139
143
  - - ">="
140
144
  - !ruby/object:Gem::Version
141
145
  version: '0'
142
146
  requirements: []
143
- rubyforge_project:
144
- rubygems_version: 2.7.6
145
- signing_key:
147
+ rubygems_version: 3.3.17
148
+ signing_key:
146
149
  specification_version: 4
147
150
  summary: An unofficial cmb (China Merchants Bank) pay gem.
148
151
  test_files: []
metadata.gz.sig CHANGED
Binary file