List vouchers via command line?



  • Hi.

    It's possible to list vouchers via command line? I'm using cp.php to create/delete vouchers using REST API and I'll modify this class to also list vouchers (rolls) already created, so I can build a full system which also get list of vouchers from pfSense, not just create/delete.



  • File services_captiveportal_vouchers.php
    Look for

    else if ($_GET['act'] == "csv") {
    

    you will find out how they are made - and send over to the user who ordered new (or existent) vouchers.

    Generated voucher codes are not stored in a file.



  • Actually, I alread had list of vouchers….i could not explain what I need exactly...hehehehe
    What I need is to get a list of rolls, not vouchers of a single roll. But I managed to got it. I'm also modifying cp.php to correct 'comment' field (whish doesn't work) and also to add a function to list rolls using REST API.
    After that, using REST API, you'll be able to:

    • Create rolls

    • Delete Rolls

    • List rolls

    I'l also building a GUI for all of these functions. We need to give some users the 'power' to create vouchers, but with some limitations.



  • Hello,

    I'm on my last year on university and for my final project i'm looking forward doing a wi-fi authentication system integrated with the website portal of my university. To be able to do this i need to create vouchers automatically but the problem is that i'm not good at programing , and as I've search i might have to do some php script to get this job done. Before I look at a lot of web sites i found your post and as u said u were able to create a system for automatically voucher creation. I would like to know if you could help me with my project, can you give your system code then i'll able to adapt it for me or help me create my own program? Thanks.


Log in to reply