|
|
@@ -216,7 +216,7 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|
|
|
- Object[] handleWxNotify2(HttpServletRequest request, String body) {
|
|
|
+ Object[] handleWxNotify2(HttpServletRequest request) {
|
|
|
var no = RandomUtil.randomInt(1000, 9999);
|
|
|
var signature = request.getHeader("Wechatpay-Signature");
|
|
|
var serial = request.getHeader("Wechatpay-Serial");
|
|
|
@@ -232,8 +232,8 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
for (int lenght; (lenght = inputStream.read(buffer)) != -1; ) {
|
|
|
result.write(buffer, 0, lenght);
|
|
|
}
|
|
|
- LOGGER.info("【body1】:{}",new String(result.toByteArray()));
|
|
|
- LOGGER.info("【body2】:{}",body);
|
|
|
+ var body = result.toString();
|
|
|
+ LOGGER.info("【body1】:{}",body);
|
|
|
|
|
|
|
|
|
LOGGER.info("微信支付回调{}:\nBody数据:\n{}", no, result);
|
|
|
@@ -871,11 +871,10 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
* 接收电子发票相关回调通知
|
|
|
*
|
|
|
* @param request
|
|
|
- * @param body
|
|
|
*/
|
|
|
@Override
|
|
|
- public void invoiceNotify(HttpServletRequest request, String body) {
|
|
|
- var notifyRes = handleWxNotify2(request, body);
|
|
|
+ public void invoiceNotify(HttpServletRequest request) {
|
|
|
+ var notifyRes = handleWxNotify2(request);
|
|
|
var requestParam = (RequestParam) notifyRes[0];
|
|
|
Notification notification = JSONObject.parseObject(requestParam.getBody(), Notification.class);
|
|
|
switch (notification.getEventType()) {
|