Class: OffsitePayments::Integrations::Paxum::Helper

Inherits:
Helper
  • Object
show all
Includes:
Common
Defined in:
lib/offsite_payments/integrations/paxum.rb

Instance Attribute Summary

Attributes inherited from Helper

#fields

Instance Method Summary collapse

Methods included from Common

#generate_signature, #generate_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.



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/offsite_payments/integrations/paxum.rb', line 55

def initialize(order, , options = {})
  @paxum_options = options.dup
  options.delete(:description)
  options.delete(:fail_url)
  options.delete(:success_url)
  options.delete(:result_url)
  super
  add_field "button_type_id", "1"
  add_field "variables", "notify_url=#{@paxum_options[:result_url]}"
  @paxum_options.each do |key, value|
    add_field mappings[key], value
  end
end

Dynamic Method Handling

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

Instance Method Details

#form_fieldsObject



69
70
71
# File 'lib/offsite_payments/integrations/paxum.rb', line 69

def form_fields
  @fields
end

#paramsObject



73
74
75
# File 'lib/offsite_payments/integrations/paxum.rb', line 73

def params
  @fields
end