adjust
This commit is contained in:
parent
f0cb8f440c
commit
bca8f6ca3a
@ -166,17 +166,19 @@ func (this *MainServiceApi) WxNotifyPurchase(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if wxnotifyobj.MiniGame.IsMock {
|
||||||
|
rspObj.ErrorCode = 0
|
||||||
|
rspObj.ErrMsg = "Success"
|
||||||
|
c.JSON(200, rspObj)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
orderModel := new(model.InAppOrder)
|
orderModel := new(model.InAppOrder)
|
||||||
if err, found := orderModel.FindByOrderId(payloadobj.OutTradeNo); err != nil {
|
if err, found := orderModel.FindByOrderId(payloadobj.OutTradeNo); err != nil {
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
return
|
return
|
||||||
} else if !found {
|
} else if !found {
|
||||||
if f5.IsOnlineEnv() {
|
c.JSON(200, rspObj)
|
||||||
c.JSON(200, rspObj)
|
|
||||||
} else {
|
|
||||||
rspObj.ErrorCode = 0
|
|
||||||
rspObj.ErrMsg = "Success"
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ type WxPurchaseNotify struct {
|
|||||||
MiniGame struct {
|
MiniGame struct {
|
||||||
Payload string `json:"Payload"` // 携带的具体内容,格式为json,具体内容如下表格Payload(因为这里需要对消息内容统一签名,所以统一把消息内容设计成json格式)
|
Payload string `json:"Payload"` // 携带的具体内容,格式为json,具体内容如下表格Payload(因为这里需要对消息内容统一签名,所以统一把消息内容设计成json格式)
|
||||||
PayEventSig string `json:"PayEventSig"` //见https://docs.qq.com/doc/DVVZZdHFsYkttYmxl(PayEventSig)
|
PayEventSig string `json:"PayEventSig"` //见https://docs.qq.com/doc/DVVZZdHFsYkttYmxl(PayEventSig)
|
||||||
|
IsMock bool `json:"IsMock"` //True: 模拟测试推送 False:真实推送
|
||||||
} `json:"MiniGame"` //道具直购发货参数
|
} `json:"MiniGame"` //道具直购发货参数
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user