This commit is contained in:
yangduo 2025-01-14 10:19:07 +08:00
parent f0cb8f440c
commit bca8f6ca3a
2 changed files with 9 additions and 6 deletions

View File

@ -166,17 +166,19 @@ func (this *MainServiceApi) WxNotifyPurchase(c *gin.Context) {
return
}
if wxnotifyobj.MiniGame.IsMock {
rspObj.ErrorCode = 0
rspObj.ErrMsg = "Success"
c.JSON(200, rspObj)
return
}
orderModel := new(model.InAppOrder)
if err, found := orderModel.FindByOrderId(payloadobj.OutTradeNo); err != nil {
c.JSON(200, rspObj)
return
} else if !found {
if f5.IsOnlineEnv() {
c.JSON(200, rspObj)
} else {
rspObj.ErrorCode = 0
rspObj.ErrMsg = "Success"
}
c.JSON(200, rspObj)
return
}

View File

@ -75,6 +75,7 @@ type WxPurchaseNotify struct {
MiniGame struct {
Payload string `json:"Payload"` // 携带的具体内容格式为json具体内容如下表格Payload因为这里需要对消息内容统一签名所以统一把消息内容设计成json格式
PayEventSig string `json:"PayEventSig"` //见https://docs.qq.com/doc/DVVZZdHFsYkttYmxlPayEventSig
IsMock bool `json:"IsMock"` //True: 模拟测试推送 False真实推送
} `json:"MiniGame"` //道具直购发货参数
}