public override void stageExecute(SalePostContext context) { ActionStatistics cardStats = context.getTerminalCardStatistics(); if (cardStats != null) { if (cardTerminalStatsUtility.isUnderThreshold(cardStats)) { // card stats ok, haven't reached the limit, so continue. nextStage(context); } else { // Limit reached... context.responseBuilder().ResponseCode = ResponseCode.CARD_AUTH_LIMIT_REACHED; } } else { // Cannot get stats, can't guarantee won't exceed limits, so have to decline. //Logger.error("Cannot get card statistics - Rejecting transaction"); context.responseBuilder().ResponseCode = ResponseCode.COULD_NOT_CHECK_AUTH_LIMIT; } }