String responseCode = (String) response.elementAt(0);
if (!responseCode.equals(RESULT_APPROVED)) {
logger.error("request = " + sb.toString());
logger.error("response = " + line);
paymentMessage = (String) response.elementAt(3);
throw new AuthorizationException(responseCode + " - " + paymentMessage);
}
authCode = (String) response.elementAt(4);
paymentReference1 = (String) response.elementAt(6);
paymentReference2 = (String) response.elementAt(1);
paymentReference3 = "";