Exception: PaystackGateway::Transactions::VerifyTransactionError

Inherits:
ApiError
  • Object
show all
Defined in:
lib/paystack_gateway/transactions.rb

Overview

Raised when an error occurs while calling /transactions/verify/:reference

Constant Summary

Constants inherited from ApiError

ApiError::CONNECTION_ERROR_CLASSES

Instance Attribute Summary

Attributes inherited from ApiError

#cancellable, #original_error

Instance Method Summary collapse

Methods inherited from ApiError

#initialize, #method_missing, #network_error?, #respond_to_missing?

Constructor Details

This class inherits a constructor from PaystackGateway::ApiError

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PaystackGateway::ApiError

Instance Method Details

#transaction_not_found?Boolean

Returns:

  • (Boolean)


55
56
57
58
59
# File 'lib/paystack_gateway/transactions.rb', line 55

def transaction_not_found?
  return false if !response_body

  response_body[:status] == false && response_body[:message].match?(/transaction reference not found/i)
end