class OffsitePayments::Integrations::HiTrust::Helper
Public Class Methods
new(order, account, options = {})
click to toggle source
Transaction types
-
Auth
-
AuthRe
-
Capture
-
CaptureRe
-
Refund
-
RefundRe
-
Query
Calls superclass method
# File lib/offsite_payments/integrations/hi_trust.rb, line 28 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/offsite_payments/integrations/hi_trust.rb, line 45 def amount=(money) cents = to_cents(money) raise ArgumentError, "amount must be a Money object or an integer" if money.is_a?(String) raise ActionViewHelperError, "amount must be greater than $0.00" if cents.to_i <= 0 add_field(mappings[:amount], cents) end