Refactored stripe checkout (#10345)

* Refactored stripe checkout

* Fixed dependency injection cache
This commit is contained in:
Keith Holliday
2018-05-19 10:31:26 -05:00
committed by GitHub
parent 25d07ac0ce
commit 04d7ff13de
6 changed files with 203 additions and 135 deletions

View 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 };