上传支付接口返回调整
This commit is contained in:
parent
fb3b881945
commit
fe15e3e2df
@ -11,7 +11,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type PayDeliveryResults struct {
|
type PayDeliveryResults struct {
|
||||||
Code int32 `json:"s"`
|
Code int32 `json:"s"`
|
||||||
|
State int32 `json:"state"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//充值发货
|
//充值发货
|
||||||
@ -35,7 +36,12 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) {
|
|||||||
)
|
)
|
||||||
defer func() {
|
defer func() {
|
||||||
if payresp.Code != 0 {
|
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 {
|
} else {
|
||||||
c.JSON(http.StatusOK, &PayDeliveryResults{Code: 1})
|
c.JSON(http.StatusOK, &PayDeliveryResults{Code: 1})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user