Module: JdPay

Defined in:
lib/jd_pay.rb,
lib/jd_pay/des.rb,
lib/jd_pay/sign.rb,
lib/jd_pay/util.rb,
lib/jd_pay/result.rb,
lib/jd_pay/service.rb,
lib/jd_pay/version.rb,
lib/jd_pay/qr_service.rb

Defined Under Namespace

Modules: Des, QrService, Service, Sign, Util Classes: Result

Constant Summary collapse

VERSION =
"0.1.3"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.debug_modeObject

Returns the value of attribute debug_mode.



14
15
16
# File 'lib/jd_pay.rb', line 14

def debug_mode
  @debug_mode
end

.des_keyObject

Returns the value of attribute des_key.



14
15
16
# File 'lib/jd_pay.rb', line 14

def des_key
  @des_key
end

.extra_rest_client_optionsObject

Returns the value of attribute extra_rest_client_options.



14
15
16
# File 'lib/jd_pay.rb', line 14

def extra_rest_client_options
  @extra_rest_client_options
end

.mch_idObject

Returns the value of attribute mch_id.



14
15
16
# File 'lib/jd_pay.rb', line 14

def mch_id
  @mch_id
end

.md5_keyObject

Returns the value of attribute md5_key.



14
15
16
# File 'lib/jd_pay.rb', line 14

def md5_key
  @md5_key
end

.pri_keyObject

Returns the value of attribute pri_key.



14
15
16
# File 'lib/jd_pay.rb', line 14

def pri_key
  @pri_key
end

.pub_keyObject

Returns the value of attribute pub_key.



14
15
16
# File 'lib/jd_pay.rb', line 14

def pub_key
  @pub_key
end

.qr_des_keyObject

Returns the value of attribute qr_des_key.



14
15
16
# File 'lib/jd_pay.rb', line 14

def qr_des_key
  @qr_des_key
end

.qr_mch_idObject

Returns the value of attribute qr_mch_id.



14
15
16
# File 'lib/jd_pay.rb', line 14

def qr_mch_id
  @qr_mch_id
end

.qr_pri_keyObject

Returns the value of attribute qr_pri_key.



14
15
16
# File 'lib/jd_pay.rb', line 14

def qr_pri_key
  @qr_pri_key
end

Class Method Details

.debug_mode?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/jd_pay.rb', line 20

def debug_mode?
  !!@debug_mode
end

.public_keyObject



16
17
18
# File 'lib/jd_pay.rb', line 16

def public_key
  self.pub_key ? self.pub_key : JdPay::Sign::JDPAY_RSA_PUBLIC_KEY
end