@extends('admin.layouts.app') @section('title', __('admin.gateways.title')) @section('content')

{{ __('admin.gateways.description') }}

{{-- Each gateway asks for the settings its own module reads. The list used to be written out here by hand, with field names that did not match, so PayPal was asked for an email address it never reads and Authorize.net for an api_login it does not know. --}}
@foreach($gateways as $gw)
▸ {{ $gw->label }} {{ $gw->active ? __('common.status.active') : __('common.status.inactive') }}
@csrf
@forelse($gw->fields as $field) @php $key = $field['name']; $value = $gw->values[$key] ?? ($field['default'] ?? ''); $type = $field['type'] ?? 'text'; @endphp
@if($type === 'password') {{-- A stored secret never travels back to the browser. It used to be printed into value=, which put the live key in the page source of every visit. The field now ships empty and a blank submission means "keep what is saved" - the same contract the general settings screen already uses for SMTPPassword. --}} @elseif($type === 'textarea') @elseif($type === 'yesno') @elseif($type === 'select') @else @endif @if(! empty($field['description'])) {{ $field['description'] }} @endif
@empty
@endforelse
@if($gw->vaults_cards) {{-- This gateway can keep a customer's card, which is the only thing automatic payment can charge. The switch for it lives on the general settings screen, so the operator configuring Stripe would otherwise have no way of knowing it exists. --}}
{{ $autoChargeOn ? __('common.status.active') : __('common.status.inactive') }} {{ __('admin.gateways.auto_charge_note') }} {{ __('admin.gateways.auto_charge_link') }}
@endif
@endforeach
@endsection