-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
29 lines (27 loc) · 1.71 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wix to GPT Project</title>
</head>
<body>
<h1>Welcome to Wix to GPT Project</h1>
<button onclick="redirectToBuyNow()">Buy Now</button>
<script>
async function redirectToBuyNow() {
try {
const response = await fetch("https://your-heroku-app-url.com/get-buy-now");
const data = await response.json();
if (data.url) {
window.location.href = data.url;
} else {
alert("Buy Now link not found");
}
} catch (error) {
console.error("Error:", error);
}
}
</script>
</body>
</html>