PHP code example of finbox / sdk

1. Go to this page and download the library: Download finbox/sdk 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/ */

    

finbox / sdk example snippets


    $finbox = new Finbox(
        '{TOKEN}',
        '{SECRET}',
        '{API_URL}'
    );

    $command = new ClientCreateCommand(
        ClientType::INDIVIDUAL,
        [
            'name' => 'Test client name',
            'surname' => 'Test client surname',
            'patronymic' => 'Test client patronymic',
        ],
        '+7 (000) 000-00-00'
    );

    $result = $finbox->send($command);
    
    if ($result->success) {
        $newClient = $result->getResult();    
    } else {
        die($result->errorMessage);
    }