https://github.com/uzdevid/yii2-apelsin
https://github.com/uzdevid/yii2-apelsin
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/uzdevid/yii2-apelsin
- Owner: uzdevid
- Created: 2022-10-20T05:30:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-20T05:31:49.000Z (over 2 years ago)
- Last Synced: 2025-01-19T18:51:51.127Z (4 months ago)
- Language: PHP
- Size: 1.95 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Apelsin
=======
Integration with the "Apelsin" payment systemInstallation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
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.
***
Usage
-----**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
```php
$config = [
'login' => '',
'password' => ''
];
```Creating an instance of a class
```php
$apelsin = new uzdevid\apelsin\Apelsin($config);
```### Working with cards
***
#### Getting p2p information about the card (cards.get_p2p_info)
params:
1. card number is string
```php
$card = $apelsin->card->info('');
```***
#### Getting card data by card number and expiry date (cards.get)
params:
1. card number is string or array
2. expiry date is string```php
$card = $apelsin->card->data('', '');
```or (cards.get_some)
```php
$cards = [
['token' => '', 'expire' => ''],
['token' => '', 'expire' => ''],
['token' => '', 'expire' => ''],
];
$card = $apelsin->card->data($cards);
```***
#### Getting card data by token (cards.get)
params:
1. token is string or array
```php
$card = $apelsin->card->dataByToken('');
```or (cards.get_some)
```php
$tokens = ['', '', ''];
$card = $apelsin->card->dataByToken($tokens);
```***
#### Getting a phone number linked to a card by card number and expiry date (cards.get_phone)
params:
1. card number is string
2. expiry date is string```php
$card = $apelsin->card->phone('', '');
```***
#### Getting a phone number linked to a card by token (cards.get_phone)
params:
1. token is string
```php
$card = $apelsin->card->phoneByToken('');
```***
#### Method that will block the card (cards.block)
params:
1. token is string
```php
$card = $apelsin->card->block('');
```