Git Product home page Git Product logo

fns-receipt-sdk's Introduction

Проверка чека ФНС

GitHub Actions Latest Stable Version Latest Unstable Version codecov Total Downloads License

Авторизация

Регистрация

<?php

$user = new FNS\Receipt\Model\User();
$user->setEmail('[email protected]');
$user->setName('John Doe');

$client = new FNS\Receipt\Client('79991234567');
$client->authorization()->signUp($user);

Восстановление пароля

<?php

$client = new FNS\Receipt\Client('79991234567');
$client->authorization()->restore();

Авторизация

<?php

$client = new FNS\Receipt\Client('79991234567');
$client->authorization()->withCode(111111);

Чек

Проверка чек

<?php

$receipt = new FNS\Receipt\Model\Receipt();
$receipt->setNumber('1112222333444444');
$receipt->setDocument('112233');
$receipt->setTag('1112223333');
$receipt->setType(FNS\Receipt\Model\Receipt::FNS_RECEIPT_TYPE_INCOMING);
$receipt->setDate(new DateTime('01.01.2019 00:00'));
$receipt->setPrice(1000.00);

$client = new FNS\Receipt\Client('79991234567');
if ($client->authorization()->withCode(111111)->isSuccess()) {
    $data = $client->receipt($receipt)->exists();
}

Детальная информация о чеке

<?php

$receipt = new FNS\Receipt\Model\Receipt();
$receipt->setNumber('1112222333444444');
$receipt->setDocument('112233');
$receipt->setTag('1112223333');
$receipt->setType(FNS\Receipt\Model\Receipt::FNS_RECEIPT_TYPE_INCOMING);
$receipt->setDate(new DateTime('01.01.2019 00:00'));
$receipt->setPrice(1000.00);

$client = new FNS\Receipt\Client('79991234567');
if ($client->authorization()->withCode(111111)->isSuccess()) {
    $data = $client->receipt($receipt)->detail();
}

fns-receipt-sdk's People

Contributors

saundefined avatar

Watchers

 avatar  avatar

fns-receipt-sdk's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.