invex / invexgate-php
SDK PHP pour l'intégration de la gestion de licences Invexgate.
v1.0.0
2026-03-15 11:26 UTC
Requires
- php: ^7.4|^8.0
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- phpunit/phpunit: ^9.0
README
SDK PHP officiel pour l'intégration de la gestion de licences avec Invexgate.
Installation
Vous pouvez installer le package via composer :
composer require barubitech/invexgate-php
Utilisation
Initialisation du client
use BarubiTech\Invexgate\Client; $publicKey = 'ig_live_...'; $secretKey = 'ig_sandbox_...'; $client = new Client($publicKey, $secretKey);
Vérifier une licence
try { $response = $client->verifyLicense('XXXX-XXXX-XXXX-XXXX', 'example.com'); if ($response['valid']) { echo "Licence valide !"; } } catch (\BarubiTech\Invexgate\Exceptions\InvexgateException $e) { echo "Erreur : " . $e->getMessage(); }
Activer une licence
try { $response = $client->activateLicense('XXXX-XXXX-XXXX-XXXX', 'example.com', [ 'metadata' => ['custom_id' => 123] ]); echo "Licence activée avec succès."; } catch (\BarubiTech\Invexgate\Exceptions\InvexgateException $e) { echo "Erreur d'activation : " . $e->getMessage(); }
Licence
MIT.