One Hat Cyber Team
Your IP :
216.73.216.93
Server IP :
178.63.234.5
Server :
Linux whm01.ins-jo.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Server Software :
Apache
PHP Version :
8.1.32
Buat File
|
Buat Folder
Dir :
~
/
home
/
business
/
www
/
storage
/
framework
/
views
/
Edit File Name :
c7cacf9ef92296194912e74e1d41ff9cc0f84f6b.php
<?php $__env->startSection('meta-description', !empty($userSeo) ? $userSeo->checkout_meta_description : ''); ?> <?php $__env->startSection('meta-keywords', !empty($userSeo) ? $userSeo->checkout_meta_keywords : ''); ?> <?php $__env->startSection('tab-title'); ?> <?php echo e($keywords['Checkout'] ?? 'Checkout'); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('page-name'); ?> <?php echo e($keywords['Checkout'] ?? 'Checkout'); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('br-name'); ?> <?php echo e($keywords['Checkout'] ?? 'Checkout'); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <!--====== Breadcrumb part End ======--> <section class="checkout-area-section section-gap"> <form onsubmit="document.getElementById('confirmBtn').innerHTML='Processing..';document.getElementById('confirmBtn').disabled=true;" action="<?php echo e(route('item.payment.submit', getParam())); ?>" method="POST" id="payment" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <div class="container"> <?php if(Session::has('st_errors')): ?> <div class="alert alert-warning"> <ul> <?php $__currentLoopData = Session::get('st_errors'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sterr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <li class="text-muted"> <?php echo e($keywords['Stock_not_available_for_the'] ?? 'Stock not available for the'); ?> <b><?php echo e($sterr); ?></b> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul> </div> <?php endif; ?> <div class="row"> <div class="col-lg-6"> <div class="form shipping-info"> <div class="shop-title-box"> <h3><?php echo e($keywords['shipping_details'] ?? 'Shipping details'); ?></h3> </div> <div class="row"> <div class="col-md-6 mb-4"> <div class="field-label"><?php echo e($keywords['first_name'] ?? 'First Name'); ?> <span class="text-danger">*</span></div> <div class="field-input"> <input type="text" class="form_control" placeholder="<?php echo e($keywords['first_name'] ?? 'First Name'); ?>" name="shpping_fname" value="<?php echo e(convertUtf8(Auth::guard('customer')->user()->shpping_fname)); ?>"> <?php $__errorArgs = ['shpping_fname']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-danger mb-2"><?php echo e(convertUtf8($message)); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> </div> <div class="col-md-6 mb-4"> <div class="field-label"><?php echo e($keywords['last_name'] ?? 'Last Name'); ?><span class="text-danger">*</span></div> <div class="field-input"> <input type="text" class="form_control" placeholder="<?php echo e($keywords['last_name'] ?? 'Last Name'); ?>" name="shpping_lname" value="<?php echo e(convertUtf8(Auth::guard('customer')->user()->shpping_lname)); ?>"> <?php $__errorArgs = ['shpping_lname']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-danger mb-2"><?php echo e(convertUtf8($message)); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> </div> <div class="col-md-6 mb-4"> <div class="field-label"><?php echo e($keywords['Email_Address'] ?? 'Email Address'); ?> <span class="text-danger">*</span></div> <div class="field-input"> <input type="email" class="form_control" placeholder="<?php echo e($keywords['Email_Address'] ?? 'Email Address'); ?>" name="shpping_email" value="<?php echo e(convertUtf8(Auth::guard('customer')->user()->shpping_email)); ?>"> <?php $__errorArgs = ['shpping_email']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-danger mb-2"><?php echo e(convertUtf8($message)); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> </div> <div class="col-md-6 mb-4"> <div class="field-label"><?php echo e($keywords['phone'] ?? 'phone'); ?> <span class="text-danger">*</span></div> <div class="field-input"> <input type="text" class="form_control" placeholder="<?php echo e($keywords['phone'] ?? 'phone'); ?> " name="shpping_number" value="<?php echo e(convertUtf8(Auth::guard('customer')->user()->shpping_number)); ?>"> <?php $__errorArgs = ['shpping_number']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-danger mb-2"><?php echo e(convertUtf8($message)); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> </div> <div class="col-md-12 mb-4"> <div class="field-label"><?php echo e($keywords['address'] ?? 'Address'); ?> <span class="text-danger">*</span></div> <textarea name="shpping_address" class="form_control" placeholder="<?php echo e($keywords['address'] ?? 'Address'); ?>"><?php echo e(convertUtf8(Auth::guard('customer')->user()->shpping_address)); ?></textarea> <?php $__errorArgs = ['shpping_address']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-danger"><?php echo e(convertUtf8($message)); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <div class="col-md-12 mb-4"> <div class="field-label"><?php echo e($keywords['city'] ?? 'City'); ?><span class="text-danger">*</span></div> <div class="field-input"> <input type="text" class="form_control" placeholder="<?php echo e($keywords['city'] ?? 'City'); ?>" name="shpping_city" value="<?php echo e(convertUtf8(Auth::guard('customer')->user()->shpping_city)); ?>"> <?php $__errorArgs = ['shpping_city']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-danger mb-2"><?php echo e(convertUtf8($message)); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> </div> <div class="col-md-6 mb-4"> <div class="field-label"><?php echo e($keywords['state'] ?? 'state'); ?> <span class="text-danger">*</span></div> <div class="field-input"> <input type="text" class="form_control" placeholder="<?php echo e($keywords['state'] ?? 'state'); ?>" name="shpping_state" value="<?php echo e(convertUtf8(Auth::guard('customer')->user()->shpping_state)); ?>"> <?php $__errorArgs = ['shpping_state']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-danger mb-2"><?php echo e(convertUtf8($message)); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> </div> <div class="col-md-6 mb-4"> <div class="field-label"><?php echo e($keywords['country'] ?? 'Country'); ?> <span class="text-danger">*</span></div> <div class="field-input"> <input type="text" class="form_control" placeholder="<?php echo e($keywords['country'] ?? 'Country'); ?>" name="shpping_country" value="<?php echo e(convertUtf8(Auth::guard('customer')->user()->shpping_country)); ?>"> <?php $__errorArgs = ['shpping_country']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-danger mb-2"><?php echo e(convertUtf8($message)); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> </div> </div> </div> </div> </div> </div> <div class="bottom"> <div class="container"> <div class="row"> <?php if(!onlyDigitalItemsInCart() && sizeof($shippings) > 0): ?> <?php $scharge = round($shippings[0]->charge, 2); ?> <div class="col-12 mb-5"> <div class="table"> <div class="shop-title-box"> <h3> <?php echo e($keywords['Shipping_Method'] ?? __('Shipping Methods')); ?></h3> </div> <table class="cart-table shipping-method table table-bordered"> <thead class="cart-header"> <tr> <th>#</th> <th><?php echo e($keywords['Method'] ?? __('Method')); ?></th> <th class="price"><?php echo e($keywords['cost'] ?? __('Cost')); ?></th> </tr> </thead> <tbody> <?php $__currentLoopData = $shippings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $charge): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td> <input type="radio" <?php echo e($key == 0 ? 'checked' : ''); ?> name="shipping_charge" <?php echo e($cart == null ? 'disabled' : ''); ?> data="<?php echo e($charge->charge); ?>" class="shipping-charge" value="<?php echo e($charge->id); ?>"> </td> <td> <p class="mb-2"> <strong><?php echo e(convertUtf8($charge->title)); ?></strong> </p> <p><small><?php echo e(convertUtf8($charge->text)); ?></small></p> </td> <td> <span dir="ltr"> <?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?> <span><?php echo e(formatNumber($charge->charge)); ?></span> <?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?> </span> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> <?php else: ?> <div class="col-12"> <input style="visibility: hidden;" type="radio" checked name="shipping_charge" <?php echo e($cart == null ? 'disabled' : ''); ?> data="0" class="shipping-charge" value="0"> </div> <?php endif; ?> <div class="col-lg-6"> <div class="table"> <div class="shop-title-box"> <h3><?php echo e($keywords['Order_Summary'] ?? __('Order Summary')); ?></h3> </div> <table class="cart-table table table-bordered"> <thead class="cart-header"> <tr> <th class="product-column" colspan="2"> <?php echo e($keywords['item'] ?? __('Items')); ?></th> <th><?php echo e($keywords['Quantity'] ?? __('Quantity')); ?></th> <th class="price"><?php echo e($keywords['total'] ?? __('Total')); ?></th> </tr> </thead> <tbody> <?php $total = 0; ?> <?php if($cart): ?> <?php $__currentLoopData = $cart; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <input type="hidden" name="product_id[]" value="<?php echo e($item['id']); ?>"> <?php $total += $item['product_price'] * $item['qty']; ?> <tr> <td colspan="2" class="product-column"> <div class="column-box"> <div class="product-title"> <a target="_blank" href="<?php echo e(route('front.user.item_details', ['slug' => $item['slug'], getParam()])); ?>"> <h3 class="prod-title"> <?php echo e(strlen($item['name']) > 30 ? mb_substr($item['name'], 0, 30, 'UTF-8') . '...' : $item['name']); ?> </h3> </a> </div> <strong> <?php echo e($keywords['Item_price'] ?? __('Item Price')); ?>: </strong> <span dir="ltr"> <?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?> <?php echo e($item['product_price']); ?> <?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?> </span> <?php if(!empty($item['variations'])): ?> <h6 class="p-2 pl-0"> <?php echo e($keywords['Variations'] ?? __('Variations')); ?>: </h6> <?php $__currentLoopData = $item['variations']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k => $itm): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <table class="variation-table table-borderless table-sm"> <tr> <strong><?php echo e($k); ?> : </strong> <?php echo e($itm['name']); ?>: <?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?><?php echo e($itm['price']); ?><?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?> </tr> </table> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </div> </td> <td class="qty"> <input class="quantity-spinner" disabled type="text" value="<?php echo e($item['qty']); ?>" name="quantity"> </td> <td class="price"> <span dir="ltr"> <?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?> <?php echo e($item['total']); ?> <?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?> </span> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <tr class="text-center"> <td colspan="4"><?php echo e($keywords['cart_empty'] ?? __('Cart is Empty')); ?> </td> </tr> <?php endif; ?> </tbody> </table> </div> </div> <div class="col-lg-6"> <div class="cart-total"> <div class="shop-title-box"> <h3><?php echo e($keywords['order'] ?? __('Order')); ?> <?php echo e($keywords['total'] ?? __(' Total')); ?></h3> </div> <div id="cartTotal"> <ul class="cart-total-table"> <li class="clearfix"> <span class="col col-title"><?php echo e($keywords['Cart_Total'] ?? __('Cart Total')); ?></span> <span class="col" dir="ltr"> <?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?> <span data="<?php echo e(cartTotal()); ?>" class="subtotal"><?php echo e(cartTotal()); ?></span> <?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?> </span> </li> <li class="clearfix"> <span class="col col-title"><?php echo e($keywords['Discount'] ?? __('Discount')); ?> <span class="text-success">(<i class="fas fa-minus"></i>)</span></span> <span class="col" dir="ltr"><?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?><span id="discount" data="<?php echo e($discount); ?>"><?php echo e(formatNumber($discount)); ?></span><?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?></span> </li> <li class="clearfix"> <span class="col col-title"><?php echo e($keywords['subtotal'] ?? __('Subtotal')); ?></span> <span class="col" dir="ltr"><?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?><span data="<?php echo e(cartSubTotal()); ?>" class="subtotal" id="subtotal"><?php echo e(cartSubTotal()); ?></span><?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?></span> </li> <?php if(!onlyDigitalItemsInCart() && sizeof($shippings) > 0): ?> <?php $scharge = round($shippings[0]->charge, 2); ?> <li class="clearfix"> <span class="col col-title"><?php echo e($keywords['Shipping_charge'] ?? __('Shipping Charge')); ?> <span class="text-danger"> (<i class="fas fa-plus"></i>) </span> </span> <span class="col" dir="ltr"> <?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?><span data="<?php echo e($scharge); ?>" class="shipping"><?php echo e($scharge); ?></span><?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?></span> </li> <?php else: ?> <?php $scharge = 0; ?> <?php endif; ?> <li class="clearfix"> <span class="col col-title"><?php echo e($keywords['tax'] ?? __('Tax')); ?>(<?php echo e($userShopSetting->tax); ?>%)<span class="text-danger">(<i class="fas fa-plus"></i>)</span></span> <span class="col" dir="ltr"><?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?><span data-tax="<?php echo e(tax()); ?>" id="tax"><?php echo e(tax()); ?></span><?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?></span> </li> <li class="clearfix"> <span class="col col-title"><?php echo e($keywords['order'] ?? __('Order')); ?> <?php echo e($keywords['total'] ?? __(' Total')); ?></span> <span class="col" dir="ltr"> <?php echo e($userBs->base_currency_symbol_position == 'left' ? $userBs->base_currency_symbol : ''); ?><span data="<?php echo e(cartSubTotal() + $scharge + tax()); ?>" class="grandTotal"> <?php echo e(cartSubTotal() + $scharge + tax()); ?></span><?php echo e($userBs->base_currency_symbol_position == 'right' ? $userBs->base_currency_symbol : ''); ?></span> </li> </ul> <?php if(session()->has('user_coupon')): ?> <div class="mt-20 alert alert-success"> <strong> </strong><?php echo e($keywords['Coupon_already_applied'] ?? __('Coupon already applied')); ?> </div> <?php else: ?> <div class="coupon mt-4"> <h4 class="mb-3"> <?php echo e($keywords['Coupon'] ?? __('Coupon')); ?></h4> <div class="form-group d-flex"> <input type="text" class="form-control" name="coupon" value=""> <button class="btn btn-primary base-bg border-0" type="button" onclick="applyCoupon();"> <?php echo e($keywords['Apply'] ?? __(' Apply')); ?></button> </div> </div> <?php endif; ?> </div> <div class="payment-options"> <h4 class="mb-4"><?php echo e($keywords['Payment_Method'] ?? __('Payment Method')); ?></h4> <?php echo $__env->make('user-front.payment-gateways', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php if($errors->has('anetCardNumber')): ?> <p class="text-danger"><?php echo e($errors->first('anetCardNumber')); ?></p> <?php endif; ?> <?php if($errors->has('anetExpMonth')): ?> <p class="text-danger"><?php echo e($errors->first('anetExpMonth')); ?></p> <?php endif; ?> <?php if($errors->has('anetExpYear')): ?> <p class="text-danger"><?php echo e($errors->first('anetExpYear')); ?></p> <?php endif; ?> <?php if($errors->has('anetCardCode')): ?> <p class="text-danger"><?php echo e($errors->first('anetCardCode')); ?></p> <?php endif; ?> <div class="placeorder-button text-left"> <button <?php echo e($cart ? '' : 'disabled'); ?> id="confirmBtn" class="main-btn" type="submit"><span class="btn-title"><?php echo e($keywords['Place_Order'] ?? __(' Place Order')); ?> </span></button> </div> </div> </div> </div> </div> </div> </div> </form> </section> <?php $__env->stopSection(); ?> <?php $anet = App\Models\User\UserPaymentGeteway::whereKeyword('Authorize.net') ->where('user_id', getUser()->id) ->first(); $anerInfo = $anet->convertAutoData(); $anetTest = $anerInfo['sandbox_check'] ?? ''; ?> <?php $__env->startSection('scripts'); ?> <script> // apply coupon functionality starts function applyCoupon() { $.post( "<?php echo e(route('front.coupon', getParam())); ?>", { coupon: $("input[name='coupon']").val(), _token: document.querySelector('meta[name=csrf-token]').getAttribute('content') }, function(data) { if (data.status == 'success') { toastr["success"](data.message); $("input[name='coupon']").val(''); $("#cartTotal").load(location.href + " #cartTotal", function() { let scharge = parseFloat($("input[name='shipping_charge']:checked").attr('data')); let total = parseFloat($(".grandTotal").attr('data')); $(".shipping").attr('data', scharge); $(".shipping").text(scharge); $(".grandTotal").attr('data', total.toFixed(2)); $(".grandTotal").text(total.toFixed(2)); }); } else { toastr["error"](data.message); } } ); } $("input[name='coupon']").on('keypress', function(e) { let code = e.which; if (code == 13) { e.preventDefault(); applyCoupon(); } }); // place order click -- loader load $(document).on('click', '#confirmBtn', function() { if ($("#payment-gateway").val() != null) { $(".request-loader").show(); setTimeout(() => { $(".request-loader").hide(); }, 100000); } }); // apply coupon functionality ends $(document).on('click', '.shipping-charge', function() { $(".shipping-charge").attr('checked', false) $(this).attr('checked', true) $(this).attr('data') let total = 0; let shipping = 0; shipping = parseFloat($('.shipping').attr('data')); let shipCharge = parseFloat($(this).attr('data')); shipping = parseFloat(shipCharge); total = <?php echo e(cartSubTotal() + tax()); ?> + parseFloat(shipCharge); $('.shipping').text(shipping); $('.grandTotal').text(parseFloat(total.toFixed(2))); }) </script> <script> "use strict"; $(document).ready(function() { $('#stripe-element').addClass('d-none'); }) $("#payment-gateway").on('change', function() { let offline = <?php echo json_encode($offlines) ?>; 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 == 'Stripe') { $('#stripe-element').removeClass('d-none'); $("#tab-stripe").show(); $("#tab-stripe input").removeAttr('disabled'); } 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('user.front.payment.instructions', getParam())); ?>', 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(); } }); // $(document).ready(function() { }); </script> <script type="text/javascript" src="https://jstest.authorize.net/v1/Accept.js" charset="utf-8"></script> <script type="text/javascript"> $(document).ready(function() { $("#payment").on('submit', function(e) { e.preventDefault(); let val = $("#payment-gateway").val(); if (val == 'Authorize.net') { sendPaymentDataToAnet(); } else { $(this).unbind('submit').submit(); } }); }); function sendPaymentDataToAnet() { // Set up authorisation to access the gateway. var authData = {}; authData.clientKey = "<?php echo e($anerInfo['public_key'] ?? ''); ?>"; authData.apiLoginID = "<?php echo e($anerInfo['login_id'] ?? ''); ?>"; var cardData = {}; cardData.cardNumber = document.getElementById("anetCardNumber").value; cardData.month = document.getElementById("anetExpMonth").value; cardData.year = document.getElementById("anetExpYear").value; cardData.cardCode = document.getElementById("anetCardCode").value; // Now send the card data to the gateway for tokenisation. // The responseHandler function will handle the response. var secureData = {}; secureData.authData = authData; secureData.cardData = cardData; Accept.dispatchData(secureData, responseHandler); } function responseHandler(response) { if (response.messages.resultCode === "Error") { var i = 0; let errorLists = ``; while (i < response.messages.message.length) { errorLists += `<li class="text-danger">${response.messages.message[i].text}</li>`; i = i + 1; } $("#anetErrors").show(); $("#anetErrors").html(errorLists); } else { paymentFormUpdate(response.opaqueData); } } function paymentFormUpdate(opaqueData) { document.getElementById("opaqueDataDescriptor").value = opaqueData.dataDescriptor; document.getElementById("opaqueDataValue").value = opaqueData.dataValue; document.getElementById("payment").submit(); } </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('user-front.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/business/public_html/resources/views/user-front/checkout.blade.php ENDPATH**/ ?>
Save