vldmr-k/mono-acquiring

Monobank Acquiring library

0.0.5 2022-10-16 16:38 UTC

This package is auto-updated.

Last update: 2024-11-17 22:40:35 UTC


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