company_key)->first(); } public function getCompanyGateway(): ?CompanyGateway { /** @var \App\Models\CompanyGateway */ return CompanyGateway::find($this->decodePrimaryKey($this->company_gateway_id)); } public function getPaymentHash(): ?PaymentHash { /** @var \App\Models\PaymentHash */ return PaymentHash::where('hash', $this->hash)->first(); } public function getClient(): ?Client { /** @var \App\Models\Client */ return Client::find($this->getPaymentHash()->data->client_id); } public function getPaymentId(): ?string { return $this->getPaymentHash()->data->payment_id; } }