Method: Cardflex::PlanGateway#_handle_response

Defined in:
lib/cardflex/plan_gateway.rb

#_handle_response(res) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/cardflex/plan_gateway.rb', line 15

def _handle_response(res)
  if res[:response][:result] == '1'
    SuccessResponse.new(:plan => Plan.new(@gateway, res[:response]))
  else
    ErrorResponse.new(@gatway, res[:response])
  end
end