Skip to content

Commit

Permalink
Merge pull request #162 from pagarme/story/customize-headers
Browse files Browse the repository at this point in the history
  • Loading branch information
devdrops committed Apr 11, 2017
2 parents 15f8272 + d4db55f commit 3c2b1af
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/PagarMe.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,18 @@ class PagarMe
* @param string $apiKey
* @param int|null $timeout
*/
public function __construct($apiKey, $timeout = null)
{
public function __construct(
$apiKey,
$timeout = null,
$headers = []
) {
$this->client = new Client(
new GuzzleClient(
[
'base_url' => 'https://api.pagar.me/1/'
'base_url' => 'https://api.pagar.me/1/',
'defaults' => [
'headers' => $headers
]
]
),
$apiKey,
Expand Down

0 comments on commit 3c2b1af

Please sign in to comment.