Parent

Methods

Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::Integrations::HiTrust::Helper

Public Class Methods

new(order, account, options = {}) click to toggle source

Transaction types

  • Auth

  • AuthRe

  • Capture

  • CaptureRe

  • Refund

  • RefundRe

  • Query

# File lib/active_merchant/billing/integrations/hi_trust/helper.rb, line 15
def initialize(order, account, options = {})
  super  
  # Perform an authorization by default
  add_field('Type', 'Auth')
  
  # Capture the payment right away
  add_field('depositflag', '1')
  
  # Disable auto query - who knows what it does?
  add_field('queryflag', '1')
  
  add_field('orderdesc', 'Store purchase')
end

Public Instance Methods

amount=(money) click to toggle source
# File lib/active_merchant/billing/integrations/hi_trust/helper.rb, line 32
def amount=(money)
  cents = money.respond_to?(:cents) ? money.cents : money 

  if money.is_a?(String) or cents.to_i < 0
    raise ArgumentError, 'money amount must be either a Money object or a positive integer in cents.' 
  end
  
  add_field(mappings[:amount], cents)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.