⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
public_html
/
storage
/
framework
/
views
/
View File Name :
136e6b7864b77ba348927b4998cb3e5ae054ebfd.php
<?php $__env->startSection('content'); ?> <?php if($message = Session::get('error')): ?> <div class="alert alert-danger alert-block"> <button type="button" class="close" data-dismiss="alert">×</button> <strong><?php echo e($message); ?></strong> </div> <?php endif; ?> <?php if(!empty($membership) && ($membership->package->term == 'lifetime' || $membership->is_trial == 1)): ?> <div class="alert bg-warning alert-warning text-white text-center"> <h3>If you purchase this package <strong class="text-dark">(<?php echo e($package->title); ?>)</strong>, then your current package <strong class="text-dark">(<?php echo e($membership->package->title); ?><?php if($membership->is_trial == 1): ?> <span class="badge badge-secondary">Trial</span> <?php endif; ?>)</strong> will be replaced immediately</h3> </div> <?php endif; ?> <div class="row justify-content-center align-items-center mb-1"> <div class="col-md-1 pl-md-0"> </div> <div class="col-md-6 pl-md-0 pr-md-0"> <div class="card card-pricing card-pricing-focus card-secondary"> <form id="my-checkout-form" action="<?php echo e(route('user.plan.checkout')); ?>" method="post" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <input type="hidden" name="package_id" value="<?php echo e($package->id); ?>"> <input type="hidden" name="user_id" value="<?php echo e(auth()->id()); ?>"> <input type="hidden" name="payment_method" id="payment" value="<?php echo e(old('payment_method')); ?>"> <div class="card-header"> <h4 class="card-title"><?php echo e($package->title); ?></h4> <div class="card-price"> <span class="price"><?php echo e($package->price == 0 ? 'Free' : format_price($package->price)); ?></span> <span class="text">/<?php echo e($package->term); ?></span> </div> </div> <div class="card-body"> <ul class="specification-list"> <li> <span class="name-specification"><?php echo e($keywords['Membership'] ?? __('Membership')); ?></span> <span class="status-specification"><?php echo e($keywords['Yes'] ?? __('Yes')); ?></span> </li> <li> <span class="name-specification"><?php echo e($keywords['Start_Date'] ?? __('Start Date')); ?></span> <?php if( (!empty($previousPackage) && $previousPackage->term == 'lifetime') || (!empty($membership) && $membership->is_trial == 1)): ?> <input type="hidden" name="start_date" value="<?php echo e(\Carbon\Carbon::today()->format('d-m-Y')); ?>"> <span class="status-specification"><?php echo e(\Carbon\Carbon::today()->format('d-m-Y')); ?></span> <?php else: ?> <input type="hidden" name="start_date" value="<?php echo e(\Carbon\Carbon::parse($membership->expire_date ?? \Carbon\Carbon::yesterday())->addDay()->format('d-m-Y')); ?>"> <span class="status-specification"><?php echo e(\Carbon\Carbon::parse($membership->expire_date ?? \Carbon\Carbon::yesterday())->addDay()->format('d-m-Y')); ?></span> <?php endif; ?> </li> <li> <span class="name-specification"><?php echo e($keywords['Expire_Date'] ?? __('Expire Date')); ?></span> <span class="status-specification"> <?php if($package->term == 'monthly'): ?> <?php if( (!empty($previousPackage) && $previousPackage->term == 'lifetime') || (!empty($membership) && $membership->is_trial == 1)): ?> <?php echo e(\Carbon\Carbon::parse(now())->addMonth()->format('d-m-Y')); ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::parse(now())->addMonth()->format('d-m-Y')); ?>"> <?php else: ?> <?php echo e(\Carbon\Carbon::parse($membership->expire_date ?? \Carbon\Carbon::yesterday())->addDay()->addMonth()->format('d-m-Y')); ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::parse($membership->expire_date ?? \Carbon\Carbon::yesterday())->addDay()->addMonth()->format('d-m-Y')); ?>"> <?php endif; ?> <?php elseif($package->term == 'lifetime'): ?> <?php echo e(__('Lifetime')); ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::maxValue()->format('d-m-Y')); ?>"> <?php else: ?> <?php if( (!empty($previousPackage) && $previousPackage->term == 'lifetime') || (!empty($membership) && $membership->is_trial == 1)): ?> <?php echo e(\Carbon\Carbon::parse(now())->addYear()->format('d-m-Y')); ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::parse(now())->addYear()->format('d-m-Y')); ?>"> <?php else: ?> <?php echo e(\Carbon\Carbon::parse($membership->expire_date ?? \Carbon\Carbon::yesterday())->addDay()->addYear()->format('d-m-Y')); ?> <input type="hidden" name="expire_date" value="<?php echo e(\Carbon\Carbon::parse($membership->expire_date ?? \Carbon\Carbon::yesterday())->addDay()->addYear()->format('d-m-Y')); ?>"> <?php endif; ?> <?php endif; ?> </span> </li> <li> <span class="name-specification"><?php echo e($keywords['Total_Cost'] ?? __('Total Cost')); ?></span> <input type="hidden" name="price" value="<?php echo e($package->price); ?>"> <span class="status-specification"> <?php echo e($package->price == 0 ? 'Free' : format_price($package->price)); ?> </span> </li> <?php if($package->price != 0): ?> <li> <div class="form-group px-0"> <label class="text-white"><?php echo e($keywords['Payment_Method'] ?? __('Payment Method')); ?></label> <select name="payment_method" class="form-control input-solid selected-payment-gateway" id="payment-gateway" required> <option value="" disabled selected> <?php echo e($keywords['Select_a_Payment_Method'] ?? __('Select a Payment Method')); ?> </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> </div> </li> <?php endif; ?> <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 pt-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="<?php echo e($keywords['Card_Number'] ?? __('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="<?php echo e($keywords['Expire_Month'] ?? __('Expire Month')); ?>" disabled /> </div> </div> <div class="col-lg-6 "> <div class="form-group"> <input class="form-control" type="text" id="anetExpYear" placeholder="<?php echo e($keywords['Expire_Year'] ?? __('Expire Year')); ?>" disabled /> </div> </div> <div class="col-lg-6 "> <div class="form-group"> <input class="form-control" type="text" id="anetCardCode" placeholder="<?php echo e($keywords['Card_Code'] ?? __('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 id="instructions" class="text-left"></div> <input type="hidden" name="is_receipt" value="0" id="is_receipt"> </ul> </div> <div class="card-footer"> <button class="btn btn-light btn-block" type="submit"><b><?php echo e($keywords['Checkout_Now'] ?? __('Checkout Now')); ?></b></button> </div> </form> </div> </div> <div class="col-md-1 pr-md-0"></div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('scripts'); ?> <?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'; } $stripe_key = App\Models\PaymentGateway::where('keyword', 'stripe')->first()->information; $stripe_key = json_decode($stripe_key); $stripe_key = $stripe_key->key; ?> <script src="https://js.stripe.com/v3/"></script> <script> $(document).ready(function() { "use strict"; $("#payment-gateway").on('change', function() { let offline = <?php echo json_encode($offline) ?>; let data = []; offline.map(({ id, name }) => { data.push(name); }); let paymentMethod = $("#payment-gateway").val(); $(".gateway-details").hide(); $(".gateway-details input").attr('disabled', true); if (paymentMethod == 'Stripe') { $('#stripe-element').removeClass('d-none'); } else { $('#stripe-element').addClass('d-none'); } 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> <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('user.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/id/public_html/resources/views/user/buy_plan/checkout.blade.php ENDPATH**/ ?>