PHP code example of unapi / def-qiwi

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

    

unapi / def-qiwi example snippets


use unapi\def\common\dto\OperatorInterface;
use unapi\def\common\dto\PhoneDto;
use unapi\def\qiwi\Service;

/** @var OperatorInterface $operator */
$operator = (new Service())->detectOperator(new PhoneDto('9651238341'))->wait();
$this->assertEquals('Билайн', $operator->getName());