vldmr-k / mono-acquiring
Monobank Acquiring library
0.0.5
2022-10-16 16:38 UTC
Requires
- guzzlehttp/guzzle: ^7.0
- starkbank/ecdsa: 0.0.5
Requires (Dev)
- php: ^7.4|^8.0
- friends-of-phpspec/phpspec-code-coverage: ^6.1
- phpspec/phpspec: ^7.2
- phpstan/phpstan: ~1.0.0
- squizlabs/php_codesniffer: 3.*
README
Monobank Acquiring PHP SDK
Unofficial SDK for Monobank Acquiring. https://api.monobank.ua/docs/acquiring.html
Examples
Retrieve public key
$token = '...'; $config = new \VldmrK\MonoAcquiring\Config($token); $api = new \VldmrK\MonoAcquiring\Api($config); $response = $api->call(new \VldmrK\MonoAcquiring\Query\PubkeyQuery()); print_r($response->toArray()); // ['key' => '....']
Merchant Details
$token = '...'; $config = new \VldmrK\MonoAcquiring\Config($token); $api = new \VldmrK\MonoAcquiring\Api($config); $response = $api->call(new \VldmrK\MonoAcquiring\Query\DetailsQuery()); print_r($response); // [ 'merchantId' => 'test_A4EaPDryzz', 'merchantName' => 'Test Caption']
More example you can find here example/. Before run example, please set global variable MONO_XTOKEN
Run Test
make build make unit
Coverage
After run tests, you can check coverage of code
make serve
After that, coverage report will be available by address http://0.0.0.0:8080/spec/_coverage/index.html