public ResponseModel SendVerificationCode(VerficationCodeRequestParams parameters) { if (parameters == null) { return(Fail(ErrorCodeEnum.NullArguments)); } if (string.IsNullOrWhiteSpace(parameters.Phone)) { return(Fail(ErrorCodeEnum.PhoneCanNotBeNull)); } var model = _accountbookService.SendBindWithdrawingAccountAuthCode(GetUserContext(), parameters.Phone); return(model.Code == (int)ErrorCodeEnum.Success ? Success(model) : Fail((ErrorCodeEnum)model.Code)); }
public ResponseModel SendVerficationCodeToPhone(VerficationCodeRequestParams parameters) { if (parameters == null) { return(Fail(ErrorCodeEnum.NullArguments)); } if (!Enum.IsDefined(typeof(CaptchaEnum), parameters.Context)) { return(Fail(ErrorCodeEnum.UnknowAuthCodeContex)); } if (string.IsNullOrWhiteSpace(parameters.Phone)) { return(Fail(ErrorCodeEnum.PhoneCanNotBeNull)); } return(_shardService.SendVerificationCode(GetUserContext(), parameters.Context, CaptchaPhoneEmailEnum.Phone, parameters.Phone)); }
public ResponseModel CheckVerificationCode(VerficationCodeRequestParams parameters) { return(_shardService.CheckVerificationCode(GetUserContext(), parameters.Context, (int)CaptchaPhoneEmailEnum.Phone, parameters.Code, parameters.Phone)); }