Module: SuningPay

Defined in:
lib/suning_pay.rb,
lib/suning_pay/rsa.rb,
lib/suning_pay/util.rb,
lib/suning_pay/engine.rb,
lib/suning_pay/result.rb,
lib/suning_pay/railtie.rb,
lib/suning_pay/service.rb,
lib/suning_pay/version.rb,
lib/suning_pay/ent_service.rb,
app/models/suning_pay/notice.rb,
app/controllers/notify_controller.rb

Defined Under Namespace

Modules: RSA Classes: Engine, EntService, MigrationGenerator, Notice, NotifyController, Railtie, Result, 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'
API_ENT_POST_NOTICE_URL =
'/api/suning_pay/notify'
VERSION =
"0.3.3"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_base_urlObject

Returns the value of attribute api_base_url.



34
35
36
# File 'lib/suning_pay.rb', line 34

def api_base_url
  @api_base_url
end

.api_card_tranfer_urlObject

Returns the value of attribute api_card_tranfer_url.



34
35
36
# File 'lib/suning_pay.rb', line 34

def api_card_tranfer_url
  @api_card_tranfer_url
end

.api_client_private_keyObject

Returns the value of attribute api_client_private_key.



35
36
37
# File 'lib/suning_pay.rb', line 35

def api_client_private_key
  @api_client_private_key
end

.api_client_public_keyObject

Returns the value of attribute api_client_public_key.



35
36
37
# File 'lib/suning_pay.rb', line 35

def api_client_public_key
  @api_client_public_key
end

.api_query_base_urlObject

Returns the value of attribute api_query_base_url.



34
35
36
# File 'lib/suning_pay.rb', line 34

def api_query_base_url
  @api_query_base_url
end

.api_suning_certObject

Returns the value of attribute api_suning_cert.



35
36
37
# File 'lib/suning_pay.rb', line 35

def api_suning_cert
  @api_suning_cert
end

.api_suning_public_keyObject (readonly)

Returns the value of attribute api_suning_public_key.



35
36
37
# File 'lib/suning_pay.rb', line 35

def api_suning_public_key
  @api_suning_public_key
end

.api_tranfer_urlObject

Returns the value of attribute api_tranfer_url.



34
35
36
# File 'lib/suning_pay.rb', line 34

def api_tranfer_url
  @api_tranfer_url
end

.debug_modeObject

Returns the value of attribute debug_mode.



33
34
35
# File 'lib/suning_pay.rb', line 33

def debug_mode
  @debug_mode
end

.merchant_noObject

Returns the value of attribute merchant_no.



33
34
35
# File 'lib/suning_pay.rb', line 33

def merchant_no
  @merchant_no
end

.sign_algorithmObject

Returns the value of attribute sign_algorithm.



33
34
35
# File 'lib/suning_pay.rb', line 33

def sign_algorithm
  @sign_algorithm
end

.signatureObject

Returns the value of attribute signature.



33
34
35
# File 'lib/suning_pay.rb', line 33

def signature
  @signature
end

.submit_timeObject

Returns the value of attribute submit_time.



33
34
35
# File 'lib/suning_pay.rb', line 33

def submit_time
  @submit_time
end

Class Method Details

.client_optionsObject



79
80
81
82
83
84
85
86
87
88
89
# File 'lib/suning_pay.rb', line 79

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)


75
76
77
# File 'lib/suning_pay.rb', line 75

def debug_mode?
  @debug_mode
end

.ent_optionsObject



91
92
93
94
95
96
97
98
99
# File 'lib/suning_pay.rb', line 91

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

  @ent_options = options
  @ent_options
end