1. Go to this page and download the library: Download lee-to/php-tochka-api-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/ */
lee-to / php-tochka-api-sdk example snippets
use TochkaApi\TochkaApi;
use TochkaApi\HttpAdapters\CurlHttpClient;
$tochkaApi = new TochkaApi("client_id", "client_secret", new CurlHttpClient);
//Для установки JWT токена
//$tochkaApi->setAccessToken("");
// Урл для авторизации, после подтверждения вернет $_GET["code"] на redirect_uri
$tochkaApi->getAuthorizeUrl();
//Вернет объект AccessToken для $tochkaApi->setAccessToken("");
$tochkaApi->token($_GET["code"]);