adjust
This commit is contained in:
parent
046ae1b710
commit
77c90e34b5
@ -129,6 +129,13 @@ func (this *InGameApi) PayDone(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sessionkey := q5.SafeToString(data["session_key"])
|
||||||
|
if len(sessionkey) == 0 {
|
||||||
|
f5.GetSysLog().Debug("empty sessionkey:%s", accountId)
|
||||||
|
f5.RspErr(c, 402, "invalid session 2")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
sessionkeytime := q5.SafeToInt64(data["update_time"])
|
sessionkeytime := q5.SafeToInt64(data["update_time"])
|
||||||
if service.Wxpay.CheckExpireCache(accountId, sessionkeytime) {
|
if service.Wxpay.CheckExpireCache(accountId, sessionkeytime) {
|
||||||
f5.RspErr(c, 402, "session expired")
|
f5.RspErr(c, 402, "session expired")
|
||||||
@ -147,7 +154,6 @@ func (this *InGameApi) PayDone(c *gin.Context) {
|
|||||||
for status < 2 {
|
for status < 2 {
|
||||||
gameid := q5.SafeToInt64(strs[1])
|
gameid := q5.SafeToInt64(strs[1])
|
||||||
openid := q5.SafeToString(data["openid"])
|
openid := q5.SafeToString(data["openid"])
|
||||||
sessionkey := q5.SafeToString(data["session_key"])
|
|
||||||
userip := this.getIP(c)
|
userip := this.getIP(c)
|
||||||
balance, errcode, err := int64(0), int32(0), error(nil)
|
balance, errcode, err := int64(0), int32(0), error(nil)
|
||||||
if status == 0 {
|
if status == 0 {
|
||||||
@ -212,6 +218,13 @@ func (this *InGameApi) OrderInfo(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sessionkey := q5.SafeToString(data["session_key"])
|
||||||
|
if len(sessionkey) == 0 {
|
||||||
|
f5.GetSysLog().Debug("empty sessionkey:%s", reqJson.AccountId)
|
||||||
|
f5.RspErr(c, 402, "invalid session 2")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
sessionkeytime := q5.SafeToInt64(data["update_time"])
|
sessionkeytime := q5.SafeToInt64(data["update_time"])
|
||||||
if service.Wxpay.CheckExpireCache(reqJson.AccountId, sessionkeytime) {
|
if service.Wxpay.CheckExpireCache(reqJson.AccountId, sessionkeytime) {
|
||||||
f5.RspErr(c, 402, "session expired")
|
f5.RspErr(c, 402, "session expired")
|
||||||
@ -248,7 +261,6 @@ func (this *InGameApi) OrderInfo(c *gin.Context) {
|
|||||||
if orderModel.Status == 0 {
|
if orderModel.Status == 0 {
|
||||||
gameid := q5.SafeToInt64(strs[1])
|
gameid := q5.SafeToInt64(strs[1])
|
||||||
openid := q5.SafeToString(data["openid"])
|
openid := q5.SafeToString(data["openid"])
|
||||||
sessionkey := q5.SafeToString(data["session_key"])
|
|
||||||
userip := this.getIP(c)
|
userip := this.getIP(c)
|
||||||
balance, errcode, err := service.Wxpay.QueryBalance(openid, gameid, userip, sessionkey)
|
balance, errcode, err := service.Wxpay.QueryBalance(openid, gameid, userip, sessionkey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -310,6 +322,13 @@ func (this *InGameApi) OtherOrder(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sessionkey := q5.SafeToString(data["session_key"])
|
||||||
|
if len(sessionkey) == 0 {
|
||||||
|
f5.GetSysLog().Debug("empty sessionkey:%s", reqJson.AccountId)
|
||||||
|
f5.RspErr(c, 402, "invalid session 2")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
sessionkeytime := q5.SafeToInt64(data["update_time"])
|
sessionkeytime := q5.SafeToInt64(data["update_time"])
|
||||||
if service.Wxpay.CheckExpireCache(reqJson.AccountId, sessionkeytime) {
|
if service.Wxpay.CheckExpireCache(reqJson.AccountId, sessionkeytime) {
|
||||||
f5.RspErr(c, 402, "session expired")
|
f5.RspErr(c, 402, "session expired")
|
||||||
@ -324,7 +343,6 @@ func (this *InGameApi) OtherOrder(c *gin.Context) {
|
|||||||
|
|
||||||
gameid := q5.SafeToInt64(strs[1])
|
gameid := q5.SafeToInt64(strs[1])
|
||||||
openid := q5.SafeToString(data["openid"])
|
openid := q5.SafeToString(data["openid"])
|
||||||
sessionkey := q5.SafeToString(data["session_key"])
|
|
||||||
userip := this.getIP(c)
|
userip := this.getIP(c)
|
||||||
balance, errcode, err := service.Wxpay.QueryBalance(openid, gameid, userip, sessionkey)
|
balance, errcode, err := service.Wxpay.QueryBalance(openid, gameid, userip, sessionkey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user