Commits
Marek Vsechovsky committed cb17204c56f
Session 144, Step 35: Verify subscription purchase/upgrade updates correctly via Paddle - AIM-2674 Verify subscription purchase/upgrade updates correctly via Paddle Outcome: Fixed two root causes preventing immediate tier highlight after free→paid checkout: 1. **JS overlay checkout**: The `checkout.completed` event handler only stored data in sessionStorage but never applied the highlight. For overlay mode (no page reload), the post-checkout IIFE had already run and returned. Extracted shared `applyCheckoutResult()` function and call it directly from the event handler. 2. **Server pending state**: `CreateCheckoutSession` only set `SubscrPendingTierId` when an existing active subscription with `SubscrStatus == 1` and future `SubscrCurrentPeriodEnd` was found. Free-tier subscriptions may not have `SubscrCurrentPeriodEnd` set. Broadened the query to `SubscrStatus != 7` to match any non-expired subscription.