The error “Chyba v podpise dátovej správy” (error in the data message signature) is most likely caused by the wrong environment (integration vs. production) in the Portos eKasa configuration.
If you use the HTTP WEB API service:
- open the admin application at
http://localhost:3010 - in the main menu, choose
Nastavenia(Settings) - on the
eKasa klient(eKasa client) tab, in theZákladné(Basic) part, choose the required value in theProstredie(Environment) field
From version 8 we recommend setting the Prostredie (Environment) field to (automaticky určené) (determined automatically). The environment is then derived from the cash register identification data.
- open the
Portos eKasa Servisservice application - in the top bar, choose the
Nastavenia(Settings) tab - in the section
Pokročilé(Advanced) >eKasa klient(eKasa client), enter the required value in theprostredie(environment) field
If you use the library without loading the configuration from a file, and instead create it manually in source code
or from your own source, change the environment type in the configuration object (the ClientConfiguration class),
which is a parameter of the Client class constructor.
ClientConfiguration configuration = new ClientConfiguration
{
// integration (Playground) or production (Production) environment,
// null (default, since version 8) = determined from the identification data
EKasaClient = new EKasaClientConfiguration { Environment = EKasaEnvironment.Playground }
};
Client client = new NineDigit.eKasa.Client(configuration);
From version 8 we recommend setting the prostredie (environment) field to automatic detection (the value null in code).