IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/4f816474d497664270c9ac72650f5737e642e6a7.php

<?php $__env->startSection('content'); ?>
<div role="tabpanel" class="tab-pane in active" id="details" aria-expanded="true">
    <div class="card" id="details">
        <div class="body">                                
            <div class="row">
                <div class="col-sm-6 col-sm-offset-1">
                    <address>
                        <strong> Student Name : </strong><?php echo e($student->firstName); ?> <?php echo e($student->middleName); ?> <?php echo e($student->lastName); ?><br>
                        <strong> Father Name : </strong><?php echo e($student->father_fname); ?> <?php echo e(isset($student->father_lname) ? $student->father_lname : ''); ?><br>
                        <strong> Mobile : </strong><?php echo e($student->father_mobile); ?><br>
                        <strong> Class : </strong><?php echo e($student->classM->className); ?><br>
                        <strong> Section : </strong><?php echo e($student->section->sectionName); ?><br>
                        <strong> Ec No. : </strong><?php echo e($student->ecNo); ?><br>
                        <?php if($sessionPending > 0): ?>
                        <p style="color:red"><u>Note</u>: You have an outstanding amount of Rs. <?php echo e($sessionPending); ?> in previous session.</p>
                        <?php endif; ?>
                    </address>

                    <?php if(session('status')): ?>
                    <?php if(session('status') == 'Payment Error'): ?>
                    <div class="alert alert-warning">
                        <?php echo e(session('status')); ?>

                    </div>
                    <?php else: ?>
                    <div class="alert alert-success">
                        <?php echo e(session('status')); ?>

                    </div>
                    <?php endif; ?>
                    <?php endif; ?>
                </div>
            </div>
            <form action="<?php echo e(url('/student/payfees')); ?>" method= "get">
                            <div class="col-md-12">
                                    <div class="col-sm-4 form-control-label">
                                        <label for="classname"><strong>Choose a session</strong></label>
                                    </div>
                                        <div class="col-sm-6">
                                            <div class="form-group">
                                                <?php $k =0 ; ?>
                                            <?php $__currentLoopData = $fy; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sessions): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <input type="radio" id="session<?php echo e($k); ?>" name="session" value="<?php echo e($sessions['id']); ?>" <?php if($sessions['id'] == Session::get('idStudent')) echo 'checked';?>>
                                            <label for="session<?php echo e($k); ?>">Session </label> <strong>(<?php echo e($sessions['yearName']); ?>)</strong> <br>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                        </div>
                                    <div class="col-sm-2">
                                    <input class="btn btn-primary btn-round" type="submit" value="Switch" style="background-color:black;color:white;"/>
                                    </div>
                        </div>       
                </form>
            <?php if($plan == ''): ?>
            <form action="<?php echo e(url('/student/payfees')); ?>" method= "get" id="feesubmission">
                            <div class="col-md-12">
                                    <div class="col-sm-4 form-control-label">
                                        <label for="classname"><strong>Choose a payment method and press view button</strong></label>
                                    </div>
                                        <div class="col-sm-6">
                                            <div class="form-group">
                                            <input type="radio" id="paymode1" name="paymode" value="Plan A" <?php if($type == "Plan A") echo 'checked';?>>
                                            <?php
                                                $plana_class_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
                                                ->where('idSection', '=', $student->idSection)
                                                ->where('idFinancialYear', '=', $student->idFinancialYear)
                                                ->where('studentCategory', '=', $student->studentType)
                                                ->where('feeheadLabel', 'LIKE', 'Plan A%')
                                                ->whereNull('idStudent');
                                                //   ->get();
                                                $plana_allcat_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
                                                        ->where('idSection', '=', $student->idSection)
                                                        ->where('studentCategory', '=', 'All')
                                                        ->where('idFinancialYear', '=', $student->idFinancialYear)
                                                        ->where('feeheadLabel', 'LIKE', 'Plan A%')
                                                        ->whereNull('idStudent');
                                                //   ->get();
                                                $plana_feeheads = \DB::table('feeheads')->where('idStudent', '=', $student->idStudent)
                                                        ->where('idFinancialYear', '=', $student->idFinancialYear)
                                                        ->where('feeheadLabel', 'LIKE', 'Plan A%')
                                                        ->union($plana_class_feeheads)
                                                        ->union($plana_allcat_feeheads)
                                                        ->orderBy('toDate')
                                                        ->get();
                                                $afeetotal = $plana_feeheads->sum('amount');
                                            ?>
                                            <label for="paymode1">Fees in Full Payment</label> of <strong>₹<?php echo e($afeetotal); ?></strong> <br>
                                            <input type="radio" id="paymode2" name="paymode" value="Plan B" <?php if($type == "Plan B") echo 'checked';?>>
                                            <?php
                                                $planb_class_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
                                                ->where('idSection', '=', $student->idSection)
                                                ->where('idFinancialYear', '=', $student->idFinancialYear)
                                                ->where('studentCategory', '=', $student->studentType)
                                                ->where('feeheadLabel', 'LIKE', 'Plan B%')
                                                ->whereNull('idStudent');
                                                //   ->get();
                                                $planb_allcat_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
                                                        ->where('idSection', '=', $student->idSection)
                                                        ->where('studentCategory', '=', 'All')
                                                        ->where('idFinancialYear', '=', $student->idFinancialYear)
                                                        ->where('feeheadLabel', 'LIKE', 'Plan B%')
                                                        ->whereNull('idStudent');
                                                //   ->get();
                                                $planb_feeheads = \DB::table('feeheads')->where('idStudent', '=', $student->idStudent)
                                                        ->where('idFinancialYear', '=', $student->idFinancialYear)
                                                        ->where('feeheadLabel', 'LIKE', 'Plan B%')
                                                        ->union($planb_class_feeheads)
                                                        ->union($planb_allcat_feeheads)
                                                        ->orderBy('toDate')
                                                        ->get();
                                                $bfeetotal = $planb_feeheads->sum('amount');
                                            ?>
                                            <label for="paymode2">Fees in Terms</label> of <strong>₹<?php echo e($bfeetotal); ?></strong> <br>  
                                            <input type="radio" id="paymode3" name="paymode" value="Plan C" <?php if($type == "Plan C") echo 'checked';?>>
                                            <?php
                                                $planc_class_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
                                                ->where('idSection', '=', $student->idSection)
                                                ->where('idFinancialYear', '=', $student->idFinancialYear)
                                                ->where('studentCategory', '=', $student->studentType)
                                                ->where('feeheadLabel', 'LIKE', 'Plan C%')
                                                ->whereNull('idStudent');
                                                //   ->get();
                                                $planc_allcat_feeheads = \DB::table('feeheads')->where('idClass', '=', $student->idClass)
                                                        ->where('idSection', '=', $student->idSection)
                                                        ->where('studentCategory', '=', 'All')
                                                        ->where('idFinancialYear', '=', $student->idFinancialYear)
                                                        ->where('feeheadLabel', 'LIKE', 'Plan C%')
                                                        ->whereNull('idStudent');
                                                //   ->get();
                                                $planc_feeheads = \DB::table('feeheads')->where('idStudent', '=', $student->idStudent)
                                                        ->where('idFinancialYear', '=', $student->idFinancialYear)
                                                        ->where('feeheadLabel', 'LIKE', 'Plan C%')
                                                        ->union($planc_class_feeheads)
                                                        ->union($planc_allcat_feeheads)
                                                        ->orderBy('toDate')
                                                        ->get();
                                                $cfeetotal = $planc_feeheads->sum('amount');
                                            ?>
                                            <label for="paymode3">Fees in Installments</label> of <strong>₹<?php echo e($cfeetotal); ?></strong>  <br>  
                                            </div>
                                        </div>
                                    <div class="col-sm-2">
                                    <input class="btn btn-primary btn-round" type="submit" value="View" style="background-color:black;color:white;"/>
                                    </div>
                        </div>       
                </form>
                <?php endif; ?>
            <div class="mt-40"></div>
            <div class="row">

                <div class="col-md-12" style="margin:10px;">
                    <div class="table-responsive col-md-12">
                            <?php 
                            $custID = $student->idStudent . "F" . $student->idFinancialYear;
                            $logo = \App\School::where('idSchool', '=', $student->idSchool)->first();
                            ?>
                            

                            <table class="table table-hover">
                                <thead>
                                    <tr>
                                        <th></th>
                                        <th style="width:60px;">Due Date</th>
                                        <th>Particular</th>
                                        <th>Amount</th>
                                        <th>Discount</th>
                                        <th>Fine</th>
                                        <th>Fine Collected</th>
                                        <th>Amount Collected</th>
                                        <th>Status</th>
                                    </tr>
                                </thead>
                                <tbody>
                                        <?php  $paidFine=0; $disableHeader = true; $totalPaid = 0;$totalAmount = 0;  $accessAmount = 0;$balance = 0;?>
                                        <?php $__currentLoopData = $feeData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php 
                                $paidFine = $paidFine + $var['transaction']['paid_fine'];
                                $totalPaid = $totalPaid + $var['transaction']['paid'];
                                $balance = $balance + $var['balance'];
                                $accessAmount = $accessAmount + $var['extra_amount'];
                                $totalAmount = $totalAmount + $var['total_amount'];
                                ?>
                                <tr>
                                    <td>
                                        <?php if($var['isEnabled'] == true && $var['isPaid'] != "Paid"): ?>
                                        <div class="checkbox-inline" style="padding-left:10px;">
                                            <?php if($disableHeader): ?>
                                            <input type="checkbox" name="selectedHeaders[]" value="<?php echo e($var['idFeehead']); ?>" class="feeclass">
                                            <?php $disableHeader = false; ?>
                                            <?php endif; ?>
                                        </div>
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e(Carbon\Carbon::parse($var['toDate'])->format('d-m-Y')); ?></td>
                                    <td>
                                    <?php echo e($var['feeheadName']); ?>

                                    <input type="hidden" name='feeheads[<?php echo e($var['idFeehead']); ?>][idFeehead]' value="<?php echo e($var['idFeehead']); ?>">
                                    </td>
                                    <td class='amt'>
                                    <?php echo e($var['amount']); ?>

                                    <input type="hidden" name='feeheads[<?php echo e($var['idFeehead']); ?>][famount]' value="<?php echo e($var['amount']); ?>">
                                    </td>
                                    <td class="discount">
                                    <?php echo e($var['discount']); ?>

                                    <input type="hidden" name='feeheads[<?php echo e($var['idFeehead']); ?>][discount]' value="<?php echo e($var['discount']); ?>">
                                    </td>
                                    <td class="fine">
                                    <?php echo e($var['fine']); ?>

                                    <input type="hidden" name='feeheads[<?php echo e($var['idFeehead']); ?>][fine]' value="<?php echo e($var['fine']); ?> ">
                                    </td>
                                    <td><?php echo e($var['transaction']['paid_fine']); ?></td>
                                    <td><?php echo e($var['transaction']['paid']); ?></td>
                                    <td>
                                    <?php if($var['isPaid'] == "Upcoming"): ?>
                                    <span class="badge badge-info">UPCOMING</span>
                                    <?php else: ?>
                                        <?php if($var['isPaid'] == "Paid"): ?>
                                        <span class="badge badge-success">Paid </span>
                                        <?php else: ?>
                                        <?php if($var['isPaid'] == "Due"): ?>
                                        <span class="badge badge-danger">DUE</span>
                                        <?php else: ?>
                                        <span class="badge badge-info">Partial-Paid</span>
                                        <?php endif; ?>
                                        <?php endif; ?>
                                    <?php endif; ?>    
                                    </td>
                                </tr>       
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                                <tr>
                                    <th>Date</th>
                                    <th>Header</th>
                                    <th>Amount</th>
                                    <!--<th>Balance</th>-->
                                    <th>Fine</th>
                                    <th>Payment Mode</th>
                                    <th>Print</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $paidfees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($var->paymentDate); ?></td>
                                    <?php 
                                        $headers = \App\StudentTransactionDetail::where('idTransaction', $var->idTransaction)->where(function($query) {
                                                    $query->whereNull('status');
                                                    $query->orWhere('status', '=', 'In-Process');
                                                    $query->orWhere('status', '=', 'Cleared');
                                                    $query->orWhere('status', '=', 'Success');
                                                })->pluck('idFeehead')->toArray();
                                        $headerName =  \DB::table('feeheads')->whereIn('idFeehead',$headers)->pluck('feeheadName')->toArray();      
                                       ?>
                                       <td>
                                        <?php $__currentLoopData = $headerName; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key =>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <?php echo e($value); ?><br>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                       </td>
                                    <td><?php echo e($var->totalPaid); ?></td>
                                    <td><?php echo e($var->fine); ?></td>
                                    <td><?php echo e($var->paymentMode); ?></td>
                                    <td><a href="<?php echo e(url('student/stdtransaction/'.$var->idTransaction.'/print')); ?>" target="_blank" class="btn btn-sm btn-info">Print</a></td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                    <h5>Lesser Paid Receipt</h5>
                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                                <tr>
                                    <th>Date</th>
                                       <th>Header</th>
                                    <th>Amount</th>
                                    <!--<th>Balance</th>-->
                                    <th>Fine</th>
                                    <th>Payment Mode</th>
                                    <th>Print</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $lesserfees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php $details = DB::table('lesser_transaction_details')->selectRaw('SUM(lesser_transaction_details.fine) as fine')->where('idLesserTransaction',$var->idLesserTransaction)->first(); ?>
                                <tr>
                                    <td><?php echo e($var->paymentDate); ?></td>
                                    <?php 
                                        $headers = \App\LesserTransactionDetail::where('idLesserTransaction', $var->idLesserTransaction)->where(function($query) {
                                                    $query->whereNull('status');
                                                    $query->orWhere('status', '=', 'In-Process');
                                                    $query->orWhere('status', '=', 'Cleared');
                                                    $query->orWhere('status', '=', 'Success');
                                                })->pluck('idFeehead')->toArray();
                                        $headerName =  \DB::table('feeheads')->whereIn('idFeehead',$headers)->pluck('feeheadName')->toArray();      
                                       ?>
                                       <td>
                                        <?php $__currentLoopData = $headerName; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key =>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <?php echo e($value); ?><br>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                       </td>
                                    <td><?php echo e($var->totalPaid); ?></td>
                                    <td><?php if(isset($details->fine))
                                       {
                                        echo $details->fine;
                                       }?></td>
                                    <td><?php echo e($var->paymentMode); ?></td>
                                    <?php if($var->status == 'Cleared' || $var->status == null): ?>
                                    <td><a href="<?php echo e(url('student/stdtransaction/lessamt/'.$var->idLesserTransaction.'/print')); ?>" target="_blank" class="btn btn-sm btn-info">Print</a></td>
                                    <?php endif; ?>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div>


            </div>
            <hr>
            <div class="row col-md-12">
                <div class="col-md-5">
                    <div class="row clearfix">
                        <div class="col-sm-6 form-control-label">
                            <label for="classname">Payable Amount</label>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <?php if(isset($prevaccess_fee->excessAmount)): ?>
                                <?php if($prevaccess_fee->excessAmount > 0): ?>
                                <label id="access_note"><b>Excess Amount Available: </b><?php echo e($prevaccess_fee->excessAmount); ?> </label>
                                <?php endif; ?>
                                <?php endif; ?>
                                <input type="text" name="payableAmount" class="form-control" readonly="readonly"  style="color: black;font-size: 1.2em;">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 text-right">
                    <p class="m-b-0"><b>Fee Total: </b><span  id='total_fee'></span>
                        <input type="hidden" name="feeTotal" id="feetotal">
                    </p>
                    <p class="m-b-0">
                        <b>Discount: </b>
                        <span  id='total_discount'></span>
                        <input type="hidden" name="discount" id="discounttotal">
                    </p>     
                    <p class="m-b-0">
                        <b>Fine: </b>
                        <span id='total_fine'></span>
                        <input type="hidden" name="fine" id="finetotal">
                    </p>
                    <p class="m-b-0">
                        <b>Cheque Bounce Penalty: </b>
                        <span id="penaltyAmt"></span>
