Protocol number as voucher
rudag last edited by
I need to use a protocol number as a voucher. These numbers will be generated along the day and should be used as a 24h voucher on the next day. A PN is a 9 digit number. I was thinking on 3 ways to do that:
1. Insert / import the numbers in the CP database every night. I dont know if this is possible.
2. Change the source code (I guess this is the file: https://github.com/pfsense/pfsense/blob/master/etc/inc/voucher.inc) to check a specific file with all PNs when doing the authentication.
3. Customize the voucher form page. I would put an extra input "Protocol Number" with a button next to it. When the button is pressed, an AJAX request would be made searching for the PN in a specific file. If the PN is found it would fill the "Voucher" input with a pre-generated voucher.
So could you tell me which of the 3 ways could and couldn't work and why?
Also I would like to understand a bit more of the voucher system. Does the algorithm that is used to generate the voucher key is used on the authentication or the system only tries to find the voucher in the rolls?