Skip to content

Commit

Permalink
fix Response validation if Hlavicka.Overeni = True mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mirus77 committed Jan 7, 2020
1 parent 0d240c6 commit 0b9fe48
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/eet/u_EETTrzba.pas
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,17 @@ function TEETTrzba.SendRevenue(aHttpClient: TEETHttpClient; const parameters: IX
FResponseStream.CopyFrom(SOAPResponse, SOAPResponse.Size);

{ * check SOAP response for valid XML signature* }
ValidateResponse(SOAPResponse);
if parameters.Hlavicka.Overeni = False then
ValidateResponse(SOAPResponse);

{ * parse response to result object if response XML is Valid * }
if FValidResponse then
ParseResponse;
ParseResponse;

if parameters.Hlavicka.Overeni and (Result <> nil) then
begin
FValidResponse := (Result.Chyba.Kod = 0);
FValidResponseCert := FValidResponse;
end;

{ * custom actions on the request * }
SOAPResponse.Position := 0;
Expand Down

0 comments on commit 0b9fe48

Please sign in to comment.