PHP code example of uzdevid / yii2-apelsin

1. Go to this page and download the library: Download uzdevid/yii2-apelsin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

uzdevid / yii2-apelsin example snippets


    $config = [
        'login' => '<login>',
        'password' => '<password>'
    ];

    $apelsin = new uzdevid\apelsin\Apelsin($config);

    $card = $apelsin->card->info('<card number>');

    $card = $apelsin->card->data('<card number>', '<expiry date>');

    $cards = [
        ['token' => '<token_1>', 'expire' => '<expire_1>'],
        ['token' => '<token_2>', 'expire' => '<expire_2>'],
        ['token' => '<token_3>', 'expire' => '<expire_3>'],
    ];
    $card = $apelsin->card->data($cards);

    $card = $apelsin->card->dataByToken('<token>');

    $tokens = ['<token_1>', '<token_2>', '<token_3>'];
    $card = $apelsin->card->dataByToken($tokens);

    $card = $apelsin->card->phone('<card number>', '<expiry date>');

    $card = $apelsin->card->phoneByToken('<token>');

    $card = $apelsin->card->block('<token>');