jiangping
2025-02-14 c185de12314b8733f23ed7856e6d1e87ee95c1ca
server/services/src/main/java/com/doumee/core/wx/WxMiniConfig.java
@@ -78,20 +78,24 @@
    /**
     * 初始化微信小程序支付
     */
    public void load_wxPayService()
    {
        Config config =
                new RSAAutoCertificateConfig.Builder()
                        .merchantId(wxPayProperties.getMchId())
                        .privateKeyFromPath(wxPayProperties.getPrivateKeyPath())
                        .merchantSerialNumber(wxPayProperties.getSerialNumer())
                        .apiV3Key(wxPayProperties.getApiV3Key())
                        .build();
        this.wxPayService =  new JsapiService.Builder().config(config).build();
    public void load_wxPayService()   {
        try {
            Config config =
                    new RSAAutoCertificateConfig.Builder()
                            .merchantId(wxPayProperties.getMchId())
                            .privateKeyFromPath(wxPayProperties.getPrivateKeyPath())
                            .merchantSerialNumber(wxPayProperties.getSerialNumer())
                            .apiV3Key(wxPayProperties.getApiV3Key())
                            .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();;
            this.jsapiExtService =  new JsapiServiceExtension.Builder().config(config).build();
            this.refundService = new RefundService.Builder().config(config).build();
            this.billDownloadService = new BillDownloadService.Builder().config(config).build();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
    /**
     * 初始化微信小程序支付