Integration with the "Apelsin" payment system
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist uzdevid/yii2-apelsin "dev-main"
or add
"uzdevid/yii2-apelsin": "dev-main"
to the require section of your composer.json
file.
Note: You can use this extension after creating a contract between the Apelsin service and your company. And you can use most of the methods only when you create your company as a payment system through the Central Bank of the Republic of Uzbekistan.
Login and password can be obtained from the technical specialists of the Apelsin service
$config = [
'login' => '<login>',
'password' => '<password>'
];
Creating an instance of a class
$apelsin = new uzdevid\apelsin\Apelsin($config);
params:
- card number is string
$card = $apelsin->card->info('<card number>');
params:
- card number is string or array
- expiry date is string
$card = $apelsin->card->data('<card number>', '<expiry date>');
or (cards.get_some)
$cards = [
['token' => '<token_1>', 'expire' => '<expire_1>'],
['token' => '<token_2>', 'expire' => '<expire_2>'],
['token' => '<token_3>', 'expire' => '<expire_3>'],
];
$card = $apelsin->card->data($cards);
params:
- token is string or array
$card = $apelsin->card->dataByToken('<token>');
or (cards.get_some)
$tokens = ['<token_1>', '<token_2>', '<token_3>'];
$card = $apelsin->card->dataByToken($tokens);
params:
- card number is string
- expiry date is string
$card = $apelsin->card->phone('<card number>', '<expiry date>');
params:
- token is string
$card = $apelsin->card->phoneByToken('<token>');
params:
- token is string
$card = $apelsin->card->block('<token>');