Class: OrderTransaction

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/forge/app/models/order_transaction.rb

Class Method Summary collapse

Class Method Details

.authorize(amount, credit_card, options = {}) ⇒ Object



9
10
11
12
13
# File 'lib/forge/app/models/order_transaction.rb', line 9

def authorize(amount, credit_card, options = {})
  process('authorization', amount) do |gw|
    gw.authorize(amount, credit_card, options)
  end
end

.capture(amount, authorization, options = {}) ⇒ Object



15
16
17
18
19
# File 'lib/forge/app/models/order_transaction.rb', line 15

def capture(amount, authorization, options = {})
  process('capture', amount) do |gw|
    gw.capture(amount, authorization, options)
  end
end