public void CloseMerchantAccount(Guid merchantId) { SecurityVerify.Verify <CloseGoogleAuth>(new CustomVerifier("CloseGoogleAuth"), SystemPlatform.FiiiPOS, merchantId.ToString(), (model) => { return(model.PinVerified && model.CombinedVerified); }); var mDAC = new MerchantAccountDAC(); var merchant = mDAC.GetById(merchantId); if (merchant == null) { throw new CommonException(ReasonCode.ACCOUNT_NOT_EXISTS, Resources.用户不存在); } var oldFlag = merchant.ValidationFlag; var newFlag = ValidationFlagComponent.ReduceValidationFlag(oldFlag, ValidationFlag.GooogleAuthenticator); mDAC.UpdateGoogleAuthencator(merchant.Id, newFlag); }
public SaveResult GoogleUnbind(Guid id, int userId, string userName) { var oldMerchant = FiiiPayDB.MerchantAccountDb.GetById(id); oldMerchant.AuthSecretKey = ""; oldMerchant.ValidationFlag = ValidationFlagComponent.ReduceValidationFlag(oldMerchant.ValidationFlag, ValidationFlag.GooogleAuthenticator); FiiiPayDB.MerchantAccountDb.Update(oldMerchant); ActionLog actionLog = new ActionLog(); actionLog.IPAddress = GetClientIPAddress(); actionLog.AccountId = userId; actionLog.CreateTime = DateTime.UtcNow; actionLog.ModuleCode = typeof(POSBLL).FullName + ".GoogleUnbind"; actionLog.Username = userName; actionLog.LogContent = "Unbind " + id; new ActionLogBLL().Create(actionLog); return(new SaveResult(true, "Save Success")); }