|
@@ -403,12 +403,24 @@ public class WxPayScoreStrategy implements PayScoreStrategy {
|
|
|
result.setTotalAmount(fenToYuan(totalAmountFen));
|
|
result.setTotalAmount(fenToYuan(totalAmountFen));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 提取微信支付订单号
|
|
|
|
|
+ if (respJson.has("collection")) {
|
|
|
|
|
+ JsonNode collection = respJson.get("collection");
|
|
|
|
|
+ if (collection.has("details") && collection.get("details").isArray()) {
|
|
|
|
|
+ JsonNode details = collection.get("details");
|
|
|
|
|
+ if (details.size() > 0) {
|
|
|
|
|
+ String transactionId = getJsonString(details.get(0), "transaction_id");
|
|
|
|
|
+ result.setTransactionId(transactionId);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
Map<String, Object> rawData = new HashMap<>();
|
|
Map<String, Object> rawData = new HashMap<>();
|
|
|
rawData.put("response", responseMap);
|
|
rawData.put("response", responseMap);
|
|
|
result.setRawData(rawData);
|
|
result.setRawData(rawData);
|
|
|
|
|
|
|
|
- log.info("[微信支付分] 查询订单成功 - 订单号: {}, 状态: {}, 金额: {}元",
|
|
|
|
|
- respOutOrderNo, state, result.getTotalAmount());
|
|
|
|
|
|
|
+ log.info("[微信支付分] 查询订单成功 - 订单号: {}, 状态: {}, 金额: {}元, transactionId: {}",
|
|
|
|
|
+ respOutOrderNo, state, result.getTotalAmount(), result.getTransactionId());
|
|
|
return result;
|
|
return result;
|
|
|
|
|
|
|
|
} catch (HttpException e) {
|
|
} catch (HttpException e) {
|