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

<script>
function myFunction() {
 var amount = $('#mySelect2').val() ;

 var price = $("#mySelect option:selected").attr('data-price');
 var coin = $("#mySelect option:selected").attr('data-coin');
 var name = $("#mySelect option:selected").attr('data-name');
 var buy = $("#mySelect option:selected").attr('data-buy');
 var cur = $("#mySelect option:selected").attr('data-cur');
 var address = $("#mySelect option:selected").attr('data-address');
 var rate = Math.round(price * "<?php echo e($basic->rate); ?>").toFixed(2);

 var y = amount;
 var z = amount * buy /100;
 var topay = 1*y+z;

 var dol = parseFloat((amount/"<?php echo e($basic->rate); ?>")*1);
 var usd = parseFloat((topay/"<?php echo e($basic->rate); ?>")*1);

 document.getElementById("usd").innerHTML = "USD " + usd;
 document.getElementById("amount").innerHTML = "<?php echo e($basic->currency_sym); ?> " + topay;
 document.getElementById("amount2").innerHTML = "<?php echo e($basic->currency_sym); ?> " + topay;
 document.getElementById("amount3").innerHTML = topay;
 document.getElementById("amount33").innerHTML = topay;

 var unit = parseFloat(dol / price).toFixed(5);
 document.getElementById("price").innerHTML = "<?php echo e($basic->currency_sym); ?> " +      Math.round(rate).toFixed(2);
 document.getElementById("coin").innerHTML = "1 " + name + " to <?php echo e($basic->currency); ?>";
 document.getElementById("unit").innerHTML = unit + coin;
 document.getElementById("unit2").innerHTML = unit + coin;
 document.getElementById("unit3").innerHTML = unit + coin;
 document.getElementById("unit4").innerHTML = unit;
 document.getElementById("unit41").innerHTML = unit;
 document.getElementById("unit5").innerHTML = unit;
 document.getElementById("name").innerHTML = name;
 document.getElementById("name2").innerHTML = name;
 document.getElementById("name3").innerHTML = name;
 document.getElementById("name4").innerHTML = name;
 document.getElementById("name5").innerHTML = name;
 document.getElementById("address").innerHTML = address;
 document.getElementById("address2").innerHTML = address;
 document.getElementById("address22").innerHTML = address;
 document.getElementById("name6").innerHTML = name;
 document.getElementById("name7").innerHTML = name;
 document.getElementById("name8").innerHTML = name;
 document.getElementById("name9").innerHTML = name;
 document.getElementById("name10").innerHTML = name;
 document.getElementById("name11").innerHTML = name;
 document.getElementById("cur").innerHTML = cur;
 document.getElementById("cur1").innerHTML = cur;
 document.getElementById("charge").innerHTML = z;
 document.getElementById("charge1").innerHTML = z;

 };
</script>




 <div class="page-content"><div class="container"><div class="row"><div class="main-content col-lg-12"><div class="content-area card"><div class="card-innr"><div class="card-head"><span class="card-sub-title text-primary font-mid">Step 1</span><h4 class="card-title">Check Cryptocurrency Price</h4></div><div class="card-text"><p>You can buy any of the following crypto currencies using your wallet, bank transfer or online payment.</p></div><div class="token-currency-choose"><div class="row guttar-15px">

<?php $__currentLoopData = $currency; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="col-6"><div class="pay-option"><input  class="pay-option-check" type="radio" id="<?php echo e($data->id); ?>" data-sell="<?php echo e($data->sell); ?>" data-buy="<?php echo e($data->buy); ?>" data-price="<?php echo e($data->price); ?>" name="currency_id"><label class="pay-option-label" for="<?php echo e($data->id); ?>"><span class="pay-title"><em class="pay-icon cf cf-<?php echo e($data->icon); ?>"></em><span class="pay-cur"><?php echo e($data->symbol); ?></span></span><span class="pay-amount"><?php echo e(number_format($data->price, $basic->decimal)); ?></span></label></div>       </div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


</div><!-- .row --></div>

<div class="card-head"><span class="card-sub-title text-primary font-mid">Step 2</span><h4 class="card-title">Select Cryptocurrency</h4></div><div class="card-text"><p>Select cryptocurrency to continue purchase. Price will be calculated according to the current market price of coin. </p></div>

