Class: OffsitePayments::Integrations::EasyPay::Helper

Inherits:
Helper
  • Object
show all
Includes:
Common
Defined in:
lib/offsite_payments/integrations/easy_pay.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, inherited, mapping, #raw_html_fields, #shipping_address, #test?

Constructor Details

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

Returns a new instance of Helper.



58
59
60
61
# File 'lib/offsite_payments/integrations/easy_pay.rb', line 58

def initialize(order, , options = {})
  super
  @secret = options[:credential2]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OffsitePayments::Helper

Instance Method Details

#form_fieldsObject



63
64
65
# File 'lib/offsite_payments/integrations/easy_pay.rb', line 63

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

#paramsObject



67
68
69
# File 'lib/offsite_payments/integrations/easy_pay.rb', line 67

def params
  @fields
end