Class ActiveMerchant::Billing::Integrations::HiTrust::Helper
In: lib/active_merchant/billing/integrations/hi_trust/helper.rb
Parent: ActiveMerchant::Billing::Integrations::Helper

Methods

amount=   new  

Public Class methods

Transaction types

  • Auth
  • AuthRe
  • Capture
  • CaptureRe
  • Refund
  • RefundRe
  • Query

[Source]

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

Public Instance methods

[Source]

    # File lib/active_merchant/billing/integrations/hi_trust/helper.rb, line 32
32:           def amount=(money)
33:             cents = money.respond_to?(:cents) ? money.cents : money 
34: 
35:             if money.is_a?(String) or cents.to_i < 0
36:               raise ArgumentError, 'money amount must be either a Money object or a positive integer in cents.' 
37:             end
38:             
39:             add_field(mappings[:amount], cents)
40:           end

[Validate]