This commit is contained in:
yangduo 2024-12-04 17:35:51 +08:00
parent be793c3cb7
commit a6c20412e0

View File

@ -126,7 +126,7 @@ func (this *InAppShopApi) Callback(c *gin.Context) {
return
}
orderId := q5.SafeToString(rec["orderId"])
orderId := q5.SafeToString(rec["gameOrderId"])
orderModel := new(model.InAppOrder)
if err, found := orderModel.FindByOrderId(orderId); err != nil {
f5.RspErr(c, 500, "server internal error")
@ -143,7 +143,9 @@ func (this *InAppShopApi) Callback(c *gin.Context) {
}
orderModel.Status = status
if orderModel.UpdateFields([]string{"status"}) != nil {
orderModel.SpOrderId = q5.SafeToString(rec["orderId"])
orderModel.ModifyTime = int32(f5.GetApp().GetRealSeconds())
if orderModel.UpdateFields([]string{"status","sp_order_id","modifytime"}) != nil {
f5.RspErr(c, 500, "server internal error")
return
}