Esempio n. 1
0
        public CustomerPinValidationResult ValidatePin(string accountCode, string pin)
        {
            var customer = _accountRepo.Get(accountCode);

            if (customer == null)
            {
                return(new CustomerPinValidationResult(TransactionOutcome.Failure, "ACCOUNT_ERR"));
            }
            var r = customer.ValidatePin(pin);

            if (r.Result == TransactionOutcome.Success)
            {
                _atm.SetCurrentCustomer(customer);
            }
            return(r);
        }