fix: Toman/Rial — system uses Toman everywhere, only ZarinPal gets Rial
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 10m16s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 10m16s
Core change in ZarinPalPaymentService: - InitiatePaymentAsync: Amount (Toman) × 10 → Rial for gateway - VerifyPaymentWithAmountAsync: Amount (Toman) × 10 → Rial for verify - Verify result: gateway Rial ÷ 10 → Toman back to system Also fixed: - Package.Price doc: ریال → تومان - Error messages in 3 handlers: ریال → تومان - ConfigurationService descriptions: ریال → تومان (7 entries) - Notification SMS/email: ریال → تومان - Doc comments in 5 command files: ریال → تومان - PaymentCallback comments: ریال → تومان 14 files changed across Domain, Application, Infrastructure, WebApi
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ public class ActivateClubMembershipCommandHandler : IRequestHandler<ActivateClub
|
||||
if (wallet.Balance < package.Price)
|
||||
{
|
||||
throw new BadRequestException(
|
||||
$"برای فعالسازی باشگاه مشتریان باید حداقل {package.Price:N0} ریال موجودی اصلی داشته باشید"
|
||||
$"برای فعالسازی باشگاه مشتریان باید حداقل {package.Price:N0} تومان موجودی اصلی داشته باشید"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ public class PlaceOrderCommandHandler : IRequestHandler<PlaceOrderCommand, Place
|
||||
return new PlaceOrderResponseDto
|
||||
{
|
||||
Success = false,
|
||||
Message = $"موجودی کیف پول اعتباری کافی نیست. مبلغ مورد نیاز: {maxDiscountBalanceUsable:N0} ریال، موجودی شما: {userWallet.DiscountBalance:N0} ریال"
|
||||
Message = $"موجودی کیف پول اعتباری کافی نیست. مبلغ مورد نیاز: {maxDiscountBalanceUsable:N0} تومان، موجودی شما: {userWallet.DiscountBalance:N0} تومان"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ public class CreateManualPaymentCommand : IRequest<long>
|
||||
public long UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ تراکنش (ریال)
|
||||
/// مبلغ تراکنش (تومان)
|
||||
/// </summary>
|
||||
public long Amount { get; set; }
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ public record ProcessManualMembershipPaymentCommand : IRequest<ProcessManualMemb
|
||||
public long UserId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداختی (ریال)
|
||||
/// مبلغ پرداختی (تومان)
|
||||
/// </summary>
|
||||
public long Amount { get; init; }
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ namespace CMSMicroservice.Application.UserWalletCQ.Queries.GetCustomerWithdrawal
|
||||
public class GetCustomerWithdrawalSettingsResponseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// حداقل مبلغ برداشت (ریال)
|
||||
/// حداقل مبلغ برداشت (تومان)
|
||||
/// </summary>
|
||||
public long MinWithdrawalAmount { get; set; }
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ public class ChargeDiscountWalletCommand : IRequest<PaymentInitiateResult>
|
||||
public long UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ مورد نظر برای شارژ (ریال)
|
||||
/// مبلغ مورد نظر برای شارژ (تومان)
|
||||
/// </summary>
|
||||
public long Amount { get; set; }
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ public class ChargeMagicWalletCommand : IRequest<PaymentInitiateResult>
|
||||
public long UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ واریزی واقعی (ریال) — اعتبار = مبلغ × 2.5
|
||||
/// مبلغ واریزی واقعی (تومان) — اعتبار = مبلغ × 2.5
|
||||
/// </summary>
|
||||
public long Amount { get; set; }
|
||||
}
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ public class ChargeMagicWalletCommandHandler
|
||||
remainingDeposit
|
||||
);
|
||||
throw new BadRequestException(
|
||||
$"مبلغ واریزی بیش از سقف باقیمانده است. حداکثر مبلغ قابل واریز: {remainingDeposit:N0} ریال"
|
||||
$"مبلغ واریزی بیش از سقف باقیمانده است. حداکثر مبلغ قابل واریز: {remainingDeposit:N0} تومان"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ public class VerifyMagicWalletChargeCommandHandler
|
||||
|
||||
var userId = paymentTx.UserId
|
||||
?? throw new BadRequestException("شناسه کاربر در تراکنش پرداخت یافت نشد");
|
||||
var depositAmount = paymentTx.Amount; // مبلغ واقعی واریزی (ریال)
|
||||
var depositAmount = paymentTx.Amount; // مبلغ واقعی واریزی (تومان)
|
||||
|
||||
// 2. بررسی وضعیت برگشتی از درگاه
|
||||
if (!string.Equals(request.Status, "OK", StringComparison.OrdinalIgnoreCase))
|
||||
@@ -74,7 +74,7 @@ public class VerifyMagicWalletChargeCommandHandler
|
||||
throw new BadRequestException("پرداخت توسط کاربر لغو شد");
|
||||
}
|
||||
|
||||
// 3. Verify با درگاه (مبلغ به ریال)
|
||||
// 3. Verify با درگاه (مبلغ به تومان — تبدیل به ریال در ZarinPalService)
|
||||
var verifyResult = await _paymentGateway.VerifyPaymentAsync(
|
||||
request.Authority,
|
||||
request.Status,
|
||||
|
||||
Reference in New Issue
Block a user