收藏
回答

支付偶尔出现cURL error 28 是什么原因?

支付偶尔会发生这种情况,证书也在有效期内,是什么原因呢?

回答关注问题邀请回答
收藏

2 个回答

  • sun
    sun
    01-11

    看起来是ssl握手失败,证书相关问题。参考https://developers.weixin.qq.com/community/develop/doc/000c68649dc948f094d1686e962800?_at=1736589702174

    01-11
    有用
    回复 3
    • 茹
      01-11
      执行 curl -v https://api.mch.weixin.qq.com/


      显示




       
      * About to connect() to api.mch.weixin.qq.com port 443 (#0)
      * Trying 42.81.243.117...
      * Connected to api.mch.weixin.qq.com (42.81.243.117) port 443 (#0)
      * Initializing NSS with certpath: sql:/etc/pki/nssdb
      * CAfile: /etc/pki/tls/certs/ca-bundle.crt
        CApath: none
      * NSS: client certificate not found (nickname not specified)
      * Server certificate:
      * subject: CN=payapp.weixin.qq.com,O=Tenpay Technology Company Limited,L=Shenzhen,ST=Guangdong Province,C=CN
      * start date: May 14 00:00:00 2024 GMT
      * expire date: May 13 23:59:59 2025 GMT
      * common name: payapp.weixin.qq.com
      * issuer: CN=DigiCert Secure Site CN CA G3,O=DigiCert Inc,C=US
      > GET / HTTP/1.1
      > User-Agent: curl/7.29.0
      > Host: api.mch.weixin.qq.com
      > Accept: */*

      < HTTP/1.1 404 Not Found
      < Server: nginx
      < Date: Sat, 11 Jan 2025 12:25:23 GMT
      < Content-Type: text/html
      < Content-Length: 162
      < Connection: keep-alive
      < Keep-Alive: timeout=8

      <html>
      <head><title>404 Not Found</title></head>
      <body bgcolor="white">
      <center><h1>404 Not Found</h1></center>
      <hr><center>nginx</center>
      </body>
      </html>
      * Connectio #0 to host api.mch.weixin.qq.com left intact




      执行curl -o /dev/null -s -w %{time_namelookup}:%{time_connect}:%{time_starttransfer}:%{time_total}"\n" 'https://api.mch.weixin.qq.com/sandbox/orderquery'


      显示




      0.004:0.011:0.272:0.272
      不知道这个是否有问题?
      01-11
      回复
    • sun
      sun
      01-11回复
      你的服务器证书有问题
      01-11
      回复
    • 茹
      01-11回复sun
      哪个证书?具体什么问题呢?
      01-11
      回复
  • 智能回答 智能回答 该问答由AI生成
    01-11
    有用
登录 后发表内容