feat: Implement Magic Wallet functionality
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m36s

- Added ClubMembershipCycle entity and DbSet to IApplicationDbContext.
- Updated VAT rate from 9% to 10% in VatCalculator and related areas.
- Introduced Magic Wallet settings in SystemConstants.
- Enhanced UserWallet entity to support Magic Wallet features.
- Updated TransactionType enum to include Magic Wallet transactions.
- Configured UserWallet to handle Magic Wallet properties in ApplicationDbContext.
- Implemented OrmCommissionCalculationStrategy to exclude Magic Wallet users from commission calculations.
- Added Protobuf definitions for Magic Wallet methods and responses.
- Created PaymentCallbackController endpoint for handling Magic Wallet charge callbacks.
- Updated UserOrderService to manage Magic Wallet state transitions.
- Developed UserWalletService to support Magic Wallet operations.
- Created ChargeMagicWalletCommand and its handler for initiating Magic Wallet charges.
- Implemented VerifyMagicWalletChargeCommand and handler for payment verification.
- Added validation for ChargeMagicWalletCommand.
- Established ClubMembershipCycle configuration for EF Core.
- Introduced WalletMode enum to differentiate between Normal and Magic modes.
This commit is contained in:
masoodafar-web
2026-02-21 19:50:28 +03:30
parent 04e8c49fa7
commit 2a569a024f
23 changed files with 914 additions and 22 deletions
@@ -26,4 +26,14 @@ public enum TransactionType
/// خرید از فروشگاه تخفیف
/// </summary>
DiscountShopPurchase = 13,
/// <summary>
/// واریز از درگاه به کیف‌پول جادویی (مبلغ واقعی)
/// </summary>
MagicWalletDeposit = 14,
/// <summary>
/// بونوس داخلی کیف‌پول جادویی (مبلغ × 1.5)
/// </summary>
MagicWalletBonus = 15,
}
@@ -0,0 +1,13 @@
namespace CMSMicroservice.Domain.Enums;
/// <summary>
/// حالت کیف‌پول — Normal: کمیسیون فعال | Magic: شارژ ×2.5 بدون کمیسیون
/// </summary>
public enum WalletMode
{
/// <summary>حالت عادی — کمیسیون و پورسانت فعال</summary>
Normal = 0,
/// <summary>حالت جادویی — شارژ ×2.5، بدون کمیسیون</summary>
Magic = 1
}