Skip to content

Commit

Permalink
Merge .env and .env.local
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpiontornado committed Jun 21, 2024
1 parent 385705d commit cb5d1ac
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 11 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
STRIPE_TEST_KEY=insert stripe test secret: sk_test...
# From https://docs.stripe.com/checkout/embedded/quickstart?client=next#set-env-vars

# Copy into .env and replace the placeholder values with the real keys.
# https://dashboard.stripe.com/apikeys
# https://dashboard.stripe.com/test/apikeys
# https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_12345
STRIPE_SECRET_KEY=sk_test_12345

# Set this environment variable to support webhooks — https://stripe.com/docs/webhooks#verify-events
# STRIPE_WEBHOOK_SECRET=whsec_12345
10 changes: 0 additions & 10 deletions .env.local.example

This file was deleted.

2 changes: 1 addition & 1 deletion pages/merch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Repo = {
export const getServerSideProps = async () => {
// Ideally should be moved out to not initialise on every render
// eslint-disable-next-line @typescript-eslint/no-var-requires
const stripe: Stripe = require("stripe")(process.env["STRIPE_TEST_KEY"]);
const stripe: Stripe = require("stripe")(process.env["STRIPE_SECRET_KEY"]);

const { products, variants } = await getAllProductsAndVariants(stripe);
const prices = await getAllPrices(stripe);
Expand Down

0 comments on commit cb5d1ac

Please sign in to comment.