fix:支付
This commit is contained in:
parent
1203c087d8
commit
9c08acc97a
|
@ -714,16 +714,18 @@ func (d *defaultOrder) Detail(ctx context.Context, in *DetailReq) (res *DetailRe
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否超时支付
|
// 是否超时支付
|
||||||
ctime := *order.Ctime
|
if *order.Status == int64(constants.ORDERSTATUSUNPAIDDEPOSIT) {
|
||||||
ctimeTimeOut := ctime.Add(30 * time.Minute).UTC().Unix()
|
ctime := *order.Ctime
|
||||||
ntimeTimeOut := time.Now().UTC().Unix()
|
ctimeTimeOut := ctime.Add(30 * time.Minute).UTC().Unix()
|
||||||
if ctimeTimeOut < ntimeTimeOut {
|
ntimeTimeOut := time.Now().UTC().Unix()
|
||||||
errorCode = *basic.CodeErrOrderCreatePrePaymentTimeout
|
if ctimeTimeOut < ntimeTimeOut {
|
||||||
err = errors.New("order pay timeout")
|
errorCode = *basic.CodeErrOrderCreatePrePaymentTimeout
|
||||||
logx.Errorf("order detail failed, err: %v", err)
|
err = errors.New("order pay timeout")
|
||||||
return &DetailRes{
|
logx.Errorf("order detail failed, err: %v", err)
|
||||||
ErrorCode: errorCode,
|
return &DetailRes{
|
||||||
}, err
|
ErrorCode: errorCode,
|
||||||
|
}, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ress, err := d.OrderDetailHandler(ctx, &order, 1)
|
ress, err := d.OrderDetailHandler(ctx, &order, 1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user