nextgen-tech / ewus
v1.1.4
2022-04-26 16:57 UTC
Requires
- php: ^7.3|^8.0
- ext-dom: *
- guzzlehttp/guzzle: ^6.0|^7.0
- spatie/array-to-xml: ^2.13
Requires (Dev)
- phpstan/phpstan: ^0.12.42
- phpunit/phpunit: ^9.3
Suggests
- ext-soap: Required to use native SOAP client connection.
README
This package is PHP implementation of eWUŚ (Elektroniczna Weryfikacja Uprawnień Świadczeniobiorców). It has coded each available operation - login, logout, check patient status and change password. It is compliment with newest version (5.0), which contans additional information about patient (e.g. information about COVID-19 quarantine and isolation).
ToC
Requirements
This package requires ext-dom to be installed on server. Optionally HTTP connection (via Guzzle) can be switched to native SOAP Client. In this case also ext-soap must be installed.
Installation
composer require nextgen-tech/ewus
Usage
// Create once handler instance $handler = new Handler(new HttpConnection()); // (Optional) Enable sandbox mode for testing $handler->enableSandboxMode(); // Login $request = new LoginRequest('15', 'TEST1', 'qwerty!@#'); $login = $handler->handle($request); // Check patient status $request = new CheckRequest($login->getSessionId(), $login->getToken(), '12345678901'); $check = $handler->handle($request); // Change password $request = new ChangePasswordRequest($login->getSessionId(), $login->getToken(), '15', 'TEST1', 'qwerty!@#', 'asdfgh#@!'); $changePassword = $handler->handle($request); // Logout $request = new LogoutRequest($login->getSessionId(), $login->getToken()); $logout = $handler->handle($request);