fix(v2): P4 终审波——歧义渠道错误留 processing(ErrRefundRejected 哨兵)/ 拒绝fixture签名 / 错误映射测试 / GetRefund 日志

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
wangjia
2026-07-10 17:58:42 +08:00
parent 346004adf3
commit e26f995d7f
8 changed files with 277 additions and 6 deletions
+6 -1
View File
@@ -58,7 +58,12 @@ func (h *GatewayHandler) CreateRefund(c *gin.Context) {
func (h *GatewayHandler) GetRefund(c *gin.Context) {
v, err := h.g.GetRefund(c.Param("refund_id"))
if err != nil {
util.RespondError(c, http.StatusNotFound, "refund_not_found", "退款单不存在")
if errors.Is(err, store.ErrRefundNotFound) {
util.RespondError(c, http.StatusNotFound, "refund_not_found", "退款单不存在")
return
}
log.Printf("[v2 refund] 查询退款单失败 %s: %v", c.Param("refund_id"), err)
util.RespondError(c, http.StatusInternalServerError, "get_refund_failed", "查询失败,请稍后重试")
return
}
util.RespondSuccess(c, v)