<?php
 namespace App\EventHooks\System; use App\EventHooks\HookEvent; class PaymentMethodUpdated extends HookEvent { public const HOOK = 'CCUpdate'; public function clientId(): ?int { $id = $this->get('client_id') ?? $this->get('userid') ?? $this->get('user_id'); return $id ? (int) $id : null; } public function gateway(): ?string { return $this->get('gateway'); } public function lastFour(): ?string { $v = $this->get('last_four'); return $v !== null ? (string) $v : null; } } 