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
|
||||
ctimeTimeOut := ctime.Add(30 * time.Minute).UTC().Unix()
|
||||
ntimeTimeOut := time.Now().UTC().Unix()
|
||||
if ctimeTimeOut < ntimeTimeOut {
|
||||
errorCode = *basic.CodeErrOrderCreatePrePaymentTimeout
|
||||
err = errors.New("order pay timeout")
|
||||
logx.Errorf("order detail failed, err: %v", err)
|
||||
return &DetailRes{
|
||||
ErrorCode: errorCode,
|
||||
}, err
|
||||
if *order.Status == int64(constants.ORDERSTATUSUNPAIDDEPOSIT) {
|
||||
ctime := *order.Ctime
|
||||
ctimeTimeOut := ctime.Add(30 * time.Minute).UTC().Unix()
|
||||
ntimeTimeOut := time.Now().UTC().Unix()
|
||||
if ctimeTimeOut < ntimeTimeOut {
|
||||
errorCode = *basic.CodeErrOrderCreatePrePaymentTimeout
|
||||
err = errors.New("order pay timeout")
|
||||
logx.Errorf("order detail failed, err: %v", err)
|
||||
return &DetailRes{
|
||||
ErrorCode: errorCode,
|
||||
}, err
|
||||
}
|
||||
}
|
||||
|
||||
ress, err := d.OrderDetailHandler(ctx, &order, 1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user