masoodafar-web
e5bc3a952a
feat: ClubMembershipCycle IHasHistory + PackageId in WalletHistory (F1)
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m33s
- ClubMembershipCycle now implements IHasHistory<ClubMembershipCycleHistory>
- CreateHistorySnapshot: New* fields from current state, Old* auto-filled by interceptor
- Parses action string to ClubMembershipCycleAction enum
- Add PackageId to 6 UserWalletHistory creation sites (F1 fix):
- VerifyPackagePurchaseCommandHandler: balanceLog + discountLog (order.PackageId)
- CheckAndProcessDayaLoansCommandHandler: mainLog + discountLog (package.Id)
- CreateManualPaymentCommandHandler: walletLog (package.Id)
- PackageService.CustomerVerifyPackagePurchase: walletLog (purchase.PackageId)
- Non-package flows (orders, commissions, manual) correctly keep PackageId=null
2026-02-27 07:07:30 +03:30
masoodafar-web
10d2ca20d1
refactor: rename UserWalletChangeLog→UserWalletHistory, add History interceptor & migration
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m11s
- Rename UserWalletChangeLog to UserWalletHistory across 54+ files (entities, configs, DTOs, commands, queries, protos, services)
- Rename 34 files and 11 directories accordingly
- Rename proto file userwalletchangelog.proto → userwallethistory.proto
- Add IHasHistory<T> generic interface for history auto-tracking
- Implement IHasHistory<PackageHistory> on Package entity
- Add HistoryTrackingSaveChangesInterceptor (reflection-based, auto-fills Old* values from OriginalValues)
- Wire interceptor in DI and ApplicationDbContext
- Add EF migration Q27_HistoryTables_And_RenameWalletHistory:
* RenameTable UserWalletChangeLogs → UserWalletHistories (preserves data)
* Rename PK, FK constraints and indexes via sp_rename
* CreateTable ClubMembershipCycleHistories + PackageHistories
2026-02-27 06:22:15 +03:30
masoodafar-web
fdbb91d2e1
feat(Q27): PackageHistory + ClubMembershipCycleHistory entities
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m28s
Q27: History Tables standardization — added missing history entities:
- PackageHistory: tracks price, activation fee, magic settings changes
- ClubMembershipCycleHistory: tracks cycle state transitions
- PackageAction + ClubMembershipCycleAction enums
- EF configurations with proper indexes and FK relationships
- DbSets registered in IApplicationDbContext + ApplicationDbContext
- Navigation properties on Package + ClubMembershipCycle entities
2026-02-27 05:31:21 +03:30
masoodafar-web
a1024a3e18
feat(Q24+Q26): balance threshold + SP auto-deploy worker
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m25s
Q24: Magic wallet entry/exit trigger now uses Balance <= 1,000,000 Rials
instead of Balance == 0 (products have varying prices so exact zero
is unreachable). Added MagicWalletEntryThreshold to SystemConstants.
Q26: StoredProcedureDeploymentService (IHostedService) auto-deploys
stored procedures on startup via embedded SQL resources + SHA256
checksum comparison. Creates [CMS].[__StoredProcedureVersions] table
automatically. Supports GO batch separators.
2026-02-27 04:22:24 +03:30
masoodafar-web
1ac23667e2
fix: package-based compliance audit — feature DIFF, remove hardcoded fallbacks
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m12s
- ActivateClubMembership: replace GetAllFeatureIds with PackageFeature DIFF (Q20)
- ActivateClubMembership: fix re-activation early return — check current cycle
- AcceptClubMembershipContract: same feature DIFF logic
- VerifyPackagePurchase: remove ?? 2.0m fallback, throw if package null
- PackageService: remove ?? 2.0m fallback for DiscountMultiplier
- UserOrderService: remove ?? 1B fallback for MagicWalletMaxDeposit
- SystemConstants: remove 9 dead [Obsolete] constants (per-package values)
2026-02-27 02:35:41 +03:30
masoodafar-web
dcd11351a3
feat(T4.13): add PackageFeature CRUD support
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m41s
- Proto: add feature_ids to Create/Update/Get package messages
- Commands: add FeatureIds to Create/Update commands
- Handlers: sync PackageFeature join entities on create/update
- Queries: include PackageFeatures, map FeatureIds in responses
- Bump NuGet to v0.0.188
2026-02-26 21:59:24 +03:30
masoodafar-web
aaaf7fc1ca
feat(commission): add per-package filtering to commission & balance queries
...
- Proto: add package_id filter to 4 request messages, package_id/package_title to 4 response models
- Queries: add PackageId filter to GetUserWeeklyBalances, GetUserCommissionPayouts, GetMyCommissionPayouts, GetMyWeeklyBalances
- Handlers: include Package navigation, filter by PackageId, map PackageId/PackageTitle
- DTOs: add PackageId + PackageTitle to all response models
- Mappings: update CommissionProfile with PackageId/PackageTitle for all admin+customer mappings
- NuGet: bump proto version to 0.0.187
2026-02-26 21:07:59 +03:30
masoodafar-web
7554d7054a
Phase 8d: Proto cleanup — delete 4 deprecated RPCs + 8 deprecated messages
...
- Deleted RPCs: PurchaseGoldenPackage, VerifyGoldenPackagePurchase,
InitiateBasePackagePayment, VerifyBasePackagePayment
- Deleted messages: PurchaseGoldenPackage{Request,Response},
VerifyGoldenPackagePurchase{Request,Response},
InitiateBasePackagePayment{Request,Response},
VerifyBasePackagePayment{Request,Response}
- Kept: GetUserPackageStatus (still in use)
- NuGet version bump: 0.0.185 → 0.0.186
2026-02-26 18:00:40 +03:30
masoodafar-web
ce8e248843
Phase 8b: Bump Protobuf NuGet to v0.0.185
2026-02-26 17:42:59 +03:30
masoodafar-web
8446e0e3b5
Phase 7c: Delete deprecated handlers + clean service/mapping refs
...
- Delete 4 deprecated CQRS handler folders (12 files):
- PurchaseGoldenPackage/ (Command, Handler, Validator)
- VerifyGoldenPackagePurchase/ (Command, Handler, Validator)
- InitiateBasePackagePayment/ (Command, Handler, Validator)
- VerifyBasePackagePayment/ (Command, Handler, Validator)
- PackageService.cs: Remove 4 gRPC override methods that dispatched
to deleted handlers (proto RPCs now auto-throw Unimplemented)
- PackageProfile.cs: Remove all Mapster mappings for deleted types
(6 mapping blocks + 4 using directives removed)
- Customer* RPCs remain fully functional
- Build: 0 errors
2026-02-26 03:02:17 +03:30
masoodafar-web
161f796cd4
Phase 7b: Embed orderId in callback URL for CustomerPurchasePackage
...
- CustomerPurchasePackage: append orderId to callback URL before sending to gateway
- Ensures PaymentCallback page receives orderId via query string for verification
2026-02-26 02:34:47 +03:30
masoodafar-web
469d97bb60
Phase 7a: Cosmetic cleanup + delete orphaned PurchasePackage handler
...
- Delete orphaned PurchasePackageCommand handler (no RPC dispatch, no callers)
- Fix doc-comments: طلایی → پکیج in enums, entities, handlers
- Remove stale 56M inline comments
- Clean SystemConstants deprecated field docs
2026-02-26 02:01:33 +03:30
masoodafar-web
d19c569aae
Phase 6: Deprecation cleanup + ConfigurationService MagicWallet
...
- Mark PurchaseGoldenPackage/VerifyGoldenPackagePurchase RPCs as deprecated
- Mark InitiateBasePackagePayment/VerifyBasePackagePayment RPCs as deprecated
- Remove deprecated SystemConstants from GetAllAsDict/GetAllWithDescriptions helpers
- Add MagicWallet per-package values to ConfigurationService (Multiplier, MaxDeposit, MaxCredit)
- All deprecated constants have zero active code usages — safe dead code
2026-02-26 01:10:43 +03:30
masoodafar-web
7176fe44ee
Fix SP: cm.PackageId → cm.LastPackageId (match actual DB column name)
2026-02-26 00:59:59 +03:30
masoodafar-web
607f791b65
Phase 5: Per-package commission + golden ref cleanup
...
- Fix golden/طلایی string refs in user-facing messages (ActivateClubMembership)
- Rename HasPurchasedGoldenPackage → HasPurchasedPackage (DTO, Handler, Proto, Mapping)
- ORM commission: per-user-package calculation via ClubMembership.LastPackageId
- Build userPackageMap, per-user maxBalancesPerLeg/maxNetworkLevel
- Carryover keyed by (UserId, PackageId) tuple
- SP commission: loop over packages, pass @PackageId/@InputMaxBalancesPerLeg/@InputMaxNetworkLevel
- sp_CalculateWeeklyBalances: accept 3 new params, filter by PackageId, insert PackageId column
2026-02-26 00:57:20 +03:30
masoodafar-web
0002a5a6f2
Phase 4: Complete Package CRUD DTOs + Legacy Fixes
...
- CreateNewPackageCommand: Add 12 new Package fields (SortOrder, IsActive, IsBasePackage,
SupportsDayaPurchase, SupportsDirectPurchase, ActivationFee, DiscountMultiplier,
MagicWalletMultiplier, MaxBalancesPerLeg, MaxNetworkLevel, MagicWalletMaxDeposit,
MagicWalletMaxCredit) with sensible defaults
- GetPackageResponseDto: Add 12 new fields (Mapster auto-maps via ProjectToType)
- GetAllPackageByFilterResponseModel: Add 12 new fields (Mapster auto-maps)
- PurchaseGoldenPackage: Replace fragile Title string match ('طلایی'/'golden')
with proper IsDeleted/IsActive/SupportsDirectPurchase validation
- VerifyPackagePurchase: Replace hardcoded order.Amount*2 with
package.DiscountMultiplier from DB (fallback 2.0 for null Package)
2026-02-26 00:24:35 +03:30
masoodafar-web
ccb938e9ba
Phase 3: Package layer overhaul — fix critical bugs + proto enhancement
...
Proto (package.proto):
- Add 11 new Package fields to Create/Update/Get/GetAll messages
- Add 8 new fields to CustomerPackageModel for frontend
Critical Bug Fixes:
- VerifyGoldenPackagePurchase: Replace hardcoded ×2 with package.DiscountMultiplier from DB
Query Fixes:
- GetAllPackageByFilter: Add IsDeleted filter (was returning soft-deleted packages)
- GetCustomerPackages: Apply IsDeleted+IncludeInactive filters, sort by SortOrder, return new fields
- GetCustomerPackageDetails: Load PackageFeatures from DB (was hardcoded), add IsDeleted filter, return new fields
- GetCustomerPurchaseHistory: Include Transaction (was null → ReferenceCode always empty)
UpdatePackage: Add 12 new fields (SortOrder, IsActive, IsBasePackage, etc.)
Build: 0 errors
2026-02-25 23:50:09 +03:30
masoodafar-web
8e5c7c5205
Phase 2: Replace all deprecated SystemConstants with Package entity reads
...
- ActivateClubMembership: Load Package, set First/Last fields, PackageId on Cycle+Pool
- AcceptClubMembershipContract: Load Package, set First/Last fields, PackageId on Pool
- CalculateWeeklyBalances: Load base package, use package.MaxBalancesPerLeg/MaxNetworkLevel, set PackageId on NetworkWeeklyBalance
- ProcessUserPayouts: Load base package, use package.MaxNetworkLevel, set PackageId on UserCommissionPayout
- CheckAndProcessDayaLoans: Load base package (IsBasePackage), replace DayaLoanAmount→package.Price, fix hardcoded p.Id==4
- CreateManualPayment: Load base package, replace BasePackageAmount→package.Price, use DiscountMultiplier
- InitiateBasePackagePayment: Remove hardcoded BasePackageId=4, load from IsBasePackage, use package.Price/Id
- VerifyBasePackagePayment: Load Package from order.PackageId, use package.Price+DiscountMultiplier
- ChargeMagicWallet: Load user's package from current cycle, use package.MagicWalletMaxDeposit
- VerifyMagicWalletCharge: Load user's package, use package.MagicWalletMultiplier/MagicWalletMaxDeposit
- OrmCommissionCalculationStrategy: Load base package in both methods, set PackageId on Balance+Payout
- ConfigurationService: Inject IApplicationDbContext, read package values from DB instead of SystemConstants
- UserOrderService: Load user's package for EXIT trigger MagicWalletMaxDeposit check
- UserWalletService: Load user's package for GetMagicWalletStatus display
All 9 deprecated SystemConstants now have ZERO usages outside SystemConstants.cs
Build: 0 errors, 521 warnings (all pre-existing)
2026-02-25 23:25:18 +03:30
masoodafar-web
a9cd2fd67a
Phase 1.5: EF Migration + Data Seed + Backfill
...
MIGRATION (AddPackageBasedSystem):
- Adds 11 new columns to Packages table
- Creates PackageFeatures table (Package×ClubFeature junction)
- Adds PackageId FK to: ClubMembershipCycles, WeeklyCommissionPools,
UserCommissionPayouts, NetworkWeeklyBalances, UserWalletChangeLogs
- Adds First/LastActivationDate, First/LastPackageId to ClubMemberships
- Drops old unique indexes, creates new composite unique indexes:
(WeekDef,Package), (User,WeekDef,Package)
DATA MIGRATION (embedded in EF migration):
1. Seeds Golden Package (Id=1): Price=56M, ActivationFee=25.2M,
DiscountMultiplier=2.0, MagicWalletMultiplier=2.5, MaxBalancesPerLeg=300,
MaxNetworkLevel=15, MagicWalletMaxDeposit=1B, MagicWalletMaxCredit=2.5B
2. Backfills PackageId=1 on all existing commission/network records
3. Backfills ClubMembership First/Last fields from existing ActivatedAt
FIXES:
- ClubMembership First/Last fields now nullable (DateTime?, long?)
for backward compat with existing records
- UserPackagePurchaseConfiguration: .WithMany() → .WithMany(p => p.Purchases)
to prevent shadow FK PackageId1
Build: 0 errors, 73 warnings
2026-02-25 22:49:12 +03:30
masoodafar-web
ae92ab8697
Phase 1: Package-Based Domain Infrastructure
...
ENTITIES:
- Package: +11 fields (SortOrder, IsActive, IsBasePackage, SupportsDaya/Direct,
ActivationFee, DiscountMultiplier, MagicWalletMultiplier, MaxBalancesPerLeg,
MaxNetworkLevel, MagicWalletMaxDeposit/Credit) + nav props
- PackageFeature: NEW junction entity (Package × ClubFeature) for feature DIFF
- ClubMembership: +4 fields (FirstActivationDate/PackageId, LastActivation/PackageId)
ActivatedAt kept as [Obsolete] for backward compat
- ClubMembershipCycle: +PackageId FK (tracks which package per cycle)
- WeeklyCommissionPool: +PackageId FK (separate pool per package)
- UserCommissionPayout: +PackageId FK (payout per package)
- NetworkWeeklyBalance: +PackageId FK (balance per package)
- UserWalletChangeLog: +PackageId? FK (optional package tracking)
EF CONFIGS:
- PackageConfiguration: 11 new field configs + indexes
- PackageFeatureConfiguration: NEW (unique PackageId+ClubFeatureId)
- ClubMembershipConfiguration: First/Last Package FKs + LastActivationDate index
- ClubMembershipCycleConfiguration: Package FK
- WeeklyCommissionPoolConfiguration: Package FK + unique(WeekDef,Package)
- UserCommissionPayoutConfiguration: Package FK + unique(User,WeekDef,Package)
- NetworkWeeklyBalanceConfiguration: Package FK + unique(User,WeekDef,Package)
- UserWalletChangeLogConfiguration: Package FK (nullable)
DBCONTEXT:
- DbSet<PackageFeature> added to ApplicationDbContext + IApplicationDbContext
SYSTEMCONSTANTS:
- 9 constants marked [Obsolete] → moved to Package entity
(ClubMembershipGiftValue, ClubActivationFee, BasePackageAmount, DayaLoanAmount,
MagicWalletMultiplier, MagicWalletMaxDeposit, MagicWalletMaxCredit,
CommissionMaxWeeklyBalancesPerLeg, CommissionMaxNetworkLevel)
Build: 0 errors, 610 warnings (40 new = expected Obsolete CS0618)
2026-02-25 22:32:42 +03:30
masoodafar-web
fe3edd178d
fix(B6): EXIT Magic Mode — reset PackagePurchaseMethod + close current cycle
...
B6: PackagePurchaseMethod was NOT reset when exiting Magic Mode.
This caused Guards G1-G3 to permanently block re-purchase.
Changes:
- user.PackagePurchaseMethod = None (allows re-purchase via G1-G3)
- currentCycle.IsCurrentCycle = false (ready for new cycle)
Note: membership.IsActive is intentionally preserved (Q19 — contract is one-time).
Features are preserved — DIFF will be applied on next purchase (Q20).
2026-02-25 21:59:30 +03:30
masoodafar-web
13dd0f552f
refactor: archive 12 dead gRPC RPCs with [ARCHIVED] markers
...
Archived RPCs (code preserved, marked obsolete):
- fms.proto: excluded from csproj (CreateNewFileInfo, DeleteFileInfo)
- UserOrderService: GetOrdersByDateRange, CreateNewOrderForCustomer, SubmitOrderForCustomer
- ConfigurationService: DeactivateConfiguration, GetConfigurationHistory
- CityService: UpdateCity, DeleteCity
- HealthService: GetServiceHealth
- CategoryService: GetCategoryByIdForCustomer
- inventory.proto: BulkAdjustStock (no implementation existed)
All archived RPCs wrapped in #region [ARCHIVED] with [Obsolete] attributes.
No code deleted — archive only. Build passes with 0 errors.
2026-02-24 22:53:36 +03:30
masoodafar-web
8b9c317de6
fix: Phase 0 — critical bugs in package purchase handlers
...
B1: VerifyGoldenPackagePurchase — DiscountBalance was NOT charged (Amount × 2)
Now charges DiscountBalance same as all other handlers.
B2: VerifyGoldenPackagePurchase — UserPackagePurchase record was NOT created
Now creates UPP with OrderId and TransactionId.
B3: VerifyPackagePurchase — UserPackagePurchase record was NOT created
Now creates UPP after wallet charge.
B4: VerifyBasePackagePayment — UserPackagePurchase record was NOT created
Now creates UPP after wallet change log.
Also: VerifyGolden WalletChangeLog split into 2 logs (Balance + Discount)
to match the pattern used by VerifyPackagePurchase.
Transaction description changed from 'پکیج طلایی' to 'پکیج' (generic).
Impact: Only Daya Loan handler was creating UserPackagePurchase before.
Now all 4 payment paths create it consistently.
2026-02-24 21:52:36 +03:30
masoodafar-web
cbaa20f339
fix: remove double ×10 Rial conversion in ZarinPalPaymentService
...
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
Root cause: FrontOffice already converts Toman→Rial (×10) before sending
to CMS. ZarinPalPaymentService was multiplying by 10 AGAIN, causing
amounts to be 10x too large.
Example: user enters 500K Toman → FO sends 5M Rial → CMS did ×10 → 50M
Rial sent to ZarinPal → showed 5M Toman instead of 500K.
Changes:
- ZarinPalPaymentService.InitiatePaymentAsync: remove ×10 (amount already Rial)
- ZarinPalPaymentService.VerifyPaymentWithAmountAsync: remove ×10 + accept Rial
- ZarinPalPaymentService.VerifyResult.Amount: return Rial (no /10 conversion)
- VerifyMagicWalletChargeCommandHandler: remove /10 before calling Verify
- PaymentCallbackController: update comments (amount is Rial)
- Also includes: improved HTTP error logging for non-200 responses
- Also includes: production URL fix (kbs1→kbs2)
2026-02-24 00:49:16 +03:30
masoodafar-web
e206b71186
fix: reduce discount order expiry from 30 to 15 minutes
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
2026-02-24 00:24:02 +03:30
masoodafar-web
0457ef6c7c
fix: validate discount wallet balance before applying discount in PlaceOrderCommandHandler
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m36s
2026-02-23 23:06:37 +03:30
masoodafar-web
f3ac5ad7df
fix: add missing UserWalletChangeLog for discount shop purchases and discount wallet charge
...
Bug: when buying from discount shop, DiscountBalance was deducted from DB
but no UserWalletChangeLog was created — making it invisible in wallet history.
Same issue existed for discount wallet top-up (charge).
Fixed in 3 handlers:
- PlaceOrderCommandHandler (fully paid by discount balance path)
- CompleteOrderPaymentCommandHandler (gateway + discount balance path)
- VerifyDiscountWalletChargeCommandHandler (discount wallet charge)
2026-02-23 22:59:00 +03:30
masoodafar-web
e72673c184
chore(staging): remove appsettings.Production.json — config comes from K8s Secret
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m42s
DO NOT cherry-pick this commit to production branch
2026-02-23 22:07:58 +03:30
masoodafar-web
9288d0640b
feat: externalize appsettings to K8s Secret — config persists independently of image rebuilds
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m57s
- Add cms-config.yaml (K8s Secret) for staging and production
- Mount appsettings.{Environment}.json from Secret into /app/
- Update CI/CD pipelines to apply Secret before Deployment
- Remove redundant env vars (Kestrel, FileStorage) — now in config file
2026-02-23 21:58:05 +03:30
masoodafar-web
de83c31346
fix: production uses namespace default + remove foursat namespace references
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m18s
2026-02-23 21:36:08 +03:30
masoodafar-web
f8dc4abd04
fix: staging ASPNETCORE_ENVIRONMENT=Staging, remove secretKeyRef (config in appsettings)
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m28s
2026-02-23 21:17:23 +03:30
masoodafar-web
2d6c95e6ee
fix: use local registry 194.5.195.53:30080 instead of git.se.kbs1.ir for image pull
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 11m28s
2026-02-23 20:58:16 +03:30
masoodafar-web
e41747afe0
fix: production ingress — add cms.kbs2.ir, use ingressClassName instead of annotation
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 12m6s
2026-02-23 20:41:12 +03:30
masoodafar-web
68da3f45a3
fix: staging uses namespace default, not foursat
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
2026-02-23 20:38:27 +03:30
masoodafar-web
3153fd8a74
feat: add PersistentVolume for CMS uploads + apply manifests in CI/CD
...
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 12m12s
- Add k8s/staging/ and k8s/production/ deployment manifests
- PVC 20Gi for /app/Uploads (file uploads persist across pod restarts)
- FileStorage__UploadPath env var set to /app/Uploads
- Replicas reduced to 1 (ReadWriteOnce PVC)
- Pipelines now: create namespace → apply manifests → restart/update
2026-02-23 20:11:56 +03:30
masoodafar-web
8cdb197ee7
chore: prevent appsettings.Production.json from merging — keep ours strategy
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m15s
2026-02-23 00:01:56 +03:30
masoodafar-web
2ca3fd29f9
feat: admin force activation — skip order/wallet checks for BackOffice
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m12s
- Proto: add force_activation field to ActivateClubMembershipRequest
- Command: add ForceActivation property
- Handler: wrap steps 2-5 in ForceActivation guard
- Skip PackagePurchaseMethod check (set to DirectPurchase if None)
- Skip wallet balance check
- Skip Magic wallet mode check
- Skip UserOrder/Transaction validation
- Proto NuGet bumped to 0.0.184
2026-02-22 23:51:39 +03:30
masoodafar-web
b9a72b4589
fix: environment-specific gateway config — staging=sandbox, production=real
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m37s
- appsettings.json/Staging.json: UseSandbox=true (sandbox mode for testing)
- appsettings.Production.json: UseSandbox=false, MerchantId=new production key
- Added SeedWorkers, Kestrel, Seq overrides to Production config
2026-02-22 22:18:51 +03:30
masoodafar-web
5c63dc6e38
feat: activate ZarinPal gateway with production MerchantId
...
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
- MerchantId: 4225d555-5fa9-4df0-9b61-1ce152cbbba8
- UseSandbox: false (production mode)
2026-02-22 22:12:02 +03:30
masoodafar-web
52f6af2091
feat: add user_name to wallet response + enrich via Users table
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m59s
- userwallet.proto: added string user_name = 5 to GetAllUserWalletByFilterResponseModel
- UserWalletService: enriches response with user names from Users table
- Proto version bumped to 0.0.183
2026-02-22 22:02:54 +03:30
masoodafar-web
e3fbd45739
fix: expand DiscountProducts.FullInformation from nvarchar(2000) to nvarchar(max) — HTML content was getting truncated
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m17s
2026-02-22 21:44:03 +03:30
masoodafar-web
0fe4db5e77
fix: StockMovement CHECK constraint violation — store Quantity as negative for reduce operations, pass correct MovementType from RecordLoss
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
2026-02-22 21:38:20 +03:30
masoodafar-web
305b8d3fd8
feat: add MagicWalletCycleSeedService — one-time BackgroundService to seed ClubMembershipCycle for existing active memberships, controlled via appsettings SeedWorkers:MagicWalletCycleSeed:Enabled
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m36s
2026-02-22 21:14:09 +03:30
masoodafar-web
df976b7b80
fix: Update project version to 0.0.182
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 9m5s
2026-02-22 20:48:26 +03:30
masoodafar-web
b90aa50fac
feat: ChargeDiscountWallet - callback endpoint, gRPC RPC & service implementation
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 10m43s
- Add /api/wallet/verify-discount-charge callback endpoint in PaymentCallbackController
- Add InitiateDiscountCharge RPC + request/response messages in userwallet.proto
- Add InitiateDiscountCharge gRPC service override in UserWalletService
- Add ChargeDiscountWallet using import for handler resolution
2026-02-22 20:22:44 +03:30
masoodafar-web
58d419ced3
feat: Magic Wallet Phase 6 + Daya restriction + purchase cycle count
...
- ActivateClubMembershipCommandHandler: block activation in Magic mode
- CheckAndProcessDayaLoansCommandHandler: reject Daya after first cycle
- userwallet.proto: add purchase_cycle_count to GetMagicWalletStatusResponse
- UserWalletService: query ClubMembershipCycles count for cycle info
- EF Migration u21: ClubMembershipCycle table + UserWallet Magic fields
2026-02-22 20:04:13 +03:30
masoodafar-web
bdd2c51726
fix: Update project version to 0.0.181 and adjust NuGet package path
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
2026-02-21 20:37:14 +03:30
masoodafar-web
2a569a024f
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.
2026-02-21 19:50:28 +03:30
masoodafar-web
04e8c49fa7
fix: IPG DiscountBalance should be 2× BasePackageAmount (112M not 56M)
...
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 7m44s
Both VerifyBasePackagePayment and VerifyPackagePurchase handlers were
charging DiscountBalance with 1× amount instead of 2×.
Now consistent with DayaLoan and ManualPayment handlers.
- VerifyBasePackagePaymentCommandHandler: DiscountBalance += BasePackageAmount * 2
- VerifyPackagePurchaseCommandHandler: DiscountBalance += order.Amount * 2
- Change logs updated to reflect correct 2× discount value
2026-02-18 23:12:03 +03:30
masoodafar-web
f968a6c005
docs: move README to totalDoc, replace with placeholder
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 7m50s
2026-02-18 21:44:46 +03:30