perf 优化未授权错误提示, 响应码改为40x

This commit is contained in:
DaxPay
2025-03-20 09:55:44 +08:00
committed by daxpay
parent c2f87a22f7
commit 844a9e4952

View File

@@ -44,7 +44,6 @@ public class WechatRefundSyncV2Service {
var result = wxPayService.refundQuery(request);
// 网关退款号
syncResult.setOutRefundNo(result.getTransactionId())
.setAmount(PayUtil.conversionAmount(result.getRefundFee()));
// 交易不存在
if (CollUtil.isEmpty(result.getRefundRecords())){
@@ -66,7 +65,7 @@ public class WechatRefundSyncV2Service {
syncResult.setRefundStatus(RefundStatusEnum.CLOSE);
}
} catch (WxPayException e) {
log.error("微信退款订单查询V3失败", e);
log.error("微信退款订单查询V2失败", e);
syncResult.setSyncErrorMsg(e.getCustomErrorMsg())
.setSyncSuccess(false)
.setRefundStatus(RefundStatusEnum.FAIL);