--}}
{{-- --}}
{{-- @if(isset($error))--}}
{{--
--}}
{{-- {{ $error }}--}}
{{--
--}}
{{-- @else--}}
{{--
--}}
{{--
{{ __('Amount to pay') }}
--}}
{{--
--}}
{{-- {{ number_format($amount ?? 0, 2) }}--}}
{{-- {{ config('payment.currency', 'SAR') }}--}}
{{--
--}}
{{-- @if(isset($brand))--}}
{{-- @php--}}
{{-- $allowed = [--}}
{{-- 'visa' => 'VISA',--}}
{{-- 'master' => 'MASTER',--}}
{{-- 'mada' => 'MADA',--}}
{{-- 'applepay' => 'APPLEPAY',--}}
{{-- ];--}}
{{-- $selectedBrand = $allowed[$brand] ?? null;--}}
{{-- @endphp--}}
{{--
{{ $selectedBrand }}--}}
{{-- @endif--}}
{{--
--}}
{{--
--}}
{{-- @php--}}
{{-- $mode = config('payment.mode', 'test');--}}
{{-- $scriptUrl = $mode === 'live'--}}
{{-- ? 'https://eu-prod.oppwa.com/v1/paymentWidgets.js'--}}
{{-- : 'https://eu-test.oppwa.com/v1/paymentWidgets.js';--}}
{{-- @endphp--}}
{{-- --}}
{{-- --}}
{{-- @endif--}}
{{--
--}}
{{----}}
{{----}}
@php
$locale = app()->getLocale() ?: 'ar';
$isArabic = str_starts_with($locale, 'ar');
$brand = $brand ?? 'visa';
$amount = $amount ?? 0;
$checkoutId = $id ?? null;
$transaction_id = $transaction_id ?? null;
$allowed = [
'visa' => 'VISA',
'master' => 'MASTER',
'mada' => 'MADA',
'applepay' => 'APPLEPAY',
];
$selectedBrand = $allowed[$brand] ?? null;
$mode = config('payment.mode', 'test');
@endphp
{{ __('Complete Your Payment') }}
@if(!$selectedBrand)
{{ __('Unsupported payment method') }}
@elseif(!$checkoutId)
{{ __('Unable to initialize payment') }}
@else
{{ __('Amount to pay') }}
{{ number_format($amount,2) }}
SAR
{{ $selectedBrand }}
{{ __('Loading payment form...') }}
@endif