fix(recovery): restore source removed by production documentation merge

This commit is contained in:
2026-11-10 03:42:10 +01:00
parent 585bdd4b44
commit 3d2fc6f913
957 changed files with 115754 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import Stripe from "stripe";
// Lazy, env-guarded Stripe client. Returns null when STRIPE_SECRET_KEY is unset
// so the app builds/runs without keys; payment routes 501 until configured.
let _stripe: Stripe | null = null;
export function getStripe(): Stripe | null {
const key = process.env.STRIPE_SECRET_KEY;
if (!key) return null;
if (!_stripe) _stripe = new Stripe(key);
return _stripe;
}