This commit is contained in:
lwl0608 2024-07-31 14:55:16 +08:00
parent 81ee19a92f
commit 96325994ea
1 changed files with 5 additions and 0 deletions

View File

@ -3800,6 +3800,11 @@ func (v *Vas) payRefund(ctx *gin.Context, tx *sqlx.Tx, order *dbstruct.Order) er
logger.Error("wxpayCli.RefundOne fail, orderId: %v, resp: %v, err: %v", orderId, util.ToJson(resp), err) logger.Error("wxpayCli.RefundOne fail, orderId: %v, resp: %v, err: %v", orderId, util.ToJson(resp), err)
return err return err
} }
if resp.Code >= 400 {
err = fmt.Errorf(resp.Error)
logger.Error("wxpayCli.RefundOne fail, invalid code, orderId: %v, resp: %v, err: %v", orderId, util.ToJson(resp), err)
return err
}
case vasproto.PayTypeCoin: case vasproto.PayTypeCoin:
err := v.store.IncCoins(ctx, tx, order.GetMid(), order.GetPayAmount()) err := v.store.IncCoins(ctx, tx, order.GetMid(), order.GetPayAmount())
if err != nil { if err != nil {