From 8800454b606778d13919dbb40e5bd08857726b82 Mon Sep 17 00:00:00 2001 From: mstfyldz Date: Sat, 14 Mar 2026 00:58:00 +0300 Subject: [PATCH] fix: hardcode domain in payment link generation to prevent localhost --- app/admin/merchants/page.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/admin/merchants/page.tsx b/app/admin/merchants/page.tsx index f80daf1..58cae9c 100644 --- a/app/admin/merchants/page.tsx +++ b/app/admin/merchants/page.tsx @@ -203,9 +203,7 @@ export default function MerchantsPage() { ) : merchants.map((m) => { const identifier = m.short_id || m.id; - const paymentLink = typeof window !== 'undefined' - ? `${window.location.origin}/checkout?merchant_id=${identifier}&amount=0` - : `https://p2cgateway.store/checkout?merchant_id=${identifier}&amount=0`; + const paymentLink = `https://p2cgateway.store/checkout?merchant_id=${identifier}&amount=0`; return (
@@ -319,7 +317,7 @@ export default function MerchantsPage() { className="text-[11px] font-mono truncate text-gray-500 hover:text-blue-600 transition-colors flex-1 flex items-center gap-1.5" title="Linki AƧ" > - {typeof window !== 'undefined' ? window.location.origin : 'https://p2cgateway.store'}/checkout?merchant_id={identifier}&amount=0 + https://p2cgateway.store/checkout?merchant_id={identifier}&amount=0