You are here: Configuration > Web Cashier > Advanced: Apply a regular expression to convert a card number

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 NG, 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.

To edit this config keyA config key stores information about a specific advanced setting in PaperCut. Config keys are editable by an administrator in the Config Editor.:

  1. Click the Options tab.

    The General page is displayed.

  2. 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.

  3. Search for auth.web-cashier-interface.card-id.card-regex.
  4. Enter the regular expression to apply to card numbers.
  5. Click Update.
  6. Check the Web Cashier usernames to ensure that the regular expression has been applied.


Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.