Elffuss BraidHub

kikocis/clonagent public

main · 340 BRawPermalink
1// Thin wrapper around the Stripe SDK.
2// All Stripe calls go through here so the rest of the app stays clean.
3let _stripe;
4
5function getStripe() {
6 if (!_stripe) {
7 if (!process.env.STRIPE_SECRET_KEY) return null;
8 _stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
9 }
10 return _stripe;
11}
12
13module.exports = { getStripe };