Exemplo n.º 1
0
        public async Task <UserSessionInfo> Code2Session(WeiXinAppInfo appInfo, string jsCode)
        {
            var request = new AuthorizeCode2SessionRequest
            {
                AppId  = appInfo.AppId,
                Secret = appInfo.AppSecret,
                JSCode = jsCode
            };

            var response = await ServiceInvoker.RequestService <AuthorizeCode2SessionResponse>(request);

            return(response);
        }