import React from 'react'; import { useForm } from '@inertiajs/react'; import { useTranslation } from 'react-i18next'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Alert, AlertDescription } from '@/components/ui/alert'; interface PaymentFormProps { packageId: number; packagePrice: number; // Add price as prop onSuccess?: () => void; } export default function PaymentForm({ packageId, packagePrice, onSuccess }: PaymentFormProps) { const { t } = useTranslation('marketing'); const { data, setData, post, processing, errors, setError } = useForm({ package_id: packageId, payment: '', // For error messages }); const handlePaymentSubmit = (e: React.FormEvent) => { e.preventDefault(); setError('payment', t('payment.coming_soon') || 'Zahlungssystem wird bald verfügbar sein. Kontaktieren Sie uns für weitere Details.'); }; return ( {t('payment.title')}
{t('payment.placeholder') || 'Das Zahlungssystem wird bald eingerichtet. Bitte kontaktieren Sie uns für den Kauf des Pakets.'}
{t('payment.contact_us') || 'Kontaktieren Sie uns unter support@fotospiel.de für den Kauf.'}
); }