composer require churakovmike/enot-io-client
or with composer.phar
php composer.phar require churakovmike/enot-io-client
Initialize api client in your code. There are two way.
use ChurakovMike\EnotIO\Client;
$client = new Client([
'merchantId' => 'your-merchant-id',
'secretWord' => 'your-secret-word',
'apiKey' => 'your-api-key',
'email' => 'your-email',
]);
All parameters in constructor are optional. You can set or change it later.
use ChurakovMike\EnotIO\Client;
$client = new Client();
$client->setMerchantId('your-merchant-id');
$client->setSecretWord('your-merchant-id');
$client->setApiKey('your-api-key');
$client->setEmail('your-email');
use ChurakovMike\EnotIO\Client;
$client = new Client([
'api_key' => 'your-api-key',
'email' => 'your-email',
])
$balance = $client->getBalance();
use ChurakovMike\EnotIO\Client;
$client = new Client([
'merchantId' => 'your-merchant-id',
'secretWord' => 'your-secret-word',
])
$paymentServices = $client->getAvailablePaymentServices();
use ChurakovMike\EnotIO\Client;
$client = new Client([
'api_key' => 'your-api-key',
'email' => 'your-email',
])
$paymentServices = $client->getAvailablePaymentServices($service, $wallet, $amount);