|
|
@@ -168,6 +168,9 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
refundService = new RefundService.Builder().config(config).build();
|
|
|
|
|
|
wxHttpClient = (OkHttpClientAdapter) new DefaultHttpClientBuilder().newInstance().config(config).build();
|
|
|
+
|
|
|
+ // 初始化微信电子发票开发配置,主要是回调地址
|
|
|
+ devConfig();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -622,7 +625,7 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
var headers = new HttpHeaders();
|
|
|
headers.addHeader("Accept", "application/json");
|
|
|
headers.addHeader("Content-Type", "application/json");
|
|
|
- var params = JSONObject.of("callback_url", fapiaoConfig.getNotifyUrl(), "show_fapiao_cell", false);
|
|
|
+ var params = JSONObject.of("callback_url", "https://www.kuaiyuman.cn/api/invoice/notify", "show_fapiao_cell", false);
|
|
|
var requestBody = new JsonRequestBody.Builder().body(params.toJSONString()).build();
|
|
|
var res = wxHttpClient.patch(headers, fapiaoConfig.getDevConfig(), requestBody, JSONObject.class);
|
|
|
LOGGER.info("微信电子发票开发设置:{}", res.toString());
|