Git Product home page Git Product logo

fiscalization-czechia's Introduction

Build Status

EET

EET stands for Elektronická Evidence Tržeb, which is Czech version of Fiscal Printers. It's an online API provided by the Ministry of Finance in a form of a SOAP Web Service.

Key features

  • No Czech abbreviations.
  • Early data validation.
  • Intuitive immutable DTOs.
  • SOAP communication (including WS-Security signing).
  • PKP and BKP security code computation.
  • Support for parallel async requests.
  • Logging support

Known issues

  • 8: As the communication is done fully via HTTPS, we postponed the implementation of response signature verification. It's a potential security risk that will be addressed in upcoming releases.

Usage

We tend to use immutable DTOs wherever possible, especially to ensure data validity. We want the library to throw an error as soon as possible, i.e. when constructing corresponding data structures. That is why we even introduce wrappers for simple datatypes. Various usages are demonstrated in our test cases.

Simplest usage example

var certificate = new Certificate(
    password: "certificatePassword",
    data: certificateContentsByteArray
);

var record = new RevenueRecord(
    identification: new Identification(
        taxPayerIdentifier: new TaxIdentifier("CZ1234567890"),
        registryIdentifier: new RegistryIdentifier("01"),
        premisesIdentifier: new PremisesIdentifier(1),
        certificate: certificate
    ),
    revenue: new Revenue(
        gross: new CurrencyValue(1234.00m)
    ),
    billNumber: new BillNumber("2016-321")
);

var securityCode = record.SecurityCode; // BKP
var signature = record.Signature; // PKP

var client = new EetClient(certificate);
var response = await client.SendRevenueAsync(record);
if (response.IsSuccess)
{
    var fiscalCode = response.Success.FiscalCode;
}
  • More examples are presented here.
  • Some of the data items are explained here.

NuGet

We have published the library as Mews.Fiscalization.Czechia.

Alternatively, the NuGet package can be generated by running the following command:

src\Mews.Fiscalization.Czechia> nuget pack .\Mews.Fiscalization.Czechia.csproj -IncludeReferencedProjects

Tests

Test are not currently running on Travis CI, as their network infrastructure is blocking HTTPS traffic directed into Europe, where the EET servers are located.

Otherwise, a xUnit test suite is a part of the library, it contains end-to-end tests that communicates with Playground EET servers to verify the lib is really working against the current EET version.

Authors

Development: @jirihelmich Code review: @siroky, @onashackem

Who uses the library in production?

We would like to hear your story and know who users of the lib are. Please, thank us for providing the library by sharing with us, who you are and letting us add you into this list.

The time to implement this was kindly provided by Mews Systems.

Donate

There is no need to donate the project, but thanks for considering it! Instead, if you like the project, star it here on GitHub :-)! Thanks!

If you still insist on donating, we accept gummy bears at Mews Systems s.r.o., Náměstí IP Pavlova 5, Vinohrady 120 00 Prague. This project was, of course, powered by a huge pile of gummy bears ;-)

Related projects

Credits

fiscalization-czechia's People

Contributors

abdallahbeshi avatar kalicz avatar marektresnak avatar siroky avatar starychfojtu avatar zdendaki avatar jasho avatar

Watchers

James Cloos avatar

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.