收藏
回答

微信公众号支付退款接口一直提示证书验证问题,已经更换了三次API证书了,怎么解决好?还能申请更换不?

java.lang.RuntimeException: java.net.ConnectException: Failed to connect to api.mch.weixin.qq.com/240e:e1:a900:50:0:0:0:4a:443

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

4 个回答

  • 支付社区运营
    支付社区运营
    2020-11-30

    您好,退款是需要证书,证书校验异常可以首页搜索证书错误关键字,获取解决方法:https://developers.weixin.qq.com/community/develop/doc/0000c4d41540000797489798450800?highLine=%25E8%25AF%2581%25E4%25B9%25A6%25E9%2594%2599%25E8%25AF%25AF

    检查证书是否过期,证书路径是否设置为绝对路径

    如果还没有解决您的问题,可以前往V3文档:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pages/index.shtml  点击右下角“技术咨询”实时寻求技术帮助。

    2020-11-30
    有用
    回复 1
    • ♥剑军ヾJJ
      ♥剑军ヾJJ
      2020-11-30
      证书是刚下载的,没过期;另外证书路径是绝对路径,已经检测到证书了,但是在发起退款时就出现上述错误,链接超时:
      Caused by: java.net.ConnectException: Failed to connect to api.mch.weixin.qq.com/240e:e1:a900:50:0:0:0:4a:443
              at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:268)
              at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:180)
              at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:238)
              at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:111)
              at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:79)
              at okhttp3.internal.connection.Transmitter.newExchange$okhttp(Transmitter.kt:163)
              at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:35)
              at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
              at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
              at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)
              at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
              at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
              at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:84)
              at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
              at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:71)
              at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
              at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
              at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.kt:194)
              at okhttp3.RealCall.execute(RealCall.kt:67)
              at com.jfinal.weixin.sdk.utils.HttpUtils$OkHttp3Delegate.postSSL(HttpUtils.java:366)
              ... 100 more
      Caused by: java.net.ConnectException: Network is unreachable (connect failed)
              at java.net.PlainSocketImpl.socketConnect(Native Method)
              at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476)
              at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218)
              at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394)
              at java.net.Socket.connect(Socket.java:606)
              at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:117)
              at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:266)
      2020-11-30
      回复
  • 扬帆起航
    扬帆起航
    2022-02-12

    问题解决了么

    2022-02-12
    有用
    回复
  • จุ๊บ
    จุ๊บ
    2020-12-01

    证书路径换成相对路径试下

    2020-12-01
    有用
    回复
  • ♥剑军ヾJJ
    ♥剑军ヾJJ
    2020-11-30

    证书是刚下载的,没过期;另外证书路径是绝对路径,已经检测到证书了,但是在发起退款时就出现上述错误,链接超时:

    Caused by: java.net.ConnectException: Failed to connect to api.mch.weixin.qq.com/240e:e1:a900:50:0:0:0:4a:443

            at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:268)

            at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:180)

            at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:238)

            at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:111)

            at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:79)

            at okhttp3.internal.connection.Transmitter.newExchange$okhttp(Transmitter.kt:163)

            at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:35)

            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)

            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)

            at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)

            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)

            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)

            at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:84)

            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)

            at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:71)

            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)

            at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)

            at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.kt:194)

            at okhttp3.RealCall.execute(RealCall.kt:67)

            at com.jfinal.weixin.sdk.utils.HttpUtils$OkHttp3Delegate.postSSL(HttpUtils.java:366)

            ... 100 more

    Caused by: java.net.ConnectException: Network is unreachable (connect failed)

            at java.net.PlainSocketImpl.socketConnect(Native Method)

            at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476)

            at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218)

            at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200)

            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394)

            at java.net.Socket.connect(Socket.java:606)

            at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:117)

            at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:266)

    2020-11-30
    有用
    回复 1
    • Mcdull
      Mcdull
      2021-05-25
      这个问题解决了吗!我也遇到了同样的问题,感觉跟版本号okhttp3有关系,但是没有找到理论依据
      2021-05-25
      回复
登录 后发表内容
问题标签