小程序
小游戏
企业微信
微信支付
扫描小程序码分享
微信支付rsa签名验证一直不成功,一是不知道是否需要解析请求报文,我解不解析报文都不行,二不知道报文怎么拿,三不清晰验证签名的方法该怎么写,希望来个明白人跟我说说具体流程,能给个验证签名的方法更加好,,
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
https://download.csdn.net/download/qq_41385798/23190356?utm_medium=distribute.pc_aggpage_search_result.none-task-download-2~aggregatepage~first_rank_ecpm_v1~rank_v31_ecpm-1-23190356.pc_agg_new_rank&utm_term=c%23+%E5%BE%AE%E4%BF%A1%E6%94%AF%E4%BB%98v3%E7%94%9F%E6%88%90%E7%AD%BE%E5%90%8D&spm=1000.2123.3001.4430
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
string Timestamp = HttpContext.Request.Headers["Wechatpay-Timestamp"].ToString();
string Nonce = HttpContext.Request.Headers["Wechatpay-Nonce"].ToString();
string Signature = HttpContext.Request.Headers["Wechatpay-Signature"].ToString();
string Serial = HttpContext.Request.Headers["Wechatpay-Serial"].ToString();
//获取回调POST过来的数据
Stream stream = HttpContext.Request.Body;
if (stream == null && stream.Length == 0)
{
return JsonConvert.SerializeObject(weChatNotifyResponse);
}
string response = new StreamReader(stream).ReadToEnd();
获取回调然后解密验签
我自己写了个nuget包,你要不用用?很简陋,但是能用,包含签名,验签,报文解密,图片上传等
https://gitee.com/qianmofengli/we-chat-sdk
nuget搜索WeChatRelatedSDK
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
https://download.csdn.net/download/qq_41385798/23190356?utm_medium=distribute.pc_aggpage_search_result.none-task-download-2~aggregatepage~first_rank_ecpm_v1~rank_v31_ecpm-1-23190356.pc_agg_new_rank&utm_term=c%23+%E5%BE%AE%E4%BF%A1%E6%94%AF%E4%BB%98v3%E7%94%9F%E6%88%90%E7%AD%BE%E5%90%8D&spm=1000.2123.3001.4430
string Timestamp = HttpContext.Request.Headers["Wechatpay-Timestamp"].ToString();
string Nonce = HttpContext.Request.Headers["Wechatpay-Nonce"].ToString();
string Signature = HttpContext.Request.Headers["Wechatpay-Signature"].ToString();
string Serial = HttpContext.Request.Headers["Wechatpay-Serial"].ToString();
//获取回调POST过来的数据
Stream stream = HttpContext.Request.Body;
if (stream == null && stream.Length == 0)
{
return JsonConvert.SerializeObject(weChatNotifyResponse);
}
string response = new StreamReader(stream).ReadToEnd();
获取回调然后解密验签
我自己写了个nuget包,你要不用用?很简陋,但是能用,包含签名,验签,报文解密,图片上传等
https://gitee.com/qianmofengli/we-chat-sdk
nuget搜索WeChatRelatedSDK