通联宝一直回调

This commit is contained in:
苏尹岚
2020-03-19 14:12:40 +08:00
parent 81da3097fd
commit ac430e3359

View File

@@ -94,6 +94,10 @@ func onTLpayFinished(call *tonglianpayapi.CallBackResult) (err error) {
orderPay.DeletedAt = utils.DefaultTimeValue
db := dao.GetDB()
if err = dao.GetEntity(db, orderPay, "PayOrderID", "PayType", "DeletedAt"); err == nil {
if orderPay.Status != 0 {
globals.SugarLogger.Debugf("already pay msg:%s, err:%v", utils.Format4Output(call, true), err)
return err
}
loc, _ := time.LoadLocation("Local")
t1, _ := time.ParseInLocation("20060102150405", call.PayTime, loc)
orderPay.PayFinishedAt = utils.Time2Pointer(t1)