'use client'; import React, { useState } from 'react'; import { useRouter } from 'next/navigation'; import { ShieldCheck, ArrowRight, Building2, CheckCircle2, Copy, ExternalLink } from 'lucide-react'; export default function MerchantRegisterPage() { const [name, setName] = useState(''); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(''); const [success, setSuccess] = useState(null); const router = useRouter(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setIsLoading(true); setError(''); try { const response = await fetch('/api/merchants/register', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name }) }); const data = await response.json(); if (response.ok) { setSuccess(data); } else { setError(data.error || 'Kayıt sırasında bir hata oluştu.'); } } catch (err) { setError('Bağlantı hatası. Lütfen tekrar deneyin.'); } finally { setIsLoading(false); } }; if (success) { return (

Tebrikler!

Hesabınız Başarıyla Oluşturuldu

Firma Yönetim Paneliniz

/merchant/{success.shortId}

Kritik Güvenlik Anahtarı

Bu anahtarı güvenli bir yere kaydedin. Sisteme giriş yapmak için tek yönteminiz budur. Bir daha görüntülenemez!

{success.apiKey}
); } return (

Firma Kaydı

P2CGateway Merchant Network'e Katılın

Firma adınızı belirleyin

Müşterileriniz ödeme sayfasında bu ismi görecektir.

setName(e.target.value)} placeholder="Örn: Ayris Teknoloji" className="w-full px-6 py-4 bg-gray-50 border-2 border-transparent focus:border-blue-500 focus:bg-white rounded-[24px] outline-none transition-all font-bold text-gray-900 placeholder:text-gray-300" /> {error &&

{error}

}

* Kayıt olduktan sonra size özel bir yönetim paneli ve API anahtarı tahsis edilecektir.

End-to-End Secure Merchant Onboarding
); }