on-internet
← Community

500 Internal Server Error using stripe for CheckoutForm in Nextjs

Stack Overflow ·

I am following a tutorial to create an e-commerce website. I try to use stripe for creating a checkout form, but I get a runtime error. I do not know how to solve this problem. app/(customerFacing)/products/\[id\]/purchase/page.tsx: import db from "@/lib/prisma"; import { notFound } from "next/navigation"; import Stripe from "stripe"; import { CheckoutForm } from "./_components/CheckoutForm"; const stripe = new Stripe(process.env.STRIPE_SECRET_KEY as string); export default async function PurchasePage({ params, }: { params: { id: string }; }) { const { id } = await params; const product = awai

Comments

Sign in or sign up to comment and upvote.

No comments yet.