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 install url

Steven Tey85c7703b8342
diff --git a/apps/web/lib/integrations/stripe/install.ts b/apps/web/lib/integrations/stripe/install.ts
index 1495b0e5b3..1b23d8ef81 100644
--- a/apps/web/lib/integrations/stripe/install.ts
+++ b/apps/web/lib/integrations/stripe/install.ts
@@ -1,4 +1,5 @@
import { APP_DOMAIN_WITH_NGROK } from "@dub/utils";
+import { get } from "@vercel/edge-config";
import { nanoid } from "nanoid";
import { redis } from "../../upstash";
import z from "../../zod";
@@ -21,7 +22,12 @@ export const getStripeInstallationUrl = async (workspaceId: string) => {
);
}
- const { STRIPE_APP_INSTALL_URL } = env.data;
+ // const { STRIPE_APP_INSTALL_URL } = env.data;
+
+ const STRIPE_APP_INSTALL_URL = (await get("stripeAppUrl"))![
+ process.env.NODE_ENV === "production" ? "production" : "development"
+ ];
+
const url = new URL(STRIPE_APP_INSTALL_URL);
url.searchParams.set(
"redirect_uri",