@extends('admin.layouts.master') @push('css') @endpush @section('page-title') @include('admin.components.page-title',['title' => __($page_title)]) @endsection @section('breadcrumb') @include('admin.components.breadcrumb',['breadcrumbs' => [ [ 'name' => __("Dashboard"), 'url' => setRoute("admin.dashboard"), ] ], 'active' => __("Add Money")]) @endsection @section('content')
@csrf @method("PUT")
{{ $page_title }}
@include('admin.components.form.input-file',[ 'label' => __("Gateway Image"), 'name' => "image", 'class' => "file-holder", 'old_files_path' => files_asset_path('payment-gateways'), 'old_files' => $payment_gateway->image, ])
@include('admin.components.form.input',[ 'label' => __("Gateway Name*"), 'name' => "gateway_name", 'value' => old('gateway_name',$payment_gateway->name), ])
@include('admin.components.form.input',[ 'label' =>__( "Currency Code")."*", 'name' => "currency_code", 'value' => old('currency_code',$payment_gateway->currencies->first()->currency_code), ])
@include('admin.components.form.input',[ 'label' =>__( "Currency Symbol")."*", 'name' => "currency_symbol", 'value' => old('currency_symbol',$payment_gateway->currencies->first()->currency_symbol), ])
{{ __("Amount Limit") }}
@include('admin.components.form.input-amount',[ 'label' => __("Minimum")."*", 'name' => "min_limit", 'value' => old("min_limit",$payment_gateway->currencies->first()->min_limit), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
@include('admin.components.form.input-amount',[ 'label' => __("Maximum")."*", 'name' => "max_limit", 'value' => old("max_limit",$payment_gateway->currencies->first()->max_limit), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
{{ __("Charges") }}
@include('admin.components.form.input-amount',[ 'label' => __("Fixed")."*", 'name' => "fixed_charge", 'value' => old("fixed_charge",$payment_gateway->currencies->first()->fixed_charge), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
@include('admin.components.form.input-amount',[ 'label' => __("Percent")."*", 'name' => "percent_charge", 'value' => old("percent_charge",$payment_gateway->currencies->first()->percent_charge), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
{{ __("Rate") }}
1   {{ get_default_currency_code($default_currency) }}  = currencies->first()->rate) }}" name="rate" placeholder="Type Here..."> {{ $payment_gateway->currencies->first()->currency_code }}
@include('admin.components.form.input-text-rich',[ 'label' =>__( "Instructions")."*", 'name' => "desc", 'value' => old("desc",$payment_gateway->desc), ])
{{ __("Collect Data") }}
@foreach ($payment_gateway->input_fields as $item)
@include('admin.components.form.input',[ 'label' =>__( "Field Name*"), 'name' => "label[]", 'attribute' => "required", 'value' => $item->label, ])
@php $selectOptions = ['text' => "Input Text", 'file' => "File", 'textarea' => "Textarea"]; @endphp
@if ($item->type == "file")
@include('admin.components.form.input',[ 'label' => __("Max File Size (mb)*"), 'name' => "file_max_size[]", 'type' => "number", 'attribute' => "required", 'value' => old('file_max_size[]',$item->validation->max), 'placeholder' => __("ex").": 10", ])
@include('admin.components.form.input',[ 'label' => __("File Extension*"), 'name' => "file_extensions[]", 'attribute' => "required", 'value' => old('file_extensions[]',implode(",",$item->validation->mimes)), 'placeholder' => __("ex").": jpg, png, pdf", ])
@else
@include('admin.components.form.input',[ 'label' => __("Min Character*"), 'name' => "min_char[]", 'type' => "number", 'attribute' => "required", 'value' => old('min_char[]',$item->validation->min), 'placeholder' => __("ex").": 6", ])
@include('admin.components.form.input',[ 'label' => __("Max Character*"), 'name' => "max_char[]", 'type' => "number", 'attribute' => "required", 'value' => old('max_char[]',$item->validation->max), 'placeholder' => __("ex").": 16", ])
@endif
@include('admin.components.form.switcher',[ 'label' => __("Field Necessity*"), 'name' => "field_necessity[]", 'options' => ['Required' => 1,'Optional' => 0], 'value' => old("field_necessity[]",$item->required), ])
@endforeach
@include('admin.components.button.form-btn',[ 'class' => "w-100", 'text' => __("update"), 'permission' => "admin.payment.gateway.update", ])
@endsection @push('script') @endpush