List<DirectResponse> directResponses = result.getDirectResponseList();
// check ResponseReasonCode to see if it means we should throw an exception
if (directResponses != null && directResponses.size() > 0) {
Map<ResponseField,String> directResponseMap = directResponses.get(0).getDirectResponseMap();
ResponseCode responseCode = ResponseCode.findByResponseCode(directResponseMap.get(ResponseField.RESPONSE_CODE));
ResponseReasonCode responseReasonCode = ResponseReasonCode.findByReasonCode(directResponseMap.get(ResponseField.RESPONSE_REASON_CODE));
// check exceptionMap to see if we should throw specific exception
Class<? extends AuthorizeNetException> exceptionClass = exceptionMap.get(responseReasonCode);
if (exceptionClass != null) {