<div class="input-item input-with-label"><label class="input-item-label ucap text-exlight"></label><div class="relative"><span class="input-icon input-icon-right"><?php echo e($basic->currency); ?></span>
<select required  class="select-bordered select-block" id="mySelect" onchange="myFunction()" name="method_id">
<option selected>Choose...</option>
<?php $__currentLoopData = $currency; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option data-coin="<?php echo e($data->symbol); ?>"  data-cur="<?php echo e($data->id); ?>" data-buy="<?php echo e($data->buy); ?>"  data-name="<?php echo e($data->name); ?>" data-address="<?php echo e(App\Cryptowallet::whereCoin_id($data->id)->first()->address); ?>"  data-price="<?php echo e($data->price); ?>" value="<?php echo e($data->id); ?>"><?php echo e($data->name); ?> </option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select></div></div>




<div class="card-head"><span class="card-sub-title text-primary font-mid">Step 3</span><h4 class="card-title">Amount of purchase</h4></div><div class="card-text"><p>Enter the amount, you would like to purchase in <?php echo e($basic->currency); ?> to get the unit equivalent of the coin you will receive. </p></div>

<div class="input-item input-with-label"><label class="input-item-label ucap text-exlight"></label><div class="relative"><span class="input-icon input-icon-right"><?php echo e($basic->currency); ?></span><input id="mySelect2" onkeyup="myFunction()" placeholder="Enter Amount" class="input-bordered" type="number"></div></div>




<div class="token-overview-wrap"><div class="token-overview"><div class="row"><div class="col-md-3 col-sm-6"><div class="token-bonus token-bonus-sale"><span class="token-overview-title" id="coin">Coin Price</span><span class="token-overview-value bonus-on-sale">

<a id="price"><?php echo e($basic->currency_sym); ?>0.00</a>

</span></div></div><div class="col-md-3 col-sm-6"><div class="token-bonus token-bonus-amount"><span class="token-overview-title">Amount To Pay </span><small>(Amount + Charge)</small><span class="token-overview-value bonus-on-amount">

<a id="amount"><?php echo e($basic->currency_sym); ?>0.00</a>

</span></div></div><div class="col-md-3 col-sm-6"><div class="token-total"><span class="token-overview-title font-bold">USD Rate</span><span class="token-overview-value token-total-amount text-primary" id="usd">0.00</span></div></div>

<div class="col-md-3 col-sm-6"><div class="token-total"><span class="token-overview-title font-bold">What You Get</span><span class="token-overview-value token-total-amount text-primary" id="unit">0.00</span></div></div>


</div></div><div class="note note-plane note-danger note-sm pdt-1x pl-0"><p>Your coin purchase will be calculated based on exchange rate at the moment your transaction is confirm.</p></div></div><div class="card-head"><span class="card-sub-title text-primary font-mid">Step 3</span><h4 class="card-title">Make a payment</h4></div><div class="card-text"><p>Click the button below to activate payment button. You can make payment directly from your deposit wallet or you may pay online using your Credit/Debit Card.  </p></div>

<br>
<button href="#" class="btn btn-light-alt">Activate/Deactivate Payment Button</button>

<divv class="pay-buttons" id="myDIV"><div class="pay-button"><a href="#" data-toggle="modal" data-target="#get-pay-address" class="btn btn-secondary btn-between w-100">Pay From Wallet <em class="ti ti-wallet"></em></a></div><div class="pay-button-sap">or</div><div class="pay-button"><a href="#" data-toggle="modal" data-target="#pay-online" class="btn btn-primary btn-between w-100">Pay Online<em class="ti ti-credit-card"></em></a></div></divv>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("#hide").ready(function(){
    $("divv").hide();
  });

});
</script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("divv").toggle();
  });
});
</script>



<div class="pay-notes"><div class="note note-plane note-light note-md font-italic"><em class="fas fa-info-circle"></em><p>Coin will appear in your wallet after payment has been successfully made and approved by our team if offline. <br class="d-none d-lg-block"> </p></div></div></div> <!-- .card-innr --></div> <!-- .content-area --></div><!-- .col --> <!-- .container --></div><!-- .container --></div><!-- .page-content -->





