FIX_HEADER_FOR_APP_SIGNSTURE

This commit is contained in:
VENKATESHWARAN 2025-12-03 11:12:24 +05:30
parent 42a1d53b01
commit 1801a85047

View File

@ -346,6 +346,9 @@ class RestAuthHelper
$client = \Config\Services::curlrequest();
$endPoint = 'getPostEmployeeDataForAuth';
$url = env('POST_ENROLLMENT_BASEURL') . $endPoint;
$headers = [
'App-Signature' => getenv('APP_SIGNATURE'),
];
$postData = [];
@ -368,7 +371,7 @@ class RestAuthHelper
log_message('error', 'Sending POST to external API: ' . $url);
log_message('error', 'POST payload: ' . json_encode($postData));
$response = $client->post($url, ['json' => $postData, 'http_errors' => false]);
$response = $client->post($url, ['json' => $postData, 'headers' => $headers , 'http_errors' => false]);
$post_json = $response->getBody();
// log_message('error', 'Response from API: ' . $post_json);