Initial commit

This commit is contained in:
Developer
2026-02-06 21:44:04 -06:00
commit f85e93c7a6
151 changed files with 22916 additions and 0 deletions

13
lib/stripe.ts Normal file
View File

@@ -0,0 +1,13 @@
import Stripe from "stripe";
import { loadSystemConfig } from "./system-config";
let stripe: Stripe | null = null;
export async function getStripe() {
if (stripe) return stripe;
const cfg = await loadSystemConfig();
const key = cfg.stripe?.secretKey || process.env.STRIPE_SECRET_KEY;
if (!cfg.stripe?.enabled || !key) return null;
stripe = new Stripe(key, { apiVersion: "2024-06-20" as any });
return stripe;
}