File: /var/www/html/punjabcabs/resources/views/admin/payment/settings.blade.php
@extends('admin.layout.base')
@section('title', 'Payment Settings ')
@section('content')
<div class="content-area py-1">
<div class="container-fluid">
<div class="row bg-title">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<h4 class="page-title">@lang('admin.settings')</h4>
<a href="{{ route('admin.settings') }}" class="btn btn-outline-warning btn-rounded w-min-sm m-l-0-75 waves-effect waves-light">@lang('admin.member.site_settings')</a>
<a href="{{ route('admin.settings.payment') }}" class="btn btn-outline-warning btn-rounded w-min-sm m-l-0-75 waves-effect waves-light active">@lang('admin.payment_settings')</a>
<a href="{{ route('admin.profile') }}" class="btn btn-outline-warning btn-rounded w-min-sm m-l-0-75 waves-effect waves-light">@lang('admin.account_settings')</a>
<a href="{{ route('admin.password') }}" class="btn btn-outline-warning btn-rounded w-min-sm m-l-0-75 waves-effect waves-light">@lang('admin.change_password')</a>
</div>
</div>
<form action="{{route('admin.settings.payment.store')}}" method="POST">
{{csrf_field()}}
<div class="panel panel-info">
<div class="panel-heading">@lang('admin.member.payment_modes')</div>
<div class="panel-wrapper collapse in" aria-expanded="true">
<div class="panel-body">
<blockquote class="card-blockquote">
<i class="fa fa-3x fa-cc-stripe pull-right"></i>
<div class="form-group row">
<div class="col-xs-4">
<label for="stripe_secret_key" class="col-form-label">
Stripe (Card Payments)
</label>
</div>
<div class="col-xs-6">
<input @if(Setting::get('CARD') == 1) checked @endif name="CARD" id="stripe_check" onchange="cardselect()" type="checkbox" class="js-switch" data-color="#43b968">
</div>
</div>
<div id="card_field" @if(Setting::get('CARD') == 0) style="display: none;" @endif>
<div class="form-group row">
<label for="stripe_secret_key" class="col-xs-4 col-form-label">Stripe Secret key</label>
<div class="col-xs-8">
<input class="form-control" type="text" value="{{Setting::get('stripe_secret_key', '') }}" name="stripe_secret_key" id="stripe_secret_key" placeholder="Stripe Secret key">
</div>
</div>
<div class="form-group row">
<label for="stripe_publishable_key" class="col-xs-4 col-form-label">Stripe Publishable key</label>
<div class="col-xs-8">
<input class="form-control" type="text" value="{{Setting::get('stripe_publishable_key', '') }}" name="stripe_publishable_key" id="stripe_publishable_key" placeholder="Stripe Publishable key">
</div>
</div>
</div>
<div class="form-group row">
<div class="col-xs-4">
<label for="cash-payments" class="col-form-label">
Cash Payments
</label>
</div>
<div class="col-xs-6">
<input @if(Setting::get('CASH') == 1) checked @endif name="CASH" id="cash-payments" onchange="cash_disable()" type="checkbox" class="js-switch" data-color="#43b968">
</div>
</div>
</blockquote>
</div>
</div>
</div>
<div class="panel panel-info" style="margin-bottom: 64px;">
<div class="panel-heading">@lang('admin.member.payment_settings')</div>
<div class="panel-wrapper collapse in" aria-expanded="true">
<div class="panel-body">
<blockquote class="card-blockquote">
<div class="form-group row">
<label for="transaction_percentage" class="col-xs-3 col-form-label">Transaction Percentage(%)</label>
<div class="col-xs-8">
<input class="form-control"
type="number"
value="{{ Setting::get('transaction_percentage', '0') }}"
id="transaction_percentage"
name="transaction_percentage"
min="0"
max="100"
placeholder="GST Percentage">
</div>
</div>
<div class="form-group row">
<label for="tax_percentage" class="col-xs-3 col-form-label">GST Percentage(%)</label>
<div class="col-xs-8">
<input class="form-control"
type="text"
value="{{ Setting::get('tax_percentage', '0') }}"
id="tax_percentage"
name="tax_percentage"
min="0"
max="100"
placeholder="GST Percentage">
</div>
</div>
<div class="form-group row">
<label for="sro_levy" class="col-xs-3 col-form-label">SRO levy ({{ currency() }})</label>
<div class="col-xs-8">
<input class="form-control"
type="text"
value="{{ Setting::get('sro_levy', '0') }}"
id="sro_levy"
name="sro_levy"
min="0"
max="100"
placeholder="SRO levy">
</div>
</div>
<div class="form-group row">
<label for="commission_enable" class="col-xs-3 col-form-label">Commission Enable</label>
<div class="col-xs-8">
<select class="form-control" id="commission_enable" name="commission_enable">
<option value="1" @if(Setting::get('commission_enable', 0) == 1) selected @endif>Enable</option>
<option value="0" @if(Setting::get('commission_enable', 0) == 0) selected @endif>Disable</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="commission_percentage" class="col-xs-3 col-form-label">@lang('admin.member.commission_percentage')(%)</label>
<div class="col-xs-8">
<input class="form-control"
type="text"
value="{{ Setting::get('commission_percentage', '0') }}"
id="commission_percentage"
name="commission_percentage"
min="0"
max="100"
placeholder="Commission percentage">
</div>
</div>
<div class="form-group row">
<label for="cancellation_min" class="col-xs-3 col-form-label">Cancellation Time(min)</label>
<div class="col-xs-8">
<input class="form-control"
type="number"
value="{{ Setting::get('cancellation_min', '0') }}"
id="cancellation_min"
name="cancellation_min"
placeholder="Cancellation Time" required>
</div>
</div>
<div class="form-group row">
<label for="cancellation_fare" class="col-xs-3 col-form-label">Cancellation Charge</label>
<div class="col-xs-8">
<input class="form-control"
type="text"
value="{{ Setting::get('cancellation_fare', '0') }}"
id="cancellation_fare"
name="cancellation_fare"
min="0"
max="4"
placeholder="Cancellation Charge" required>
</div>
</div>
<div class="form-group row">
<label for="booking_prefix" class="col-xs-3 col-form-label">@lang('admin.member.booking_id_prefix')</label>
<div class="col-xs-8">
<input class="form-control"
type="text"
value="{{ Setting::get('booking_prefix', '0') }}"
id="booking_prefix"
name="booking_prefix"
min="0"
max="4"
placeholder="Booking ID Prefix">
</div>
</div>
<div class="form-group row">
<label for="wheelchair_service" class="col-xs-3 col-form-label">Select Wheelchair Service</label>
<div class="col-xs-8">
<select class="form-control" id="wheelchair_service" name="wheelchair_service" required>
<option value="">Select Service model</option>
@forelse($wheelservices as $Type)
<option value="{{ $Type->id }}" @if(Setting::get('wheelchair_service') == $Type->id) selected @endif>{{ $Type->name }}</option>
@empty
<option>- Please Create a Service Type -</option>
@endforelse
</select>
</div>
</div>
<div class="form-group row">
<label for="wheelchair_discount" class="col-xs-3 col-form-label">Wheelchair Discount (%)</label>
<div class="col-xs-8">
<input class="form-control"
type="number"
value="{{ Setting::get('wheelchair_discount', '0') }}"
id="wheelchair_discount"
name="wheelchair_discount"
min="5"
max="100"
placeholder="Wheelchair Discount" required>
</div>
</div>
<div class="form-group row">
<label for="base_price" class="col-xs-3 col-form-label">
@lang('admin.member.currency') ( <strong>{{ Setting::get('currency', '$') }} </strong>)
</label>
<div class="col-xs-8">
<select name="currency" class="form-control" required>
<option @if(Setting::get('currency') == "$") selected @endif value="$">US Dollar (USD)</option>
<option @if(Setting::get('currency') == "₹") selected @endif value="₹"> Indian Rupee (INR)</option>
<option @if(Setting::get('currency') == "د.ك") selected @endif value="د.ك">Kuwaiti Dinar (KWD)</option>
<option @if(Setting::get('currency') == "د.ب") selected @endif value="د.ب">Bahraini Dinar (BHD)</option>
<option @if(Setting::get('currency') == "﷼") selected @endif value="﷼">Omani Rial (OMR)</option>
<option @if(Setting::get('currency') == "£") selected @endif value="£">British Pound (GBP)</option>
<option @if(Setting::get('currency') == "€") selected @endif value="€">Euro (EUR)</option>
<option @if(Setting::get('currency') == "CHF") selected @endif value="CHF">Swiss Franc (CHF)</option>
<option @if(Setting::get('currency') == "ل.د") selected @endif value="ل.د">Libyan Dinar (LYD)</option>
<option @if(Setting::get('currency') == "B$") selected @endif value="B$">Bruneian Dollar (BND)</option>
<option @if(Setting::get('currency') == "S$") selected @endif value="S$">Singapore Dollar (SGD)</option>
<option @if(Setting::get('currency') == "A$") selected @endif value="A$"> Australian Dollar (AUD)</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="zipcode" class="col-xs-12 col-form-label"></label>
<div class="col-xs-10">
<button type="submit" class="btn btn-success"> <i class="fa fa-check"></i> @lang('admin.member.update_site_settings')</button>
<a href="{{route('admin.index')}}" class="btn btn-inverse waves-effect waves-light">@lang('admin.member.cancel')</a>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</form>
</div>
</div>
@endsection
@section('scripts')
<script type="text/javascript">
function cash_disable(){
if($('#cash-payments').is(":checked")) {
} else {
if($('#stripe_check').is(":checked")) {
$("#card_field").fadeIn(700);
} else {
$('#cash-payments').trigger('click');
}
}
}
function cardselect()
{
if($('#stripe_check').is(":checked")) {
$("#card_field").fadeIn(700);
} else {
if($('#cash-payments').is(":checked")) {
$("#card_field").fadeOut(700);
} else {
$('#cash-payments').trigger('click');
$("#card_field").fadeOut(700);
}
}
}
</script>
@endsection