Packages paid through Stripe Checkout
The catalog stays in packages.rs: every checkout session carries the package's name and gross price, nothing has to be kept in Stripe. The package is granted once, when Stripe confirms the payment: by the signed webhook, or by the return page asking Stripe when the webhook is late. With a test key only admins can buy, so Stripe's test cards give nobody free packages. Without the keys nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -10,6 +10,7 @@ import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
|
||||
import { CompareButton } from "@/components/CompareButton";
|
||||
import { Tabs } from "@/components/Tabs";
|
||||
import { ASPECTS, ELEMENTS, MODALITIES, MOON_PHASES, countryName, formatBirthDate, pointName } from "@/lib/astro";
|
||||
import { payMethod } from "@/lib/payments";
|
||||
import { backendGet, requireMe } from "@/lib/server";
|
||||
import type { Analysis, Chart, ChartListItem, PublicConfig } from "@/lib/types";
|
||||
|
||||
@@ -181,7 +182,7 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri
|
||||
initial={detailed}
|
||||
left={me.analyses_left.natal}
|
||||
isAdmin={me.user.roles.includes("admin")}
|
||||
canPay={config?.mock_payments ?? false}
|
||||
canPay={payMethod(config, me)}
|
||||
questionsLeft={me.analyses_left.question ?? 0}
|
||||
/>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user