<?php
$chqbounce = \App\StudentTransaction::where('idStudent', '=', $student->idStudent)
        ->where('idFinancialYear', '=', $student->idFinancialYear)
        ->where('status', '=', 'Bounced')
        ->get();

$chqPenaltyAmount = 0;
$chqPenaltyPaid = 0;
$chqPenaltyUnPaid = 0;
if (isset($chqbounce)) {
    foreach ($chqbounce as $chqFine) {
        if ($chqFine->chqFineStatus == 1)
            $chqPenaltyPaid = $chqPenaltyPaid + $chqFine->chequeBounceCharge;
        else
            $chqPenaltyUnPaid = $chqPenaltyUnPaid + $chqFine->chequeBounceCharge;

        $chqPenaltyAmount = $chqPenaltyAmount + $chqFine->chequeBounceCharge;
    }
}
?>
                        <?php if(isset($chqbounce)): ?>
                        <?php echo e($chqPenaltyAmount); ?>

                        <?php if($chqPenaltyAmount==0): ?>
                        <span></span>
                        <?php elseif($chqPenaltyAmount > $chqPenaltyPaid): ?>
                        <span style="color:red"> | <?php echo e($chqPenaltyUnPaid); ?>(Unpaid)</span>
                        <?php else: ?>
                        <span style="color:green">(Paid)</span>
                        <?php endif; ?>
                        <?php else: ?>
                        <span>0.00</span>
                        <?php endif; ?>
                    </p>
                    <p class="m-b-0"><b>Excess Amount : </b>
                        <?php if(isset($prevaccess_fee->excessAmount)): ?>
                        <?php echo e($prevaccess_fee->excessAmount + $accessAmount); ?>

                        <?php else: ?>
                        <span><?php echo e($accessAmount); ?></span>
                        <?php endif; ?>
                    </p>
                    <p class="m-b-0"><b>Fine Amount : </b>
                    <?php echo e($paidFine); ?>  
                    </p> 
                    <p class="m-b-0"><b>Total Amount : </b>
                    <?php echo e($totalAmount); ?>

                    </p> 
                    <p class="m-b-0"><b>Total Paid: </b>
                        <span id='total_paid'>
                        <?php echo e($totalPaid); ?>

                        </span>
                    </p>
                    <p class="m-b-0"><b>Balance Amount: </b>
                    <?php echo e($balance); ?>     

                    </p>
                </div>
            </div>
            <!--<hr>-->
            <div id="juspayDiv"></div>
            <hr>
            <div class="hidden-print col-md-12 text-right">
                <?php if($sessionPending == 0): ?>
                    <button class="btn btn-primary btn-round" id="submit-btn">Pay Now</button>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script src="https://ebz-static.s3.ap-south-1.amazonaws.com/easecheckout/easebuzz-checkout.js"></script> 
