Processing Stripe Dance Payments

This commit is contained in:
metacryst
2025-12-07 22:01:37 -06:00
parent 9a1aa55297
commit 279be987a4
11 changed files with 152 additions and 420 deletions

View File

@@ -51,8 +51,11 @@ class Events extends Shadow {
.border("1px solid #ab2f007d")
.background('var(--green)')
.marginLeft("auto")
.onClick(() => {
window.open("https://app.fluidpay.com/spp/hyperia-winter-ball?add_products=d4o523v0i47c3987j320:1:35.00", "_blank");
.onClick(async function() {
this.innerText = "Loading..."
const res = await fetch("/create-checkout-session", { method: "POST" });
const data = await res.json();
window.location = data.url;
})
})
.gap(3, em)

View File

@@ -4,6 +4,7 @@ import "./Why.js"
import "./Events.js"
import "./Join.js"
import "./SignIn.js"
import "./Success.js"
class Home extends Shadow {
render() {
@@ -38,7 +39,7 @@ class Home extends Shadow {
.maxWidth(isMobile() ? 0.8 : 100, em)
if(!isMobile()) {
let text = "A Classical Christian Association"
let text = "A Classical Christian Network"
p(isMobile() ? text : text.toUpperCase())
.x(50, vw).yBottom(isMobile() ? 1 : 3, vh)
.center()
@@ -57,6 +58,9 @@ class Home extends Shadow {
case "/join":
Join()
break;
case "/success":
Success()
break;
default:
if(window.location.pathname.startsWith("/signup")) {

View File

@@ -0,0 +1,9 @@
class Success extends Shadow {
render() {
p("Thanks for your purchase! You will receive a confirmation email shortly. <br><br> <b>Keep that email; it will be checked at the door.</b>")
.x(50, vw).y(50, vh)
.center()
}
}
register(Success)

View File

@@ -1,20 +1,5 @@
See https://github.com/return-to-the-land/go-backend for instructions.
# Installs
# Style Guidelines
- Font size is defined in the index.html. Only use rem as a unit.
Stripe CLI
# Documentation
```go install golang.org/x/tools/cmd/godoc@latest```
```$HOME/go/bin/godoc -http=:6060``` (to run on Mac)
Fix Redirect Issues:
Have the go server determine redirect, generate a random URL from it
When random url is accessed by frontend -> redirect to home
# Resources
Convert image to webp (so it's smaller)
https://www.freeconvert.com/jpg-to-webp/download
stripe listen --forward-to localhost:3003/webhook