public bool H5Register(H5RegisterIM im) { if (im.Cellphone.StartsWith("170") || im.Cellphone.StartsWith("171")) { throw new CommonException(ReasonCode.PhoneNumber_Invalid, MessageResources.InvalidCellphone); } var verifier = new RegisterCellphoneVerifier(); SecurityVerify.Verify(verifier, SystemPlatform.FiiiPay, $"{im.CountryId}:{im.Cellphone}", im.SMSCode, true); var accountDAC = new UserAccountDAC(); if (!IsNullOrEmpty(im.InviterCode) && !accountDAC.ExistInviterCode(im.InviterCode)) { throw new CommonException(ReasonCode.INVITORCODE_NOT_EXISTS, MessageResources.InvalidInvitation); } if (!AccountUseable(im.CountryId, im.Cellphone)) { throw new CommonException(ReasonCode.ACCOUNT_EXISTS, Format(MessageResources.AccountAlreadyExist, im.Cellphone)); } bool result = Register(im.CountryId, im.Cellphone, im.Password, im.InviterCode); if (result) { SecurityVerify.InvalidateCode(verifier, SystemPlatform.FiiiPay, $"{im.CountryId}:{im.Cellphone}"); } return(result); }