@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')
{{ $type }}
@endif{!! get_payment_method_type($type_id)['description'] !!}
{{ $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('paypal-express') @if($config->paypalExpress) @php $has_config = TRUE; @endphp @endif @break @case('wire') @case('cod') @php $active = $config->manualPaymentMethods->pluck('id')->toArray(); $has_config = in_array($payment_provider->id, $active) ? TRUE : FALSE; @endphp @break @endswitch @unless($has_config)