stripe promo code

This commit is contained in:
Timo Knuth
2026-04-27 11:42:09 +02:00
parent c6f20f7f0b
commit 11159eb02b
3 changed files with 5 additions and 7 deletions

View File

@@ -2,7 +2,6 @@
import { useEffect, useMemo, useState } from 'react';
import { useRouter } from 'next/navigation';
import Link from 'next/link';
import { Badge } from '@/components/ui/Badge';
import { Button } from '@/components/ui/Button';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card';
@@ -356,13 +355,13 @@ export default function NewsletterClient() {
<p className="text-sm text-slate-600">Internal access only.</p>
</CardHeader>
<CardContent>
<form onSubmit={handleLogin} className="space-y-4">
<form onSubmit={handleLogin} className="space-y-4" autoComplete="off">
<Input
label="Email"
type="email"
value={email}
onChange={(event) => setEmail(event.target.value)}
placeholder="support@qrmaster.net"
autoComplete="off"
required
/>
<Input
@@ -370,7 +369,7 @@ export default function NewsletterClient() {
type="password"
value={password}
onChange={(event) => setPassword(event.target.value)}
placeholder="••••••••"
autoComplete="new-password"
required
/>
{loginError && <p className="text-sm text-red-600">{loginError}</p>}
@@ -378,9 +377,6 @@ export default function NewsletterClient() {
Sign in
</Button>
</form>
<Link href="/" className="mt-4 block text-center text-sm text-slate-500 hover:text-slate-900">
Back to home
</Link>
</CardContent>
</Card>
</div>

View File

@@ -53,6 +53,7 @@ export async function POST(request: NextRequest) {
customer: customerId,
mode: 'subscription',
payment_method_types: ['card'],
allow_promotion_codes: true,
line_items: [
{
price: priceId,

View File

@@ -108,6 +108,7 @@ export async function POST(request: NextRequest) {
customer: customerId,
mode: 'subscription',
payment_method_types: ['card'],
allow_promotion_codes: true,
line_items: [
{
price: priceId,