class OffsitePayments::Integrations::Latipay::Interface::RequestError
Constants
- ERRORS
Latipay
doesn't provide error codes for each interface, this is the only list for all the errors.
Attributes
exception[R]
message[R]
response_code[R]
Public Class Methods
new(response)
click to toggle source
# File lib/offsite_payments/integrations/latipay.rb, line 49 def initialize(response) @response = response @response_code = @response['code'] @success = @response_code == '0' @message = @response['message'] end
Public Instance Methods
error_code_text()
click to toggle source
# File lib/offsite_payments/integrations/latipay.rb, line 81 def error_code_text errors[@response_code] end
errors()
click to toggle source
# File lib/offsite_payments/integrations/latipay.rb, line 77 def errors fail NotImplementedError, "This method must be implemented on the subclass" end
success?()
click to toggle source
# File lib/offsite_payments/integrations/latipay.rb, line 73 def success? !!@success end