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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7cb6e2e16c168adda66116084b9baee9885df88f
4
- data.tar.gz: 538974a366f22d25f637d139d1a6422ff368f773
3
+ metadata.gz: 7fe2d640abbeff5dae77c2c7147635c7d0f2ecf2
4
+ data.tar.gz: 34ca1429ed56ba1837adc383a9a407021b035b30
5
5
  SHA512:
6
- metadata.gz: 037d0f1f208ca53ba2bfb47d09c87f68d7ee5992e3e63e50d5d956b3bac73a8badf359839049803df0dcc441b94e8d2555ae5ff02715d1da03b5f1daacc06b3a
7
- data.tar.gz: a8bfbee55dd68369f559f4f5c013cb330076046481f5948d3542f913791e2f760d68501a79b5f11fce929412084c75c5785cc8dfb19aed6e1afb0759ad6eaf9e
6
+ metadata.gz: 752436a710d15cf097a43e01924757089c928fae8d4504c66e8f80a0f7df3118a2c7508830a387f82bf5f89225e5cac5f61787c20a34720c2d7bbe9f7e4e5fa7
7
+ data.tar.gz: 00b0c256eb70de481ee01005f1ef428fe1ca19cf9eea9638ef12a657169d09ecf0fd2305ce9c481b1489d66934a1376ef54104e79d9c06ea6bb8a1e36073e03c
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' # 支付商户号/收单商户号,6位长数字,由银行在商户开户时确定
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
@@ -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, nil, nil, card_bank,
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
 
@@ -1,3 +1,3 @@
1
1
  module CmbPay
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.2.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: 0.1.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-08 00:00:00.000000000 Z
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
@@ -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
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,21 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDAplcmlj
3
- Lmd1b2N6MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj
4
- b20wHhcNMTYwNzExMTUyMTU2WhcNMTcwNzExMTUyMTU2WjBBMRMwEQYDVQQDDApl
5
- cmljLmd1b2N6MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
6
- FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6LSiHb79c6Krm
7
- TeoHq5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