namespace CMSMicroservice.Application.Common;
///
/// Canonical scope keys for .
///
public static class PaymentLockScopes
{
/// One active payment initiation per user (package, wallet charge, order, IPG deposit).
public static string Initiate(long userId) => $"payment:initiate:user:{userId}";
/// One active verify per user + authority/order (duplicate callback protection).
public static string Verify(long userId, string resourceKey)
{
if (string.IsNullOrWhiteSpace(resourceKey))
throw new ArgumentException("Payment verify resource key is required.", nameof(resourceKey));
return $"payment:verify:user:{userId}:{resourceKey.Trim()}";
}
}