Class: ActiveMerchant::Billing::Integrations::EasyPay::Helper

Inherits:
Helper
  • Object
show all
Includes:
Common
Defined in:
lib/active_merchant/billing/integrations/easy_pay/helper.rb

Instance Attribute Summary

Attributes inherited from Helper

#fields

Instance Method Summary collapse

Methods included from Common

#generate_signature, #notify_signature_string, #request_signature_string

Methods inherited from Helper

#add_field, #add_fields, #add_raw_html_field, #billing_address, #form_method, mapping, #raw_html_fields, #shipping_address, #test?

Constructor Details

#initialize(order, account, options = {}) ⇒ Helper

Returns a new instance of Helper.



8
9
10
11
# File 'lib/active_merchant/billing/integrations/easy_pay/helper.rb', line 8

def initialize(order, , options = {})
  @md5secret = options.delete(:secret)
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveMerchant::Billing::Integrations::Helper

Instance Method Details

#form_fieldsObject



13
14
15
# File 'lib/active_merchant/billing/integrations/easy_pay/helper.rb', line 13

def form_fields
  @fields.merge(ActiveMerchant::Billing::Integrations::EasyPay.signature_parameter_name => generate_signature(:request))
end

#paramsObject



17
18
19
# File 'lib/active_merchant/billing/integrations/easy_pay/helper.rb', line 17

def params
  @fields
end

#secretObject



21
22
23
# File 'lib/active_merchant/billing/integrations/easy_pay/helper.rb', line 21

def secret
  @md5secret
end