2020-03-23 18:10:42 +01:00
|
|
|
@extends('portal.ninja2020.layout.app')
|
2022-03-09 01:31:59 +01:00
|
|
|
@section('meta_title', App\Models\GatewayType::getAlias($payment_method->gateway_type_id))
|
2020-03-23 18:10:42 +01:00
|
|
|
|
|
|
|
@section('body')
|
|
|
|
<div class="container mx-auto">
|
2020-09-18 11:02:21 +02:00
|
|
|
<div class="overflow-hidden bg-white shadow sm:rounded-lg">
|
2020-03-23 18:10:42 +01:00
|
|
|
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
|
2020-09-18 11:02:21 +02:00
|
|
|
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
2022-03-09 01:31:59 +01:00
|
|
|
{{ App\Models\GatewayType::getAlias($payment_method->gateway_type_id) }}
|
2020-03-23 18:10:42 +01:00
|
|
|
</h3>
|
2020-09-18 11:02:21 +02:00
|
|
|
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500" translate>
|
2020-03-26 22:43:57 +01:00
|
|
|
{{ ctrans('texts.payment_method_details') }}
|
2020-03-23 18:10:42 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<dl>
|
2022-03-09 01:31:59 +01:00
|
|
|
@if(!empty(App\Models\GatewayType::getAlias($payment_method->gateway_type_id)) && !is_null(App\Models\GatewayType::getAlias($payment_method->gateway_type_id)))
|
2021-06-25 09:15:57 +02:00
|
|
|
<div class="px-4 py-5 bg-gray-50 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.payment_type') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
2022-03-09 01:31:59 +01:00
|
|
|
{{ App\Models\GatewayType::getAlias($payment_method->gateway_type_id) }}
|
2021-06-25 09:15:57 +02:00
|
|
|
</dd>
|
|
|
|
</div>
|
2020-09-18 11:02:21 +02:00
|
|
|
@endif
|
|
|
|
|
|
|
|
@if(!empty($payment_method->meta) && !is_null($payment_method->meta))
|
2021-06-25 09:15:57 +02:00
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.type') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
2022-06-21 11:59:25 +02:00
|
|
|
{{ $payment_method->meta?->brand }}
|
2022-07-30 02:12:15 +02:00
|
|
|
{{ property_exists($payment_method->meta, 'scheme') ? $payment_method->meta?->scheme : '' }}
|
2021-06-25 09:15:57 +02:00
|
|
|
</dd>
|
|
|
|
</div>
|
2020-09-18 11:02:21 +02:00
|
|
|
@endif
|
|
|
|
|
|
|
|
@if(!empty($payment_method->meta->last4) && !is_null($payment_method->meta->last4))
|
2021-06-25 09:15:57 +02:00
|
|
|
<div class="px-4 py-5 bg-gray-50 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.card_number') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
**** {{ ucfirst($payment_method->meta->last4) }}
|
|
|
|
</dd>
|
|
|
|
</div>
|
2020-09-18 11:02:21 +02:00
|
|
|
@endif
|
2021-06-25 09:15:57 +02:00
|
|
|
|
2020-09-18 11:02:21 +02:00
|
|
|
@if(!empty($payment_method->created_at) && !is_null($payment_method->created_at))
|
2021-06-25 09:15:57 +02:00
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.date_created') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
{{ $payment_method->formatDateTimestamp($payment_method->created_at, auth()->user()->client->date_format()) }}
|
|
|
|
</dd>
|
|
|
|
</div>
|
2020-09-18 11:02:21 +02:00
|
|
|
@endif
|
|
|
|
|
|
|
|
@if(!empty($payment_method->is_default) && !is_null($payment_method->is_default))
|
2021-06-25 09:15:57 +02:00
|
|
|
<div class="px-4 py-5 bg-gray-50 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
|
|
|
{{ ctrans('texts.default') }}
|
|
|
|
</dt>
|
|
|
|
<div class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
{{ $payment_method->is_default ? ctrans('texts.yes') : ctrans('texts.no') }}
|
|
|
|
</div>
|
2020-03-23 18:10:42 +01:00
|
|
|
</div>
|
2020-09-18 11:02:21 +02:00
|
|
|
@endif
|
2021-06-25 09:15:57 +02:00
|
|
|
|
2020-03-23 18:10:42 +01:00
|
|
|
@isset($payment_method->meta->exp_month)
|
2020-09-18 11:02:21 +02:00
|
|
|
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
|
|
<dt class="text-sm font-medium leading-5 text-gray-500">
|
2020-03-23 18:10:42 +01:00
|
|
|
{{ ctrans('texts.expires') }}
|
|
|
|
</dt>
|
|
|
|
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
|
|
|
|
{{ $payment_method->meta->exp_month }} / {{ $payment_method->meta->exp_year }}
|
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
@endisset
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-25 09:15:57 +02:00
|
|
|
|
2022-07-30 02:12:15 +02:00
|
|
|
@if(($payment_method->gateway_type_id === \App\Models\GatewayType::BANK_TRANSFER && property_exists($payment_method->meta, 'state') && ($payment_method->meta?->state === 'unauthorized' || $payment_method->meta?->state === 'pending')))
|
2021-08-09 13:49:50 +02:00
|
|
|
<div class="mt-4 mb-4 bg-white shadow sm:rounded-lg">
|
|
|
|
<div class="px-4 py-5 sm:p-6">
|
|
|
|
<div class="sm:flex sm:items-start sm:justify-between">
|
|
|
|
<div>
|
|
|
|
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
|
|
|
{{ ctrans('texts.verification')}}
|
|
|
|
</h3>
|
|
|
|
<div class="max-w-xl mt-2 text-sm leading-5 text-gray-500">
|
|
|
|
<p>
|
|
|
|
{{ ctrans('texts.ach_verification_notification') }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center">
|
|
|
|
<div class="inline-flex rounded-md shadow-sm" x-data="{ open: false }">
|
|
|
|
<a href="{{ route('client.payment_methods.verification', ['payment_method' => $payment_method->hashed_id, 'method' => \App\Models\GatewayType::BANK_TRANSFER]) }}" class="button button-primary bg-primary">
|
|
|
|
{{ ctrans('texts.complete_verification') }}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2021-06-25 09:15:57 +02:00
|
|
|
|
2021-08-09 13:49:50 +02:00
|
|
|
@livewire('payment-methods.update-default-method', ['token' => $payment_method, 'client' => $client])
|
|
|
|
|
2021-06-25 09:15:57 +02:00
|
|
|
<div class="mt-4 mb-4 bg-white shadow sm:rounded-lg">
|
2020-03-23 18:10:42 +01:00
|
|
|
<div class="px-4 py-5 sm:p-6">
|
|
|
|
<div class="sm:flex sm:items-start sm:justify-between">
|
|
|
|
<div>
|
2020-09-18 11:02:21 +02:00
|
|
|
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
2020-03-26 22:43:57 +01:00
|
|
|
{{ ctrans('texts.remove')}}
|
2020-03-23 18:10:42 +01:00
|
|
|
</h3>
|
2020-09-18 11:02:21 +02:00
|
|
|
<div class="max-w-xl mt-2 text-sm leading-5 text-gray-500">
|
2020-03-23 18:10:42 +01:00
|
|
|
<p>
|
2020-03-26 22:43:57 +01:00
|
|
|
{{ ctrans('texts.permanently_remove_payment_method') }}
|
2020-03-23 18:10:42 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center">
|
|
|
|
<div class="inline-flex rounded-md shadow-sm" x-data="{ open: false }">
|
2020-10-13 13:36:56 +02:00
|
|
|
<button class="button button-danger" @click="open = true" id="open-delete-popup">
|
2020-03-26 22:43:57 +01:00
|
|
|
{{ ctrans('texts.remove_payment_method') }}
|
2020-03-23 18:10:42 +01:00
|
|
|
</button>
|
|
|
|
@include('portal.ninja2020.payment_methods.includes.modals.removal')
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
2021-06-25 09:15:57 +02:00
|
|
|
|
|
|
|
@section('footer')
|
|
|
|
<script>
|
|
|
|
Livewire.on('UpdateDefaultMethod::method-updated', event => {
|
|
|
|
document.querySelector('span[data-ref=success-label]').classList.remove('hidden');
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@endsection
|