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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.rubocop.yml +1 -1
- data/.travis.yml +4 -4
- data/lib/cmb_pay/version.rb +1 -1
- data/lib/cmb_pay.rb +33 -2
- data.tar.gz.sig +0 -0
- metadata +43 -40
- 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: 96dd7210b0606422c2103a318b8dabb9eaaa37ff1af9d932761255e3b6e296c0
|
4
|
+
data.tar.gz: 6fd128dfe15254515789febb6fd4b87b757bacd7faf9ab2ce0f446444f91fd4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4246126764493b197ab6dcd4ea6890f48cb65bb70a6064fd9f998ad9c7f65063519e90ed666faf990a3ea051c417a803e58b100f6103602ef298229d2796caa6
|
7
|
+
data.tar.gz: e476583957a7ff634e61c11f0d19c5d50d4d40f43d5416fbe98642394b237e3cca4ab87ba098d86df06d7d01372826b7310f2305d521142704d9187e90452f6e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
-
|
7
|
-
before_install: gem install bundler -v
|
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
|
data/lib/cmb_pay/version.rb
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.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
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
13
|
+
MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhlcmlj
|
14
|
+
L0RDPWNsb3VkLW1lcy9EQz1jb20wHhcNMjEwOTE1MDIxMDMzWhcNMjIwOTE1MDIx
|
15
|
+
MDMzWjAjMSEwHwYDVQQDDBhlcmljL0RDPWNsb3VkLW1lcy9EQz1jb20wggGiMA0G
|
16
|
+
CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDfweHJdAqu5+BQ6t+F923czZvUynqe
|
17
|
+
DyacqWVUbDg53oVwYxldDNqUea5hMlSs1UWj2sJ5ZHiU02ly0QVyDCw/5pFP2CKJ
|
18
|
+
ukQbw35ZoCF0t2i0/GPYAtBMxb1qUynkxDAtCefQG33lBt2u9scgE9xOIiPrxtJg
|
19
|
+
shl3XFYmOx1ol66JR540l7NBS1OHR7UV6WiJrRW1cZTcR+py7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8E/4ujwilV8HKmgU77vVN6vSMvxx8zQFSz9a6GbdpB4egPZ++peSk/Q
|
35
|
+
uaIJtOX6M4VC6u7eZfotARKyUy6EcoN2zNqEAQ==
|
32
36
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
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: '
|
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: '
|
58
|
+
version: '6'
|
55
59
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
60
|
+
name: rexml
|
57
61
|
requirement: !ruby/object:Gem::Requirement
|
58
62
|
requirements:
|
59
|
-
- - "
|
63
|
+
- - ">="
|
60
64
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
-
type: :
|
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: '
|
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: '
|
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: '
|
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.
|
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.
|
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.
|
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
|
-
|
144
|
-
|
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
|