curl_setopt($ch, CURLOPT_USERPWD, "8(800)555-35-35" . ":" . "554400");
$base = "https://proverkacheka.nalog.ru:9999";
$derviceId = uniqid();
$deviceOS = "Android 4.4.4";
$protocol = "2";
$clientVersion = "1.4.1.3";
$userAgent = "okhttp/3.0.1";
$fn = $_GET["fn"];
$fd = $_GET["fd"];
$fs = $_GET["fs"];
$query = http_build_query([
'fiscalSign' => $fs,
'sendToEmail' => "no"
]);
$ch = curl_init("$base/v1/inns/*/kkts/*/fss/$fn/tickets/$fd?".$query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Device-Id: $derviceId",
"Device-OS: $deviceOS",
"Version: $protocol",
"ClientVersion: $clientVersion",
"ClientVersion: $clientVersion",
]);
curl_setopt($ch, CURLOPT_USERPWD, "8(800)555-35-35" . ":" . "554400");
$result = curl_exec($ch);
$json = json_decode($result);
var_dump($json);
shell
окружении c curl
EMAIL=email@example.ru
NAME=Name
PHONE=+79xxxxxxxxxx
curl -X POST -H "Content-Type: application/json; charset=UTF-8" https://proverkacheka.nalog.ru:9999/v1/mobile/users/signup -d "{\"email\":\"$EMAIL\", \"name\": \"$NAME\", \"phone\": \"$PHONE\"}" -i
PHONE=+79xxxxxxxxxx
PASS=555xxx
FN=87100001017610xx
FDP=41709130xx
FD=128xx
DERVICEID=curl
DEVICEOS=linux
curl -H "Device-Id: $DERVICEID" -H "Device-OS: $DEVICEOS" "https://$PHONE:$PASS@proverkacheka.nalog.ru:9999/v1/inns/*/kkts/*/fss/$FN/tickets/$FD?fiscalSign=$FDP&sendToEmail=no" -i
Есть ли легальное API для доступа к данным чека для использования в своих приложениях/сервисах?
{"update":true,"appstore":"https://apps.apple.com/ru/app/%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0-%D1%87%D0%B5%D0%BA%D0%BE%D0%B2-%D1%84%D0%BD%D1%81-%D1%80%D0%BE%D1%81%D1%81%D0%B8%D0%B8/id1169353005","playmarket":"https://play.google.com/store/apps/details?id=ru.fns.billchecker","appstorebutton":"Обновить","playmarketbutton":"Обновить","message":"Уважаемый пользователь! \nДоступна новая версия приложения, пожалуйста установите обновление."}