111
rk
2025-08-21 10c77061473979a78529139d1ed4cbb70353ba73
server/services/src/main/java/com/doumee/config/wx/WxMiniConfig.java
@@ -78,15 +78,27 @@
     */
    public void load_wxPayService()   {
        try {
//            Config config =
//                    new RSAPublicKeyConfig.Builder()
//                            .merchantId(wxPayProperties.getMchId())
//                            .privateKeyFromPath(wxPayProperties.getPrivateKeyPath())
//                            .publicKeyFromPath(wxPayProperties.getPubKeyPath())
//                            .publicKeyId("PUB_KEY_ID_0117000719222024112700219100000508")
//                            .merchantSerialNumber(wxPayProperties.getSerialNumer())
//                            .apiV3Key(wxPayProperties.getApiV3Key())
//                            .build();
            Config config =
                    new RSAAutoCertificateConfig.Builder()
                            .merchantId(wxPayProperties.getMchId())
                            .privateKeyFromPath(wxPayProperties.getPrivateKeyPath())
//                            .publicKeyFromPath(wxPayProperties.getPubKeyPath())
//                            .publicKeyId("PUB_KEY_ID_0117000719222024112700219100000508")
                            .merchantSerialNumber(wxPayProperties.getSerialNumer())
                            .apiV3Key(wxPayProperties.getApiV3Key())
                            .build();
            this.wxPayService =  new JsapiService.Builder().config(config).build();
//            this.wxPayService =  new JsapiService.Builder().config(config).build();
            this.jsapiExtService =  new JsapiServiceExtension.Builder().config(config).build();
            this.refundService = new RefundService.Builder().config(config).build();
            this.billDownloadService = new BillDownloadService.Builder().config(config).build();