- 开发指引中的httpClient能用公钥吗?
新注册商户没有证书,请问下这个开发指引中的httpClient能用公钥吗?如果可以的话怎么改,如果不可以的话有什么解决办法?谢谢 private CloseableHttpClient httpClient; private CertificatesManager certificatesManager; private Verifier verifier; @Before //initialize verifier and build httpClient public void setup() throws GeneralSecurityException, IOException, HttpCodeException, NotFoundException { PrivateKey merchantPrivateKey = PemUtil.loadPrivateKey(privateKey); certificatesManager = CertificatesManager.getInstance(); certificatesManager.putMerchant(merchantId, new WechatPay2Credentials(merchantId, new PrivateKeySigner(merchantSerialNumber, merchantPrivateKey)), apiV3Key.getBytes(StandardCharsets.UTF_8)); verifier = certificatesManager.getVerifier(merchantId); WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create() .withMerchant(merchantId, merchantSerialNumber, merchantPrivateKey) .withValidator(new WechatPay2Validator(verifier)); httpClient = builder.build(); }
2024-11-16 - 小程序注册,小额打款验证重复打款两次,且多个工作日没验证成功?
[图片][图片]
2024-10-28