public ActionResult Gambling_Pay(string code, string state) { WeChatUtilities utilites = new WeChatUtilities(); Wx_WebOauthAccessToken webToken = utilites.getWebOauthAccessToken(code); ViewBag.openId = webToken.openid; return(View()); }
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()); }
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")); } }