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

    <section class="go-section">
        <div class="row">
            <div class="container">
                <div class="col-md-offset-2 col-md-8">
                <?php if(Session::has('error')): ?>
                    <div class="alert alert-danger alert-dismissable">
                        <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                        <?php echo e(Session::get('error')); ?>

                    </div>
                <?php endif; ?>
                </div>
                <div class="col-md-12 text-center services">
                    <div class="col-md-offset-2 col-md-8 order-div">

                        <div class="col-md-8 order-left">
                            <h4>ENTER YOUR DETAILS</h4>
                            <form action="<?php echo e(route('payment.submit')); ?>" method="post" target="_blank" id="payment_form">
                                <?php echo e(csrf_field()); ?>


                                <div class="form-group">
                                    <input type="text" class="form-control" name="name" placeholder="Full Name" required>
                                </div>
                                <div class="form-group">
                                    <input type="text" class="form-control" name="phone" placeholder="Phone Number" required>
                                </div>
                                <div class="form-group">
                                    <input type="email" class="form-control" name="email" placeholder="Email" required>
                                </div>
                                <div class="form-group">
                                    <input type="text" class="form-control" name="address" placeholder="Address" required>
                                </div>
                                <div class="form-group">
                                    <input type="text" class="form-control" name="city" placeholder="City" required>
                                </div>
                                <div class="form-group">
                                    <input type="text" class="form-control" name="zip" placeholder="Postal Code" required>
                                </div>
                                <div class="form-group">
                                    <select class="form-control" onChange="meThods(this)" id="formac" name="method" required>
                                        <option value="Paypal" selected>Paypal</option>
                                        <option value="Stripe">Credit Card</option>
                                    </select>
                                </div>
                                <div id="stripes" style="display: none;">
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="card" placeholder="Card">
                                    </div>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="cvv" placeholder="Cvv">
                                    </div>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="month" placeholder="Month">
                                    </div>
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="year" placeholder="Year">
                                    </div>
                                </div>
                                <div id="paypals">
                                    <input type="hidden" name="cmd" value="_xclick" />
                                    <input type="hidden" name="no_note" value="1" />
                                    <input type="hidden" name="lc" value="UK" />
                                    <input type="hidden" name="currency_code" value="USD" />
                                    <input type="hidden" name="total" value="<?php echo e(Session::get('total')); ?>" />
                                    <input type="hidden" name="adults" value="<?php echo e(Session::get('adults')); ?>" />
                                    <input type="hidden" name="childs" value="<?php echo e(Session::get('childs')); ?>" />
                                    <input type="hidden" name="package" value="<?php echo e($package->id); ?>" />
                                    <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest" />
                                </div>
                                <button type="submit" class="genius-btn"></i> Pay Now</button>
                            </form>

                        </div>
                        <div class="col-md-4 order-right">
                            <h4>ORDER DETAILS</h4>
                            <h3><?php echo e($package->title); ?></h3>
                            <h3 class="pricing-count" style="margin: 0">Cost: $<?php echo e(Session::get('total')); ?></h3><hr>
                            <div class="pricing-list">
                                <p>Total Adults: <?php echo e(Session::get('adults')); ?></p>
                                <p>Total Childs: <?php echo e(Session::get('childs')); ?></p>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </section>

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

<?php $__env->startSection('footer'); ?>
<script type="text/javascript">
   function meThods(val) { 
          var action1 = "<?php echo e(route('payment.submit')); ?>";
          var action2 = "<?php echo e(route('stripe.submit')); ?>";
          if (val.value == "Paypal") {
            $("#payment_form").attr("action", action1);
            $("#stripes").hide();
          }
          if (val.value == "Stripe") {
            $("#payment_form").attr("action", action2);
            $("#stripes").show();
          }
    }
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('includes.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>