Preformatted Receipts

Starting from PayServer version 1.28, you have access to preformatted receipts. These receipts can be printed right away without any necessity for further formatting. The preformatted receipts are flexible to be adjusted according to your printer's character limit for each line.
Setting Preformatted Receipts Line Limit
In order to define the maximum characters of each line of preformatted receipts, add the following setting to your PayServer
settings: receipt: max_line_length: 40 # optional; will default to some predefined value if omitted
Please note that
is just an example value. The actual value depends on your printer's limit that it can print on its paper. Longer lines will be wrapped to their respective next lines in the returned output.
Retrieving Preformatted Receipts
Once you have defined the maximum line length of your preformatted receipts, you can simply print them for both customer receipt and merchant receipt. To retrieve the lines, there is an element called
whose data type is an array of strings at the top level of both
foreach (var line in transaction.CustomerReceipt.Lines) { Console.WriteLine(line); } foreach (var line in transaction.MerchantReceipt.Lines) { Console.WriteLine(line); }