@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('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)