示例#1
0
        protected MpConfigModel GetMpConfigModel()
        {
            var mpconfig = _vipDal.GetAll <MPConfig>().FirstOrDefault();

            return(mpconfig == null ? null : Newtonsoft.Json.JsonConvert.DeserializeObject <MpConfigModel>(mpconfig.ConfigValue, new Newtonsoft.Json.JsonSerializerSettings
            {
                MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore
            }));
        }
示例#2
0
        private void DoRefund(Vip entity)
        {
            var vipFee = _dal.GetAll <VipFee>().Where(p => p.VipId == entity.Id && p.Status == (int)PayStatus.支付成功).OrderByDescending(p => p.FeeTime).FirstOrDefault();

            if (vipFee != null && entity.FeeStatus == (int)PayStatus.支付成功)
            {
                var refundReqData = RefundRequestData.GetRefundRequestData((int)vipFee.Fee, vipFee.OrderCode, Server.MapPath("~/App_Data/apiclient_cert.p12"));
                _dal.Insert <VipFeeRefund>(new VipFeeRefund
                {
                    RtnOrderCode   = refundReqData.RtnOrderCode,
                    OrderCode      = vipFee.OrderCode,
                    VipId          = vipFee.VipId,
                    VipName        = entity.VipName,
                    RefundFee      = vipFee.Fee,
                    WXRtnOrderCode = refundReqData.WxRtnOrderCode,
                    Remark         = refundReqData.Remark
                });

                if (refundReqData.RefundResult.ToLower() == "success")
                {
                    //entity.IsReturnFee = true;
                    entity.FeeStatus = (int)PayStatus.待支付;
                }
            }
        }
示例#3
0
        public ActionResult PayLog()
        {
            ViewBag.Title = "我的缴费";

            var vipFees = _dal.GetAll <VipFee>().Where(p => p.VipId == CurrentVip.VipId && p.Status == 1).OrderByDescending(p => p.FeeTime).ToList();

            return(View(vipFees));
        }