⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.81
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Server Software:
Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.25
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
public_html
/
storage
/
framework
/
views
/
View File Name :
b012f798ff78f273c87b9fd982da9b026d56e5eb.php
<?php $__env->startSection('styles'); ?> <link rel="stylesheet" href="<?php echo e(asset('assets/front/css/checkout.css')); ?>"> <?php $__env->stopSection(); ?> <?php $__env->startSection('pagename'); ?> - <?php echo e(__('Checkout')); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('meta-description', !empty($seo) ? $seo->checkout_meta_description : ''); ?> <?php $__env->startSection('meta-keywords', !empty($seo) ? $seo->checkout_meta_keywords : ''); ?> <?php $__env->startSection('breadcrumb-title'); ?> <?php echo e(__('Checkout')); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('breadcrumb-link'); ?> <?php echo e(__('Checkout')); ?> <?php $__env->stopSection(); ?> <?php $stripe_key = App\Models\PaymentGateway::where('keyword', 'stripe')->first()->information; $stripe_key = json_decode($stripe_key); $stripe_key = $stripe_key->key; ?> <?php $__env->startSection('content'); ?> <!--====== Start saas_checkout ======--> <section class="saas_checkout pt-150 pb-110"> <div class="container"> <form action="<?php echo e(route('front.membership.checkout')); ?>" method="POST" enctype="multipart/form-data" id="my-checkout-form"> <div class="row"> <div class="col-lg-6"> <div class="section_title mb-30"> <h3><?php echo e(__('Billing Details')); ?></h3> </div> <div class="billing_form mb-40"> <?php echo csrf_field(); ?> <div class="row"> <input type="hidden" name="username" value="<?php echo e($username); ?>"> <input type="hidden" name="password" value="<?php echo e($password); ?>"> <input type="hidden" name="package_type" value="<?php echo e($status); ?>"> <input type="hidden" name="email" value="<?php echo e($email); ?>"> <input type="hidden" name="price" value="<?php echo e($status == 'trial' ? 0 : $package->price); ?>"> <input type="hidden" name="package_id" value="<?php echo e($id); ?>"> <input type="hidden" name="payment_method" id="payment" value="<?php echo e(old('payment_method')); ?>"> <input type="hidden" name="trial_days" id="trial_days" value="<?php echo e($package->trial_days); ?>"> <input type="hidden" name="start_date" value="<?php echo e(\Carbon\Carbon::today()->format('d-m-Y')); ?>"> <?php if($status === 'trial'): ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::today()->addDay($package->trial_days)->format('d-m-Y')); ?>"> <?php else: ?> <?php if($package->term === 'daily'): ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::today()->addDay()->format('d-m-Y')); ?>"> <?php elseif($package->term === 'weekly'): ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::today()->addWeek()->format('d-m-Y')); ?>"> <?php elseif($package->term === 'monthly'): ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::today()->addMonth()->format('d-m-Y')); ?>"> <?php elseif($package->term === 'lifetime'): ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::maxValue()->format('d-m-Y')); ?>"> <?php else: ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::today()->addYear()->format('d-m-Y')); ?>"> <?php endif; ?> <?php endif; ?> <div class="col-lg-6"> <div class="form_group"> <label for="first_name"><?php echo e(__('First Name')); ?>*</label> <input id="first_name" type="text" class="form_control" name="first_name" placeholder="<?php echo e(__('First Name')); ?>" value="<?php echo e(old('first_name')); ?>" required> <?php if($errors->has('first_name')): ?> <span class="error"> <strong><?php echo e($errors->first('first_name')); ?></strong> </span> <?php endif; ?> </div> </div> <div class="col-lg-6"> <div class="form_group"> <label for="last_name"><?php echo e(__('Last Name')); ?>*</label> <input id="last_name" type="text" class="form_control" name="last_name" placeholder="<?php echo e(__('Last Name')); ?>" value="<?php echo e(old('last_name')); ?>" required> <?php if($errors->has('last_name')): ?> <span class="error"> <strong><?php echo e($errors->first('last_name')); ?></strong> </span> <?php endif; ?> </div> </div> <div class="col-lg-12"> <div class="form_group"> <label for="phone"><?php echo e(__('Phone Number')); ?>*</label> <input id="phone" type="text" class="form_control" name="phone" placeholder="<?php echo e(__('Phone Number')); ?>" value="<?php echo e(old('phone')); ?>" required> <?php if($errors->has('phone')): ?> <span class="error"> <strong><?php echo e($errors->first('phone')); ?></strong> </span> <?php endif; ?> </div> </div> <div class="col-lg-6"> <div class="form_group"> <label for="email"><?php echo e(__('Email Address')); ?>*</label> <input id="email" type="email" class="form_control" name="email" value="<?php echo e($email); ?>" disabled> <?php if($errors->has('email')): ?> <span class="error"> <strong><?php echo e($errors->first('email')); ?></strong> </span> <?php endif; ?> </div> </div> <div class="col-lg-6"> <div class="form_group"> <label for="company_name"><?php echo e(__('Company Name')); ?></label> <input id="company_name" type="text" class="form_control" name="company_name" placeholder="<?php echo e(__('Company Name')); ?>" value="<?php echo e(old('company_name')); ?>"> <?php if($errors->has('company_name')): ?> <span class="error"> <strong><?php echo e($errors->first('company_name')); ?></strong> </span> <?php endif; ?> </div> </div> <div class="col-lg-12"> <div class="form_group"> <label for="address"><?php echo e(__('Street Address')); ?></label> <input id="address" type="text" class="form_control" name="address" placeholder="<?php echo e(__('Street Address')); ?>" value="<?php echo e(old('address')); ?>"> <?php if($errors->has('address')): ?> <span class="error"> <strong><?php echo e($errors->first('address')); ?></strong> </span> <?php endif; ?> </div> </div> <div class="col-lg-6"> <div class="form_group"> <label for="city"><?php echo e(__('City')); ?> *</label> <input id="city" type="text" class="form_control" name="city" placeholder="<?php echo e(__('City')); ?>" value="<?php echo e(old('city')); ?>" required> <?php if($errors->has('city')): ?> <span class="error"> <strong><?php echo e($errors->first('city')); ?></strong> </span> <?php endif; ?> </div> </div> <div class="col-lg-6"> <div class="form_group"> <label for="district"><?php echo e(__('State')); ?></label> <input id="district" type="text" class="form_control" name="district" placeholder="<?php echo e(__('State')); ?>" value="<?php echo e(old('district')); ?>"> <?php if($errors->has('district')): ?> <span class="error"> <strong><?php echo e($errors->first('district')); ?></strong> </span> <?php endif; ?> </div> </div> <div class="col-lg-6"> <div class="form_group"> <label for="post_code"><?php echo e(__('Postcode/Zip')); ?></label> <input id="post_code" type="text" class="form_control" name="post_code" placeholder="<?php echo e(__('Post Code')); ?>" value="<?php echo e(old('post_code')); ?>"> <?php if($errors->has('post_code')): ?> <span class="error"> <strong><?php echo e($errors->first('post_code')); ?></strong> </span> <?php endif; ?> </div> </div> <div class="col-lg-6"> <div class="form_group"> <label for="country"><?php echo e(__('Country')); ?> *</label> <input id="country" type="text" class="form_control" name="country" placeholder="<?php echo e(__('Country')); ?>" value="<?php echo e(old('country')); ?>" required> <?php if($errors->has('country')): ?> <span class="error"> <strong><?php echo e($errors->first('country')); ?></strong> </span> <?php endif; ?> </div> </div> </div> </div> </div> <div class="col-lg-6"> <div class="order_wrap_box mb-40"> <div id="couponReload"> <input type="hidden" name="price" value="<?php echo e($status == 'trial' ? 0 : $package->price - $cAmount); ?>"> <div class="order_product_info mb-30 mt-30"> <h3><?php echo e(__('Package Summary')); ?></h3> <div class="order_list_info"> <ul> <li><?php echo e(__('Package')); ?> <span><?php echo e($package->title); ?></span></li> <li><?php echo e(__('Start Date')); ?> <span><?php echo e(\Carbon\Carbon::today()->format('d-m-Y')); ?></span> </li> <?php if($status === 'trial'): ?> <li> <?php echo e(__('Expiry Date')); ?> <span> <?php echo e(\Carbon\Carbon::today()->addDay($package->trial_days)->format('d-m-Y')); ?> </span> </li> <?php else: ?> <li> <?php echo e(__('Expiry Date')); ?> <span> <?php if($package->term === 'daily'): ?> <?php echo e(\Carbon\Carbon::today()->addDay()->format('d-m-Y')); ?> <?php elseif($package->term === 'weekly'): ?> <?php echo e(\Carbon\Carbon::today()->addWeek()->format('d-m-Y')); ?> <?php elseif($package->term === 'monthly'): ?> <?php echo e(\Carbon\Carbon::today()->addMonth()->format('d-m-Y')); ?> <?php elseif($package->term === 'lifetime'): ?> <?php echo e(__('Lifetime')); ?> <?php else: ?> <?php echo e(\Carbon\Carbon::today()->addYear()->format('d-m-Y')); ?> <?php endif; ?> </span> </li> <?php endif; ?> </ul> </div> <div class="order_list_bottom"> <ul> <li><span><?php echo e(__('Total')); ?></span></li> <li> <span class="price"> <?php if($status === 'trial'): ?> <?php echo e(__('Free')); ?> (<?php echo e($package->trial_days . ' days'); ?>) <?php elseif($package->price == 0): ?> <?php echo e(__('Free')); ?> <?php else: ?> <?php echo e(format_price($package->price)); ?> <?php endif; ?> </span> </li> </ul> </div> </div> <?php if(session()->has('coupon')): ?> <li> <span><?php echo e(__('Package Price')); ?></span> <span class="price"> <?php if($status === 'trial'): ?> <?php echo e(__('Free')); ?> (<?php echo e($package->trial_days . ' days'); ?>) <?php elseif($package->price == 0): ?> <?php echo e(__('Free')); ?> <?php else: ?> <?php echo e(format_price($package->price)); ?> <?php endif; ?> </span> </li> <li> <span><?php echo e(__('Discount')); ?></span> <span class="price text-success"> - <?php echo e(format_price($cAmount)); ?> </span> </li> <li class="border-0"> <span><?php echo e(__('Total')); ?></span> <span class="price"> <?php if($status === 'trial'): ?> <?php echo e(__('Free')); ?> (<?php echo e($package->trial_days . ' days'); ?>) <?php elseif($package->price == 0): ?> <?php echo e(__('Free')); ?> <?php else: ?> <?php echo e(format_price($package->price - $cAmount)); ?> <?php endif; ?> </span> </li> <?php endif; ?> <?php if($package->price > 0 && $status != 'trial'): ?> <?php if(!session()->has('coupon')): ?> <div class="row"> <div class="col-12"> <div class="input-group mb-3"> <input type="text" class="form-control form-control-lg" name="coupon" placeholder="<?php echo e(__('Enter Coupon Code Here')); ?>"> <div class="input-group-append"> <span class="input-group-text coupon-apply" id="basic-addon2"><?php echo e(__('Apply')); ?></span> </div> </div> </div> </div> <?php else: ?> <div class="alert alert-success"> <?php echo e(__('Coupon already applied')); ?> </div> <?php endif; ?> <?php endif; ?> <div class="order_payment_box"> <?php if($package->price - $cAmount == 0 || $status == 'trial'): ?> <?php else: ?> <h3><?php echo e(__('Payment Method')); ?></h3> <div class="form_group"> <select id="payment-gateway" class="selected-payment-gateway"> <option value="" selected disabled><?php echo e(__('Choose an option')); ?> </option> <?php $__currentLoopData = $payment_methods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment_method): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($payment_method->name); ?>" <?php echo e(old('payment_method') == $payment_method->name ? 'selected' : ''); ?>> <?php echo e($payment_method->name); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php if($errors->has('payment_method')): ?> <span class="method-error"> <strong><?php echo e($errors->first('payment_method')); ?></strong> </span> <?php endif; ?> </div> <?php endif; ?> </div> </div> <div id="stripe-element" style="margin-top: 70px;" class="mb-2 "> <!-- A Stripe Element will be inserted here. --> </div> <!-- Used to display form errors --> <div id="stripe-errors" class="pb-2 " role="alert"></div> <div class="row gateway-details py-3" id="tab-anet" style="display: none;"> <div class="col-lg-6"> <div class="form_group mb-3"> <input class="form_control" type="text" id="anetCardNumber" placeholder="Card Number" disabled /> </div> </div> <div class="col-lg-6 mb-3"> <div class="form_group"> <input class="form_control" type="text" id="anetExpMonth" placeholder="Expire Month" disabled /> </div> </div> <div class="col-lg-6 "> <div class="form_group"> <input class="form_control" type="text" id="anetExpYear" placeholder="Expire Year" disabled /> </div> </div> <div class="col-lg-6 "> <div class="form_group"> <input class="form_control" type="text" id="anetCardCode" placeholder="Card Code" disabled /> </div> </div> <input type="hidden" name="opaqueDataValue" id="opaqueDataValue" disabled /> <input type="hidden" name="opaqueDataDescriptor" id="opaqueDataDescriptor" disabled /> <ul id="anetErrors" style="display: none;"></ul> </div> <div> <div id="instructions"></div> <input type="hidden" name="is_receipt" value="0" id="is_receipt"> <?php if($errors->has('receipt')): ?> <span class="error"> <strong><?php echo e($errors->first('receipt')); ?></strong> </span> <?php endif; ?> </div> <div class="text-center"> <button id="confirmBtn" class="main-btn" style="margin-top: 20px; width: 100%;" type="submit"><?php echo e(__('Confirm')); ?> </button> </div> </div> </div> </div> </form> </div> </section> <!--====== End saas_checkout ======--> <?php $__env->stopSection(); ?> <?php $__env->startSection('scripts'); ?> <script src="https://js.stripe.com/v3/"></script> <script> "use strict"; $(document).ready(function() { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); function applyCoupon() { let fd = new FormData(); let coupon = $("input[name='coupon']").val(); fd.append('coupon', coupon); fd.append('package_id', <?php echo e($package->id); ?>); $.ajax({ url: "<?php echo e(route('front.membership.coupon')); ?>", type: 'POST', data: fd, contentType: false, processData: false, success: function(data) { if (data == 'success') { $("#couponReload").load(location.href + " #couponReload", function() { $('select').niceSelect(); }); toastr['success']("Coupon applied successfully!"); } else { toastr['warning'](data); } } }) } $("input[name='coupon']").on('keypress', function(e) { if (e.which === 13) { e.preventDefault(); applyCoupon(); } }); $(".coupon-apply").on('click', function() { applyCoupon(); }); $(document).on('change', "#payment-gateway", function() { let offline = <?php echo json_encode($offline) ?>; let data = []; offline.map(({ id, name }) => { data.push(name); }); let paymentMethod = $("#payment-gateway").val(); $("input[name='payment_method']").val(paymentMethod); $(".gateway-details").hide(); $(".gateway-details input").attr('disabled', true); if (paymentMethod == 'Authorize.net') { $("#tab-anet").show(); $("#tab-anet input").removeAttr('disabled'); } if (paymentMethod == 'Stripe') { $('#stripe-element').removeClass('d-none'); } else { $('#stripe-element').addClass('d-none'); } if (data.indexOf(paymentMethod) != -1) { let formData = new FormData(); formData.append('name', paymentMethod); $.ajax({ url: '<?php echo e(route('front.payment.instructions')); ?>', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, type: 'POST', contentType: false, processData: false, cache: false, data: formData, success: function(data) { let instruction = $("#instructions"); let instructions = `<div class="gateway-desc">${data.instructions}</div>`; if (data.description != null) { var description = `<div class="gateway-desc"><p>${data.description}</p></div>`; } else { var description = `<div></div>`; } let receipt = `<div class="form-element mb-2"> <label>Receipt<span>*</span></label><br> <input type="file" name="receipt" value="" class="file-input" required> <p class="mb-0 text-warning">** Receipt image must be .jpg / .jpeg / .png</p> </div>`; if (data.is_receipt == 1) { $("#is_receipt").val(1); let finalInstruction = instructions + description + receipt; instruction.html(finalInstruction); } else { $("#is_receipt").val(0); let finalInstruction = instructions + description; instruction.html(finalInstruction); } $('#instructions').fadeIn(); }, error: function(data) {} }) } else { $('#instructions').fadeOut(); } }); }); </script> <script> $(document).ready(function() { "use strict"; $(document).on('change', "#payment-gateway", function() { let offline = <?php echo json_encode($offline) ?>; let data = []; offline.map(({ id, name }) => { data.push(name); }); let paymentMethod = $("#payment-gateway").val(); $("input[name='payment_method']").val(paymentMethod); $(".gateway-details").hide(); $(".gateway-details input").attr('disabled', true); if (paymentMethod == 'Authorize.net') { $("#tab-anet").show(); $("#tab-anet input").removeAttr('disabled'); } if (data.indexOf(paymentMethod) != -1) { let formData = new FormData(); formData.append('name', paymentMethod); $.ajax({ url: '<?php echo e(route('front.payment.instructions')); ?>', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, type: 'POST', contentType: false, processData: false, cache: false, data: formData, success: function(data) { let instruction = $("#instructions"); let instructions = `<div class="gateway-desc">${data.instructions}</div>`; if (data.description != null) { var description = `<div class="gateway-desc"><p>${data.description}</p></div>`; } else { var description = `<div></div>`; } let receipt = `<div class="form-element mb-2"> <label>Receipt<span>*</span></label><br> <input type="file" name="receipt" value="" class="file-input" required> <p class="mb-0 text-warning">** Receipt image must be .jpg / .jpeg / .png</p> </div>`; if (data.is_receipt == 1) { $("#is_receipt").val(1); let finalInstruction = instructions + description + receipt; instruction.html(finalInstruction); } else { $("#is_receipt").val(0); let finalInstruction = instructions + description; instruction.html(finalInstruction); } $('#instructions').fadeIn(); }, error: function(data) {} }) } else { $('#instructions').fadeOut(); } }); }); </script> <?php $anet = App\Models\PaymentGateway::find(20); $anerInfo = $anet->convertAutoData(); $anetTest = $anerInfo['sandbox_check']; if ($anetTest == 1) { $anetSrc = 'https://jstest.authorize.net/v1/Accept.js'; } else { $anetSrc = 'https://js.authorize.net/v1/Accept.js'; } ?> <script> let stripe_key = "<?php echo e($stripe_key); ?>"; let anit_public_key = "<?php echo e($anerInfo['public_key']); ?>"; let login_id = "<?php echo e($anerInfo['login_id']); ?>"; </script> <script type="text/javascript" src="<?php echo e($anetSrc); ?>" charset="utf-8"></script> <script src="<?php echo e(asset('assets/front/js/stripe.js')); ?>"></script> <script> <?php if(old('payment_method') == 'Stripe'): ?> $(document).ready(function() { $('#stripe-element').removeClass('d-none'); }) <?php endif; ?> </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('front.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/id/public_html/resources/views/front/checkout.blade.php ENDPATH**/ ?>