<script>
// Saving form data   
$(document).ready(function(){
 $('.otherpaymode').hide(); 
 $('#paymode').change(function() {
        var val = $(this).val();
        if((val == 'Cheque')){
           $('.otherpaymode').show();
        }else if(val == 'DD'){
           $('.otherpaymode').show();
        }else{
           $('.otherpaymode').hide();
        }
    });
});

var feeheaderIds = [];
$('.feeclass').change(function() {
    feeheaderIds = [];
    $("input:checkbox[name='selectedHeaders[]']:checked").each(function () {
            feeheaderIds.push($(this).val());
    });
    if(feeheaderIds.length>0)
    $.ajax({
            url: "<?php echo e(url('/student/feeheaders')); ?>"+'/' +feeheaderIds + "/students/"+<?php echo e($student->idStudent); ?>,
            type: "GET",
            dataType: "json",
                success:function(data) {
                     $('input[name="payableAmount"]').val(data);
                }
            });
    else    $('input[name="payableAmount"]').val(" ");      
});

function calculatePenalty(){
        var penaltyAmt = parseFloat($('#penalty').val());
        console.log(penaltyAmt);
        $('#penaltyAmt').text(penaltyAmt.toFixed(2));
    }
    
var sum = 0;
var discount = 0;
var fine = 0;
// iterate through each td based on class and add the values
$(".amt").each(function() {

    var value = $(this).text();
    // add only if the value is number
    if(!isNaN(value) && value.length != 0) {
        sum += parseFloat(value);
    }
    $('#total_fee').text(sum.toFixed(2));
    
});

