<?php $__env->startSection('breadcrumb'); ?>
    <li class="breadcrumb-item"><a href="/manage"><?php echo e(Auth::user()->name); ?></a></li>
    <li class="breadcrumb-item active">Payment History</li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

<div class="card shadow-lg border-0 mb-4">
    <div class="card-header bg-gradient-primary text-white py-3">
        <h5 class="mb-0 fw-bold"><i class="fas fa-receipt me-2"></i>Payment History</h5>
    </div>

    <div class="card-body">

        <p class="text-muted mb-4">All your purchase transactions will appear here.</p>

        <div class="table-responsive">
            <table class="table table-hover align-middle">
                <thead class="table-light">
                    <tr class="text-center">
                        <th style="width: 90px;">Order #</th>
                        <th>Provider</th>
                        <th>Package</th>
                        <th>Payer</th>
                        <th>Amount (INR)</th>
                        <th>Status</th>
                        <th>Date</th>
                    </tr>
                </thead>

                <tbody>

                    <?php $__empty_1 = true; $__currentLoopData = $history; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $info): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr class="text-center">

                             
                            <td class="fw-bold text-primary">#<?php echo e($info->payment_id); ?></td>

                             
                            <td class="text-capitalize fw-semibold">
                                <?php if($info->payment_provider === 'razorpay'): ?>
                                    <i class="fa-brands fa-google-pay text-primary me-1"></i> Razorpay
                                <?php else: ?>
                                    <?php echo e(ucfirst($info->payment_provider)); ?>

                                <?php endif; ?>
                            </td>

                             
                            <td class="fw-bold">
                                <?php
                                    $pkg = \App\Packages::find($info->package_id);
                                ?>

                                <?php if($pkg): ?>
                                    <?php echo e($pkg->package_name); ?>

                                <?php else: ?>
                                    <span class="text-muted">Unknown</span>
                                <?php endif; ?>
                            </td>

                             
                            <td><?php echo e($info->payment_payer); ?></td>

                             
                            <td class="fw-semibold text-dark">
                                ₹<?php echo e(number_format($info->payment_amount)); ?>

                            </td>

                             
                            <td>
                                <?php if($info->payment_status === 'successful'): ?>
                                    <span class="badge bg-success px-3 py-2">
                                        <i class="fas fa-check-circle me-1"></i> Success
                                    </span>
                                <?php else: ?>
                                    <span class="badge bg-danger px-3 py-2">
                                        <i class="fas fa-times-circle me-1"></i> Failed
                                    </span>
                                <?php endif; ?>
                            </td>

                             
                            <td class="text-muted">
                                <?php echo e($info->created_at->format('d M, Y - h:i A')); ?>

                            </td>

                        </tr>

                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="7" class="text-center py-5 text-muted">
                                <i class="fas fa-box-open fa-3x opacity-25 mb-3"></i><br>
                                No payment history found yet.
                            </td>
                        </tr>
                    <?php endif; ?>

                </tbody>
            </table>
        </div>

    </div>
</div>

<style>
    .bg-gradient-primary {
        background: linear-gradient(90deg, #4e73df, #224abe) !important;
    }
    .table-hover tbody tr:hover {
        background-color: #eef3ff !important;
    }
    .card {
        transition: 0.3s;
    }
    .card:hover {
        box-shadow: 0 1rem 3rem rgba(0,0,0,.25) !important;
    }
</style>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('manage.admin.index', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home2/reckons1/public_html/store1.reckonsoul.fun/resources/views/manage/admin/payments/index.blade.php ENDPATH**/ ?>