cmb_pay 0.1.0 → 0.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.tar.gz.sig +0 -0
- data/README.md +5 -2
- data/lib/cmb_pay.rb +3 -3
- data/lib/cmb_pay/version.rb +1 -1
- metadata +2 -5
- metadata.gz.sig +0 -0
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/certs/Eric-Guo.pem +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fe2d640abbeff5dae77c2c7147635c7d0f2ecf2
|
4
|
+
data.tar.gz: 34ca1429ed56ba1837adc383a9a407021b035b30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 752436a710d15cf097a43e01924757089c928fae8d4504c66e8f80a0f7df3118a2c7508830a387f82bf5f89225e5cac5f61787c20a34720c2d7bbe9f7e4e5fa7
|
7
|
+
data.tar.gz: 00b0c256eb70de481ee01005f1ef428fe1ca19cf9eea9638ef12a657169d09ecf0fd2305ce9c481b1489d66934a1376ef54104e79d9c06ea6bb8a1e36073e03c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -36,12 +36,15 @@ Create `config/initializers/cmb_pay.rb` and put following configurations into it
|
|
36
36
|
```ruby
|
37
37
|
# required
|
38
38
|
CmbPay.branch_id = '0755' # 支付商户开户分行号,4位
|
39
|
-
CmbPay.co_no = '000056'
|
39
|
+
CmbPay.co_no = '000056' # 支付商户号/收单商户号,6位长数字,由银行在商户开户时确定
|
40
|
+
CmbPay.co_key = '' # 商户校验码/商户密钥,测试环境为空,注意保密
|
40
41
|
CmbPay.environment = 'test' if Rails.env.development? || Rails.env.staging?
|
41
|
-
CmbPay.co_key = '' # 商户校验码,测试环境为空
|
42
42
|
# only require by uri_of_pre_pay_euserp
|
43
43
|
CmbPay.mch_no = 'P0019844' # 协议商户企业编号,或者说是8位虚拟企业网银编号
|
44
44
|
CmbPay.default_payee_id = '1' # 默认收款方的用户标识
|
45
|
+
# onlyl require if you need refund via cmb_pay (no need if you using CMB bank web)
|
46
|
+
CmbPay.operator = '9999' # 操作员号,一般是9999
|
47
|
+
CmbPay.operator_password = '' # 操作员的密码,默认是支付商户号,但建议修改,注意保密,仅直连退款需要
|
45
48
|
```
|
46
49
|
|
47
50
|
## Development
|
data/lib/cmb_pay.rb
CHANGED
@@ -79,11 +79,11 @@ module CmbPay
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def self.uri_of_pre_pay_wap(bill_no:, amount_in_cents:, merchant_url:, merchant_para: nil,
|
82
|
-
card_bank: nil,
|
82
|
+
merchant_ret_url:, merchant_ret_para: nil, card_bank: nil,
|
83
83
|
options: {})
|
84
84
|
generate_pay_link_of('PrePayWAP',
|
85
85
|
nil, bill_no, amount_in_cents, merchant_url, merchant_para,
|
86
|
-
nil,
|
86
|
+
nil, merchant_ret_url, merchant_ret_para, card_bank,
|
87
87
|
options)
|
88
88
|
end
|
89
89
|
|
@@ -211,7 +211,7 @@ module CmbPay
|
|
211
211
|
'MerchantCode' => m_code
|
212
212
|
}
|
213
213
|
uri_params['MerchantRetUrl'] = merchant_ret_url unless merchant_ret_url.nil?
|
214
|
-
uri_params['MerchantRetPara'] = merchant_ret_para unless merchant_ret_para.nil?
|
214
|
+
uri_params['MerchantRetPara'] = Service.encode_merchant_para(merchant_ret_para) unless merchant_ret_para.nil?
|
215
215
|
Service.request_uri(pay_type, uri_params)
|
216
216
|
end
|
217
217
|
|
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: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Guo
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
R5k6Ma92sW8jupX4cqbSu9rntdVQkNRpoHIrfU0MZT0cKsg/D1zMteylxrO3KMsz
|
31
31
|
SPQRv+nrI1J0zevFqb8010heoR8SDyUA0Mm3+Q==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2016-08-
|
33
|
+
date: 2016-08-18 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: http
|
@@ -110,9 +110,6 @@ files:
|
|
110
110
|
- ".travis.yml"
|
111
111
|
- LICENSE.txt
|
112
112
|
- README.md
|
113
|
-
- bin/console
|
114
|
-
- bin/setup
|
115
|
-
- certs/Eric-Guo.pem
|
116
113
|
- lib/cmb_pay.rb
|
117
114
|
- lib/cmb_pay/merchant_code.rb
|
118
115
|
- lib/cmb_pay/message/bill_records_message.rb
|
metadata.gz.sig
CHANGED
Binary file
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'cmb_pay'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
IRB.start
|
data/bin/setup
DELETED
data/certs/Eric-Guo.pem
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDAplcmlj
|
3
|
-
Lmd1b2N6MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAE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