mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
Refactored stripe checkout (#10345)
* Refactored stripe checkout * Fixed dependency injection cache
This commit is contained in:
14
website/server/libs/payments/stripe/api.js
Normal file
14
website/server/libs/payments/stripe/api.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import stripeModule from 'stripe';
|
||||
import nconf from 'nconf';
|
||||
|
||||
let stripe = stripeModule(nconf.get('STRIPE_API_KEY'));
|
||||
|
||||
function setStripeApi (stripeInc) {
|
||||
stripe = stripeInc;
|
||||
}
|
||||
|
||||
function getStripeApi () {
|
||||
return stripe;
|
||||
}
|
||||
|
||||
module.exports = { getStripeApi, setStripeApi };
|
||||
Reference in New Issue
Block a user