<?php $__env->startSection('title'); ?>
    <?php echo e(__('Payment Settings')); ?>

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


<?php $__env->startSection('content'); ?>
    <div class="content-wrapper">
        <div class="page-header">
            <h3 class="page-title">
                <?php if(Auth::user()->school_id): ?>
                <?php echo e(__('fees_payment_settings')); ?>

                <?php else: ?>
                    <?php echo e(__('Payment Settings')); ?>

                <?php endif; ?>
            </h3>
        </div>
        <div class="row grid-margin">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-body">
                        <form class="create-form-without-reset" action="<?php echo e(route('system-settings.payment.update')); ?>" method="POST" novalidate="novalidate" enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>
                            
                            <div class="border border-secondary rounded-lg mb-3">
                                <h3 class="col-12 page-title mt-3 ">
                                    <?php echo e(__('Currency Settings')); ?>

                                </h3>
                                <div class="row my-4 mx-1">





                                    <div class="form-group col-sm-12 col-md-6">
                                        <label for="currency_code"><?php echo e(__("Currency")); ?> <span class="text-danger">*</span></label>
                                        <select name="currency_code" id="currency_code" class="form-control select2-dropdown select2-hidden-accessible">
                                            <option value="USD">USD</option>
                                            <option value="AED">AED</option>
                                            <option value="AFN">AFN</option>
                                            <option value="ALL">ALL</option>
                                            <option value="AMD">AMD</option>
                                            <option value="ANG">ANG</option>
                                            <option value="AOA">AOA</option>
                                            <option value="ARS">ARS</option>
                                            <option value="AUD">AUD</option>
                                            <option value="AWG">AWG</option>
                                            <option value="AZN">AZN</option>
                                            <option value="BAM">BAM</option>
                                            <option value="BBD">BBD</option>
                                            <option value="BDT">BDT</option>
                                            <option value="BGN">BGN</option>
                                            <option value="BMD">BMD</option>
                                            <option value="BND">BND</option>
                                            <option value="BOB">BOB</option>
                                            <option value="BRL">BRL</option>
                                            <option value="BSD">BSD</option>
                                            <option value="BWP">BWP</option>
                                            <option value="BYN">BYN</option>
                                            <option value="BZD">BZD</option>
                                            <option value="CAD">CAD</option>
                                            <option value="CDF">CDF</option>
                                            <option value="CHF">CHF</option>
                                            <option value="CNY">CNY</option>
                                            <option value="COP">COP</option>
                                            <option value="CRC">CRC</option>
                                            <option value="CVE">CVE</option>
                                            <option value="CZK">CZK</option>
                                            <option value="DKK">DKK</option>
                                            <option value="DOP">DOP</option>
                                            <option value="DZD">DZD</option>
                                            <option value="EGP">EGP</option>
                                            <option value="ETB">ETB</option>
                                            <option value="EUR">EUR</option>
                                            <option value="FJD">FJD</option>
                                            <option value="FKP">FKP</option>
                                            <option value="GBP">GBP</option>
                                            <option value="GEL">GEL</option>
                                            <option value="GIP">GIP</option>
                                            <option value="GMD">GMD</option>
                                            <option value="GTQ">GTQ</option>
                                            <option value="GYD">GYD</option>
                                            <option value="HKD">HKD</option>
                                            <option value="HNL">HNL</option>
                                            <option value="HTG">HTG</option>
                                            <option value="HUF">HUF</option>
                                            <option value="IDR">IDR</option>
                                            <option value="ILS">ILS</option>
                                            <option value="INR">INR</option>
                                            <option value="ISK">ISK</option>
                                            <option value="JMD">JMD</option>
                                            <option value="KES">KES</option>
                                            <option value="KGS">KGS</option>
                                            <option value="KHR">KHR</option>
                                            <option value="KYD">KYD</option>
                                            <option value="KZT">KZT</option>
                                            <option value="LAK">LAK</option>
                                            <option value="LBP">LBP</option>
                                            <option value="LKR">LKR</option>
                                            <option value="LRD">LRD</option>
                                            <option value="LSL">LSL</option>
                                            <option value="MAD">MAD</option>
                                            <option value="MDL">MDL</option>
                                            <option value="MKD">MKD</option>
                                            <option value="MMK">MMK</option>
                                            <option value="MNT">MNT</option>
                                            <option value="MOP">MOP</option>
                                            <option value="MUR">MUR</option>
                                            <option value="MVR">MVR</option>
                                            <option value="MWK">MWK</option>
                                            <option value="MXN">MXN</option>
                                            <option value="MYR">MYR</option>
                                            <option value="MZN">MZN</option>
                                            <option value="NAD">NAD</option>
                                            <option value="NGN">NGN</option>
                                            <option value="NIO">NIO</option>
                                            <option value="NOK">NOK</option>
                                            <option value="NPR">NPR</option>
                                            <option value="NZD">NZD</option>
                                            <option value="PAB">PAB</option>
                                            <option value="PEN">PEN</option>
                                            <option value="PGK">PGK</option>
                                            <option value="PHP">PHP</option>
                                            <option value="PKR">PKR</option>
                                            <option value="PLN">PLN</option>
                                            <option value="QAR">QAR</option>
                                            <option value="RON">RON</option>
                                            <option value="RSD">RSD</option>
                                            <option value="RUB">RUB</option>
                                            <option value="SAR">SAR</option>
                                            <option value="SBD">SBD</option>
                                            <option value="SCR">SCR</option>
                                            <option value="SEK">SEK</option>
                                            <option value="SGD">SGD</option>
                                            <option value="SHP">SHP</option>
                                            <option value="SLE">SLE</option>
                                            <option value="SOS">SOS</option>
                                            <option value="SRD">SRD</option>
                                            <option value="STD">STD</option>
                                            <option value="SZL">SZL</option>
                                            <option value="THB">THB</option>
                                            <option value="TJS">TJS</option>
                                            <option value="TOP">TOP</option>
                                            <option value="TRY">TRY</option>
                                            <option value="TTD">TTD</option>
                                            <option value="TWD">TWD</option>
                                            <option value="TZS">TZS</option>
                                            <option value="UAH">UAH</option>
                                            <option value="UYU">UYU</option>
                                            <option value="UZS">UZS</option>
                                            <option value="WST">WST</option>
                                            <option value="XCD">XCD</option>
                                            <option value="YER">YER</option>
                                            <option value="ZAR">ZAR</option>
                                            <option value="ZMW">ZMW</option>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-3 col-sm-12">
                                        <label for="currency_symbol"><?php echo e(__('currency_symbol')); ?> <span class="text-danger">*</span></label>
                                        <input name="currency_symbol" id="currency_symbol" value="<?php echo e($settings['currency_symbol'] ??  ''); ?>" type="text" placeholder="<?php echo e(__('currency_symbol')); ?>" class="form-control" required/>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="border border-secondary rounded-lg mb-3">


                                <h3 class="col-12 page-title mt-3 ">
                                    <?php echo e(__('Stripe')); ?>

                                </h3>
                                <div class="row my-4 mx-1">
                                    <div class="form-group col-sm-12 col-md-6">
                                        <label for="stripe_status"><?php echo e(__("status")); ?> <span class="text-danger">*</span></label>
                                        <select name="gateway[Stripe][status]" id="stripe_status" class="form-control">
                                            <option value="1" <?php echo e((isset($paymentGateway["Stripe"]["status"]) && $paymentGateway["Stripe"]["status"]==1) ? 'selected' : ''); ?>><?php echo e(__("Enable")); ?></option>
                                            <option value="0" <?php echo e((isset($paymentGateway["Stripe"]["status"]) && $paymentGateway["Stripe"]["status"]==0) ? 'selected' : ''); ?>><?php echo e(__("Disable")); ?></option>
                                        </select>
                                    </div>
                                    <input type="hidden" name="gateway[Stripe][currency_code]" id="stripe_currency" value="<?php echo e($paymentGateway["Stripe"]['currency_code'] ?? ''); ?>">




























































































































                                    <div class="form-group col-sm-12 col-md-6">
                                        <label for="stripe_publishable_key"><?php echo e(__("Stripe Publishable Key")); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="gateway[Stripe][api_key]" id="stripe_publishable_key" class="form-control" placeholder="Stripe Publishable Key" required value="<?php echo e($paymentGateway["Stripe"]['api_key'] ?? ''); ?>">
                                    </div>

                                    <div class="form-group col-sm-12 col-md-6">
                                        <label for="stripe_secret_key"><?php echo e(__("Stripe Secret Key")); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="gateway[Stripe][secret_key]" id="stripe_secret_key" class="form-control" placeholder="Stripe Secret Key" required value="<?php echo e($paymentGateway["Stripe"]['secret_key'] ??''); ?>">
                                    </div>

                                    <div class="form-group col-sm-12 col-md-6">
                                        <label for="stripe_webhook_secret"><?php echo e(__("Stripe Webhook Secret")); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="gateway[Stripe][webhook_secret_key]" id="stripe_webhook_secret" class="form-control" placeholder="Stripe Webhook Secret" required value="<?php echo e($paymentGateway["Stripe"]['webhook_secret_key'] ?? ''); ?>">
                                    </div>

                                    <?php if(Auth::user()->school_id): ?>
                                        <div class="form-group col-sm-12 col-md-6">
                                            <label for="stripe_webhook_url">Stripe Webhook URL</label>
                                            <input type="text" name="gateway[Stripe][webhook_url]" id="stripe_webhook_url" class="form-control" placeholder="Stripe Webhook URL" disabled value="<?php echo e(url('webhook/stripe')); ?>">
                                        </div>    
                                    <?php else: ?>
                                        <div class="form-group col-sm-12 col-md-6">
                                            <label for="stripe_webhook_url">Stripe Webhook URL</label>
                                            <input type="text" name="gateway[Stripe][webhook_url]" id="stripe_webhook_url" class="form-control" placeholder="Stripe Webhook URL" disabled value="<?php echo e(url('subscription/webhook/stripe')); ?>">
                                        </div>
                                    <?php endif; ?>
                                </div>
                                
                            </div>
                            <input class="btn btn-theme" type="submit" value="Submit">
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
    <script>

        window.onload = setTimeout(() => {
            $('#currency_code').trigger("change");
        }, 500);

        <?php if(!empty($paymentGateway["Stripe"]['currency_code'])): ?>

        $('#currency_code').val("<?php echo e($settings['currency_code']); ?>").trigger("change");

        <?php endif; ?>

        $('#currency_code').on('change',function(){
            $('#stripe_currency').val($(this).val());
        })
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/mimeld/mxul.mimeld.com/resources/views/settings/payment.blade.php ENDPATH**/ ?>