public void ResetPIN(Guid accountId, string pin) { SecurityVerify.Verify <ResetPinVerify>(new CustomVerifier("ResetPin"), SystemPlatform.FiiiPay, accountId.ToString(), (model) => { return(model.CombinedVerified); }); UserAccount user = new UserAccountDAC().GetById(accountId); if (PasswordHasher.VerifyHashedPassword(user.Pin, pin)) { throw new CommonException(ReasonCode.PIN_MUST_BE_DIFFERENT, MessageResources.NewPINOldPINDifferent); } UserAccountDAC mad = new UserAccountDAC(); mad.SetPinById(accountId, PasswordHasher.HashPassword(pin)); SecurityVerify.DeleteErrorCount(new PinVerifier(), SystemPlatform.FiiiPay, accountId.ToString()); }