ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/charityOnMe / netlify/functions/create-checkout-session.mjs

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/charityOnMe / netlify/functions/create-checkout-session.mjs
DateNot specified in source
RepositoryJanady13/charityOnMe
Revision1f6af2bae18f29d03d4542e9eb03554cb1c88886
Branchmain
Path or archive membernetlify/functions/create-checkout-session.mjs
Original SHA-256782cbf75617b9c3672051fe21c7118538e466e1705fba7224fa20dd3921cf72b
Git blob SHA3392936818168373b57300089e03bbb4367df779
Reading-copy SHA-256782cbf75617b9c3672051fe21c7118538e466e1705fba7224fa20dd3921cf72b

Original source ↗

Recovered source transcript

import Stripe from "stripe"; const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { apiVersion: "2024-06-20" }); export async function handler(event) { if (event.httpMethod !== "POST") return { statusCode: 405, body: "Method Not Allowed" }; try { const { priceId = process.env.PRICE_ID_ONE_TIME, quantity = 1, mode = "payment", metadata } = JSON.parse(event.body || "{}"); const session = await stripe.checkout.sessions.create({ mode, line_items: [{ price: priceId, quantity }], success_url: `${process.env.DOMAIN}/donate-success.html?session_id={CHECKOUT_SESSION_ID}`, cancel_url: `${process.env.DOMAIN}/donate-cancel.html`, billing_address_collection: "auto", allow_promotion_codes: true, metadata }); return { statusCode: 200, body: JSON.stringify({ url: session.url }) }; } catch (err) { return { statusCode: 500, body: JSON.stringify({ error: err.message }) }; } }

Search equations, builds, manuscript text, and recovered sources.