Class: Vantiv::Api::CaptureResponse
- Defined in:
- lib/vantiv/api/capture_response.rb
Constant Summary collapse
- RESPONSE_CODES =
{ transaction_received: '001', # TODO: check this and other possible response codes for this txn, # because currently the API _ONLY_ returns 001... :'( invalid_amount: '209' }.freeze
Instance Attribute Summary
Attributes inherited from Response
#body, #http_response_code, #httpok, #raw_body
Instance Method Summary collapse
Methods inherited from Response
#api_level_failure?, #error_message
Instance Method Details
#failure? ⇒ Boolean
15 16 17 |
# File 'lib/vantiv/api/capture_response.rb', line 15 def failure? !success? end |
#success? ⇒ Boolean
11 12 13 |
# File 'lib/vantiv/api/capture_response.rb', line 11 def success? !api_level_failure? && response_code == RESPONSE_CODES[:transaction_received] end |