adjust
This commit is contained in:
parent
14027c81f0
commit
f0cb8f440c
@ -171,7 +171,12 @@ func (this *MainServiceApi) WxNotifyPurchase(c *gin.Context) {
|
|||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
return
|
return
|
||||||
} else if !found {
|
} else if !found {
|
||||||
c.JSON(200, rspObj)
|
if f5.IsOnlineEnv() {
|
||||||
|
c.JSON(200, rspObj)
|
||||||
|
} else {
|
||||||
|
rspObj.ErrorCode = 0
|
||||||
|
rspObj.ErrMsg = "Success"
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,20 +233,20 @@ func (this *MainServiceApi) WxNotifyPurchase(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
rspObj := struct {
|
gamerspObj := struct {
|
||||||
ErrCode int64 `json:"errcode"`
|
ErrCode int64 `json:"errcode"`
|
||||||
ErrMsg string `json:"errmsg"`
|
ErrMsg string `json:"errmsg"`
|
||||||
}{}
|
}{}
|
||||||
|
|
||||||
f5.GetSysLog().Debug("get game rsp:%s", hcr.GetRawData())
|
f5.GetSysLog().Debug("get game rsp:%s", hcr.GetRawData())
|
||||||
if json.Unmarshal([]byte(hcr.GetRawData()), &rspObj) != nil {
|
if json.Unmarshal([]byte(hcr.GetRawData()), &gamerspObj) != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if rspObj.ErrCode == 0 {
|
if gamerspObj.ErrCode == 0 {
|
||||||
orderModel.Status = 2
|
orderModel.Status = 2
|
||||||
orderModel.UpdateFields([]string{"status"})
|
orderModel.UpdateFields([]string{"status"})
|
||||||
rspObj.ErrCode = 0
|
rspObj.ErrorCode = 0
|
||||||
rspObj.ErrMsg = "Success"
|
rspObj.ErrMsg = "Success"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user