picios / dlocksdk
php sdk for DLock API
v1.0.2
2025-12-30 10:06 UTC
Requires
- php: >=8.0
Requires (Dev)
- phpunit/phpunit: ^9.3
This package is auto-updated.
Last update: 2026-02-25 23:29:03 UTC
README
This library helps to connect to DLock API with PHP
Installation
Install with composer
composer require picios/dlocksdk
Usage
Creating a new token
You need to create a connection object first and then use it in request
<?php use Picios\DlockSDK\DlockSDKConnection; use Picios\DlockSDK\Request\DlockSDKAuth; require_once __DIR__ . '/vendor/autoload.php'; $connection = new DlockSDKConnection( 'https://example.com', 'partner_address_123' ); $auth = new DlockSDKAuth($connection); $response = $auth->getQRcodeImage( 'session_id', 'https://example.com/webhook/123' ); if ($response->isSuccess()) { die($response->getContent()); }
Testing
To test the class, run:
phpunit test