public void WxBizMsg( string signature = null, string timestamp = null, string nonce = null, string openid = null, string encrypt_type = null, string msg_signature = null, string echostr = null) { if (this._os.WorkContext.HttpContext.Request.HttpMethod.Equals("GET", System.StringComparison.OrdinalIgnoreCase)) { this._os.WorkContext.HttpContext.Response.Write(echostr); this._os.WorkContext.HttpContext.Response.End(); return; } var token = new WxMsgToken(msg_signature, timestamp, nonce, this._os.WorkContext.HttpContext.Request.InputStream.ReadStream()); string weChatMsg = string.Concat( string.Format("requestUrl:{0}\r\n", this._os.WorkContext.HttpContext.Request.RawUrl), string.Format("xmlbody = {0} \r\n", token.ReqMsg) ); Logger.Error(weChatMsg); this._handler.Handle(token); }
/// <summary> /// /// </summary> /// <param name="encryptMsg"></param> public void ProccessWeChatMsg(WxMsgToken token) { var wxapp = sharingHostService.MerchantDetails.SelectMany(o => o.Apps).Where(o => o.OriginalId == token.OriginalId) .FirstOrDefault(); this.handler.Proccess(token, wxapp.AppId); }