Class: GatewayResponse

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

Instance Method Summary collapse

Instance Method Details

#response=(response) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'app/models/gateway_response.rb', line 6

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