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

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

<?php $__env->startSection('header'); ?>
    <?php echo $__env->make('includes.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="row mt-4">
        <div class="col-md-12">
        <?php echo $__env->make('includes.errors', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <div class="card">
                <div class="card-body">
                    <h3 class="card-title">Vous avez commandez :</h3>
                    <table class="table table-dark mx-auto">
                        <thead class="thead-default">
                            <tr>
                            <th></th>
                                <th>Libellé</th>
                                <th>Prix</th>
                                <th>Qté</th>
                                <th>Total</th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = Cart::content(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><img src="<?php echo e(URL::to('images/'.$product->model->file)); ?>" height="50" width="50" alt=""></td>
                                <td scope="row"><?php echo e($product->name); ?></td>
                                <td><?php echo e($product->price); ?> dh</td>
                                <td>
                                    <?php echo e($product->qty); ?>

                                </td>
                                <td><?php echo e(Cart::subtotal()); ?> dh</td>
                            </tr> 
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                    <p class="lead">Total: <span class="badge bg-success text-white"><?php echo e(Cart::total()); ?> dh</span></p>
                    <form action="<?php echo e(route('cart.pay')); ?>" method="POST">
                    <?php echo e(csrf_field()); ?>

                        <script
                            src="https://checkout.stripe.com/checkout.js" class="stripe-button"
                            data-key="pk_test_wrog9S6A4SEoHNLFkV0OQg9s"
                            data-amount= <?php echo e(Cart::total() * 9.95); ?>

                            data-name="Ecommerce Site"
                            data-description="Commande"
                            data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
                            data-locale="fr">
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

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

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

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

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

<?php echo $__env->make('includes.main-layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>