Advanced: Apply a regular expression to a card number
In Web CashierWeb Cashier is a basic Point of Sale (POS) system to charge items to PaperCut accounts and deposit funds into users' accounts., card/identity numbers can be used to access the user details. This can be done in the following ways:
- the Web Cashier administrator can enter the card number in the Web Cashier Username field
- automatically populated by a card reader
If you automatically populate the Username field from the card number, you can apply a regular expression on the card number.
For example, if you have stored only the last six characters of a card number in PaperCut MF, you can apply a regular expression to the card number in Web Cashier so that only the last six characters are used to populate the username.
Config key | Description |
---|---|
auth.web-cashier-interface.card-id.card-regex |
A regular expression that will be applied to a Web Cashier card/identity number when used to search for user details. By default, this value is empty. Ensure your regular expression is valid. For more information about regular expressions, see Regular Expression Language - Quick Reference. |
-
Click the Options tab.
The General page is displayed.
-
In the Actions menu, click Config editor (advanced).
The Config EditorThe Config Editor stores information used by PaperCut to configure advanced options and functions. This information is stored in config keys, which are editable by an administrator. page is displayed.
- Search for auth.web-cashier-interface.card-id.card-regex.
- Enter the regular expression to apply to card numbers.
- Click Update.
-
Check the Web Cashier usernames to ensure that the regular expression has been applied.