feat(payment): add per-user in-memory lock for gateway operations
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 9m58s
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 9m58s
Introduce IUserPaymentLock to serialize payment initiate and verify flows per user, preventing concurrent duplicate gateway requests across services. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
namespace CMSMicroservice.Application.Common.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// Thrown when a concurrent payment operation is already in progress for the same scope.
|
||||
/// </summary>
|
||||
public class PaymentInProgressException : Exception
|
||||
{
|
||||
public PaymentInProgressException()
|
||||
: base("یک عملیات پرداخت دیگر در حال پردازش است. لطفاً چند لحظه صبر کنید.")
|
||||
{
|
||||
}
|
||||
|
||||
public PaymentInProgressException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public PaymentInProgressException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user