feat: merchant specific fees, TRON & BTC support, coin logos, and bug fixes

This commit is contained in:
mstfyldz
2026-03-13 00:34:42 +03:00
parent b0c1055c13
commit 2d435a4ee8
17 changed files with 708 additions and 233 deletions

View File

@@ -20,6 +20,7 @@ export default function NewMerchantPage() {
const [name, setName] = useState('');
const [webhookUrl, setWebhookUrl] = useState('');
const [paymentProvider, setPaymentProvider] = useState('stripe');
const [feePercent, setFeePercent] = useState('1.0');
const [success, setSuccess] = useState(false);
const handleSubmit = async (e: React.FormEvent) => {
@@ -33,7 +34,8 @@ export default function NewMerchantPage() {
body: JSON.stringify({
name,
webhook_url: webhookUrl,
payment_provider: paymentProvider
payment_provider: paymentProvider,
fee_percent: parseFloat(feePercent || '1.0')
}),
});
@@ -141,6 +143,27 @@ export default function NewMerchantPage() {
</div>
</div>
{/* Fee Percentage Input */}
<div className="space-y-3">
<label className="text-[11px] font-black text-gray-400 uppercase tracking-widest ml-1">Özel Komisyon Oranı (%)</label>
<div className="relative group max-w-[240px]">
<div className="absolute right-6 top-1/2 -translate-y-1/2 text-gray-400 font-black">%</div>
<input
type="number"
step="0.1"
min="0"
max="100"
value={feePercent}
onChange={(e) => setFeePercent(e.target.value)}
placeholder="1.0"
className="w-full pl-8 pr-12 py-5 bg-gray-50 border-2 border-transparent focus:border-blue-100 focus:bg-white rounded-3xl text-lg font-black text-gray-900 outline-none transition-all placeholder:text-gray-300"
/>
</div>
<p className="text-[11px] text-gray-400 font-medium px-1">
Bu firmadan her işlemde kesilecek platform payı. (Varsayılan: %1.0)
</p>
</div>
{/* Webhook Input */}
<div className="space-y-3">
<label className="text-[11px] font-black text-gray-400 uppercase tracking-widest ml-1">Geri Dönüş (Webhook) URL</label>