diff --git a/app/Controllers/SamlController.php b/app/Controllers/SamlController.php index 79284c5..3dc663d 100644 --- a/app/Controllers/SamlController.php +++ b/app/Controllers/SamlController.php @@ -193,11 +193,9 @@ class SamlController extends BaseController $postId = $empdata['post']['id'] ?? $empdata['post']['employee_id'] ?? null; if ($postId !== null && $postId !== '') { $restAuth = new RestAuthenticationController(); - $endpoint = env('POST_ENROLLMENT_BASEURL', 'getTokenforSamulssOAuthLogin'); - $rawBody = $restAuth->callThirdPartyGETAPI( - ['id' => $postId], - $endpoint - ); + + $rawBody = $restAuth->callThirdPartyGETAPI(['id' => $postId],'getTokenforSamulssOAuthLogin'); + $api = is_string($rawBody) ? json_decode($rawBody, true) : null; if (is_array($api) && (($api['status'] ?? '') === 'success' || (int) ($api['code'] ?? 0) === 200)