Class: Transaction

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/transaction.rb

Instance Method Summary collapse

Instance Method Details

#response=(response) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'app/models/transaction.rb', line 10

def response=(response)
  self.success       = response.success?
  self.authorization = response.authorization
  self.message       = response.message
  self.params        = response.params
rescue ActiveMerchant::ActiveMerchantError => e
  self.success       = false
  self.authorization = nil
  self.message       = e.message
  self.params        = {}
end