Guzzle için;
$auth = base64_encode("username:password");
$response = $client->get('http://paytr/endpoint', [
'Authorization' => ['Basic ' . $auth]
]);Curl İçin;
$auth = base64_encode("username:password");
$headers = [
'Content-Type: application/json',
'Authorization: Basic '. $auth
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);Ya da;
curl_setopt($ch, CURLOPT_USERPWD, "username:password");
PayTR ye istek gönderirken bu yukarıda verdiğim örneklerden size hangisi uyuyorsa onu kullanarak authenticate olmanız gerekiyor. Kolaylıklar dilerim..