线下支付需要订单审批后才能退款
This commit is contained in:
parent
67c52979ce
commit
aff2f3d831
@ -3354,11 +3354,21 @@ public class UnifiedRegistrationService : ITransient
|
|||||||
if (registration == null) throw Oops.Bah("报名记录不存在");
|
if (registration == null) throw Oops.Bah("报名记录不存在");
|
||||||
|
|
||||||
if (registration.PaymentStatus == 4) throw Oops.Bah("订单已取消");
|
if (registration.PaymentStatus == 4) throw Oops.Bah("订单已取消");
|
||||||
if (registration.PaymentMethod == 1 && registration.PaymentStatus != 0 && registration.PaymentStatus != 1)
|
|
||||||
|
// 线下支付场景特殊处理
|
||||||
|
if (registration.PaymentMethod == 1)
|
||||||
{
|
{
|
||||||
throw Oops.Bah("线下支付订单仅当状态为未支付或已支付时允许取消,当前状态不允许取消");
|
// 线下支付只有已支付/审核通过状态(PaymentStatus == 1)才允许退款
|
||||||
|
if (registration.PaymentStatus != 1)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("订单还在审核中,请联系管理员审核之后进行退款");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 线上支付场景保持原有逻辑
|
||||||
|
if (registration.PaymentStatus != 1) throw Oops.Bah("未支付的订单无法退款");
|
||||||
}
|
}
|
||||||
if (registration.PaymentMethod != 1 && registration.PaymentStatus != 1) throw Oops.Bah("未支付的订单无法退款");
|
|
||||||
|
|
||||||
// 验证线下支付且已支付时,是否填写了收款人信息
|
// 验证线下支付且已支付时,是否填写了收款人信息
|
||||||
if (registration.PaymentMethod == 1 && registration.PaymentStatus == 1)
|
if (registration.PaymentMethod == 1 && registration.PaymentStatus == 1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user