【问题标题】:Citrus Payment Gateway integration in AndroidAndroid 中的 Citrus 支付网关集成
【发布时间】:2017-05-29 09:00:50
【问题描述】:

当我集成 citrus 支付网关时,出现错误“com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certificate path not found.”

如何在项目中添加 SSL 证书?

【问题讨论】:

    标签: citrus-pay


    【解决方案1】:

    将您的证书放入 res->raw->your certificate.cer 并以 getResources().openRawResource(R.raw.your_certificate)

    【讨论】:

    • 我已经将我的证书放在原始文件夹中,但是,我使用 getResources().openRawResource(R.raw.your_certificate) 因为,这个错误是我从 citrus Payment 库中得到的
    • 我在应用类中构建了凌空请求队列的地方使用过。
    • Citrus 库不使用应用类
    • 然后放在你构造 requestQueue 的地方
    【解决方案2】:

    这个问题不在 android 或 volley 方面。 检查你的 url 是访问证书还是不是 api 端。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-19
      • 2016-01-27
      • 2014-08-06
      • 2016-11-30
      • 2015-12-21
      • 2013-04-20
      相关资源
      最近更新 更多