<!-- Modal End --><div class="modal fade" id="get-pay-address" tabindex="-1"><div class="modal-dialog modal-dialog-md modal-dialog-centered"><div class="modal-content"><a href="#" class="modal-close" data-dismiss="modal" aria-label="Close"><em class="ti ti-close"></em></a><div class="popup-body"><h4 class="popup-title">Payment Via Wallet</h4><p>You are about to make a purchase of <strong id="unit2">0.00</strong> from your deposit wallet. <strong id="amount2"><?php echo e($basic->currency); ?>0.00</strong> will be deducted from your wallet and your <a id="name">crypto</a> wallet will be credited once payment is successful.</p>


<!-- .pay-info-list --><button class="btn btn-primary" data-dismiss="modal" data-toggle="modal" data-target="#pay-confirm">Buy <a id="name3">Coin</a>  <em class="ti ti-arrow-right mgl-4-5x"></em></button><div class="gaps-3x"></div><div class="note note-plane note-light mgb-1x"><em class="fas fa-info-circle"></em><p>Ensure you have updated your <a id="name2"></a> wallet address before proceeding to make purchase.</p></div><div class="note note-plane note-danger"><em class="fas fa-info-circle"></em><p><?php echo e($basic->sitename); ?> will not be liable to any loss of fund arising from supplying a wrong wallet address.</p></div></div></div><!-- .modal-content --></div><!-- .modal-dialog --></div><!-- Modal End -->


<form id="redirectForm" class="part-form" action="<?php echo e(route('buy.wallet')); ?>" method="post">
<?php echo csrf_field(); ?>
<div class="modal fade" id="pay-confirm" tabindex="-1"><div class="modal-dialog modal-dialog-md modal-dialog-centered"><div class="modal-content"><div class="popup-body"><h4 class="popup-title">Confirm Your Payment</h4><p class="lead text-primary">Your <a id="name6"></a> purchase of <strong id="unit3">0.00</strong> has been placed. </p><p>The coin balance will appear in your <a id="name4"></a>  wallet after your payment has been confirmed.</p><p>To <strong>ensure safety of coin</strong> Please confirm the <a id="name5"></a> wallet address belongs to you and it is correct.</p><div class="input-item input-with-label"><label for="token-address" class="input-item-label">Wallet Address</label><p id="address"></p></div>

<textarea row="1" name="address" required  hidden class="input-bordered" type="text" id="address2"></textarea>
<textarea row="1" name="amount" required   hidden class="input-bordered" type="text" id="amount3"></textarea>
<textarea row="1" name="coin"  required  hidden  class="input-bordered" type="text" id="cur"></textarea>
<textarea row="1" name="charge"  required  hidden class="input-bordered" type="text" id="charge"></textarea>
<textarea row="1" name="unit"  required  hidden class="input-bordered" type="text" id="unit4"></textarea>

<div class="pdb-2-5x pdt-1-5x"><input required type="checkbox" class="input-checkbox input-checkbox-md" id="agree-term"><label for="agree-term">I hereby agree to the <strong> purchase aggrement &amp; terms</strong>.</label></div>

<!-- .input-item --><ul class="d-flex flex-wrap align-items-center guttar-30px"><li><button type="submit" class="btn btn-primary">Confirm Payment</button></li><li class="pdt-1x pdb-1x"><a href="#" data-dismiss="modal" data-toggle="modal" data-target="#pay-online" class="link link-primary">Make Online Payment</a></li></ul><div class="gaps-2x"></div><div class="gaps-1x d-none d-sm-block"></div><div class="note note-plane note-light mgb-1x"><em class="fas fa-info-circle"></em><p>To change your wallet address or to receive into another <strong id="name7"></strong> wallet, <a href="<?php echo e(route('wallet')); ?>">Click Here</a>.</p></div><div class="note note-plane note-danger"><em class="fas fa-info-circle"></em><p><?php echo e($basic->sitename); ?> will not be liable to any loss arising from you providing a wrong <strong id="name8"></strong> wallet address.</p></div></div></div><!-- .modal-content --></div><!-- .modal-dialog --></div><!-- Modal End -->
</form>

