@php use App\Models\Option; use App\Models\Transaction; use App\Models\WallsGenerated; use Illuminate\Support\Facades\Crypt; try { $wall_generated = WallsGenerated::where('encrypted_transaction', $_GET['transaction'])->first(); $decryptedTransaction = base64_decode(Crypt::decryptString($_GET['transaction'])); $transaction = Transaction::withoutGlobalScopes()->where('id', $decryptedTransaction)->first(); } catch (Exception $e) { $transaction = null; } $availableOptions = (new App\Http\Controllers\OptionController)->getReduniq($transaction->license_id); $numberFormatter = new NumberFormatter('pt_PT', NumberFormatter::CURRENCY); $hasAvailableReduniqPayment = false; foreach (Option::AvailableOptions['reduniq'] as $method) { if ( !empty($availableOptions[$method]) && !empty($availableOptions[$method]['value']) ) { $hasAvailableReduniqPayment = true; break; } } @endphp @vite('resources/js/app.js') @vite('resources/css/payment.css') @vite('resources/js/payment.js')
@if($wall_generated && $wall_generated->status === 'not_started') @if(count($availableOptions) > 0 && $transaction !== null && $hasAvailableReduniqPayment && ($availableOptions['reduniq.status']['value'] ?? false))
Selecione um método de pagamento
@if($availableOptions['reduniq.status']['value']) @if($availableOptions['reduniq.paymentMethod.paypal']['value'])
{{ __('transactions.payment_methods.paypal') }}
@endif @if($availableOptions['reduniq.paymentMethod.amex']['value'])
{{ __('transactions.payment_methods.amex') }}
@endif @if($availableOptions['reduniq.paymentMethod.cards']['value'])
{{ __('transactions.payment_methods.card') }}
@endif @if($availableOptions['reduniq.paymentMethod.mbway']['value'])
{{ __('transactions.payment_methods.mbway') }}
@endif @if($availableOptions['reduniq.paymentMethod.mb']['value'])
{{ __('transactions.payment_methods.reference') }}
@endif @if($availableOptions['reduniq.paymentMethod.parcela']['value'])
{{ __('transactions.payment_methods.parcela') }}
@endif @if($availableOptions['reduniq.paymentMethod.googlepay']['value'])
{{ __('transactions.payment_methods.googlepay') }}
@endif @if($availableOptions['reduniq.paymentMethod.applepay']['value'])
{{ __('transactions.payment_methods.applepay') }}
@endif @if($availableOptions['reduniq.paymentMethod.pix']['value'])
{{ __('transactions.payment_methods.pix') }}
@endif @endif

A processar o pagamento...

@else
Não existem métodos de pagamento disponíveis, por favor tente novamente mais tarde
@if($transaction === null) Código de Erro: INVALID-TRANSACTION-DECRYPTION @else Código de Erro: NO-PAYMENT-METHODS @endif
@endif @elseif($wall_generated && $wall_generated->status !== 'not_started')
O pagamento já foi iniciado, não é possível continuar.
Código de Erro: PAYMENT-ALREADY-STARTED
@else
Código de pagamento inválido ou expirado.
Código de Erro: INVALID-OR-EXPIRED-CODE
@endif