$(".discount").each(function() {

    var value = Number($(this).text());
    // add only if the value is number
    if(!isNaN(value) && value.length != 0) {
        discount += parseFloat(value);
    }
   $('#total_discount').text(discount.toFixed(2));
});
$(".fine").each(function() {

    var value = Number($(this).text());
    // add only if the value is number
    if(!isNaN(value) && value.length != 0) {
        fine += parseFloat(value);
    }
    $('#total_fine').text(fine.toFixed(2));
});
 var ftotal = parseFloat($('#total_fee').text()); 
 var tdiscount = parseFloat($('#total_discount').text());
 var tfine = parseFloat($('#total_fine').text());
 var paidtot = parseFloat($('#total_paid').text());
 var fbalance = parseFloat(ftotal+paidtot);
 $('#total_balance').text(fbalance.toFixed(2));
 var feetotal = parseFloat(ftotal);
 $('#feetotal').val(feetotal.toFixed(2));
 
 var distotal = parseFloat($('#total_discount').text()); 
 $('#discounttotal').val(distotal.toFixed(2));

 var tf = parseFloat($('#total_fine').text()); 
 $('#finetotal').val(tf.toFixed(2));
 
 var baltotal = parseFloat(ftotal+tfine-tdiscount);
 $('#balance_total').text(baltotal.toFixed(2));
