Files
CMS/src/CMSMicroservice.Application/PackageCQ/Commands/VerifyUserPackagePurchasePayment/VerifyUserPackagePurchasePaymentCommand.cs
T
masoodafar-web dba0b63a70
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 10m40s
refactor(payment): unify package verify for callback and reconciliation job
Extract VerifyUserPackagePurchasePaymentCommand with idempotency, DB lock,
and IUserPaymentLock so ZarinpalReconciliationJob cannot double-credit wallets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 22:44:12 +03:30

27 lines
988 B
C#

using MediatR;
namespace CMSMicroservice.Application.PackageCQ.Commands.VerifyUserPackagePurchasePayment;
/// <summary>
/// Shared verify + wallet credit path for package IPG payments (callback UI and reconciliation job).
/// </summary>
public class VerifyUserPackagePurchasePaymentCommand : IRequest<VerifyUserPackagePurchasePaymentResult>
{
public long PurchaseId { get; set; }
public string Authority { get; set; } = string.Empty;
public string Status { get; set; } = "OK";
}
public class VerifyUserPackagePurchasePaymentResult
{
public bool Success { get; init; }
public bool AlreadyPaid { get; init; }
public string Message { get; init; } = string.Empty;
public long TransactionId { get; init; }
public string ReferenceCode { get; init; } = string.Empty;
public long PackageId { get; init; }
public string PackageName { get; init; } = string.Empty;
public long AmountPaid { get; init; }
public DateTime PurchasedAt { get; init; }
}