|
|
@@ -781,26 +781,8 @@ public class WxPayScoreStrategy implements PayScoreStrategy {
|
|
|
return json.get(key).asText();
|
|
|
}
|
|
|
return null;
|
|
|
-
|
|
|
- /**
|
|
|
- * 从 MalformedMessageException 中提取 JSON 响应体
|
|
|
- * SDK 的 String.class 反序列化会抛此异常,响应体在异常消息中
|
|
|
- */
|
|
|
- private JsonNode parseResponseFromException(MalformedMessageException e) throws Exception {
|
|
|
- String message = e.getMessage();
|
|
|
- if (message != null) {
|
|
|
- int start = message.indexOf("{");
|
|
|
- int end = message.lastIndexOf("}");
|
|
|
- if (start >= 0 && end > start) {
|
|
|
- String body = message.substring(start, end + 1);
|
|
|
- log.info("[微信支付分] 从异常中提取响应体: {}", body);
|
|
|
- return objectMapper.readTree(body);
|
|
|
- }
|
|
|
- }
|
|
|
- throw e;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 解析支付时间
|
|
|
*/
|