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



6
7
8
9
10
# File 'lib/forge/app/models/order_transaction.rb', line 6

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

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



12
13
14
15
16
# File 'lib/forge/app/models/order_transaction.rb', line 12

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