-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f64f65
commit b2b4726
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import Stripe from 'stripe'; | ||
|
||
if (!process.env.STRIPE_SECRET_KEY) { | ||
if (!process.env.NEXT_PUBLIC_STRIPE_SECRET_KEY) { | ||
throw new Error('STRIPE_SECRET_KEY is not set in the environment variables'); | ||
} | ||
|
||
export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { | ||
export const stripe = new Stripe(process.env.NEXT_PUBLIC_STRIPE_SECRET_KEY, { | ||
apiVersion: '2024-06-20', // Use the latest API version or the one you prefer | ||
}); |