|
|
@@ -566,7 +566,9 @@ public class PayScoreServiceImpl implements PayScoreService {
|
|
|
request.setOutOrderNo(order.getPayScoreOrderId());
|
|
|
request.setTransactionId(order.getTransactionId());
|
|
|
request.setRefundAmount(actualRefundAmount);
|
|
|
- request.setTotalAmount(order.getTotalAmount());
|
|
|
+ // 使用 paidAmount 作为 total,避免 order.totalAmount 被回调修改后
|
|
|
+ // 与微信侧原始交易金额不一致导致 INVALID_REQUEST
|
|
|
+ request.setTotalAmount(order.getPaidAmount() != null ? order.getPaidAmount() : order.getTotalAmount());
|
|
|
request.setReason(reason != null ? reason : "用户申请退款");
|
|
|
|
|
|
PayScoreResult result = payScoreStrategy.refundServiceOrder(request);
|