Skip to content

Commit

Permalink
Merge pull request #398 from recurly/add-api-version
Browse files Browse the repository at this point in the history
Add X-Api-Version header to getPdf and getFile
  • Loading branch information
bhelx authored Feb 12, 2019
2 parents 5d1f251 + e321e2a commit 555cfed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/recurly/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ public function getFile($uri, $file_pointer) {
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
Recurly_Client::__userAgent(),
'X-Api-Version: ' . Recurly_Client::$apiVersion
));
curl_setopt($ch, CURLOPT_FILE, $file_pointer);

Expand Down Expand Up @@ -292,7 +293,8 @@ public function getPdf($uri, $locale = null)
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Accept: application/pdf',
Recurly_Client::__userAgent(),
'Accept-Language: ' . $locale
'Accept-Language: ' . $locale,
'X-Api-Version: ' . Recurly_Client::$apiVersion
));
curl_setopt($ch, CURLOPT_USERPWD, $this->apiKey());

Expand Down

0 comments on commit 555cfed

Please sign in to comment.