<?php echo $__env->make('front.layouts.old_header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<!--Main Layout-->
<main>
    <div class="container">
        <section class="screen_5  text-center">
            <div class="row">
                <div class="col-12" style="margin-top:0px">
                    <img src="/assets/front/img/rebrandedLogo/logo1.png" class="img-responsive img">
                </div>
                <?php if(isset($fees['total_payment_link']) && $fees['total_payment_link'] != ''): ?>
                <div class="col-12">
                    <h3 style="color:#f89010; margin-bottom: 10px">Congratulations! Your loan is approved</h3>
                    <h4>Please proceed with your payment</h4>
                </div>
                <div class="card shadow-sm border-0" style="max-width: 800px; margin: auto;">
                    <div class="card-body" style="width: 600px; font-family=sans-serif;">
                        <h3 class="card-title text-center fw-bold">Payment Details</h3>
                        <?php $__currentLoopData = $fees['payment_details']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment_type => $details): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php if($payment_type=='Total Payment'): ?>
                                <hr style="border-top:2px solid rgba(0,0,0,.3);">
                            <?php endif; ?>
                            <div class="d-flex justify-content-between gap-1 mb-3">
                                <div>
                                    <span class="d-block"><?php echo $payment_type; ?></span>
                                    <?php if(!in_array($payment_type, ['Down Payment', 'Total Payment', 'Legal Charges'])): ?>
                                        <small class="text-muted">(Including GST)</small>
                                    <?php endif; ?>
                                </div>
                                <span class="fw-bold">₹ <?php echo $details['amount']; ?></span>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <a href="<?php echo $fees['total_payment_link']; ?>" >
                            <div class="col-sm-3 btn btn-primary">
                                <p style="padding-bottom: 0; margin-bottom: 0!important;">Pay Now</p>
                            </div>
                        </a>
                    </div>
                </div>
                <?php if(isset($fees['sanction_letter']) && $fees['sanction_letter']): ?>
                <div class="col-12 mt-3">
                    <div class="sanction-download-text">
                        <a href="<?php echo e($fees['sanction_letter']); ?>" download='sanction_letter'>Download Sanction Letter</a>
                    </div>
                </div>
                <?php endif; ?>
                <div class="col-12 mt-4">
                    <?php if(isset($lender_id) && $lender_id == 10): ?>
                    <p>
                        Thank you for completing the KYC process. We will update you on the disbursement shortly
                    </p>
                    <?php else: ?>
                    <p>
                        Thank you for signing the <?php if(isset($is_bnpl) && $is_bnpl ==1){ echo "service";}else{echo "loan";} ?> agreement. We will update you on the disbursement shortly
                    </p>
                    <?php endif; ?>
                    <p>
                        If you have any query please email at <a href="mailto:operations@creditfair.in" style="color: #4a1481!important;">operations@creditfair.in</a>  or WhatsApp/Call at +919967235047.
                    </p>
                </div>
                <?php elseif(isset($fees['set_auto_debit'])): ?>
                <div class="col-12">
                    <h3 style="margin-bottom: 10px">Congratulations!</h3>
                </div>
                <div class="col-12 mt-4">
                    <?php if(isset($lender_id) && $lender_id == 10): ?>
                    <p>
                        Thank you for completing the KYC process. We will update you on the disbursement shortly
                    </p>
                    <?php else: ?>
                    <p>
                        Thank you for signing the <?php if(isset($is_bnpl) && $is_bnpl ==1){ echo "service";}else{echo "loan";} ?> agreement. We will update you on the disbursement shortly
                    </p>
                    <?php endif; ?>
                    <p>
                        If you have any query please email at <a href="mailto:operations@creditfair.in" style="color: #4a1481!important;">operations@creditfair.in</a>  or WhatsApp/Call at +919967235047.
                    </p>
                </div>
                <div class="container">
                    <div>
                    <a href="<?php echo $fees['set_auto_debit']; ?>">
                       <div class="col-sm-3 btn btn-primary">
                            <div style="padding-bottom: 0; margin-bottom: 0!important;">Setup my Auto-Debit Now </div><div style="text-align:center;font-size:11px;color:#ffffff">via Net-Banking</div>
                        </div>
                    </a>
                    </div>
                </div>    
                <?php else: ?>
                    <div class="col-12">
                        <h3 style="margin-bottom: 10px">Congratulations!</h3>
                    </div>
                    <div class="col-12 mt-4">
                        <?php if(isset($lender_id) && $lender_id == 10): ?>
                        <p>
                            Thank you for completing the KYC process. We will update you on the disbursement shortly
                        </p>
                        <?php else: ?>
                        <p>
                            Thank you for signing the <?php if(isset($is_bnpl) && $is_bnpl ==1){ echo "service";}else{echo "loan";} ?> agreement. We will update you on the disbursement shortly
                        </p>
                        <?php endif; ?>
                        <p>
                            If you have any query please email at <a href="mailto:operations@creditfair.in" style="color: #4a1481!important;">operations@creditfair.in</a>  or WhatsApp/Call at +919967235047.
                        </p>
                    </div>
                <?php endif; ?>
            </div>

            <div class="row footer-privacy">
                <div class="col-12">
                    <small class="text-muted">We value your privacy. All your data is kept strictly confidential.</small>
                </div>
            </div>
        </section>
    </div>
</main>
<?php echo $__env->make('front.layouts.footerfixed', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
