上传支付接口返回调整

This commit is contained in:
liwei1dao 2022-12-20 18:01:41 +08:00
parent fb3b881945
commit fe15e3e2df

View File

@ -12,6 +12,7 @@ import (
type PayDeliveryResults struct {
Code int32 `json:"s"`
State int32 `json:"state"`
}
//充值发货
@ -35,7 +36,12 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) {
)
defer func() {
if payresp.Code != 0 {
c.JSON(http.StatusOK, &PayDeliveryResults{Code: -2})
if payresp.Code == pb.ErrorCode_PayOrderCompleted {
c.JSON(http.StatusOK, &PayDeliveryResults{Code: 2})
} else {
c.JSON(http.StatusOK, &PayDeliveryResults{Code: 3, State: 1})
}
} else {
c.JSON(http.StatusOK, &PayDeliveryResults{Code: 1})
}