@extends('admin.layouts.master') @php $can_update = Gate::allows('update', $config) ?? null; $active_payment_methods = $config->paymentMethods->pluck('id')->toArray(); $has_config = false; @endphp @section('content')

{{ trans('app.payment_methods') }}

@foreach ($payment_method_types as $type_id => $type) @php $payment_providers = $payment_methods->where('type', $type_id); $logo_path = sys_image_path('payment-method-types') . "{$type_id}.svg"; @endphp @if ($payment_providers->count())
@if (File::exists($logo_path)) {{ $type }} @else

{{ $type }}

@endif

{!! get_payment_method_type($type_id)['description'] !!}

@foreach ($payment_providers as $payment_provider) @continue($payment_provider->code == 'zcart-wallet') @php $has_config = false; $logo_path = sys_image_path('payment-methods') . "{$payment_provider->code}.png"; @endphp
  • @if (File::exists($logo_path)) {{ $type }} @else

    {{ $payment_provider->name }}

    @endif

    {!! $payment_provider->description !!}

    @if (in_array($payment_provider->id, $active_payment_methods)) @if ($can_update) @switch($payment_provider->code) @case('stripe') @if ($config->stripe) @php $has_config = true; @endphp @endif @break @case('instamojo') @if ($config->instamojo) @php $has_config = true; @endphp @endif @break @case('iyzico') @if ($config->iyzico) @php $has_config = true; @endphp @endif @break @case('paypal') @if ($config->paypal) @php $has_config = true; @endphp @endif @break @case('payfast') @if ($config->payfast) @php $has_config = true; @endphp @endif @break @case('mercado-pago') @if ($config->mercadoPago) @php $has_config = true; @endphp @endif @break @case('authorizenet') @if ($config->authorizeNet) @php $has_config = true; @endphp @endif @break @case('paypal-express') @if ($config->paypalExpress) @php $has_config = true; @endphp @endif @break @case('paypal-marketplace') @if ($config->paypalMarketplace) @php $has_config = true; @endphp @endif @break @case('paystack') @if ($config->paystack) @php $has_config = true; @endphp @endif @break @case('cybersource') @if ($config->cybersource) @php $has_config = true; @endphp @endif @break @case('razorpay') @if ($config->razorpay) @php $has_config = true; @endphp @endif @break @case('sslcommerz') @if ($config->sslcommerz) @php $has_config = true; @endphp @endif @break @case('flutterwave') @if ($config->flutterwave) @php $has_config = true; @endphp @endif @break @case('mpesa') @if ($config->mpesa) @php $has_config = true; @endphp @endif @break @case('mollie') @if ($config->mollie) @php $has_config = true; @endphp @endif @break @case('bkash') @if ($config->bkash) @php $has_config = true; @endphp @endif @break @case('paytm') @if ($config->paytm) @php $has_config = true; @endphp @endif @break @case('wire') @case('cod') @case('pip') @php $active = $config->manualPaymentMethods->pluck('id')->toArray(); $has_config = in_array($payment_provider->id, $active) ? true : false; @endphp @break @endswitch @unless ($has_config)
    @lang('app.payment_method_configuration_issue')
    @endunless @if ($payment_provider->code == 'stripe') {{ trans('app.update') }} @else {{ trans('app.update') }} @endif {{ trans('app.deactivate') }} @else {{ trans('app.active') }} @endif @else @if ($can_update) @if ($payment_provider->code == 'stripe') {{ $has_config ? trans('app.reactivate') : trans('app.activate') }} @else {{ $has_config ? trans('app.reactivate') : trans('app.activate') }} @endif @else {{ trans('app.inactive') }} @endif @endif
@endforeach
@unless ($loop->last)
@endunless @endif @endforeach
@endsection