From version 28.2
edited by Kristian Lingsom
on 2017/10/17 08:33
To version 28.3
edited by Kristian Lingsom
on 2017/10/17 08:45
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -378,3 +378,76 @@
378 378  
379 379  All subfields must be present when bit 62 is set. Field 62 shall not be sent if none of the three subfields need to be sent. If one of the subfields needs to be sent, all three subfields shall be sent.
380 380  
381 +
382 +**P-63 PRODUCT DATA**
383 +
384 +This data element provides the detailed information on the products purchased or selected by the customer. The first two fields (63-1, 63-2) appear once per transaction. The next seven fields can be repeated up to 18 times.
385 +
386 +Each product is represented by seven fields: Product Code, Unit of Measure, Quantity, Unit Price, Amount, Taxcode and Additional product code. The variable length fields and the succeeding entry are separated by a back-slash (\).
387 +Unit price and amount may be negative or positive, but the sum of the amounts in the product data must equal the transaction amount.
388 +The values of Quantity and Unit price may have a value that includes both integer and fractional values. The format of these fields consists of a single digit, which specifies the number of fractional digits following the integer, followed by the numeric value.
389 +The value must be numeric. The number of fractional digits has a maximum of 4. The Amount field may have fractional digits. The number of fractional digits is specified by the currency code.
390 +
391 +The list of sales items can contain a mixture of normal sales items and refund items. These are included in the online Host message as follows:
392 +
393 +
394 +|=Number|=Format|=Field|=Description
395 +|63|n 3|Product data|LLLVAR length field. Sets the length of P-63 data
396 +|63-1|a 1|Service level|(((
397 +S - Self-serve
398 +F - Full serve
399 +Space - Information not available
400 +)))
401 +|63-2|n 2|Number of products|Count of products (sale item) reported for this transaction.
402 +
403 +Each Sales item consists of the following components:
404 +
405 +
406 +|=Number|=Format|=Field|=Description
407 +|63-3|n 3 |Product code|3-digit product code that defines the type of product sold
408 +|63-4|a 1 |Unit ofg measure|Indicates the meaning of the Quantity field. ‘U’ Sold per Unit
409 +‘O’ Unit of Measurement undefined ‘L’ Sold per Litre
410 +|63-5|n 9|Quantity|Number of product units
411 +| | |Separator|‘\’ To separate Quantity from Unit-Price
412 +|63-6|sn 9|Unit price|Starts with a Minus sign when Unit price is negative. First digit is exponent. Typically 3 for fuels, and 2 for shop articles. Remaining digits are actual unit price
413 +| | |Separator|‘\’ To separate Unit price from Amount
414 +|63-7|sn 12|Amount|Starts with a minus sign in case Item amount is negative. 2 decimals are always implied.
415 +| | |Separator|‘\’ To separate the Amount from the Vat Code
416 +|63-8|an 1|Tax code|1 digit VAT code
417 +|63-9|n 14|Additional Product code|Up to 14 digits article number as known in the POS
418 +| | |Teminator |‘\’ To mark the end of this sales item
419 +
420 +
421 +**P-64 MAC**
422 +
423 +MAC is calculated/verified according to the “IFSF X9.19 Retail CBC MAC (3DES)” (see Appendix D in [2]), using the “Derivation of the MAC session key” (see 5.2.2 Derivation of the MAC session key in [2]).
424 +
425 +The input for the MAC calculation/verification will be the SHA-256 of the IFSF message. The message length header and the MAC block itself are not included, however the MAC bit in the bitmap is part of the message and is already set when calculating the MAC.
426 +
427 +
428 +In pseudo code it is as follows (the sign is used for assignment):
429 +Input :
430 +
431 +* The four 8-byte blocks B1 .. B4 from the SHA256
432 +* MAC session key <Kl, Kr> (left and right halfs)
433 +
434 +Output :
435 +
436 +* 8-byte MAC M
437 +
438 +Function X9.19retailMAC:
439 +
440 +* M <- 0x0000 0000 0000 0000
441 +
442 +For each 8-byte block b in B1 to B4 do:
443 +
444 +* M <- M XOR b
445 +* M <- 1DES_encrypt(Kl, M)
446 +
447 +Done
448 +
449 +* M <- 1DES_decrypt(Kr, M)
450 +* M <- 1DES_encrypt(Kl, M)
451 +
452 +End function
453 +