

<?php $__env->startSection('page', $page); ?>
<?php $__env->startSection('title', getSetting('APPLICATION_NAME') . ' | ' . $page); ?>

<?php $__env->startSection('style'); ?>
    <style>
        .card .nav.flex-column>li {
            border-bottom: unset;
        }

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

<?php $__env->startSection('content'); ?>

    <div class="card border-0 shadow-sm">
        <?php echo $__env->make('include.message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        <div class="card-body">
            <ul class="nav nav-pills d-flex flex-fill flex-column flex-md-row mb-3" id="pills-tab" role="tablist">
                <li class="nav-item text-center">
                    <?php if(!$errors->has('STRIPE_KEY') && !$errors->has('STRIPE_SECRET') && !$errors->has('STRIPE_WH_SECRET') && ($errors->has('PAYPAL_CLIENT_ID') || $errors->has('PAYPAL_SECRET') || $errors->has('PAYPAL_WEBHOOK_ID'))): ?>
                        <a class="nav-link" id="pills-stripe-tab" data-toggle="pill" href="#pills-stripe" role="tab"
                            aria-controls="pills-stripe" aria-selected="true"><?php echo e(__('Stripe')); ?></a>
                    <?php else: ?>
                        <a class="nav-link active" id="pills-stripe-tab" data-toggle="pill" href="#pills-stripe" role="tab"
                            aria-controls="pills-stripe" aria-selected="true"><?php echo e(__('Stripe')); ?></a>
                    <?php endif; ?>
                </li>

                <li class="nav-item text-center">
                    <?php if(!$errors->has('STRIPE_KEY') && !$errors->has('STRIPE_SECRET') && !$errors->has('STRIPE_WH_SECRET') && ($errors->has('PAYPAL_CLIENT_ID') || $errors->has('PAYPAL_SECRET') || $errors->has('PAYPAL_WEBHOOK_ID'))): ?>
                        <a class="nav-link active" id="pills-paypal-tab" data-toggle="pill" href="#pills-paypal" role="tab"
                            aria-controls="pills-paypal" aria-selected="false"><?php echo e(__('PayPal')); ?></a>
                    <?php else: ?>
                        <a class="nav-link" id="pills-paypal-tab" data-toggle="pill" href="#pills-paypal" role="tab"
                            aria-controls="pills-paypal" aria-selected="false"><?php echo e(__('PayPal')); ?></a>
                    <?php endif; ?>
                </li>
            </ul>

            <form action="<?php echo e(route('admin.payment_gateways')); ?>" method="post">

                <?php echo csrf_field(); ?>

                <div class="tab-content" id="pills-tabContent">
                    <?php if(!$errors->has('STRIPE_KEY') && !$errors->has('STRIPE_SECRET') && !$errors->has('STRIPE_WH_SECRET') && ($errors->has('PAYPAL_CLIENT_ID') || $errors->has('PAYPAL_SECRET') || $errors->has('PAYPAL_WEBHOOK_ID'))): ?>
                        <div class="tab-pane fade" id="pills-stripe" role="tabpanel" aria-labelledby="pills-stripe-tab">
                        <?php else: ?>
                            <div class="tab-pane fade show active" id="pills-stripe" role="tabpanel"
                                aria-labelledby="pills-stripe-tab">
                    <?php endif; ?>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label for="i-stripe"><?php echo e(__('Enabled')); ?></label>
                                <select name="STRIPE" id="i-stripe"
                                    class="custom-select<?php echo e($errors->has('STRIPE') ? ' is-invalid' : ''); ?>">
                                    <?php $__currentLoopData = [1 => __('Yes'), 0 => __('No')]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($key); ?>"
                                            <?php if((old('STRIPE') !== null && old('STRIPE') == $key) || (getSetting('STRIPE') == $key && old('STRIPE') == null)): ?> selected <?php endif; ?>>
                                            <?php echo e($value); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                                <?php if($errors->has('STRIPE')): ?>
                                    <span class="invalid-feedback" role="alert">
                                        <strong><?php echo e($errors->first('STRIPE')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>
                        </div>

                        <div class="col-sm-6">
                            <div class="form-group">
                                <label for="i-stripe-key"><?php echo e(__('Publishable key')); ?></label>
                                <input type="text" name="STRIPE_KEY" id="i-stripe-key"
                                    class="form-control<?php echo e($errors->has('STRIPE_KEY') ? ' is-invalid' : ''); ?>"
                                    value="<?php echo e(old('STRIPE_KEY') ?? getSetting('STRIPE_KEY')); ?>"
                                    placeholder="<?php echo e(__('Publishable key')); ?>">
                                <?php if($errors->has('STRIPE_KEY')): ?>
                                    <span class="invalid-feedback" role="alert">
                                        <strong><?php echo e($errors->first('STRIPE_KEY')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label for="i-stripe-secret"><?php echo e(__('Secret key')); ?></label>
                                <input type="password" name="STRIPE_SECRET" id="i-stripe-secret"
                                    class="form-control<?php echo e($errors->has('STRIPE_SECRET') ? ' is-invalid' : ''); ?>"
                                    value="<?php echo e(old('STRIPE_SECRET') ?? getSetting('STRIPE_SECRET')); ?>"
                                    placeholder="<?php echo e(__('Secret key')); ?>">
                                <?php if($errors->has('STRIPE_SECRET')): ?>
                                    <span class="invalid-feedback" role="alert">
                                        <strong><?php echo e($errors->first('STRIPE_SECRET')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>
                        </div>

                        <div class="col-sm-6">
                            <div class="form-group">
                                <label for="i-stripe-wh-secret"><?php echo e(__('Signing secret')); ?></label>
                                <input type="password" name="STRIPE_WH_SECRET" id="i-stripe-wh-secret"
                                    class="form-control<?php echo e($errors->has('STRIPE_WH_SECRET') ? ' is-invalid' : ''); ?>"
                                    value="<?php echo e(old('STRIPE_WH_SECRET') ?? getSetting('STRIPE_WH_SECRET')); ?>"
                                    placeholder="<?php echo e(__('Signing secret')); ?>">
                                <?php if($errors->has('STRIPE_WH_SECRET')): ?>
                                    <span class="invalid-feedback" role="alert">
                                        <strong><?php echo e($errors->first('STRIPE_WH_SECRET')); ?></strong>
                                    </span>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label for="i-stripe-wh-url"><?php echo e(__('Webhook URL')); ?></label>
                                <div class="input-group">
                                    <input type="text" dir="ltr" name="stripe_wh_url" id="i-stripe-wh-url"
                                        class="form-control" value="<?php echo e(route('webhooks.stripe')); ?>" readonly>
                                    <div class="input-group-append">
                                        <div class="btn btn-primary" id="stripe_wh_url_copy"><?php echo e(__('Copy')); ?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <?php if(!$errors->has('STRIPE_KEY') && !$errors->has('STRIPE_SECRET') && !$errors->has('STRIPE_WH_SECRET') && ($errors->has('PAYPAL_CLIENT_ID') || $errors->has('PAYPAL_SECRET') || $errors->has('PAYPAL_WEBHOOK_ID'))): ?>
                    <div class="tab-pane fade show active" id="pills-paypal" role="tabpanel"
                        aria-labelledby="pills-paypal-tab">
                    <?php else: ?>
                        <div class="tab-pane fade" id="pills-paypal" role="tabpanel" aria-labelledby="pills-paypal-tab">
                <?php endif; ?>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="i-paypal"><?php echo e(__('Enabled')); ?></label>
                            <select name="PAYPAL" id="i-paypal"
                                class="custom-select<?php echo e($errors->has('PAYPAL') ? ' is-invalid' : ''); ?>">
                                <?php $__currentLoopData = [1 => __('Yes'), 0 => __('No')]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($key); ?>" <?php if((old('PAYPAL') !== null && old('PAYPAL') == $key) || (getSetting('PAYPAL') == $key && old('PAYPAL') == null)): ?> selected <?php endif; ?>>
                                        <?php echo e($value); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                            <?php if($errors->has('PAYPAL')): ?>
                                <span class="invalid-feedback" role="alert">
                                    <strong><?php echo e($errors->first('PAYPAL')); ?></strong>
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>
               
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="i-paypal-mode"><?php echo e(__('Mode')); ?></label>
                            <select name="PAYPAL_MODE" id="i-paypal-mode"
                                class="custom-select<?php echo e($errors->has('PAYPAL_MODE') ? ' is-invalid' : ''); ?>">
                                <?php $__currentLoopData = ['live' => __('Live'), 'sandbox' => __('Sandbox')]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($key); ?>" <?php if((old('PAYPAL_MODE') !== null && old('PAYPAL_MODE') == $key) || (getSetting('PAYPAL_MODE') == $key && old('PAYPAL_MODE') == null)): ?> selected <?php endif; ?>>
                                        <?php echo e($value); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                            <?php if($errors->has('PAYPAL_MODE')): ?>
                                <span class="invalid-feedback" role="alert">
                                    <strong><?php echo e($errors->first('PAYPAL_MODE')); ?></strong>
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="i-paypal-client-id"><?php echo e(__('Client ID')); ?></label>
                            <input type="text" name="PAYPAL_CLIENT_ID" id="i-paypal-client-id"
                                class="form-control<?php echo e($errors->has('PAYPAL_CLIENT_ID') ? ' is-invalid' : ''); ?>"
                                value="<?php echo e(old('PAYPAL_CLIENT_ID') ?? getSetting('PAYPAL_CLIENT_ID')); ?>"
                                placeholder="<?php echo e(__('Client ID')); ?>">
                            <?php if($errors->has('PAYPAL_CLIENT_ID')): ?>
                                <span class="invalid-feedback" role="alert">
                                    <strong><?php echo e($errors->first('PAYPAL_CLIENT_ID')); ?></strong>
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>
                
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="i-paypal-secret"><?php echo e(__('Secret')); ?></label>
                            <input type="password" name="PAYPAL_SECRET" id="i-paypal-secret"
                                class="form-control<?php echo e($errors->has('PAYPAL_SECRET') ? ' is-invalid' : ''); ?>"
                                value="<?php echo e(old('PAYPAL_SECRET') ?? getSetting('PAYPAL_SECRET')); ?>"
                                placeholder="<?php echo e(__('Secret')); ?>">
                            <?php if($errors->has('PAYPAL_SECRET')): ?>
                                <span class="invalid-feedback" role="alert">
                                    <strong><?php echo e($errors->first('PAYPAL_SECRET')); ?></strong>
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="i-paypal-webhook-id"><?php echo e(__('Webhook ID')); ?></label>
                            <input type="text" name="PAYPAL_WEBHOOK_ID" id="i-paypal-webhook-id"
                                class="form-control<?php echo e($errors->has('PAYPAL_WEBHOOK_ID') ? ' is-invalid' : ''); ?>"
                                value="<?php echo e(old('PAYPAL_WEBHOOK_ID') ?? getSetting('PAYPAL_WEBHOOK_ID')); ?>"
                                placeholder="<?php echo e(__('Webhook ID')); ?>">
                            <?php if($errors->has('PAYPAL_WEBHOOK_ID')): ?>
                                <span class="invalid-feedback" role="alert">
                                    <strong><?php echo e($errors->first('PAYPAL_WEBHOOK_ID')); ?></strong>
                                </span>
                            <?php endif; ?>
                        </div>
                    </div>
                
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="i-paypal-wh-url"><?php echo e(__('Webhook URL')); ?></label>
                            <div class="input-group">
                                <input type="text" dir="ltr" name="paypal_wh_url" id="i-paypal-wh-url"
                                    class="form-control" value="<?php echo e(route('webhooks.paypal')); ?>" readonly>
                                <div class="input-group-append">
                                    <div class="btn btn-primary" id="paypal_wh_url_url"><?php echo e(__('Copy')); ?></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
        </div>
    </div>

    <button type="submit" name="submit" class="btn btn-primary"><?php echo e(__('Save')); ?></button>
    </form>

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

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\jupitermeet_cc\JupiterMeet_2.5.0\jupitermeet\resources\views/admin/payment-gateways.blade.php ENDPATH**/ ?>