一分钟解决The `certs(***)` contains the merchants certificate serial number(***) which is not allowed here.

对接微信支付经常证书不匹配或者报错的情况,如何解决如下报错问题

The `certs(***)` contains the merchant's certificate serial number(**) which is not allowed here.

问题原因

主要原因是没有正确获取并配置【微信支付平台证书】

The `certs(***)` contains the merchant's certificate serial number(***) which is not allowed here.

解决方法

获取对应的证书,并生成步骤如下:

技术说明书.md

PHP解决方法

1、安装 composer,并且 下载 CertificateDownloader.php

2、通过composer 生成所需证书即可。

详细命令如下:

#下载所需的内容
git clone https://github.com/wechatpay-apiv3/wechatpay-php.git

#使用 composer 获取相关包
composer update

#使用命令生成证书
composer exec CertificateDownloader.php -- -k 商户密钥APIV3 -m 商户ID -f apiclient_key.pem -s 证书序列号 -o 保存目录./

注意:如果有报错:cURL error 60: ,禁用 ssl 即可

禁用 ssl 即可

JAVA解决方法

Certificate Downloader 是 Java 微信支付 APIv3 平台证书的命令行下载工具。该工具可从https://api.mch.weixin.qq.com/v3/certificates 接口获取商户可用证书,并使用 APIv3 密钥 和 AES_256_GCM 算法进行解密,并把解密后证书下载到指定位置。

该工具使用了 wechatpay-apache-httpclient (opens new window)、Maven (opens new window)、picocli (opens new window)、gson (opens new window)、lombok (opens new window)等库

前置条件

JRE 1.8+

快速开始

该工具已经通过 Maven 打包成 CertificateDownloader.jar,可在 release 中下载。

下载 jar 包后,如果你没有证书,第一次下载证书的命令如下,具体说明请看 常见问题-第一次下载证书:

java -jar CertificateDownloader.jar -k ${apiV3key} -m ${mchId} -f ${mchPrivateKeyFilePath} -s ${mchSerialNo} -o ${outputFilePath}

如果你已有微信支付平台证书,完整命令如:

java -jar CertificateDownloader.jar -k ${apiV3key} -m ${mchId} -f ${mchPrivateKeyFilePath} -s ${mchSerialNo} -o ${outputFilePath} -c ${wechatpayCertificateFilePath}

其他解决方法

参考:技术说明书.md文章来源地址https://www.toymoban.com/article/783.html

到此这篇关于一分钟解决The `certs(***)` contains the merchants certificate serial number(***) which is not allowed here.的文章就介绍到这了,更多相关内容可以在右上角搜索或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

原文地址:https://www.toymoban.com/article/783.html

如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请联系站长进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • 微信支付apiV3异常:The corresponding provider for the merchant already exists

    异常信息 原因 这个错误是微信SDK抛出的,这是因为微信支付apiV3的RSAConfig重复build导致,即RSAConfig要保证是 单例 才不会导致报错。 参数说明 mchId:商户号 privateKey:商户号密钥 mchSerialNo:商户证书号 apiV3Key:apiV3密钥 建议 可以把商户配置参数使用数据库保存,服务启动的时

    2024年02月11日
    浏览(30)
  • [postman] SSL Error: Unable to verify the first certificate(已解决)

    [postman] SSL Error: Unable to verify the first certificate(已解决)

    记录一次解决的由ssl证书带来的问题,以及解决历程。 问题的产生的原因是这样的,客户想给项目迁移服务器。也是按照之前服务器的配置方式,tomcat、jdk、nginx、maven等等也是用过 scp命令进行同步的,因为用scp命令能保证 文件的权限也不会变。客户这面也提供了 https的ss

    2024年02月12日
    浏览(25)
  • 解决Correct the classpath of your application so that it contains compatible versions

    解决Correct the classpath of your application so that it contains compatible versions

    springboot启动失败 报错Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.web.servlet.handler.AbstractHandlerMethodMapping and org.springframework.web.method.HandlerMethod 排查发现:pom依赖同时引用了两个不同版本的web包。 删掉一个web依赖重新构建以后问题直

    2024年02月09日
    浏览(27)
  • 解决:Unable to connect to the server: x509: certificate signed by unknown authority (possibly because

    前提条件:之前搭建过k8s集群,使用 kubeadm reset 命令清除集群所有的配置之后,重新运行 kubectl get nodes 时报错: [root@master ~]# kubectl get nodes Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of \\\"crypto/rsa: verification error\\\" while trying to verify candidate authority

    2024年02月10日
    浏览(24)
  • The activity must be exported or contain an intent-filter错误的解决方案

    The activity must be exported or contain an intent-filter错误的解决方案

    报了The activity must be exported or contain an intent-filter的错误 解决方案: 把  那么就可以正常运行了 

    2024年02月07日
    浏览(27)
  • 解决The Node,js path can contain only letters, digits, periods (), underscores ( ), hyphens (-), colon

    解决The Node,js path can contain only letters, digits, periods (), underscores ( ), hyphens (-), colon

    安装 HUAWEI DevEco Studio 后配置 Node.js 环境时可能会报: The Node,js path can contain only letters, digits, periods (), underscores ( ), hyphens (-), colon () and backslash () 原因可能是因为安装路径中包含了 空格 ,可能大部分人习惯将软件安装在 Program Files 目录下,此时只要将 nodejs 的安装目录移到根

    2024年04月12日
    浏览(71)
  • 全网多种方法解决Updates were rejected because the remote contains work that you do not have locally的错误

    全网多种方法解决Updates were rejected because the remote contains work that you do not have locally的错误

    今天使用 git status 查看文件状态,发现有一个文件未提交,如下代码所示: 既然未提交,则首先使用 git add 将当前目录下修改的代码,从工作区添加到暂存区,如下代码所示: 接着使用 git commit 将缓存区内容添加到本地仓库,如下代码所示: 但使用 git push origin master 将本地

    2024年02月03日
    浏览(34)
  • 解决gitpush时报错:hint: Updates were rejected because the remote contains work that you do hint: not have

    当我新建了一个git仓库,依次执行 却报错 报这个错是因为远程仓库和本地仓库文件不同步,解决方法是先执行git pull将远程仓库文件拉下来使得远程与本地同步。 解决步骤 1.执行 这里的webbrowser换成你的远程仓库名 执行后会有如下输出 2.再试试重新推送行不行 发现还是报错

    2024年02月16日
    浏览(55)
  • 更新清华软件源时报错:Certificate verification failed: The certificate is NOT trusted.

    更新清华软件源时报错:Certificate verification failed: The certificate is NOT trusted.

    场景: 在下载libapriltag-dev依赖时,Linux给报了一个错误: E: Unable to locate package libapriltag-dev 。这个错误经常会出现,无法在现有的软件源里找到该安装包或者该依赖,这个时候,首先我们就需要先检查依赖名(安装包名)是否正确。如果无误,再去更新软件源。如果想要全部

    2024年02月12日
    浏览(25)
  • There was a problem confirming the ssl certificate

    参考:https://blog.csdn.net/dou3516/article/details/111881479 使用pip install 某个包的时候报错ModuleNotFoundError: No module named ‘某个包’ ,错误原因是: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.tuna.tsinghua.edu.cn’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLE

    2024年02月06日
    浏览(27)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包