This commit is contained in:
yangduo 2025-01-13 18:12:15 +08:00
parent 14027c81f0
commit f0cb8f440c

View File

@ -171,7 +171,12 @@ func (this *MainServiceApi) WxNotifyPurchase(c *gin.Context) {
c.JSON(200, rspObj)
return
} else if !found {
if f5.IsOnlineEnv() {
c.JSON(200, rspObj)
} else {
rspObj.ErrorCode = 0
rspObj.ErrMsg = "Success"
}
return
}
@ -228,20 +233,20 @@ func (this *MainServiceApi) WxNotifyPurchase(c *gin.Context) {
return
}
rspObj := struct {
gamerspObj := struct {
ErrCode int64 `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{}
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
}
if rspObj.ErrCode == 0 {
if gamerspObj.ErrCode == 0 {
orderModel.Status = 2
orderModel.UpdateFields([]string{"status"})
rspObj.ErrCode = 0
rspObj.ErrorCode = 0
rspObj.ErrMsg = "Success"
}
})