Module: Cmbchina
- Defined in:
- lib/cmbchina.rb
Defined Under Namespace
Modules: Api, Service, Sign Classes: Message, Order, SessionObject
Constant Summary collapse
- URI =
{ #支付网关 gateway: { api: 'https://payment.ebank.cmbchina.com/NetPayment/BaseHttp.dll', live: 'https://netpay.cmbchina.com/netpayment/BaseHttp.dll?PrePayC2', test: 'https://netpay.cmbchina.com/netpayment/BaseHttp.dll?TestPrePayC2' } }
- @@gateway_url =
URI[:gateway][:live]
Class Attribute Summary collapse
-
.branch_id ⇒ Object
开户分行号.
-
.co_no ⇒ Object
商户号.
-
.env ⇒ Object
Returns the value of attribute env.
-
.password ⇒ Object
登录密码.
-
.public_key ⇒ Object
招行官方公钥(从der版本转换为pem版本).
-
.secret ⇒ Object
商户秘钥.
Class Method Summary collapse
Class Attribute Details
.branch_id ⇒ Object
开户分行号
24 25 26 |
# File 'lib/cmbchina.rb', line 24 def branch_id @branch_id end |
.co_no ⇒ Object
商户号
25 26 27 |
# File 'lib/cmbchina.rb', line 25 def co_no @co_no end |
.env ⇒ Object
Returns the value of attribute env.
29 30 31 |
# File 'lib/cmbchina.rb', line 29 def env @env end |
.password ⇒ Object
登录密码
28 29 30 |
# File 'lib/cmbchina.rb', line 28 def password @password end |
.public_key ⇒ Object
招行官方公钥(从der版本转换为pem版本)
26 27 28 |
# File 'lib/cmbchina.rb', line 26 def public_key @public_key end |
.secret ⇒ Object
商户秘钥
27 28 29 |
# File 'lib/cmbchina.rb', line 27 def secret @secret end |
Class Method Details
.api_url ⇒ Object
45 46 47 |
# File 'lib/cmbchina.rb', line 45 def api_url URI[:gateway][:api] end |
.config(options) ⇒ Object
35 36 37 38 39 |
# File 'lib/cmbchina.rb', line 35 def config() .each do |key, value| send "#{key}=", value end end |
.initialize ⇒ Object
31 32 33 |
# File 'lib/cmbchina.rb', line 31 def initialize @env = :test end |
.url ⇒ Object
41 42 43 |
# File 'lib/cmbchina.rb', line 41 def url URI[:gateway][env] end |