withOptions(['verify' => config('app.api_verify')]) ->get($pkbUrl . $endpoint, ['ic' => $icno]), ]; if ($koopUrl !== $pkbUrl) { $requests[] = $pool->withOptions(['verify' => config('app.api_verify')]) ->get($koopUrl . $endpoint, ['ic' => $icno]); } return $requests; }); $customer = $responses[0]->json(); if ($pkbUrl === $koopUrl) { // Preserve the source company: payment rules depend on this identity. return config('api.company') == CompanyStatus::COM_KOOPPKB ? [[], $customer] : [$customer, []]; } return [$customer, $responses[1]->json()]; } }