public async Task <ActionResult> Process()
        {
            EnrollDto enrollDto = _helper.GetEnrollDto();

            if (enrollDto == null)
            {
                return(Redirect("/Mob/Enroll"));
            }

            if (WxPayApi.IsPaid("", enrollDto.Enroll.OrderNo))
            {
                PayModelDto model = WxPayApi.GetPayModel(enrollDto.Enroll.OrderNo);
                await _helper.SetPayStatus(EnrollStatus.PaySuccess, model);
            }

            WxPayData data = null;

            if (enrollDto.Enroll.Status != EnrollStatus.PaySuccess)
            {
                data = await WxPayApi.GetJSSDKConfig();
            }

            ViewBag.WxConfig = data == null ? "" : SerializationHelper.ToJson(data.GetValues());

            enrollDto.Enroll.IdCard = enrollDto.Enroll.IdCard.ToSpecialString(6, 8);
            return(View(enrollDto));
        }
Пример #2
0
        // GET: Mob/Home
        public async Task <ActionResult> Index(string id)
        {
            if (!string.IsNullOrEmpty(id))
            {
                MemberHelper memberHelper = new MemberHelper();
                await memberHelper.SetMemberReferee(id);
            }

            //if (string.IsNullOrEmpty(_Member.Phone))
            //{
            //    return Redirect("/Mob/Home/Bind");
            //}

            WxPayData data = await WxPayApi.GetJSSDKConfig();

            ViewBag.WxConfig = data == null ? "" : SerializationHelper.ToJson(data.GetValues());

            return(View());
        }
Пример #3
0
        // GET: Mob/Share
        public async Task <ActionResult> Index(string id = "")
        {
            if (SessionHelper.Mob.IsNullSession())
            {
                return(Redirect("/Mob/Home/Index/" + id));
            }

            if (string.IsNullOrEmpty(id))
            {
                Member member = SessionHelper.Mob.GetSession <Member>();
                if (member != null)
                {
                    id = member.ShareCode;
                }
            }

            WxPayData data = await WxPayApi.GetJSSDKConfig();

            ViewBag.WxConfig = data == null ? "" : SerializationHelper.ToJson(data.GetValues());

            return(View((object)id));
        }