The API client provides Response classes that can be used to extract the API response.
There are two type of responses, one is Result and the other is Error.
Result
Error
The following example outlines how to properly handle the API responses.
use IdeoLogix\DigitalLicenseManagerClient\Http\Responses\Result; use IdeoLogix\DigitalLicenseManagerClient\Http\Responses\Error; if( $response instanceof Error ) { print_r( $response->get_code() ); print_r( $response->get_message() ); } else { print_r( $response->get_data() ); }
There was an error while loading. Please reload this page.