|
|
|
@ -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"]; |
|
|
|
|
|
|
|
//从微信服务器接收传递过来的数据
|
|
|
|
|