Genie

{{ __('Genie') }}

@include('accounting.partials.nav')
Genie
Genie
කාඩ් පන්ච් කරන ලද විස්තර.
@php($activeTab = $tab ?? 'payments')
@php($activeTab = $tab ?? 'payments') @if($activeTab === 'payments')
Confirmed Payments
Only CONFIRMED events are shown.
@php($range = (string) ($filters['range'] ?? 'today'))
Reset
@php($rows = ($payments ?? null) ? $payments->items() : []) @forelse($rows as $p) @php($payload = is_array($p->payload ?? null) ? $p->payload : []) @php($cs = is_array(($payload['_transaction']['costStructure'] ?? null)) ? $payload['_transaction']['costStructure'] : null) @php($fee = is_array($cs) && is_numeric($cs['fee'] ?? null) ? (int) $cs['fee'] : null) @php($recv = is_array($cs) && is_numeric($cs['netReceivable'] ?? null) ? (int) $cs['netReceivable'] : null) @php($rawTxnAt = method_exists($p, 'getRawOriginal') ? (string) $p->getRawOriginal('transaction_at') : '') @php($rawReceivedAt = method_exists($p, 'getRawOriginal') ? (string) $p->getRawOriginal('received_at') : '') @php($paidAtDisplay = null) @if($rawTxnAt !== '') @php($paidAtDisplay = \Illuminate\Support\Carbon::parse($rawTxnAt, 'UTC')->timezone(config('app.timezone'))) @elseif($rawReceivedAt !== '') @php($paidAtDisplay = \Illuminate\Support\Carbon::parse($rawReceivedAt, 'UTC')->timezone(config('app.timezone'))) @endif @empty @endforelse @if(($payments ?? null) && $totals) @endif
Paid Amount Fee Receivable
{{ optional($paidAtDisplay)->format('Y-m-d H:i:s') }} {{ $p->currency ?? '' }} {{ number_format(((int) ($p->amount ?? 0)) / 100, 2) }} @if(!is_null($fee)) {{ $p->currency ?? '' }} {{ number_format($fee / 100, 2) }} @else - @endif @if(!is_null($recv)) {{ $p->currency ?? '' }} {{ number_format($recv / 100, 2) }} @else - @endif
No confirmed payments found for the selected range.
Total (visible) {{ $totals['currency'] ?? '' }} {{ number_format(((int) ($totals['amount'] ?? 0)) / 100, 2) }} {{ $totals['currency'] ?? '' }} {{ number_format(((int) ($totals['fee'] ?? 0)) / 100, 2) }} {{ $totals['currency'] ?? '' }} {{ number_format(((int) ($totals['receivable'] ?? 0)) / 100, 2) }}
@if(($payments ?? null))
Showing {{ $payments->count() }} of {{ $payments->total() }}
@php($ppBottom = (string) ($filters['per_page'] ?? '25'))
{{ $payments->links() }}
@endif
Genie
Copy & run
@php($importCmd = 'cd C:\\xampp\\htdocs\\pos\\main && php artisan genie:webhooks:pull-catcher "https://webhook.yashan.dev/index.php?token=thisurababi" --days=7')
@endif @if($activeTab === 'settings')
Use this tab to store API credentials and manage webhook URLs. This does not connect to the physical terminal device directly.
@csrf
@error('application_id')
{{ $message }}
@enderror
@php($selectedSettlement = (int) old('settlement_account_id', $settings['terminal_api_settlement_account_id'] ?? 0))
Required for settlements: choose where Genie settlement money should be deposited.
@error('settlement_account_id')
{{ $message }}
@enderror
Current: {{ empty($settings['terminal_api_api_key'] ?? ($settings['terminal_api_client_secret'] ?? '')) ? 'Not set' : 'Saved' }}
@error('api_key')
{{ $message }}
@enderror
Current: {{ empty($settings['terminal_api_public_key'] ?? '') ? 'Not set' : 'Saved' }}
@error('public_key')
{{ $message }}
@enderror
@error('notes')
{{ $message }}
@enderror
Webhook (Auto Capture)
Add this URL in Genie Business → Connect → Webhooks. Genie will POST updates here and we will log them.
Webhook URL (Current)
{{ $currentWebhookUrl ?? '' }}
Recent 25 Failed Attempts
Shows only payment attempts that are not CONFIRMED (CANCELLED/DECLINED/etc.).
@forelse(($failedAttempts ?? []) as $e) @php($rawReceivedAt = method_exists($e, 'getRawOriginal') ? (string) $e->getRawOriginal('received_at') : ((string) ($e->received_at ?? ''))) @php($receivedAtDisplay = $rawReceivedAt !== '' ? \Illuminate\Support\Carbon::parse($rawReceivedAt, 'UTC')->timezone(config('app.timezone')) : null) @php($payload = is_array($e->payload ?? null) ? $e->payload : []) @php($txn = is_array(($payload['_transaction'] ?? null)) ? $payload['_transaction'] : []) @php($reason = $payload['reason'] ?? $payload['message'] ?? $payload['error'] ?? ($txn['accountingState'] ?? null) ?? ($payload['status'] ?? null) ?? null) @php($amountCents = is_numeric($e->amount ?? null) ? (int) $e->amount : (is_numeric($payload['amount'] ?? null) ? (int) $payload['amount'] : null)) @php($currency = is_string($e->currency ?? null) && (string) $e->currency !== '' ? (string) $e->currency : (is_string($payload['currency'] ?? null) ? (string) $payload['currency'] : '')) @empty @endforelse
Received Amount Status Txn ID Reason
{{ optional($receivedAtDisplay)->format('Y-m-d H:i:s') ?? '-' }} @if(!is_null($amountCents)) {{ $currency }} {{ number_format($amountCents / 100, 2) }} @else - @endif {{ $e->state ?? '-' }} {{ $e->transaction_id ?? '-' }} {{ is_string($reason) && $reason !== '' ? $reason : '-' }}
No failed attempts.
Fees
Recent 10 fee payments (captured when status is PAID).
@forelse(($feePayments ?? []) as $e) @php($rawReceivedAt = method_exists($e, 'getRawOriginal') ? (string) $e->getRawOriginal('received_at') : ((string) ($e->received_at ?? ''))) @php($receivedAtDisplay = $rawReceivedAt !== '' ? \Illuminate\Support\Carbon::parse($rawReceivedAt, 'UTC')->timezone(config('app.timezone')) : null) @php($payload = is_array($e->payload ?? null) ? $e->payload : []) @php($amountCents = is_numeric($e->amount ?? null) ? (int) $e->amount : (is_numeric($payload['amount'] ?? null) ? (int) $payload['amount'] : null)) @php($currency = is_string($e->currency ?? null) && (string) $e->currency !== '' ? (string) $e->currency : (is_string($payload['currency'] ?? null) ? (string) $payload['currency'] : '')) @empty @endforelse
Timestamp Amount Txn ID
{{ optional($receivedAtDisplay)->format('Y-m-d H:i:s') ?? '-' }} @if(!is_null($amountCents)) {{ $currency }} {{ number_format($amountCents / 100, 2) }} @else - @endif {{ $e->transaction_id ?? '-' }}
No fee payments yet.
@endif
@push('scripts') @endpush