1. Go to this page and download the library: Download haikiri/mikbill 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/ */
haikiri / mikbill example snippets
use Haikiri\MikBiLL\MikBiLLApi;
$MikBiLL = new MikBiLLApi(
url: "https://api.example.com/", # Твой Api сервер.
key: "yourApiSignKey", # Твой Api ключ для подписи запросов.
);
$id = 101; # ID услуги в MikBiLL.
$status = $MikBiLL->cabinet->Subscriptions()->setSubscriptions(id: $id, activate: 1);
echo $status
? "Успешно оформили подписку №$id."
: "Не удалось оформить подписку №$id.";
$id = 101; # ID услуги в MikBiLL.
$status = $MikBiLL->cabinet->Subscriptions()->setSubscriptions(id: $id);
echo $status
? "Успешно отписались от подписки №$id."
: "Не удалось отписаться от подписки №$id.";
$token = $MikBiLL->cabinet->Auth()
->login("userLogin", "userPassword")
->getToken();
echo $token
? "Успешно авторизовались."
: "Не удалось авторизоваться.";
# Обязательно запоминаем полученный токен для последующих запросов.
$MikBiLL->setUserToken($token);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.