This commit is contained in:
adueck 2022-10-12 23:51:42 +05:00
parent efe8247fde
commit af9a466c68
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ paymentRouter.use((req, res, next) => {
}); });
paymentRouter.post("/create-checkout-session", async (req, res, next) => { paymentRouter.post("/create-checkout-session", async (req, res, next) => {
console.log("with key", env.stripeSecretKey);
try { try {
const prices = await stripe.prices.list({ const prices = await stripe.prices.list({
lookup_keys: [req.body.lookup_key], lookup_keys: [req.body.lookup_key],
@ -44,7 +45,7 @@ paymentRouter.post("/create-checkout-session", async (req, res, next) => {
} }
res.redirect(303, session.url); res.redirect(303, session.url);
} catch (err) { } catch (err) {
console.log(err); console.error(err);
return next("error connection to Stripe"); return next("error connection to Stripe");
} }
}); });