inital check in

This commit is contained in:
2025-03-07 12:15:48 -06:00
parent 1a571d2f8b
commit cdbbea7711
56 changed files with 1988 additions and 0 deletions

24
schasite/static/main.js Normal file
View File

@@ -0,0 +1,24 @@
// static/main.js
console.log("Sanity Check");
fetch("/schasite/config/")
.then((result) => {return result.json(); })
.then((data) => {
const stripe = Stripe(data.publicKey);
// Event Handler
document.querySelector("#submitBtn").addEventListener("click", () => {
// Get Checkout Session ID
fetch("/schasite/create-checkout-session/")
.then((result) => { return result.json(); })
.then((data) => {
console.log(data);
// Redirect to Stripe Checkout
return stripe.redirectToCheckout({sessionId: data.sessionId})
})
.then((res) => {
console.log(res);
});
});
});