diff --git a/odoo/upsell.html b/odoo/upsell.html index 3a30b01..e65ad3e 100644 --- a/odoo/upsell.html +++ b/odoo/upsell.html @@ -298,8 +298,6 @@ // ── Webhooks ───────────────────────────────────────────────────────────── const getContract_Webhook = "https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/0c8536be-d175-4740-8e78-123159193b23"; - const buy_webhook = - "https://002-001-5dd6e535-4d1c-46bc-9bd9-42ad4bc5f082.odoo4projects.com/webhook/2366cc41-bfd9-41c0-b9b4-bea1e60726f1"; // ── Plan hierarchy (index = tier, lower = cheaper) ──────────────────────── const PLAN_ORDER = [ @@ -337,37 +335,43 @@ const uuid = params.get("uuid") || ""; document.getElementById("uuidText").textContent = uuid || "–"; + // ── Product ID mapping ───────────────────────────────────────── + const PRODUCT_IDS = { + sidehustle: 54, + ontherise: 55, + powerhouse: 56, + }; + // ── Buy handler ─────────────────────────────────────────────────────────── - async function buyProduct(productId) { + function buyProduct(productId) { if (!uuid) { alert("Missing uuid parameter in URL."); return; } - try { - const res = await fetch(buy_webhook, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ uuid, product_id: productId }), - }); - if (!res.ok) throw new Error("HTTP " + res.status); - - document.body.innerHTML = ` -
- Please check your email for the payment link and confirmation.
- New features will be active as soon as the payment is complete.
-