示例#1
0
        /// <summary>
        /// 余额查询
        /// </summary>
        /// <returns></returns>
        public async Task <CThirdRechargeQueryResult> ThirdShopRechargeQuery(CThirdShopRechargeQueryModel model)
        {
            var parametermodel = new ThirdPartyDistributionParameterModel();

            parametermodel.source_id = GetMerchant(model.ShopId).DaDaShopId.ToString();
            var Data = JsonConvert.SerializeObject(model);

            parametermodel.body = Data;
            var data   = parameter.ExThirdPartyDistributionParameterAction(parametermodel);
            var result = await httpClient.Post <CThirdRechargeQueryResult>($"{thirdoptions.Url}/api/balance/query", data);

            if (result.errorCode != 0 || result.status != "success")
            {
                throw new Exception(result.msg);
            }
            return(result);
        }
示例#2
0
        public static async Task <CThirdRechargeQueryResult> ThirdAmountFinish(ShopDbContext db, ThirdConfig thirdConfig, CThirdShopRechargeQueryModel model)
        {
            ThirdServer thirdServer = new ThirdServer(db, thirdConfig);

            return(await thirdServer.ThirdShopRechargeQuery(model));
        }