Skip to content

Commit

Permalink
chore: quick commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WomB0ComB0 committed Sep 26, 2024
1 parent 9f64f65 commit b2b4726
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/api/webhook/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
manageSubscriptionStatusChange
} from './admin';

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
const stripe = new Stripe(process.env.NEXT_PUBLIC_STRIPE_SECRET_KEY!, {
apiVersion: '2024-06-20',
});

Expand Down
4 changes: 2 additions & 2 deletions src/utils/stripe.ts
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
});

0 comments on commit b2b4726

Please sign in to comment.