create cancel.html + update add.html webhook URL

This commit is contained in:
Oliver
2026-06-09 05:42:38 -03:00
parent aab016c8b7
commit d0d9f7f95e
2 changed files with 569 additions and 1 deletions
+1 -1
View File
@@ -516,7 +516,7 @@
<script> <script>
// ── Signup Webhook URLs (matching app.derez.ai) ────────── // ── Signup Webhook URLs (matching app.derez.ai) ──────────
const ORDER_WEBHOOK = "https://n8n.derez.ai/webhook/5318a0d8-d064-42fb-95b7-aa5552cb3fa9"; const ORDER_WEBHOOK = "https://n8n.derez.ai/webhook/payment";
/* ── Period / billing update ──────────────────────────── */ /* ── Period / billing update ──────────────────────────── */
function updatePeriodDisplay() { function updatePeriodDisplay() {
+568
View File
@@ -0,0 +1,568 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Subscription Issue — Derez.ai</title>
<meta name="robots" content="noindex, nofollow" />
<style>
/* ── Design Tokens (matches derez.ai system) ─────────────── */
:root {
--bg: #000810;
--bg-card: #010f20;
--bg-inner: #000d1a;
--bg-hover: #001a30;
--bg-input: #000813;
--border: #0a3060;
--border-hi: rgba(0,245,255,0.45);
--accent: #00f5ff;
--accent-dim: #002535;
--danger: #ff3b3b;
--danger-dim: #3b0000;
--success: #00ff88;
--warning: #ffaa00;
--text: #c8f0ff;
--text-muted: #2e6a80;
--radius: 8px;
--radius-card: 18px;
--shadow: 0 0 0 1px rgba(0,245,255,0.25), 0 0 60px rgba(0,245,255,0.12), 0 28px 72px rgba(0,0,0,0.9);
--max-width: 520px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
font-family: "Courier New", Courier, monospace;
background: var(--bg);
color: var(--text);
font-size: 14px;
line-height: 1.6;
overflow-x: hidden;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
body::before {
content: "";
position: fixed;
inset: 0;
background:
radial-gradient(ellipse 60% 50% at 25% 30%, rgba(0, 245, 255, 0.06) 0%, transparent 70%),
radial-gradient(ellipse 50% 60% at 75% 70%, rgba(0, 200, 255, 0.04) 0%, transparent 70%);
pointer-events: none;
z-index: 0;
}
.card {
position: relative;
z-index: 1;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-card);
padding: 48px 40px 40px;
max-width: var(--max-width);
width: 92%;
margin: 24px;
box-shadow: var(--shadow);
text-align: center;
}
/* ── Icon ─────────────────────────────────── */
.card-icon {
width: 64px;
height: 64px;
border-radius: 50%;
background: var(--danger-dim);
border: 2px solid var(--danger);
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 24px;
font-size: 30px;
}
h1 {
font-size: clamp(1.4rem, 4vw, 1.8rem);
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.3;
margin-bottom: 12px;
}
.sub {
color: var(--text-muted);
font-size: 14px;
line-height: 1.7;
margin-bottom: 32px;
max-width: 400px;
margin-left: auto;
margin-right: auto;
}
.sub strong { color: var(--text); font-weight: 600; }
/* ── Buttons ───────────────────────────────── */
.actions {
display: flex;
flex-direction: column;
gap: 12px;
align-items: center;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 12px 28px;
border-radius: var(--radius);
border: none;
cursor: pointer;
font-size: 14px;
font-weight: 600;
text-decoration: none;
transition: opacity 0.15s, background 0.15s, transform 0.1s;
min-width: 240px;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary {
background: transparent;
color: #fff;
border: 1px solid var(--accent);
box-shadow: 0 0 8px rgba(0,245,255,0.35), inset 0 0 8px rgba(0,245,255,0.04);
}
.btn-primary:hover {
background: rgba(0,245,255,0.08);
box-shadow: 0 0 14px rgba(0,245,255,0.5), inset 0 0 10px rgba(0,245,255,0.06);
}
.btn-chat {
background: transparent;
color: var(--text-muted);
border: 1px solid var(--border);
}
.btn-chat:hover {
color: var(--text);
border-color: var(--accent);
background: var(--bg-hover);
}
.btn-home {
background: transparent;
color: var(--text-muted);
border: none;
font-size: 13px;
}
.btn-home:hover {
color: var(--accent);
opacity: 1;
}
.divider {
width: 100%;
max-width: 280px;
display: flex;
align-items: center;
gap: 16px;
color: var(--text-muted);
font-size: 11px;
font-weight: 500;
}
.divider::before,
.divider::after {
content: "";
flex: 1;
height: 1px;
background: var(--border);
}
/* ── Chat Widget (embedded) ────────────────── */
.chat-fab {
position: fixed;
bottom: 28px;
right: 28px;
z-index: 9999;
width: 60px;
height: 60px;
border-radius: 50%;
background: linear-gradient(135deg, #00f5ff, #0099cc);
border: none;
cursor: pointer;
box-shadow: 0 4px 24px rgba(0, 245, 255, 0.4), 0 0 0 0 rgba(0, 245, 255, 0.35);
display: flex;
align-items: center;
justify-content: center;
font-size: 26px;
color: #000;
transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s;
animation: fabPulse 2.5s ease-in-out infinite;
}
@keyframes fabPulse {
0%, 100% { box-shadow: 0 4px 24px rgba(0, 245, 255, 0.4), 0 0 0 0 rgba(0, 245, 255, 0.35); }
50% { box-shadow: 0 4px 32px rgba(0, 245, 255, 0.55), 0 0 0 12px rgba(0, 245, 255, 0); }
}
.chat-fab:hover {
transform: scale(1.12) rotate(-8deg);
box-shadow: 0 6px 36px rgba(0, 245, 255, 0.5);
animation: none;
}
.chat-fab:active { transform: scale(0.92); }
.chat-fab.open {
transform: scale(0.88);
opacity: 0.6;
animation: none;
}
.chat-widget {
position: fixed;
bottom: 100px;
right: 28px;
z-index: 9998;
width: 380px;
max-width: calc(100vw - 56px);
height: 520px;
max-height: calc(100vh - 160px);
background: rgba(1, 15, 32, 0.92);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(0, 245, 255, 0.25);
border-radius: 22px;
box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 40px rgba(0, 245, 255, 0.06);
overflow: hidden;
display: flex;
flex-direction: column;
opacity: 0;
visibility: hidden;
transform: translateY(16px) scale(0.94);
transform-origin: bottom right;
transition: opacity 0.3s cubic-bezier(.22,1,.36,1), transform 0.35s cubic-bezier(.22,1,.36,1), visibility 0.3s;
}
.chat-widget.open {
opacity: 1;
visibility: visible;
transform: translateY(0) scale(1);
}
.chat-widget::before {
content: '';
position: absolute;
inset: 0;
border-radius: 22px;
padding: 1px;
background: linear-gradient(135deg, rgba(0, 245, 255, 0.35), rgba(0, 153, 204, 0.15), rgba(0, 245, 255, 0.35));
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
pointer-events: none;
}
.chat-header {
display: flex;
align-items: center;
gap: 12px;
padding: 18px 20px 14px;
background: linear-gradient(135deg, rgba(0, 245, 255, 0.08), rgba(0, 153, 204, 0.04));
border-bottom: 1px solid rgba(0, 245, 255, 0.12);
}
.chat-header-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent-dim), #002535);
border: 2px solid var(--accent);
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
flex-shrink: 0;
position: relative;
}
.chat-header-avatar::after {
content: '';
position: absolute;
bottom: -1px;
right: -1px;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--success);
border: 2px solid var(--bg-card);
}
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name {
font-weight: 700;
font-size: 14px;
color: var(--text);
letter-spacing: -0.01em;
}
.chat-header-status {
font-size: 11px;
color: var(--success);
display: flex;
align-items: center;
gap: 5px;
}
.chat-header-status::before {
content: '';
width: 5px;
height: 5px;
border-radius: 50%;
background: var(--success);
display: inline-block;
animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
.chat-header-close {
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
font-size: 18px;
padding: 6px;
line-height: 1;
border-radius: 8px;
transition: color 0.15s, background 0.15s;
}
.chat-header-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.chat-msgs {
flex: 1;
overflow-y: auto;
padding: 16px 18px;
display: flex;
flex-direction: column;
gap: 10px;
scroll-behavior: smooth;
}
.chat-msgs::-webkit-scrollbar { width: 4px; }
.chat-msgs::-webkit-scrollbar-track { background: transparent; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.chat-input-row {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px 16px;
border-top: 1px solid rgba(0, 245, 255, 0.08);
background: rgba(0, 8, 16, 0.5);
}
.chat-input-box {
flex: 1;
min-width: 0;
padding: 10px 16px;
border: 1px solid var(--border);
border-radius: 22px;
outline: none;
background: var(--bg-input);
color: var(--text);
font-size: 13px;
transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-input-box:focus {
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(0, 245, 255, 0.1);
}
.chat-input-box::placeholder { color: var(--text-muted); }
.chat-send-btn {
width: 38px;
height: 38px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), #0099cc);
border: none;
cursor: pointer;
color: #000;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: opacity 0.15s, transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s;
box-shadow: 0 2px 12px rgba(0, 245, 255, 0.25);
}
.chat-send-btn:hover { opacity: 0.9; transform: scale(1.08); box-shadow: 0 4px 16px rgba(0, 245, 255, 0.35); }
.chat-send-btn:active { transform: scale(0.88); }
.chat-send-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.chat-msg {
max-width: 80%;
padding: 10px 14px;
border-radius: 16px;
line-height: 1.5;
word-wrap: break-word;
font-size: 13px;
animation: msgSlide 0.25s cubic-bezier(.22,1,.36,1);
}
@keyframes msgSlide {
from { opacity: 0; transform: translateY(8px) scale(0.97); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-msg-bot {
align-self: flex-start;
background: rgba(1, 15, 32, 0.8);
border: 1px solid rgba(0, 245, 255, 0.1);
border-bottom-left-radius: 4px;
}
.chat-msg-user {
align-self: flex-end;
background: linear-gradient(135deg, var(--accent), #0099cc);
color: #000;
border-bottom-right-radius: 4px;
}
.chat-msg-thinking {
align-self: flex-start;
background: rgba(1, 15, 32, 0.6);
border: 1px solid rgba(0, 245, 255, 0.08);
border-bottom-left-radius: 4px;
opacity: 0.5;
}
@media (max-width: 500px) {
.chat-widget {
right: 12px;
bottom: 84px;
width: calc(100vw - 24px);
max-height: calc(100vh - 120px);
}
.chat-fab {
right: 16px;
bottom: 20px;
width: 52px;
height: 52px;
font-size: 22px;
}
}
@media (max-width: 350px) {
.chat-widget { display: none; }
}
@media (max-width: 480px) {
.card { padding: 32px 24px 28px; }
.btn { min-width: 0; width: 100%; }
}
</style>
</head>
<body>
<!-- ── Main Card ──────────────────────────────── -->
<div class="card">
<div class="card-icon"></div>
<h1>Subscription Not Completed</h1>
<p class="sub">
Something went wrong while processing your subscription.
Don't worry — no charges were made. You can <strong>try again</strong>
or chat with our sales agent for help.
</p>
<div class="actions">
<a href="https://derez.ai#pricing" class="btn btn-primary">Try Again</a>
<div class="divider">or</div>
<button class="btn btn-chat" onclick="chatToggle()">💬 Chat with Sales Agent</button>
<a href="https://derez.ai" class="btn btn-home">← Back to homepage</a>
</div>
</div>
<!-- ── Chat Widget ────────────────────────────── -->
<button class="chat-fab" id="chat-fab" onclick="chatToggle()" aria-label="Chat with Sales Agent">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
</button>
<div class="chat-widget" id="chat-widget" aria-hidden="true">
<div class="chat-header">
<div class="chat-header-avatar"></div>
<div class="chat-header-info">
<div class="chat-header-name">Sales Agent</div>
<div class="chat-header-status">Online</div>
</div>
<button class="chat-header-close" onclick="chatClose()" aria-label="Close chat"></button>
</div>
<div class="chat-msgs" id="chat-msgs"></div>
<div class="chat-input-row">
<input type="text" class="chat-input-box" id="chat-input" placeholder="Ask your sales agent..." onkeydown="chatKey(event)" />
<button class="chat-send-btn" id="chat-send-btn" onclick="chatSend()"></button>
</div>
</div>
<script>
/* ── Chat Widget ──────────────────────────── */
const CHAT_URL = "https://n8n.derez.ai/webhook/a58d00c4-f0c9-40cd-bb50-4f45f0442ef0";
let chatId = null;
let chatOpen = false;
let chatBusy = false;
function chatToggle() {
chatOpen = !chatOpen;
document.getElementById('chat-widget').classList.toggle('open', chatOpen);
document.getElementById('chat-fab').classList.toggle('open', chatOpen);
document.getElementById('chat-widget').setAttribute('aria-hidden', !chatOpen);
if (chatOpen) {
if (!chatId) {
chatId = String(Math.floor(100000 + Math.random() * 900000));
chatAppendMsg('bot', "Hi! I'm your Sales Agent. I can help you with the subscription issue, answer questions about plans, or anything else. How can I help?");
}
setTimeout(function () { document.getElementById('chat-input').focus(); }, 300);
}
}
function chatClose() {
if (chatOpen) chatToggle();
}
function chatAppendMsg(role, text) {
var msgs = document.getElementById("chat-msgs");
var div = document.createElement("div");
div.className = "chat-msg chat-msg-" + role;
div.innerHTML = text.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
.replace(/\son\w+\s*=\s*"[^"]*"/gi, '')
.replace(/\son\w+\s*=\s*'[^']*'/gi, '');
msgs.appendChild(div);
msgs.scrollTop = msgs.scrollHeight;
return div;
}
function chatKey(e) {
if (e.key === "Enter") chatSend();
}
async function chatSend() {
var input = document.getElementById("chat-input");
var btn = document.getElementById("chat-send-btn");
var msg = input.value.trim();
if (!msg || chatBusy) return;
chatBusy = true;
chatAppendMsg("user", msg);
input.value = "";
btn.disabled = true;
btn.innerHTML = '<span style="opacity:0.6">…</span>';
var think = chatAppendMsg("bot", "…");
think.className = "chat-msg chat-msg-thinking";
try {
var res = await fetch(CHAT_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ message: msg, sessionId: chatId }),
});
var json = await res.json();
var first = Array.isArray(json) ? json[0] : json;
var reply = typeof json === "string"
? json
: (first && (first.output || first.message || first.reply || first.response || first.text)) ||
JSON.stringify(json);
think.remove();
chatAppendMsg("bot", reply);
} catch (err) {
think.remove();
chatAppendMsg("bot", "Sorry, I couldn't connect right now. Please try again later.");
} finally {
chatBusy = false;
btn.disabled = false;
btn.innerHTML = '➤';
document.getElementById("chat-input").focus();
}
}
</script>
</body>
</html>