Skip to content

armgit / mapcn

Public Imported from GitHub
0

Beautiful map components. 100% Free, Zero config, one command setup.

TypeScript

feat(sponsors): enable live Dodo checkout

Anmolb302bd432cdb
diff --git a/src/app/(main)/sponsors/_components/sponsor-contact-button.tsx b/src/app/(main)/sponsors/_components/sponsor-contact-button.tsx
index d44d583..79fa083 100644
--- a/src/app/(main)/sponsors/_components/sponsor-contact-button.tsx
+++ b/src/app/(main)/sponsors/_components/sponsor-contact-button.tsx
@@ -22,6 +22,8 @@ export function SponsorContactButton({
<Button asChild {...props}>
<a
href={action.href}
+ target={action.kind === "checkout" ? "_blank" : undefined}
+ rel={action.kind === "checkout" ? "noopener noreferrer" : undefined}
onClick={() =>
trackEvent({
name:
diff --git a/src/app/(main)/sponsors/page.tsx b/src/app/(main)/sponsors/page.tsx
index 33860ac..fa74ab7 100644
--- a/src/app/(main)/sponsors/page.tsx
+++ b/src/app/(main)/sponsors/page.tsx
@@ -149,7 +149,7 @@ const faqs = [
{
question: "How does booking work?",
answer: checkoutEnabled
- ? "Pick a tier with an open slot and pay through Dodo Payments, which handles invoices and tax. You land back on mapcn with a short list of what to send."
+ ? "Pick a tier with an open slot and pay through Dodo Payments, which handles invoices and tax. You land back on mapcn with a short list of what to send. We review every sponsorship, and if we can't place yours, you get a full refund."
: "Pick a tier with an open slot and reserve your spot by email. Once your sponsorship is approved, we send payment instructions and a short list of what to send.",
},
{
diff --git a/src/app/(main)/sponsors/thank-you/page.tsx b/src/app/(main)/sponsors/thank-you/page.tsx
index 293e547..52bcff6 100644
--- a/src/app/(main)/sponsors/thank-you/page.tsx
+++ b/src/app/(main)/sponsors/thank-you/page.tsx
@@ -21,7 +21,7 @@ import {
export const metadata: Metadata = {
title: "Thank you",
- description: "Your mapcn sponsorship is confirmed.",
+ description: "Thanks for sponsoring mapcn.",
robots: { index: false, follow: false },
};
@@ -50,12 +50,13 @@ export default async function Page({
<PageHeader size="sm">
<PageHeaderHeading>
{tier
- ? `You're a ${tier.name} sponsor`
+ ? `Thanks for choosing ${tier.name}`
: "Thanks for sponsoring mapcn"}
</PageHeaderHeading>
<PageHeaderDescription>
- Your sponsorship is confirmed. Thank you for helping keep mapcn free
- and open source.
+ Your payment went through. We review every sponsorship and will
+ email you once yours is approved. Thank you for helping keep mapcn
+ free and open source.
</PageHeaderDescription>
</PageHeader>
@@ -67,8 +68,8 @@ export default async function Page({
What to send next
</h2>
<p className="text-muted-foreground text-[15px]">
- Send these over and your logo goes live within three business
- days.
+ Send these over. Once your sponsorship is approved, your logo
+ goes live within three business days.
</p>
</div>
diff --git a/src/app/(main)/terms/page.tsx b/src/app/(main)/terms/page.tsx
index d8a1740..cb85dc1 100644
--- a/src/app/(main)/terms/page.tsx
+++ b/src/app/(main)/terms/page.tsx
@@ -92,9 +92,19 @@ export default function Page() {
<TextLink href="/sponsors">sponsors page</TextLink>.
</p>
<p>
- {checkoutEnabled
- ? "You pay at checkout through Dodo Payments. Sponsorships are billed monthly in USD and renew until cancelled."
- : "Sponsorships are currently arranged by email. Once a sponsorship is approved, we send payment instructions. Sponsorships are billed monthly in USD and renew until cancelled, under the payment arrangement we agree with you."}
+ {checkoutEnabled ? (
+ <>
+ You pay at checkout through Dodo Payments, which sells the
+ sponsorship as our reseller (merchant of record) under its{" "}
+ <TextLink href="https://dodopayments.com/legal/buyer-terms">
+ Buyer Terms
+ </TextLink>
+ . Sponsorships are billed monthly in USD and renew until
+ cancelled.
+ </>
+ ) : (
+ "Sponsorships are currently arranged by email. Once a sponsorship is approved, we send payment instructions. Sponsorships are billed monthly in USD and renew until cancelled, under the payment arrangement we agree with you."
+ )}
</p>
<p>
We aim to publish approved sponsor assets within three business
@@ -169,6 +179,23 @@ export default function Page() {
cookie. Neither is used for tracking.
</p>
+ {checkoutEnabled && (
+ <>
+ <h3>Payments</h3>
+ <p>
+ Sponsorship payments are processed by Dodo Payments, which
+ collects your payment details to process them under its own{" "}
+ <TextLink href="https://dodopayments.com/legal/privacy-policy">
+ privacy policy
+ </TextLink>
+ . We never see or store your full card details. We receive
+ your contact and billing details, such as your name and
+ email address, and your payment status to run your
+ sponsorship.
+ </p>
+ </>
+ )}
+
<h3>Emails and sponsorships</h3>
<p>
If you email us or sponsor mapcn, we keep your messages and the
diff --git a/src/lib/sponsors.ts b/src/lib/sponsors.ts
index 21bda09..a97b9cd 100644
--- a/src/lib/sponsors.ts
+++ b/src/lib/sponsors.ts
@@ -40,7 +40,7 @@ export const sponsorTiers: SponsorTier[] = [
name: "Platinum",
price: 500,
slots: 2,
- productId: "",
+ productId: "pdt_0NqIeV2hbo0ni9jNeksSH",
perks: [
"Largest logo on the homepage, below the showcase",
"Top logo with tagline on every docs page",
@@ -53,7 +53,7 @@ export const sponsorTiers: SponsorTier[] = [
name: "Gold",
price: 250,
slots: 4,
- productId: "",
+ productId: "pdt_0NqIeUdSGqsHQbF9YsPeb",
perks: [
"Logo on the homepage, below the showcase",
"Logo on every docs page",
@@ -65,7 +65,7 @@ export const sponsorTiers: SponsorTier[] = [
id: "silver",
name: "Silver",
price: 100,
- productId: "",
+ productId: "pdt_0NqIeTdQ8DSQrDQyGJW1d",
perks: ["Logo on the sponsors page", "Logo in the README"],
},
];