Having trouble putting together a CURL get request in PHP 8.
The raw curl is as such:
curl --location 'https://api-stg.syf.com/v1/dpos/utility/lookup/transaction/18a1ddb84d4PI2082504896426?lookupType=PARTNERID&lookupId=PI20825048' \
--header 'X-SYF-ChannelId: DY' \
--header 'X-SYF-Request-TrackingId: 123e4567-e89b-12d3-a456-426614174000' \
--header 'Authorization: Bearer iEXgd43NhPA2fa4TiNjiTo0NkKt0' \
My attempt is as such:
<?php
$bearer = "iEXgd43NhPA2fa4TiNjiTo0NkKt0";
$cURLConnection = curl_init();
curl_setopt($cURLConnection, CURLOPT_URL, 'https://api-stg.syf.com/v1/dpos/utility/lookup/transaction/18a1ddb84d4PI2082504896426?lookupType=PARTNERID&lookupId=PI20825048');
$authorization = "Authorization: Bearer ".$bearer;
curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization ));
curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($cURLConnection);
curl_close($cURLConnection);
$jsonArrayResponse = json_decode($result);
print_r($jsonArrayResponse);
My call results in "Invalid request.Verify content-Type header and payload of request "