void authenticate(bool pLastAttempt) { var _rc = sessionHandler.AuthenticateRetail(session, out account); cdr.RetailAcctId = account.RetialAcctId; cdr.SerialNumber = account.SerialNumber; cdr.CardNumber = session.CardNumber; if (_rc == RbrResult.Success) { return; } if (_rc == RbrResult.Retail_NoBalance) { Play(promptManager.NoBalance, false, true, true); throw new RbrException(RbrResult.Retail_AuthenticationFailed, "SessionScriptBase.authenticate", string.Format("No Balance, Serial#={0}", account.SerialNumber)); } if (pLastAttempt) { Play(promptManager.InvalidCardNumber, true, true, true); } else { Play(promptManager.InvalidCardNumberTryAgain, true, true, true); } throw new RbrException(RbrResult.Retail_AuthenticationFailed, "SessionScriptBase.authenticate", string.Format("Max attempts, Serial#={0}", account.SerialNumber)); }