From fe3edd178d36048eb0c885c1d1dbb5cab785e761 Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Wed, 25 Feb 2026 21:59:30 +0330 Subject: [PATCH] =?UTF-8?q?fix(B6):=20EXIT=20Magic=20Mode=20=E2=80=94=20re?= =?UTF-8?q?set=20PackagePurchaseMethod=20+=20close=20current=20cycle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- src/CMSMicroservice.WebApi/Services/UserOrderService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/CMSMicroservice.WebApi/Services/UserOrderService.cs b/src/CMSMicroservice.WebApi/Services/UserOrderService.cs index e8c9e53..c55abcc 100644 --- a/src/CMSMicroservice.WebApi/Services/UserOrderService.cs +++ b/src/CMSMicroservice.WebApi/Services/UserOrderService.cs @@ -358,6 +358,13 @@ public class UserOrderService : UserOrderContract.UserOrderContractBase if (currentCycle != null) { currentCycle.MagicCompletedAt = DateTime.UtcNow; + currentCycle.IsCurrentCycle = false; + } + + // B6 fix: ریست PackagePurchaseMethod تا Guards G1-G3 خرید مجدد را مسدود نکنند + if (user != null) + { + user.PackagePurchaseMethod = PackagePurchaseMethod.None; } } else if (wallet.WalletMode == WalletMode.Normal