Example #1
0
        public ActionResult AlipayCallback(string app_id, string source, string app_auth_code)
        {
            AlipayAuthService service = new AlipayAuthService();
            var result = service.OpenAuthTokenApp(new OpenAuthTokenAppDTO {
                code = app_auth_code, grant_type = "authorization_code"
            });

            Session["CurrentAlipayAuthToken"] = result.AppAuthToken;
            JavaScriptSerializer jss = new JavaScriptSerializer();

            return(Content(string.Format("结果:{0}<br/>CurrentAlipayAuthToken:{1}", jss.Serialize(result), Session["CurrentAlipayAuthToken"])));
        }