Class: Payzen::Config
- Inherits:
-
Object
- Object
- Payzen::Config
- Defined in:
- lib/payzen/config.rb
Constant Summary collapse
- DEFAULTS =
{ target_url: 'https://secure.payzen.eu/vads-payment/', vads_action_mode: 'INTERACTIVE', vads_ctx_mode: 'TEST', vads_contrib: 'Wizypay', vads_page_action: 'PAYMENT', vads_return_mode: 'POST', vads_version: 'V2', vads_payment_config: 'SINGLE', vads_currency: '978', vads_language: 'fr', # INTERACTIVE: card information entered in Systempay payment page # SILENT: card info captured in merchant's site (contract option) # or 'PRODUCTION' # or 'GET', but request in GET could be too large # 978 EUR; 840 USD' }.freeze
Instance Attribute Summary collapse
-
#certificate ⇒ Object
Returns the value of attribute certificate.
-
#target_url ⇒ Object
Returns the value of attribute target_url.
-
#vads_action_mode ⇒ Object
Returns the value of attribute vads_action_mode.
-
#vads_contrib ⇒ Object
Returns the value of attribute vads_contrib.
-
#vads_ctx_mode ⇒ Object
Returns the value of attribute vads_ctx_mode.
-
#vads_currency ⇒ Object
Returns the value of attribute vads_currency.
-
#vads_language ⇒ Object
Returns the value of attribute vads_language.
-
#vads_page_action ⇒ Object
Returns the value of attribute vads_page_action.
-
#vads_payment_config ⇒ Object
Returns the value of attribute vads_payment_config.
-
#vads_return_mode ⇒ Object
Returns the value of attribute vads_return_mode.
-
#vads_shop_name ⇒ Object
Returns the value of attribute vads_shop_name.
-
#vads_shop_url ⇒ Object
Returns the value of attribute vads_shop_url.
-
#vads_site_id ⇒ Object
Returns the value of attribute vads_site_id.
-
#vads_validation_mode ⇒ Object
Returns the value of attribute vads_validation_mode.
-
#vads_version ⇒ Object
Returns the value of attribute vads_version.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #vads_params ⇒ Object
Constructor Details
Instance Attribute Details
#certificate ⇒ Object
Returns the value of attribute certificate.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def certificate @certificate end |
#target_url ⇒ Object
Returns the value of attribute target_url.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def target_url @target_url end |
#vads_action_mode ⇒ Object
Returns the value of attribute vads_action_mode.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_action_mode @vads_action_mode end |
#vads_contrib ⇒ Object
Returns the value of attribute vads_contrib.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_contrib @vads_contrib end |
#vads_ctx_mode ⇒ Object
Returns the value of attribute vads_ctx_mode.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_ctx_mode @vads_ctx_mode end |
#vads_currency ⇒ Object
Returns the value of attribute vads_currency.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_currency @vads_currency end |
#vads_language ⇒ Object
Returns the value of attribute vads_language.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_language @vads_language end |
#vads_page_action ⇒ Object
Returns the value of attribute vads_page_action.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_page_action @vads_page_action end |
#vads_payment_config ⇒ Object
Returns the value of attribute vads_payment_config.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_payment_config @vads_payment_config end |
#vads_return_mode ⇒ Object
Returns the value of attribute vads_return_mode.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_return_mode @vads_return_mode end |
#vads_shop_name ⇒ Object
Returns the value of attribute vads_shop_name.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_shop_name @vads_shop_name end |
#vads_shop_url ⇒ Object
Returns the value of attribute vads_shop_url.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_shop_url @vads_shop_url end |
#vads_site_id ⇒ Object
Returns the value of attribute vads_site_id.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_site_id @vads_site_id end |
#vads_validation_mode ⇒ Object
Returns the value of attribute vads_validation_mode.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_validation_mode @vads_validation_mode end |
#vads_version ⇒ Object
Returns the value of attribute vads_version.
21 22 23 |
# File 'lib/payzen/config.rb', line 21 def vads_version @vads_version end |
Instance Method Details
#vads_params ⇒ Object
43 44 45 46 47 |
# File 'lib/payzen/config.rb', line 43 def vads_params Hash[instance_variables. select { |v| v.to_s.starts_with? '@vads_' }. map { |v| [v[1..-1].to_sym, instance_variable_get(v)] }] end |