diff --git a/components/checkout/PaymentForm.tsx b/components/checkout/PaymentForm.tsx index 2fd49f3..039ead8 100644 --- a/components/checkout/PaymentForm.tsx +++ b/components/checkout/PaymentForm.tsx @@ -57,7 +57,7 @@ const mollieFieldBase = export default function PaymentForm({ plan, interval, limit, country, vatId }: PaymentFormProps) { const router = useRouter() - const [selectedMethod, setSelectedMethod] = useState('card') + const [selectedMethod, setSelectedMethod] = useState('') const [mollieReady, setMollieReady] = useState(false) const [mollieError, setMollieError] = useState(false) const [formError, setFormError] = useState(null) @@ -141,6 +141,11 @@ export default function PaymentForm({ plan, interval, limit, country, vatId }: P setSubmitted(true) setFormError(null) + if (!selectedMethod) { + setFormError('Please select a payment method') + return + } + if (!country) { setFormError('Please select your country') return @@ -319,8 +324,8 @@ export default function PaymentForm({ plan, interval, limit, country, vatId }: P {/* Submit */} diff --git a/components/checkout/PlanSummary.tsx b/components/checkout/PlanSummary.tsx index e8fbc20..ac7ee97 100644 --- a/components/checkout/PlanSummary.tsx +++ b/components/checkout/PlanSummary.tsx @@ -185,13 +185,8 @@ export default function PlanSummary({ plan, interval, limit, country, vatId, onC {/* Price breakdown */} -
- {vatLoading && !vatResult ? ( -
-
- Calculating VAT... -
- ) : vatResult ? ( +
+ {vatResult ? (
Subtotal ({tierLabel} pageviews) @@ -220,15 +215,15 @@ export default function PlanSummary({ plan, interval, limit, country, vatId, onC
Subtotal ({tierLabel} pageviews) - €{isYearly ? baseDisplay.toFixed(2) : baseDisplay.toFixed(2)} + €{baseDisplay.toFixed(2)}
VAT - Select country + {vatLoading ? 'Calculating...' : 'Select country'}
Total {isYearly ? '/year' : '/mo'} excl. VAT - €{isYearly ? baseDisplay.toFixed(2) : baseDisplay.toFixed(2)} + €{baseDisplay.toFixed(2)}
{isYearly && (

€{(baseDisplay / 12).toFixed(2)}/mo · Save 1 month