fiskaltrust/product-de-bring-your-own-datacenter

JSON Casing

JulianSchmidtke opened this issue · 2 comments

Describe the bug
The casing of JSON-Responses from Fiskaltrust is documented to sometimes start with a capital letter and sometimes not.
https://docs.fiskaltrust.cloud/de/docs/poscreators/middleware-doc/general/data-structures#signature-entry
For Example, the "Data" Tag is written with a capital letter.
When using BYOD, the response JSON is always starting with a lowercase letter.

To Reproduce
Request:
Target URL: http://localhost:80/json/V1/sign

Request::

{
   "ftReceiptCase":"XXXX",
   "ftCashboxID":"XXXX",
   "cbTerminalID":"MS1",
   "cbUser":{
      "ID":"XXXX"
   },
   "cbCustomer":{
      "CustomerId":"XXXX",
      "CustomerName":"XXXX",
      "CustomerName2":"XXXX",
      "CustomerStreet":"XXXX",
      "CustomerZip":"XXXX",
      "CustomerCity":"XXXX"
   },
   "cbReceiptReference":"XXXX",
   "cbPreviousReceiptReference":"",
   "cbReceiptMoment":"2021-02-18T14:05:52.0000000Z",
   "cbChargeItems":[
      
   ],
   "cbPayItems":[
      
   ]
}

Response:

{
   "ftCashBoxID":"XXXX",
   "ftQueueID":"7f4ee3a1-3faa-49b0-9ac8-2abf03cc2f9b",
   "ftQueueItemID":"00810e7c-eb94-4cf4-98a6-93275aa378e0",
   "ftQueueRow":4,
   "cbTerminalID":"XXXX",
   "cbReceiptReference":"XXXX",
   "ftCashBoxIdentification":"XXXX",
   "ftReceiptIdentification":"XXXX",
   "ftReceiptMoment":"2021-02-18T14:07:13.886793Z",
   "ftReceiptHeader":null,
   "ftChargeItems":null,
   "ftChargeLines":null,
   "ftPayItems":null,
   "ftPayLines":null,
   "ftSignatures":[
      {
         "ftSignatureFormat":13,
         "ftSignatureType":4919338167972134928,
         "caption":"start-transaction-result",
         "data":"XXXX"
      },
      {
         "ftSignatureFormat":13,
         "ftSignatureType":4919338167972134929,
         "caption":"finish-transaction-payload",
         "data":"XXXX"
      },
      {
         "ftSignatureFormat":13,
         "ftSignatureType":4919338167972134930,
         "caption":"finish-transaction-result",
         "data":"XXXX"
      }
   ]
}

Expected behavior
The BYOD should respond in the same format as documented here
and return a uppercase "Data" and uppercase "Caption" Tag. I believe there will be more tags acting like this.

Hi @JulianSchmidtke,

thanks for bringing this to our attention. You are definitely right, that there is a difference on how we handle this in the local middleware and how we handle this in BYOD.

Since this change is potentially breaking we need to be careful when changing that. We will put it on our backlog and try to check how problematic it would be for existing customers that have implemented the serialization in a way that is case sensitive.

Are you able to work around this issue in the meantime or is this blocking your implementation?

We had to change our Application, but are able to work with it now.