{"id":1950,"date":"2025-10-22T16:11:14","date_gmt":"2025-10-22T16:11:14","guid":{"rendered":"https:\/\/www.getuniqu.com\/%d0%be%d0%bf%d0%bb%d0%b0%d1%82%d1%83-%d0%b7%d0%b4%d1%96%d0%b9%d1%81%d0%bd%d0%b5%d0%bd%d0%be\/"},"modified":"2026-03-10T03:14:54","modified_gmt":"2026-03-10T03:14:54","slug":"%d0%be%d0%bf%d0%bb%d0%b0%d1%82%d1%83-%d0%b7%d0%b4%d1%96%d0%b9%d1%81%d0%bd%d0%b5%d0%bd%d0%be","status":"publish","type":"page","link":"https:\/\/www.getuniqu.com\/uk\/%d0%be%d0%bf%d0%bb%d0%b0%d1%82%d1%83-%d0%b7%d0%b4%d1%96%d0%b9%d1%81%d0%bd%d0%b5%d0%bd%d0%be\/","title":{"rendered":"\u041e\u043f\u043b\u0430\u0442\u0443 \u0437\u0434\u0456\u0439\u0441\u043d\u0435\u043d\u043e"},"content":{"rendered":"\n<div style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; text-align: center; padding: 3rem; max-width: 500px; margin: 4rem auto; background: white; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.1);\">\n    <div style=\"width: 80px; height: 80px; background: #10b981; border-radius: 50%; margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: center; font-size: 48px; color: white;\">\u2713<\/div>\n    <h1 style=\"color: #1f2937; font-size: 28px; margin: 0 0 0.5rem;\">\u041e\u043f\u043b\u0430\u0442\u0443 \u0443\u0441\u043f\u0456\u0448\u043d\u043e \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043e!<\/h1>\n    <p style=\"color: #6b7280; font-size: 16px; margin: 0 0 1rem;\">\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0454\u043c\u043e \u0442\u0435\u0431\u0435 \u0434\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043e\u0431\u043b\u0456\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0443&#8230;<\/p>\n    <div style=\"width: 40px; height: 40px; border: 4px solid #e5e7eb; border-top-color: #667eea; border-radius: 50%; animation: spin 1s linear infinite; margin: 1.5rem auto;\"><\/div>\n<\/div>\n\n<style>\n    @keyframes spin {\n        to { transform: rotate(360deg); }\n    }\n<\/style>\n\n<script>\nconsole.log('\ud83d\udd04 Payment success page loaded');\n\n\/\/ Get plan from URL\nconst urlParams = new URLSearchParams(window.location.search);\nconst plan = urlParams.get('plan') || 'core';\nconst session = urlParams.get('session');\n\n\/\/ Detect provider: check URL parameter first, then fallback to session presence\nlet provider = urlParams.get('provider');\nif (!provider) {\n    \/\/ Fallback: if we have a session parameter, it's likely PPG (LS doesn't use session)\n    provider = session ? 'payproglobal' : 'lemonsqueezy';\n}\n\nconsole.log('\ud83d\udce6 Plan:', plan);\nconsole.log('\ud83d\udcb3 Provider:', provider);\nconsole.log('\ud83c\udfab Session:', session);\n\n\/\/ BREAK OUT OF IFRAME: Only for PayProGlobal (LS doesn't use iframes)\nif (provider === 'payproglobal' && window.top !== window.self) {\n    console.log('\ud83d\udeaa Breaking out of PayProGlobal iframe');\n    \/\/ Get the current URL and redirect the top window\n    const currentUrl = window.location.href;\n    window.top.location.href = currentUrl;\n    \/\/ Stop execution here - the page will reload outside iframe\n} else {\n    \/\/ Original logic for non-iframe or LemonSqueezy\n    \/\/ Retrieve session token from localStorage (same domain as marketing site)\n    const sessionToken = localStorage.getItem('uniqu_checkout_session');\n\n    if (sessionToken) {\n        console.log('\u2705 Session token found:', sessionToken);\n        \n        \/\/ Build redirect URL with token\n        const redirectUrl = `https:\/\/app.getuniqu.com\/create-account?plan=${plan}&token=${sessionToken}`;\n        \n        console.log('\ud83d\udd17 Redirecting to:', redirectUrl);\n        \n        \/\/ Redirect after short delay (allows user to see success message)\n        setTimeout(() => {\n            \/\/ Break out of iframe only for PayProGlobal\n            if (provider === 'payproglobal' && window.top !== window.self) {\n                window.top.location.href = redirectUrl;\n            } else {\n                window.location.href = redirectUrl;\n            }\n        }, 1500);\n        \n    } else {\n        console.error('\u274c No session token found in localStorage');\n        \n        \/\/ Redirect anyway after 3 seconds (they can still create account)\n        setTimeout(() => {\n            const fallbackUrl = `https:\/\/app.getuniqu.com\/create-account?plan=${plan}`;\n            \/\/ Break out of iframe only for PayProGlobal\n            if (provider === 'payproglobal' && window.top !== window.self) {\n                window.top.location.href = fallbackUrl;\n            } else {\n                window.location.href = fallbackUrl;\n            }\n        }, 3000);\n    }\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\u2713 \u041e\u043f\u043b\u0430\u0442\u0443 \u0443\u0441\u043f\u0456\u0448\u043d\u043e \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043e! \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0454\u043c\u043e \u0442\u0435\u0431\u0435 \u0434\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043e\u0431\u043b\u0456\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0443&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_analytify_skip_tracking":false,"footnotes":""},"class_list":["post-1950","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.getuniqu.com\/uk\/wp-json\/wp\/v2\/pages\/1950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.getuniqu.com\/uk\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.getuniqu.com\/uk\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.getuniqu.com\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.getuniqu.com\/uk\/wp-json\/wp\/v2\/comments?post=1950"}],"version-history":[{"count":3,"href":"https:\/\/www.getuniqu.com\/uk\/wp-json\/wp\/v2\/pages\/1950\/revisions"}],"predecessor-version":[{"id":504921,"href":"https:\/\/www.getuniqu.com\/uk\/wp-json\/wp\/v2\/pages\/1950\/revisions\/504921"}],"wp:attachment":[{"href":"https:\/\/www.getuniqu.com\/uk\/wp-json\/wp\/v2\/media?parent=1950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}