@extends('admin.layouts.master') @php $pricison = get_precision($payment_gateway); @endphp @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' => __("Withdraw Gateway Edit")]) @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), ])
@include('admin.components.form.switcher',[ 'label' => __("type"), 'name' => 'crypto', 'value' => old('crypto',$payment_gateway->crypto), 'options' => [__("CRYPTO") => 1, __("FIAT") => 0], ])
{{ __("Amount Limit") }}
@include('admin.components.form.input-amount',[ 'label' => __("Minimum")."*", 'name' => "min_limit", 'value' => old("min_limit",get_amount($payment_gateway->currencies->first()->min_limit,null,$pricison)), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
@include('admin.components.form.input-amount',[ 'label' => __("Maximum")."*", 'name' => "max_limit", 'value' => old("max_limit",get_amount($payment_gateway->currencies->first()->max_limit,null,$pricison)), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
{{ __("Transaction Limit") }} ({{ __("Execute if the value is greater than zero") }})
@include('admin.components.form.input-amount',[ 'label' => __("Daily Limit"), 'name' => "daily_limit", 'value' => old("daily_limit",get_amount($payment_gateway->currencies->first()->daily_limit,null,$pricison)), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
@include('admin.components.form.input-amount',[ 'label' => __("Monthly Limit"), 'name' => "monthly_limit", 'value' => old("monthly_limit",get_amount($payment_gateway->currencies->first()->monthly_limit,null,$pricison)), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
{{ __("Charges") }}
@include('admin.components.form.input-amount',[ 'label' => __("Fixed")."*", 'name' => "fixed_charge", 'value' => old("fixed_charge",get_amount($payment_gateway->currencies->first()->fixed_charge,null,$pricison)), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
@include('admin.components.form.input-amount',[ 'label' => __("Percent")."*", 'name' => "percent_charge", 'value' => old("percent_charge",get_amount($payment_gateway->currencies->first()->percent_charge,null,$pricison)), 'currency' => $payment_gateway->currencies->first()->currency_code, ])
{{ __("Rate") }}
1   {{ get_default_currency_code($default_currency) }}  = currencies->first()->rate,null,$pricison)) }}" name="rate" placeholder="Type Here..."> {{ $payment_gateway->currencies->first()->currency_code }}
{{-- @include('admin.components.form.input',[ 'label' => "Symbol", 'name' => "currency_symbol", 'value' => old("currency_symbol",$payment_gateway->currencies->first()->currency_symbol), ]) --}}
@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