@extends("client.layouts.app") @section("title", __("client.payment_methods.title")) @section("content")

{{ __('client.payment_methods.title') }}

{{ __('client.payment_methods.subtitle') }}

{{-- Offered only where a card could actually be stored AND charged: the shop collects by card and has a gateway that can do it. Anywhere else the route itself does not exist, so a button would lead to a 404. --}} @if($cardStorageOffered)
{{ __('client.payment_methods.add_card_button') }}
@endif
{{-- The customer's own stop switch. Rendered only where it means something: with the shop's AutoChargeEnabled off nothing charges a card at all, and a toggle for a thing that does not happen misleads whichever way it is set. --}} @if($autoChargeOffered)
{{ __('client.payment_methods.auto_charge_title') }}

{{ $autoCharge ? __('client.payment_methods.auto_charge_on_hint') : __('client.payment_methods.auto_charge_off_hint') }}

@csrf
@endif
@forelse($methods as $method) @empty @endforelse
{{ __('common.table.description') }} {{ __('client.payment_methods.type') }} {{ __('client.payment_methods.details') }} {{ __('common.table.status') }} {{ __('common.table.action') }}
{{ $method->description ?: '—' }} {{ __('client.payment_methods.type_' . strtolower($method->payment_type ?: 'other')) }} @if($method->last_four)•••• {{ $method->last_four }}@endif @if($method->expiry_date)  {{ __('client.payment_methods.expires') }} {{ $method->expiry_date }}@endif @if($method->is_default) {{ __('client.payment_methods.default') }} @endif {{-- The gateway has stopped accepting this card. Said here as well as in the email, because the email was read once and this page is where the customer comes to do something about it. --}} @if($method->status === \App\Models\PaymentMethod::STATUS_REQUIRES_UPDATE) {{ __('client.payment_methods.needs_replacing') }} @endif
@if(!$method->is_default)
@csrf
@endif
@csrf @method('DELETE')
💳

{{ __('client.payment_methods.none') }}

{{ __('client.payment_methods.add_bank_account') }}

{{ __('client.payment_methods.add_bank_hint') }}

@csrf
@endsection