Exemple #1
0
        public ActionResult Gambling_Pay(string code, string state)
        {
            WeChatUtilities        utilites = new WeChatUtilities();
            Wx_WebOauthAccessToken webToken = utilites.getWebOauthAccessToken(code);

            ViewBag.openId = webToken.openid;

            return(View());
        }
Exemple #2
0
        public ActionResult Gambling_Pay(string code, string state)
        {
            WeChatUtilities        utilites = new WeChatUtilities();
            Wx_WebOauthAccessToken webToken = utilites.getWebOauthAccessToken(code);

            ViewBag.openId = webToken.openid;
            WxPayStatistic s = new WxPayStatistic()
            {
                EventName       = "大学城手机摇一摇",
                ApplicationDate = DateTime.Now,
                Details         = state
            };

            offlineDB.WxPayStatistic.Add(s);
            offlineDB.SaveChanges();
            return(View());
        }
Exemple #3
0
 public ActionResult StartPayAmount(string code, string state)
 {
     try
     {
         WeChatUtilities        utilites = new WeChatUtilities();
         Wx_WebOauthAccessToken webToken = utilites.getWebOauthAccessToken(code);
         int amount = 1980;
         ViewBag.openId = webToken.openid;
         if (state == "AC69IPVD")
         {
             amount = 100;
         }
         else if (state == "BGAER9CB")
         {
             amount = 300;
         }
         ViewBag.amount = amount;
         return(View());
     }
     catch
     {
         return(View("Error"));
     }
 }