Updated checkout to wait for backend confirmation before advancing, added a “Processing payment…” state with retry/ refresh fallback, and now use Paddle totals/currency for purchase records + confirmation emails (with new email translations).

This commit is contained in:
Codex Agent
2025-12-22 09:06:48 +01:00
parent 41d29eb7d3
commit 84234bfb8e
36 changed files with 1742 additions and 187 deletions

View File

@@ -23,6 +23,7 @@ interface LoginFormProps {
onSuccess?: (userData: AuthUserPayload | null) => void;
canResetPassword?: boolean;
locale?: string;
packageId?: number | null;
}
type SharedPageProps = {
@@ -33,7 +34,7 @@ type FieldErrors = Record<string, string>;
const csrfToken = () => (document.querySelector('meta[name="csrf-token"]') as HTMLMetaElement | null)?.content ?? "";
export default function LoginForm({ onSuccess, canResetPassword = true, locale }: LoginFormProps) {
export default function LoginForm({ onSuccess, canResetPassword = true, locale, packageId }: LoginFormProps) {
const page = usePage<SharedPageProps>();
const { t } = useTranslation("auth");
const resolvedLocale = locale ?? page.props.locale ?? "de";
@@ -103,6 +104,7 @@ export default function LoginForm({ onSuccess, canResetPassword = true, locale }
password: values.password,
remember: values.remember,
locale: resolvedLocale,
package_id: packageId ?? null,
}),
});