diff --git a/src/Infrastructure/TakeoutSaaS.Infrastructure/App/Repositories/EfOrderRepository.cs b/src/Infrastructure/TakeoutSaaS.Infrastructure/App/Repositories/EfOrderRepository.cs index aac5988..57af3df 100644 --- a/src/Infrastructure/TakeoutSaaS.Infrastructure/App/Repositories/EfOrderRepository.cs +++ b/src/Infrastructure/TakeoutSaaS.Infrastructure/App/Repositories/EfOrderRepository.cs @@ -106,7 +106,8 @@ public sealed class EfOrderRepository(TakeoutAppDbContext context) : IOrderRepos context.PaymentRecords.Any(record => record.TenantId == tenantId && record.OrderId == x.Id && - record.Method == paymentMethod.Value)); + record.Method == paymentMethod.Value && + (record.Status == PaymentStatus.Paid || record.Status == PaymentStatus.Refunded))); } if (!string.IsNullOrWhiteSpace(keyword))