Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update route.ts

Steven Teye784193616a9
diff --git a/apps/web/app/api/stripe/integration/webhook/route.ts b/apps/web/app/api/stripe/integration/webhook/route.ts
index fc9cd0f704..28b7f869ac 100644
--- a/apps/web/app/api/stripe/integration/webhook/route.ts
+++ b/apps/web/app/api/stripe/integration/webhook/route.ts
@@ -20,9 +20,9 @@ export const POST = withAxiom(
const { livemode } = JSON.parse(buf);
const sig = req.headers.get("Stripe-Signature");
- const webhookSecret = livemode
- ? process.env.STRIPE_APP_WEBHOOK_SECRET
- : process.env.STRIPE_APP_WEBHOOK_SECRET_TEST;
+ const webhookSecret = !livemode
+ ? process.env.STRIPE_APP_WEBHOOK_SECRET_TEST
+ : process.env.STRIPE_APP_WEBHOOK_SECRET;
if (!sig || !webhookSecret) {
return new Response("Invalid request", {