Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.07 KB

README.md

File metadata and controls

48 lines (31 loc) · 1.07 KB

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