#aced0001
1 messages · Page 1 of 1 (latest)
hi! what's the problem exactly?
("use strict");
// import Stripe from "stripe";
// const stripe = new Stripe(process.env.STRIPE_KEY,
// {
// apiVersion: "2023-08-16"
// });
const stripe = require('stripe')(process.env.STRIPE_KEY);
/**
- order controller
*/
const { createCoreController } = require("@strapi/strapi").factories;
this is the code snippet
and this is the problem
This expression is not callable.
Type 'typeof import("stripe")' has no call signatures.
the commented part is another method I tried to use stripe but then I got a error while trying to run the server by 'npm run develop' where the server couldn't be connected because "import statement can't be used outside a module"
Hey! Taking over for my colleague. Check this complete project for a sample nextjs integration:
https://github.com/vercel/next.js/tree/canary/examples/with-stripe-typescript
You may be interested in particular to this file:
https://github.com/vercel/next.js/blob/canary/examples/with-stripe-typescript/app/actions/stripe.ts
I don't have typescript enabled will that cause problems?
No this has no link to Typescript or not
oh ok will check it out thank you