2020-10-19 23:02:18 +02:00
|
|
|
@extends('portal.ninja2020.layout.app')
|
|
|
|
|
|
|
|
@isset($gateway_title)
|
|
|
|
@section('meta_title', $gateway_title)
|
|
|
|
@else
|
|
|
|
@section('meta_title', ctrans('texts.pay_now'))
|
|
|
|
@endisset
|
|
|
|
|
|
|
|
@push('head')
|
|
|
|
@yield('gateway_head')
|
|
|
|
@endpush
|
|
|
|
|
|
|
|
@section('body')
|
2024-05-09 00:53:29 +02:00
|
|
|
@livewire('required-client-info', ['db' => $company->db, 'fields' => method_exists($gateway, 'getClientRequiredFields') ? $gateway->getClientRequiredFields() : [], 'contact_id' => auth()->guard('contact')->user()->id, 'countries' => $countries, 'company_id' => $company->id, 'company_gateway_id' => $gateway->company_gateway ? $gateway->company_gateway->id : $gateway->id, 'is_subscription' => request()->query('source') == 'subscriptions'])
|
2021-01-12 15:43:07 +01:00
|
|
|
|
2021-01-14 12:24:45 +01:00
|
|
|
<div class="container mx-auto grid grid-cols-12 opacity-25 pointer-events-none" data-ref="gateway-container">
|
2022-02-26 23:17:47 +01:00
|
|
|
<div class="col-span-12 lg:col-span-6 lg:col-start-4 bg-white shadow rounded-lg">
|
2020-10-19 23:02:18 +02:00
|
|
|
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
|
2020-10-19 23:49:17 +02:00
|
|
|
@isset($card_title)
|
|
|
|
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
|
|
|
{{ $card_title }}
|
|
|
|
</h3>
|
|
|
|
@endisset
|
2021-01-12 15:43:07 +01:00
|
|
|
|
2020-10-19 23:49:17 +02:00
|
|
|
@isset($card_description)
|
|
|
|
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
|
2020-10-19 23:02:18 +02:00
|
|
|
{{ $card_description }}
|
2020-10-19 23:49:17 +02:00
|
|
|
</p>
|
|
|
|
@endisset
|
2020-10-19 23:02:18 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
@yield('gateway_content')
|
|
|
|
</div>
|
2021-03-17 12:06:58 +01:00
|
|
|
|
|
|
|
@if(Request::isSecure())
|
|
|
|
<span class="block mx-4 mb-4 text-xs inline-flex items-center">
|
2024-03-04 18:36:50 +01:00
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-emerald-600"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>
|
2021-03-17 12:06:58 +01:00
|
|
|
<span class="ml-1">Secure 256-bit encryption</span>
|
|
|
|
</span>
|
|
|
|
@endif
|
2020-10-19 23:02:18 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@push('footer')
|
|
|
|
@yield('gateway_footer')
|
2021-01-12 15:43:07 +01:00
|
|
|
|
|
|
|
<script>
|
2021-01-14 12:24:45 +01:00
|
|
|
|
2024-01-14 02:00:51 +01:00
|
|
|
document.addEventListener('livewire:init', () => {
|
2021-01-14 12:24:45 +01:00
|
|
|
|
2024-01-14 02:00:51 +01:00
|
|
|
Livewire.on('passed-required-fields-check', () => {
|
2024-06-06 03:17:34 +02:00
|
|
|
|
|
|
|
document.querySelector('div[data-ref="required-fields-container"]').classList.toggle('h-0');
|
|
|
|
// document.querySelector('div[data-ref="required-fields-container"]').classList.add('opacity-25');
|
|
|
|
// document.querySelector('div[data-ref="required-fields-container"]').classList.add('pointer-events-none');
|
2024-01-14 02:00:51 +01:00
|
|
|
|
|
|
|
document.querySelector('div[data-ref="gateway-container"]').classList.remove('opacity-25');
|
|
|
|
document.querySelector('div[data-ref="gateway-container"]').classList.remove('pointer-events-none');
|
|
|
|
|
|
|
|
document
|
|
|
|
.querySelector('div[data-ref="gateway-container"]')
|
|
|
|
.scrollIntoView({behavior: "smooth"});
|
|
|
|
});
|
2021-07-29 13:56:07 +02:00
|
|
|
|
2024-01-14 02:00:51 +01:00
|
|
|
Livewire.on('update-shipping-data', (event) => {
|
|
|
|
for (field in event) {
|
|
|
|
let element = document.querySelector(`input[name=${field}]`);
|
2021-08-05 17:36:24 +02:00
|
|
|
|
2024-01-14 02:00:51 +01:00
|
|
|
if (element) {
|
|
|
|
element.value = event[field];
|
|
|
|
}
|
2021-08-05 17:36:24 +02:00
|
|
|
}
|
2024-01-14 02:00:51 +01:00
|
|
|
});
|
2021-08-05 17:36:24 +02:00
|
|
|
|
2024-01-14 02:00:51 +01:00
|
|
|
});
|
2024-05-09 00:53:29 +02:00
|
|
|
|
2021-07-29 13:56:07 +02:00
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
let toggleWithToken = document.querySelector('.toggle-payment-with-token');
|
2022-04-14 10:21:17 +02:00
|
|
|
let toggleWithCard = document.querySelector('#toggle-payment-with-credit-card');
|
2021-07-29 13:56:07 +02:00
|
|
|
|
|
|
|
if (toggleWithToken) {
|
|
|
|
toggleWithToken.click();
|
2022-04-14 10:21:17 +02:00
|
|
|
} else if (toggleWithCard) {
|
|
|
|
toggleWithCard.click();
|
2021-07-29 13:56:07 +02:00
|
|
|
}
|
|
|
|
});
|
2021-01-12 15:43:07 +01:00
|
|
|
</script>
|
2020-10-19 23:02:18 +02:00
|
|
|
@endpush
|