</script>
<script>
    document.getElementById('submit-btn').onclick = function (e) {
        e.preventDefault();
        var requestPayload = JSON.stringify({
            amount: $('input[name="payableAmount"]').val(),
            idStudent: <?php echo e($student->idStudent); ?>,
            idFinancialYear: <?php echo e($student->idFinancialYear); ?>,
            selectedHeaders : feeheaderIds,
        });        
        $("#submit-btn").prop('disabled', true);
        var requestOptions = {
            method: "POST",
            headers: {
                "Content-Type": "application/json",
                "X-CSRF-TOKEN": "<?php echo e(csrf_token()); ?>",
            },
            body: requestPayload,
        };
        fetch("https://online-login.online/student/makePayment", requestOptions)
          .then((response) => response.json())
          .then((result) => {
//               console.log(result);
               $('#paymentModal').modal('show')
               var easebuzzCheckout = new EasebuzzCheckout(result.key, 'prod')
               var options = {
                    access_key: result.token, // access key received via Initiate Payment
                    onResponse: (response) => {
                        if (response.status == "success") {
                            window.location.href = "<?php echo e(url('student/payfees')); ?>";
                        } 
                    },
                    theme: "#11385b" // color hex
                }
                $('#submit-btn').hide();
                easebuzzCheckout.initiatePayment(options);
            })
          .catch((error) => console.log("error", error));
        return false;
    }
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('students.student_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

Copyright © 2021 - 2025 IMMREX7