微信支付 Verify the signature and get the Wechatpay certificate corresponding to serialnumber[X] is empt

发布时间 2023-10-12 17:03:25作者: 轻鸿羽过

1.先获取商户证书文件
这块叫商户证书需要和下面的支付证书名字区分

在微信开放平台里面下载商户证书,用apiclient_cert.pem取获取'商户证书的序列号'

证书查看

 

 

2.需要下载一个jar,生成微信证书时候用
Releases · wechatpay-apiv3/CertificateDownloader · GitHub

 

 

3.生成证书证书命令参考

mirrors / wechatpay-apiv3 / CertificateDownloader · GitCode

 

4.执行完命令以后会,指定的路径出现一个'wechatpay_XXX.pem',其中XXX的信息会和之前请求时候
Verify the signature and get the Wechatpay certificate corresponding to serialnumber[XXX] is empty.中对应上

5.重新查看支付证书的序列号,把代码中证书序列号,证书路径重新配置就好使了