Ejemplo n.º 1
0
        /// <summary>
        /// 获取绑定账户的额外信息
        /// </summary>
        /// <param name="userContext"></param>
        /// <returns></returns>
        public ResponseModel GetWithdrawingExtraInfo(UserContext userContext)
        {
            var result        = CaptchaHelper.GetWithdrawingExtraInfo(userContext.AccId);
            var responseModel = new ResponseModel();
            var youPaiSdk     = new UploadCalculationInfo();
            var payLoad       = new YouPaiImgParams();

            if (result.Code == ResponseErrorcode.C200)
            {
                if (result.Data != null)
                {
                    var model =
                        JsonConvert.DeserializeObject <WithdrawOtherData>(
                            Helper.JsonSerializeObject(result.Data));
                    if (model.youPaiSDK != null)
                    {
                        payLoad.Policy               = model.youPaiSDK.Policy;
                        payLoad.Prefix               = model.youPaiSDK.ImgHostUrl;
                        payLoad.Signature            = model.youPaiSDK.SignStr;
                        payLoad.BucketName           = model.youPaiSDK.BucketName;
                        youPaiSdk.HasBusinessLicense = model.IsHasBusinessUrl;
                        youPaiSdk.Payload            = payLoad;
                    }
                }
            }

            responseModel.Data    = youPaiSdk;
            responseModel.Code    = Convert.ToInt32(result.Code);
            responseModel.Message = result.Message;
            return(responseModel);
        }