isign / isign-sdk-php
Client for Dokobit.com e-signature WS API
Installs: 12 274
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 4
Open Issues: 3
Requires
- php: >=7.1.0
- guzzlehttp/guzzle: ~6.0 || ~7.0
- symfony/validator: ~3.2 || ~4.0 || ~5.0
Requires (Dev)
- monolog/monolog: ~1.0
- phpunit/phpunit: ~7.5
- psr/log: ~1.0
This package is auto-updated.
Last update: 2024-07-15 14:41:42 UTC
README
How to start?
Check integration tests under tests/Integration
for library use cases.
Logging requests
Custom PSR-3 logger
use GuzzleHttp\Middleware;
use GuzzleHttp\MessageFormatter;
use Monolog\Logger;
$log = Middleware::log(new Logger('requests'), new MessageFormatter(MessageFormatter::DEBUG));
$client = Dokobit\Client::create([
'apiKey' => 'xxxxxx',
'sandbox' => true,
], $log);
Read more:
http://www.php-fig.org/psr/psr-3/
https://github.com/Seldaek/monolog
Debugging
To dig more into occured error use following methods. A
echo (string) $exception->getMessage()
echo (string) $exception->getPrevious()->getResponse()
var_dump( $exception->getResponseData() )
Available on all exception classes except UnexpectedError
and QueryValidator
.
Develop
Whole testsuite including integrational tests
phpunit
Don't forget to define SANDBOX_API_KEY
in your phpunit.xml.
Running unit tests only:
phpunit --testsuite=Unit
Running integrational tests only:
phpunit --testsuite=Integration
Running single testcase:
phpunit tests/Integration/MobileSignTest.php