Yousign REST API Client.
PRs are of course highly appreciated, as well as improvement suggestions!
src/
tests/
Via Composer
$ composer require timothecrespy/yousign-api-php-client
For testing, and obviously for production, an internet connexion is required.
use TimotheCrespy\YousignClient;
// It is recommended to store these values in a .env or equivalent file
const YOUSIGN_PRODUCTION_API_URL = 'https://api.yousign.com';
const YOUR_PRODUCTION_API_KEY = '[YOUR_PRODUCTION_API_KEY]';
$yousignClient = new YousignClient([
'api_url' => self::YOUSIGN_PRODUCTION_API_URL,
'api_key' => self::YOUR_PRODUCTION_API_KEY
]);
As the Yousign production API is not free, you might want to test it, with the staging environment:
use TimotheCrespy\YousignClient;
// It is recommended to store these values in a .env or equivalent file
const YOUSIGN_STAGING_API_URL = 'https://staging-api.yousign.com';
const YOUR_STAGING_API_KEY = '[YOUR_STAGING_API_KEY]';
$yousignClient = new YousignClient([
'api_url' => self::YOUSIGN_STAGING_API_URL,
'api_key' => self::YOUR_STAGING_API_KEY
]);
Requirement : version 6.*
minimum
// If you are using Laravel (https://github.com/laravel/laravel), you could specify the default Laravel logger:
$loggerInstance = Illuminate\Support\Facades\Log::getLogger();
$yousignClient->setLogger($loggerInstance);
$yousignClient->getUsers();
Please see CHANGELOG for more information on what has changed recently.
All this package is based on the notion that the Yousign's staging
environment is strictly similar to the production
environment. Hence the tests based on this staging
environment. Therefore, the API is not stubbed, as this staging
environment is free and without any restriction.
Testing for a PR is however done this way:
$ composer test
or
$ ./vendor/bin/phpcs
$ ./vendor/bin/phpunit
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email contact@timothecrespy.fr instead of using the issue tracker.
- Timothé Crespy
- All Contributors
The MIT License (MIT). Please see License File for more information.