Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
fix: stripe webhook error
Marc Seitze558790fd97f
diff --git a/components/emails/upgrade-plan.tsx b/components/emails/upgrade-plan.tsxindex b8e649a0..4bfeb864 100644--- a/components/emails/upgrade-plan.tsx+++ b/components/emails/upgrade-plan.tsx@@ -21,7 +21,7 @@ interface UpgradePlanEmailProps {const UpgradePlanEmail = ({name,- planType = "Pro",+ planType = "pro",}: UpgradePlanEmailProps) => {const previewText = `The document sharing infrastructure for the modern web`;@@ -30,22 +30,31 @@ const UpgradePlanEmail = ({"Custom branding","Unlimited link views","Folder organization",- "2 team members",+ "1 team member",],business: ["Custom domains on document links",- "Unlimited document uploads",- "1 data room for multi-file sharing",+ "Unlimited data rooms for multi-file sharing",+ "Advanced access controls","3 team members",],datarooms: ["Custom domains on data room links","Unlimited data rooms","Unlimited document uploads",+ "3 team members",+ ],+ "datarooms-plus": [+ "Custom domains on data room links",+ "Unlimited data rooms",+ "Q&A module","5 team members",],};+ const planTypeText = planType.toLowerCase();+ const planFeatures = features[planTypeText];+return (<Html><Head />@@ -63,7 +72,7 @@ const UpgradePlanEmail = ({Hey{name && ` ${name}`}!</Text><Text className="text-sm">- My name is Marc, and I'm the creator of Papermark. I wanted+ My name is Marc, and I'm the founder of Papermark. I wantedto personally reach out to thank you for upgrading to Papermark{" "}{planType}!</Text>@@ -82,21 +91,30 @@ const UpgradePlanEmail = ({<Text className="text-sm leading-6 text-black">On the {planType} plan, you now have access to:</Text>- {features[planType.toLowerCase()].map(- (feature: string, index: number) => (- <Text key={index} className="ml-1 text-sm leading-4 text-black">- ◆ {feature}- </Text>- ),- [],- )}+ {planFeatures &&+ planFeatures.map(+ (feature: string, index: number) => (+ <Text+ key={index}+ className="ml-1 text-sm leading-4 text-black"+ >+ ◆ {feature}+ </Text>+ ),+ [],+ )}<Section className="mb-[32px] mt-[32px] text-center"><ButtonclassName="rounded bg-black text-center text-xs font-semibold text-white no-underline"- href={`${process.env.NEXT_PUBLIC_BASE_URL}/documents`}+ href={`${process.env.NEXT_PUBLIC_BASE_URL}/${+ planTypeText.includes("datarooms") ? "datarooms" : "documents"+ }`}style={{ padding: "12px 20px" }}>- Share your documents+ Share your{" "}+ {planTypeText.includes("datarooms")+ ? "data rooms"+ : "documents"}</Button></Section><Section>diff --git a/ee/stripe/webhooks/checkout-session-completed.ts b/ee/stripe/webhooks/checkout-session-completed.tsindex 0c3abdba..259d330d 100644--- a/ee/stripe/webhooks/checkout-session-completed.ts+++ b/ee/stripe/webhooks/checkout-session-completed.ts@@ -105,6 +105,6 @@ export async function checkoutSessionCompleted(email: team.users[0].user.email as string,name: team.users[0].user.name as string,},- planType: plan.name,+ planType: plan.slug,});}