Skip to content

Commit 013c854

Browse files
committed
Stripe Config
1 parent 61c2cc8 commit 013c854

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

config/default.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,5 +265,8 @@ module.exports = {
265265
// The interview completed past time for fetching interviews
266266
INTERVIEW_COMPLETED_PAST_TIME: process.env.INTERVIEW_COMPLETED_PAST_TIME || 'PT4H',
267267
// The time before resource booking expiry when we should start sending notifications
268-
RESOURCE_BOOKING_EXPIRY_TIME: process.env.RESOURCE_BOOKING_EXPIRY_TIME || 'P21D'
268+
RESOURCE_BOOKING_EXPIRY_TIME: process.env.RESOURCE_BOOKING_EXPIRY_TIME || 'P21D',
269+
// The Stripe
270+
STRIPE_SECRET_KEY: process.env.STRIPE_SECRET_KEY,
271+
CURRENCY: process.env.CURRENCY || 'usd'
269272
}

src/services/TeamService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const { getAuditM2Muser } = require('../common/helper')
1919
const { matchedSkills, unMatchedSkills } = require('../../scripts/emsi-mapping/esmi-skills-mapping')
2020
const Role = models.Role
2121
const RoleSearchRequest = models.RoleSearchRequest
22-
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);
22+
const stripe = require("stripe")(config.STRIPE_SECRET_KEY);
2323

2424
const emailTemplates = helper.getEmailTemplatesForKey('teamTemplates')
2525

@@ -1174,7 +1174,7 @@ suggestMembers.schema = Joi.object().keys({
11741174
async function createPayment(totalAmount) {
11751175
const paymentIntent = await stripe.paymentIntents.create({
11761176
amount: totalAmount,
1177-
currency: process.env.CURRENCY,
1177+
currency: config.CURRENCY,
11781178
});
11791179
return { paymentIntentToken: paymentIntent.client_secret };
11801180
}

0 commit comments

Comments
 (0)