<form id="redirectForm" class="part-form" action="<?php echo e(route('buy.online')); ?>" method="post">
<?php echo csrf_field(); ?>
<div class="modal fade" id="pay-online" tabindex="-1"><div class="modal-dialog modal-dialog-md modal-dialog-centered"><div class="modal-content"><div class="popup-body"><h4 class="popup-title">Confirm Your Payment</h4><p class="lead text-primary">Your <a id="name9"></a> purchase of <strong id="unit5">0.00</strong> has been placed. </p><p>The coin balance will appear in your <a id="name11"></a>  wallet after your payment has been confirmed.</p><p>To <strong>ensure safety of coin</strong> Please confirm the <a id="name10"></a> wallet address belongs to you and it is correct.</p>


<h5 class="mgt-1-5x font-mid">Select payment method:</h5><ul class="pay-list guttar-20px"><li class="pay-item"><input onclick="myFunctions(this.value)" value="stripe" type="radio" class="pay-check" name="pay-option" id="pay-coin"><label class="pay-check-label" for="pay-coin"><img src="<?php echo e(asset('dash-assets/images/stripe.png')); ?>" alt="pay-logo"></label></li><li class="pay-item"><input  onclick="myFunctions(this.value)" value="paystack"  type="radio" class="pay-check" name="pay-option" id="pay-coinpay"><label class="pay-check-label" for="pay-coinpay"><img src="<?php echo e(asset('dash-assets/images/paystack.png')); ?>" alt="pay-logo"></label></li><li class="pay-item"><input  onclick="myFunctions(this.value)" value="bank"  type="radio" class="pay-check" name="pay-option" id="pay-paypal"><label class="pay-check-label" for="pay-paypal"><img src="<?php echo e(asset('dash-assets/images/bank.png')); ?>" alt="pay-logo"></label></li>

<li class="pay-item"><input  onclick="myFunctions(this.value)" value="rave"  type="radio" class="pay-check" name="pay-option" id="pay-paypal1"><label class="pay-check-label" for="pay-paypal1"><img src="<?php echo e(asset('dash-assets/images/rave.png')); ?>" alt="pay-logo"></label></li>

</ul>

<script>
function myFunctions(radio) {
document.getElementById("result").value = radio;
}
</script>
<input name="radio" hidden id="result">
<span class="text-light font-italic mgb-2x"><small>* Payment gateway company may charge you a processing fees.</small></span>

<textarea row="1" name="address" required hidden class="input-bordered" type="text" id="address22"></textarea>
<textarea row="1" name="amount"  required hidden class="input-bordered" type="text" id="amount33"></textarea>
<textarea row="1" name="coin"  required  hidden  class="input-bordered" type="text" id="cur1"></textarea>
<textarea row="1" name="charge"  required  hidden class="input-bordered" type="text" id="charge1"></textarea>
<textarea row="1" name="unit"  required  hidden class="input-bordered" type="text" id="unit41"></textarea>

<div class="pdb-2-5x pdt-1-5x"><input required checked type="checkbox" class="input-checkbox input-checkbox-md"><label for="agree-term">I hereby agree to the <strong> purchase aggrement &amp; terms</strong>.</label></div>

<!-- .input-item --><ul class="d-flex flex-wrap align-items-center guttar-30px"><li><button type="submit" class="btn btn-primary">Confirm Payment</button></li><li class="pdt-1x pdb-1x"><a href="#" data-dismiss="modal" data-toggle="modal" data-target="#get-pay-address" class="link link-primary">Pay Using Wallet</a></li></ul><div class="gaps-2x"></div><div class="gaps-1x d-none d-sm-block"></div><div class="note note-plane note-light mgb-1x"><em class="fas fa-info-circle"></em><p>To change your wallet address or to receive into another <strong id="name7"></strong> wallet, <a href="<?php echo e(route('wallet')); ?>">Click Here</a>.</p></div><div class="note note-plane note-danger"><em class="fas fa-info-circle"></em><p><?php echo e($basic->sitename); ?> will not be liable to any loss arising from you providing a wrong <strong id="name8"></strong> wallet address.</p></div></div></div><!-- .modal-content --></div><!-- .modal-dialog --></div><!-- Modal End -->
</form>







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

<?php echo $__env->make('include.userdashboard', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>