fastje / enot-io-client
PHP API client for enot.io
v1.0.6
2024-02-20 11:20 UTC
Requires
- php: ^7.4 || ^8.0
- guzzlehttp/guzzle: ^6.5 || ^7.0
README
Installation
composer require fastje/enot-io-client
or with composer.phar
php composer.phar require fastje/enot-io-client
Usage
Initialize api client in your code. There are two way.
use FASTJE\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');
Methods
Get balance
use FASTJE\EnotIO\Client; $client = new Client([ 'api_key' => 'your-api-key', 'email' => 'your-email', ]) $balance = $client->getBalance();
Get available payment services
use FASTJE\EnotIO\Client; $client = new Client([ 'merchantId' => 'your-merchant-id', 'secretWord' => 'your-secret-word', ]) $paymentServices = $client->getAvailablePaymentServices();
Withdraw money
use FASTJE\EnotIO\Client; $client = new Client([ 'api_key' => 'your-api-key', 'email' => 'your-email', ]) $paymentServices = $client->getAvailablePaymentServices($service, $wallet, $amount);