@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('instamojo') @if ($config->instamojo) @php $has_config = true; @endphp @endif @break @case('authorize-net') @if ($config->authorizeNet) @php $has_config = true; @endphp @endif @break @case('paypal-express') @if ($config->paypalExpress) @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('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)