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);
        }
        /// <summary>
        ///     获取储值状态列表
        /// </summary>
        /// <param name="userContext"></param>
        /// <returns></returns>
        public ResponseModel GetBussinessStatus(UserContext userContext)
        {
            var responseModel = new ResponseModel();
            var listStatus    = new Dictionary <string, Dictionary <string, string> >();
            //储值操作类型(1.充值 2.消费)
            var storeMoneyOperateStatus = new Dictionary <string, string>
            {
                { "1", "充值" },
                { "2", "消费" }
            };
            //计次卡状态
            var timesCardStatus = new Dictionary <string, string>
            {
                { "1", "正常" },
                { "2", "已过期" }
            };
            //储值计次支付方式
            var storeMoneyPayType = new Dictionary <string, string>
            {
                { "1", "现金" },
                { "2", "银行卡支付" },
                { "3", "微信支付" },
                { "4", "支付宝支付" }
            };
            //充次操作类型
            var timesCardOperateStatus = new Dictionary <string, string>
            {
                { "1", "充次" },
                { "2", "消费" }
            };

            listStatus.Add("storeMoneyOperateStatus", storeMoneyOperateStatus);
            listStatus.Add("timesCardStatus", timesCardStatus);
            listStatus.Add("storeMoneyPayType", storeMoneyPayType);
            listStatus.Add("timesCardOperateStatus", timesCardOperateStatus);
            responseModel.Data = listStatus;
            return(responseModel);
        }