Module: SuningPay

Defined in:
lib/suning_pay.rb,
lib/suning_pay/rsa.rb,
lib/suning_pay/util.rb,
lib/suning_pay/service.rb,
lib/suning_pay/version.rb,
lib/suning_pay/ent_service.rb

Defined Under Namespace

Modules: RSA Classes: EntService, Railtie, Service, Util

Constant Summary collapse

API_CODE_PAY =
'PAY'
API_CODE_TRANSFER =
'TRAN'
API_CODE_Q_PAY =
'Q_PAY'
API_CODE_TRANSFER_CARD =
'TRAN_C'
VERSION =
"0.2.2"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_base_urlObject

Returns the value of attribute api_base_url.



29
30
31
# File 'lib/suning_pay.rb', line 29

def api_base_url
  @api_base_url
end

.api_card_tranfer_urlObject

Returns the value of attribute api_card_tranfer_url.



29
30
31
# File 'lib/suning_pay.rb', line 29

def api_card_tranfer_url
  @api_card_tranfer_url
end

.api_client_private_keyObject

Returns the value of attribute api_client_private_key.



30
31
32
# File 'lib/suning_pay.rb', line 30

def api_client_private_key
  @api_client_private_key
end

.api_client_public_keyObject

Returns the value of attribute api_client_public_key.



30
31
32
# File 'lib/suning_pay.rb', line 30

def api_client_public_key
  @api_client_public_key
end

.api_query_base_urlObject

Returns the value of attribute api_query_base_url.



29
30
31
# File 'lib/suning_pay.rb', line 29

def api_query_base_url
  @api_query_base_url
end

.api_suning_certObject

Returns the value of attribute api_suning_cert.



30
31
32
# File 'lib/suning_pay.rb', line 30

def api_suning_cert
  @api_suning_cert
end

.api_suning_public_keyObject (readonly)

Returns the value of attribute api_suning_public_key.



30
31
32
# File 'lib/suning_pay.rb', line 30

def api_suning_public_key
  @api_suning_public_key
end

.api_tranfer_urlObject

Returns the value of attribute api_tranfer_url.



29
30
31
# File 'lib/suning_pay.rb', line 29

def api_tranfer_url
  @api_tranfer_url
end

.debug_modeObject

Returns the value of attribute debug_mode.



28
29
30
# File 'lib/suning_pay.rb', line 28

def debug_mode
  @debug_mode
end

.merchant_noObject

Returns the value of attribute merchant_no.



28
29
30
# File 'lib/suning_pay.rb', line 28

def merchant_no
  @merchant_no
end

.sign_algorithmObject

Returns the value of attribute sign_algorithm.



28
29
30
# File 'lib/suning_pay.rb', line 28

def sign_algorithm
  @sign_algorithm
end

.signatureObject

Returns the value of attribute signature.



28
29
30
# File 'lib/suning_pay.rb', line 28

def signature
  @signature
end

.submit_timeObject

Returns the value of attribute submit_time.



28
29
30
# File 'lib/suning_pay.rb', line 28

def submit_time
  @submit_time
end

Class Method Details

.client_optionsObject



74
75
76
77
78
79
80
81
82
83
84
# File 'lib/suning_pay.rb', line 74

def client_options
  options = {:merchantNo => @merchant_no,
             :publicKeyIndex => @public_key_index,
             :version => @version,
             :inputCharset => @input_charset,
             :submitTime => Time.now.strftime("%Y%m%d%H%M%S")
  }

  @client_options = options
  @client_options
end

.debug_mode?Boolean

Returns:

  • (Boolean)


70
71
72
# File 'lib/suning_pay.rb', line 70

def debug_mode?
  @debug_mode
end

.ent_optionsObject



86
87
88
89
90
91
92
93
94
# File 'lib/suning_pay.rb', line 86

def ent_options
  options = {:merchantNo => @merchant_no,
             :publicKeyIndex => @public_key_index,
             :inputCharset => @input_charset
  }

  @ent_options = options
  @ent_options
end