Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b09af460f1 | |||
| 7c5b5f1728 | |||
| 50db61b3ee | |||
| 94b0084d75 |
+2
-2
@@ -66,7 +66,7 @@ public sealed class PayfastPaymentConfirmationReceivedEventHandler(IServiceProvi
|
||||
{
|
||||
OrderId = orderResult.Value.Id,
|
||||
PaymentId = paymentResult.Value.Id,
|
||||
PaymentGatewayReference = payload.PaymentId!,
|
||||
PaymentGatewayReference = payload.MerchantPaymentId!,
|
||||
Status = LedgerStatuses.Completed,
|
||||
CustomerId = orderResult.Value.CustomerId,
|
||||
}, cancellationToken);
|
||||
@@ -91,7 +91,7 @@ public sealed class PayfastPaymentConfirmationReceivedEventHandler(IServiceProvi
|
||||
{
|
||||
OrderId = orderResult.Value.Id,
|
||||
PaymentId = paymentResult.Value.Id,
|
||||
PaymentGatewayReference = payload.PaymentId!,
|
||||
PaymentGatewayReference = payload.MerchantPaymentId!,
|
||||
Status = ledgerStatus,
|
||||
CustomerId = orderResult.Value.CustomerId,
|
||||
}, cancellationToken);
|
||||
|
||||
@@ -123,8 +123,7 @@ public sealed class PaymentService(IDbContextFactory<MidrandBooksDbContext> cont
|
||||
await using var context = await contextFactory.CreateDbContextAsync(cancellationToken);
|
||||
|
||||
var exists = await context.Ledger.AnyAsync(l =>
|
||||
l.OrderId == orderId &&
|
||||
l.PaymentId == paymentId, cancellationToken);
|
||||
l.OrderId == orderId && l.PaymentId == paymentId && l.Status == LedgerStatuses.Completed, cancellationToken);
|
||||
|
||||
return Result.Ok(exists);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user