|
|
@@ -165,6 +165,12 @@ public class UnionNotifyService extends SuperService {
|
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 扣款结果通知
|
|
|
+ *
|
|
|
+ * @param request
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@SneakyThrows
|
|
|
public ResultContent payNotify(HttpServletRequest request) {
|
|
|
ServletInputStream inputStream = request.getInputStream();
|
|
|
@@ -176,7 +182,30 @@ public class UnionNotifyService extends SuperService {
|
|
|
stringBuffer.append(s);
|
|
|
}
|
|
|
String body = stringBuffer.toString();
|
|
|
- PayNotifyResponse notifyResponse = jsonHelper.toObject(body, PayNotifyResponse.class);
|
|
|
+ log.info("body: {}", body);
|
|
|
+// PayNotifyResponse notifyResponse = jsonHelper.toObject(body, PayNotifyResponse.class);
|
|
|
+
|
|
|
+
|
|
|
+ Map<String, String> header = new HashMap<>();
|
|
|
+ log.info("stringBuffer: {}", stringBuffer.toString());
|
|
|
+ Enumeration<String> exception = request.getHeaderNames();
|
|
|
+ while (exception.hasMoreElements()) {
|
|
|
+ String key = exception.nextElement();
|
|
|
+ String value = request.getHeader(key);
|
|
|
+ log.info("key: {}, value: {}", key, value);
|
|
|
+ header.put(key, value);
|
|
|
+ }
|
|
|
+
|
|
|
+ String authorization = request.getHeader("X-Authorization");
|
|
|
+ log.info("authorization: {}", authorization);
|
|
|
+ Map<String, String[]> map = request.getParameterMap();
|
|
|
+ Map<String, String> paramMap = new LinkedHashMap<>();
|
|
|
+ map.forEach((String key, String[] values) -> {
|
|
|
+ log.info("key: {}, values: {}", key, values);
|
|
|
+ paramMap.put(key, values[0]);
|
|
|
+ });
|
|
|
+ JSONObject jsonObject = new JSONObject(paramMap);
|
|
|
+ PayNotifyResponse notifyResponse = JSONUtil.toBean(jsonObject, PayNotifyResponse.class);
|
|
|
|
|
|
return ResultContent.buildSuccess();
|
|
|
}
|