fudiwei / DotNetCore.SKIT.FlurlHttpClient.Wechat

可能是全网最完整的 C# 版微信 SDK,封装全部已知的微信 OpenAPI,包含微信公众平台(订阅号+服务号+小程序+小游戏+小商店+视频号)、微信开放平台、微信商户平台(微信支付+微企付)、企业微信、微信广告平台、微信智能对话开放平台等模块,可跨平台。持续随官方更新,欢迎 Star/Fork/PR。QQ 交流群 875580418【满】、930461548【满】、611974621。
https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient
MIT License
1.47k stars 285 forks source link

client.VerifyEventSignature 签名失败问题 #104

Closed vanteking closed 1 year ago

vanteking commented 1 year ago
        bool valid = client.VerifyEventSignature(callbackTimestamp,
            callbackNonce,
            callbackModel.ToJson(),
            callbackSignature,
            callbackSerialNumber,out Exception error);

抛出的异常代码:确认过证书用的是apiclient_key.pem里面的内容 error:SKIT.FlurlHttpClient.Wechat.TenpayV3.Exceptions.WechatTenpayEventVerificationException: Verify signature of event failed. Please see the inner exception for more details. ---> System.Exception: There is no platform certificate matched the serial number: "3ACF2C7B883AC1CACB9DEE7E2F3C974A30DFC2D5". Please make sure you have downloaded platform certificates first.

fudiwei commented 1 year ago

https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat/blob/main/docs/WechatTenpayV3/Basic_EventSignatureVerification.md#%E9%87%8D%E8%A6%81%E9%A1%BB%E7%9F%A5

image