{{-- Extends layout --}}
@extends('layout.default')
{{-- Content --}}
@section('content')
<script src="https://www.paypal.com/sdk/js?client-id={{ env('PAYPAL_LIVE_CLIENT_ID') }}"></script>
<div class="content d-flex flex-column flex-column-fluid">
    <div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
        <div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
            <!--begin::Info-->
            <div class="d-flex align-items-center flex-wrap mr-2">
                <!--begin::Page Title-->
                <h5 class="text-dark font-weight-bold mt-2 mb-2 mr-5">Fees</h5>
                <!--end::Page Title-->
                <!--begin::Actions-->
                <div class="subheader-separator subheader-separator-ver mt-2 mb-2 mr-4 bg-gray-200"></div>
                <!--end::Actions-->
            </div>
            <!--end::Info-->
            <!--begin::Toolbar-->
            <div class="d-flex align-items-center">
                <!--begin::Daterange-->
                <a href="#" class="btn btn-sm btn-light font-weight-bold mr-2" id="kt_dashboard_daterangepicker" data-toggle="tooltip" title="" data-placement="left">
                    <span class="text-muted font-size-base font-weight-bold mr-2" id="kt_dashboard_daterangepicker_title">Today:</span>
                    <span class="text-primary font-size-base font-weight-bolder" id="kt_dashboard_daterangepicker_date">Dec 6</span>
                </a>
                <!--end::Daterange-->
            </div>
            <!--end::Toolbar-->
        </div>
    </div>
    <div class="d-flex flex-column-fluid">
        <div class="container">

            <div class="card card-custom example example-compact">
                <div class="card-header">
                    <h3 class="card-title">
                        PAY NOW
                    </h3>
                </div>
                <!--begin::Form-->
                <form class="form" method="POST">
                    @csrf
                    @if(\Session::has('error'))
                    <div class="alert alert-danger">{{ \Session::get('error') }}</div>
                    {{ \Session::forget('error') }}
                    @endif
                    @if(\Session::has('success'))
                    <div class="alert alert-success">{{ \Session::get('success') }}</div>
                    {{ \Session::forget('success') }}
                    @endif
                    <div class="card-body">
                        @if ($errors->any())
                        <div class="alert alert-danger">
                            <strong>Error!</strong>
                            <ul>
                                @foreach ($errors->all() as $error)
                                <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                        @endif
                        <div class="form-group row">
                            <label for="Studentid" class="col-sm-3 control-label">
                                Student</label>
                            <div class="col-lg-6 col-md-9 col-sm-12">{{ $dueamount[0]->participant_name }}
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="Studentid" class="col-sm-3 control-label">
                                Batch:</label>
                            <div class="col-sm-5">{{ $dueamount[0]->name }}
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="Fees" class="col-sm-3 control-label">
                                Course Fees</label>
                            <div class="col-lg-6 col-md-9 col-sm-12">{{ $dueamount[0]->clientcur }} {{ $dueamount[0]->clientamount }}</div>
                        </div>
                        <div class="form-group row">
                        <?php if(!empty($dueamount[0]->course_id)){
                                if($dueamount[0]->course_id == 24){ ?>
                                <div class="col-lg-6 col-md-9 col-sm-12"> 
                                    <a class="btn btn-primary" href="{{ route('processcoursefees',['cjid'=>$dueamount[0]->cjid,'courseamount'=>1000]) }}">Pay Full Course Fees - USD 999</a>
                                </div>
                                <div class="col-lg-6 col-md-9 col-sm-12"> 
                                    <a class="btn btn-primary" href="{{ route('processcoursefees',['cjid'=>$dueamount[0]->cjid,'courseamount'=>333]) }}">Pay in Installment - USD 333</a>
                                </div>
                                <?php    } } ?>
                        </div>
                    </div>
                </form>
                <!--end::Form-->
            </div>

        </div>
    </div>
</div>
@endsection
{{-- Scripts Section --}}
@section('scripts')
<script src="{{ asset('js/app.js') }}" type="text/javascript"></script>
@endsection