Hello, first at all, thanks for all this code, it's so usefull.
But I tried to run an example like this:
include('vendor/autoload.php');
use GuzzleHttp\Client;
use LauLamanApps\IzettleApi\GuzzleIzettleClient;
use LauLamanApps\IzettleApi\IzettleClientFactory;
$izettleClient = new GuzzleIzettleClient(new Client(), 'myClientID', 'myClientSecret');
$accessToken = $izettleClient->getAccessTokenFromUserLogin('[email protected]', 'mypassword.');
$purchaseClient = IzettleClientFactory::getPurchaseClient($iZettleClient);
$library = $purchaseClient->getPurchaseHistory();
This is the error that it gives to me:
Fatal error: Uncaught TypeError: Argument 1 passed to LauLamanApps\IzettleApi\IzettleClientFactory::getPurchaseClient() must implement interface LauLamanApps\IzettleApi\IzettleClientInterface, null given, called in /homepages/35/d696135976/htdocs/print/izettle/pru.php on line 14 and defined in /homepages/35/d696135976/htdocs/print/izettle/src/IzettleClientFactory.php:48 Stack trace: #0 /homepages/35/d696135976/htdocs/print/izettle/pru.php(14): LauLamanApps\IzettleApi\IzettleClientFactory::getPurchaseClient(NULL) #1 {main} thrown in /homepages/35/d696135976/htdocs/print/izettle/src/IzettleClientFactory.php on line 48
Hello, first at all, thanks for all this code, it's so usefull.
But I tried to run an example like this:
This is the error that it gives to me: