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:
@@ -5,6 +5,7 @@ import { ChartCard } from "@/components/ChartCard";
|
||||
import { PersonActions } from "@/components/PersonActions";
|
||||
import { PendingInvites } from "@/components/PendingInvites";
|
||||
import { PersonPacks } from "@/components/PersonPacks";
|
||||
import { payMethod } from "@/lib/payments";
|
||||
import { backendGet, requireMe } from "@/lib/server";
|
||||
import type { ChartListItem, PublicConfig } from "@/lib/types";
|
||||
|
||||
@@ -102,7 +103,7 @@ export default async function PersonsPage() {
|
||||
? "Elfogytak a helyeid. Újabb személyhez válassz csomagot."
|
||||
: "A felvett személyek képletét és elemzéseit itt éred el. Egy törölt személy helye nem szabadul fel."}
|
||||
</p>
|
||||
<PersonPacks canPay={config?.mock_payments ?? false} />
|
||||
<PersonPacks canPay={payMethod(config, me)} />
|
||||
</section>
|
||||
)}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user