Class: Laundry::PaymentsGateway::TransactionResponse

Inherits:
ResponseModel
  • Object
show all
Defined in:
lib/laundry/payments_gateway/models/transaction_response.rb

Instance Attribute Summary

Attributes inherited from ResponseModel

#merchant, #record

Instance Method Summary collapse

Methods inherited from ResponseModel

#blank?, dump, #dumpable, from_response, load, #method_missing, #require_merchant!, #to_hash

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Laundry::PaymentsGateway::ResponseModel

Instance Method Details

#full_transactionObject



14
15
16
17
# File 'lib/laundry/payments_gateway/models/transaction_response.rb', line 14

def full_transaction
	require_merchant!
	self.merchant.transactions.find pg_payment_method_id, pg_trace_number
end

#initialize_with_response(response) ⇒ Object



6
7
8
# File 'lib/laundry/payments_gateway/models/transaction_response.rb', line 6

def initialize_with_response(response)
	self.record = parse(response)
end

#success?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/laundry/payments_gateway/models/transaction_response.rb', line 10

def success?
	pg_response_type == 'A'
end