def parse_response(response)
      unless response.body
        raise ResponseError, 'PaynetEasy response is empty'
      end

      # Change hash format from {'key' => ['value']} to {'key' => 'value'} in map block
      response_fields = Hash[CGI.parse(response.body).map {|key, value| [key, value.first]}]

      Response.new response_fields
    end
def parse_response(response)
      unless response.body
        raise ResponseError, 'PaynetEasy response is empty'
      end

      # Change hash format from {'key' => ['value']} to {'key' => 'value'} in map block
      response_fields = Hash[CGI.parse(response.body).map {|key, value| [key, value.first]}]

      Response.new response_fields
    end
Parse PaynetEasy response from string to Response object

 @param    response    [HTTPResponse]    PaynetEasy response as HTTPResponse

 @return               [Response]        PaynetEasy response as Response