@push('css')
    <link href="{{ asset('css/payment_setting.css') }}" rel="stylesheet">
@endpush
<div id="payment-report-modal" class="modal fade" role="dialog" style="padding-top: 50px">
    <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xs-12 mx-auto">
        <div class="modal-dialog modal-dialog-centered">
            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">Add Payment Or Update New Credit Card</h4>
                </div>
                <div class="modal-body">
                    <div class="payment-report-modal">
                        <div class="container-fluid py-3">

                            <div class="row">

                                <div class="card-body">
                                    @php
                                        $user_last_payment = getCache('card_no');
                                    @endphp
                                    @if(!empty($user_last_payment))
                                    <label style="margin-left: 20px"> Last Payment By : {{$user_last_payment}}
                                        @if(auth()->user()->last_payment_date!=null)
                                        at {{getStringToDate(auth()->user()->last_payment_date)}}
                                        @endif
                                    </label>
                                    @endif
                                    <form action="{{route('payment.create')}}" method="post" id="payment-report_form"
                                          class="needs-validation">
                                        @csrf
                                        <div class="form-row">
                                            <div class="form-group col-md-12 col-xs-12">
                                                <input id="cc-number" name="card_number" type="text"
                                                       value="{{getCache('card_'.auth()->id())}}"
                                                       placeholder="Card Number"
                                                       class="form-control cc-number identified visa"
                                                       autocomplete="off">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6 col-xs-12">
                                                <input id="expiry" name="expiry" type="text"
                                                       value="{{getCache('expiration_'.auth()->id())}}"
                                                       class="form-control" autocomplete="off" placeholder="MM/YY" maxlength="5">
                                            </div>
                                            <div class="form-group col-md-6 col-xs-12">
                                                <input id="x_card_code" name="cvv" type="text"
                                                       value="{{getCache('cvv_'.auth()->id())}}" class="form-control"
                                                       autocomplete="off" placeholder="CVV">
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-6 col-xs-12 text-left">
                                                <input class="form-check-input" onclick="common_helper.saveCardCheckUncheck(this,'#clear_card')" type="checkbox" name="save_card"
                                                       value="1" id="save_card">
                                                <label class="form-check-label" for="saveCard">
                                                    Save Card
                                                </label>
                                            </div>
                                            <div class="form-group col-md-6 col-xs-12 text-left">
                                                <input onclick="common_helper.saveCardCheckUncheck(this,'#save_card')" class="form-check-input" type="checkbox" name="clear_card"
                                                       value="1" id="clear_card">
                                                <label class="form-check-label" for="saveCard">
                                                    Clear
                                                </label>
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-group col-md-12 col-xs-12">
                                                <button id="payment-button" type="submit"
                                                        class="btn btn-md btn-info btn-block">
                                                    <i class="fa fa-lock fa-lg"></i>&nbsp;
                                                    <span id="payment-button-amount">Pay </span>
                                                    <span id="payment-button-sending"
                                                          style="display:none;">Sending…</span>
                                                </button>
                                            </div>
                                        </div>

                                    </form>

                                </div>

                            </div>
                        </div>

                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>

        </div>
    </div>
</div>






