Browse Source

微信APPID设置取值修改

master
[zhengchao] 9 years ago
parent
commit
62a3e20f1c
2 changed files with 4 additions and 2 deletions
  1. +2
    -0
      B3WeChat/Rpcs/ClientRpc.cs
  2. +2
    -2
      B3WeChat/Utils/InOutMessageUtil.cs

+ 2
- 0
B3WeChat/Rpcs/ClientRpc.cs View File

@ -36,7 +36,9 @@ namespace BWP.B3WeChat.Rpcs
[Rpc]
public static void Send(string username, string content)
{
logger.Info("Send Begin");
string oppenid = GetOpenId(username).ToString();
logger.Info("Send+username:" + username + ",content" + content + ",oppenid");
string[] param = content.Split('|');
switch (param[0])
{


+ 2
- 2
B3WeChat/Utils/InOutMessageUtil.cs View File

@ -37,7 +37,7 @@ namespace BWP.B3WeChat.Utils
public static string GetToken()
{
string token = string.Empty;
string uriStr = string.Format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}", config.AppID, config.AppSecret);
string uriStr = string.Format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}", config.AppID.Value, config.AppSecret.Value);
WebClient client = new WebClient();
string responseBody = string.Empty;
@ -196,7 +196,7 @@ namespace BWP.B3WeChat.Utils
/// * 开发者获得加密后的字符串可与signature对比,标识该请求来源于微信。
public static bool CheckSignature()
{
string WeChat_Token = config.Token;//从配置文件获取Token
string WeChat_Token = config.Token.Value;//从配置文件获取Token
string WeChat_Key = HttpContext.Current.Request.QueryString["key"];
//从微信服务器接收传递过来的数据


Loading…
Cancel
Save