Class: ActiveMerchant::Billing::Integrations::BitPay::Helper

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

Instance Attribute Summary

Attributes inherited from Helper

#fields

Instance Method Summary collapse

Methods inherited from Helper

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

Constructor Details

#initialize(order_id, account, options) ⇒ Helper

Returns a new instance of Helper.



6
7
8
9
10
11
12
13
# File 'lib/active_merchant/billing/integrations/bit_pay/helper.rb', line 6

def initialize(order_id, , options)
  super
  @account = 

  add_field('posData', {'orderId' => order_id}.to_json)
  add_field('fullNotifications', true)
  add_field('transactionSpeed', 'high')
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



38
39
40
41
42
# File 'lib/active_merchant/billing/integrations/bit_pay/helper.rb', line 38

def form_fields
  invoice = create_invoice

  {"id" => invoice['id']}
end

#form_methodObject



34
35
36
# File 'lib/active_merchant/billing/integrations/bit_pay/helper.rb', line 34

def form_method
  "GET"
end