示例#1
0
        public ServiceResult <bool> GetSecurityCellphoneCode(GetSecurityCellphoneCodeModel key)
        {
            new SecurityComponent().SendSecurityValidateCellphoneCode(this.GetUser(), key?.DivisionCode);

            return(new ServiceResult <bool>
            {
                Data = true
            });
        }
示例#2
0
        public ServiceResult <bool> GetSecurityCellphoneCode(GetSecurityCellphoneCodeModel model)
        {
            var result = new ServiceResult <bool>();

            if (!ModelState.IsValid)
            {
                result.Code = ReasonCode.MISSING_REQUIRED_FIELDS;
                foreach (string error in ModelState.Values.SelectMany(v => v.Errors.Select(b => b.ErrorMessage)))
                {
                    result.Message += error + Environment.NewLine;
                }

                return(result);
            }
            new SecurityComponent().FiiiPOSSendSecurityValidateCellphoneCode(this.GetMerchantAccountId(), model?.DivisionCode);

            result.Data    = true;
            result.Message = Resources.发送成功;
            return(result);
        }