Skip to content

tomasjurasek/eet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Known issues

  • 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 client = new EetClient(certificate);
var response = await client.SendRevenue(record);
if (response.IsSuccess)
{
    var fiscalCode = response.Success.FiscalCode;
}

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.

NuGet

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

src\Mews.Eet> nuget pack .\Mews.Eet.csproj -IncludeReferencedProjects

It will be published to NuGet once we fully verify its functionality.

Authors

Development: @jirihelmich

Code review: @siroky, @onashackem

Participants:

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

Friendly projects

About

Czech Fiscal Machines Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%