<?php use function App\Core\{e, url}; $order = $order ?? []; ?>
<section class="payment-result-page">
    <div class="container payment-result-card">
        <span class="payment-result-icon failed">NO</span>
        <p class="eyebrow">Odeme basarisiz</p>
        <h1>Islem tamamlanamadi</h1>
        <p><?= e((string) ($message ?? 'Odeme providerindan basarisiz sonuc dondu. Kart bilgisi saklanmadi.')) ?></p>
        <?php if (!empty($order['order_no'])): ?>
            <dl>
                <div><dt>Siparis no</dt><dd><?= e((string) $order['order_no']) ?></dd></div>
                <div><dt>Durum</dt><dd><?= e((string) ($order['status'] ?? 'failed')) ?></dd></div>
            </dl>
            <a class="pill primary" href="<?= e(url('/checkout/' . (int) ($order['package_id'] ?? 0)) . '?period=' . (string) ($order['period_type'] ?? 'monthly')) ?>">Tekrar Dene</a>
        <?php else: ?>
            <a class="pill primary" href="<?= e(url('/')) ?>">Ana Sayfaya Don</a>
        <?php endif; ?>
    </div>
</section>
