Skip to content

Commit

Permalink
DARK - fix instantiate YouCanPay with the right env
Browse files Browse the repository at this point in the history
  • Loading branch information
yafniss committed Aug 26, 2021
1 parent 0dd61d8 commit 0362f25
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/API/APIService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ final class APIService implements APIServiceInterface
private $httpClient;

public function __construct()
{
$this->initHttpClient();
}
{}

/**
* @param string $endpoint
Expand Down Expand Up @@ -67,6 +65,10 @@ public function get(string $endpoint, array $params): Response

private function getHttpClient(): GuzzleClient
{
if (!$this->httpClient instanceof GuzzleClient) {
$this->initHttpClient();
}

return $this->httpClient;
}

Expand Down

0 comments on commit 0362f25

Please sign in to comment.