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:
@@ -1,6 +1,7 @@
|
||||
import type { Metadata } from "next";
|
||||
|
||||
import { PersonPacks } from "@/components/PersonPacks";
|
||||
import { payMethod } from "@/lib/payments";
|
||||
import { backendGet, requireMe } from "@/lib/server";
|
||||
import type { PublicConfig } from "@/lib/types";
|
||||
|
||||
@@ -31,7 +32,7 @@ export default async function NewPersonPage() {
|
||||
full={
|
||||
<>
|
||||
<p className="muted">Elfogytak a helyeid. Újabb személyhez válassz csomagot, vagy hívd meg.</p>
|
||||
<PersonPacks canPay={config?.mock_payments ?? false} />
|
||||
<PersonPacks canPay={payMethod(config, me)} />
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user