Skip to content

v4.7.3B,全新商户号,为何还会触发到证书校验404的问题呢? #3531

Description

@kiddkyd2

我是新微信支付,是否可以完全不配置证书信息,只配置支付公钥?
现在这个库,如果不填写证书参数,又提示没配置证书;
如果填了证书参数,又会触发/v3/certificates的校验404;

是否有什么开关之类的,让接口只走支付公钥的逻辑?

这段代码,在第一部分的逻辑里,就已经404抛异常了,都进不去下面的公钥校验逻辑里。

 private Verifier getVerifier(PrivateKey merchantPrivateKey, WxPayHttpProxy wxPayHttpProxy, PublicKey publicKey) {
    Verifier certificatesVerifier = new AutoUpdateCertificatesVerifier(
      new WxPayCredentials(mchId, new PrivateKeySigner(certSerialNo, merchantPrivateKey)),
      this.getApiV3Key().getBytes(StandardCharsets.UTF_8), this.getCertAutoUpdateTime(),
      this.getPayBaseUrl(), wxPayHttpProxy);
    if (publicKey != null) {
      Verifier publicCertificatesVerifier = new PublicCertificateVerifier(publicKey, publicKeyId);
      publicCertificatesVerifier.setOtherVerifier(certificatesVerifier);
      certificatesVerifier = publicCertificatesVerifier;
    }
    return certificatesVerifier;
  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions