Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    List vouchers via command line?

    Scheduled Pinned Locked Moved Captive Portal
    4 Posts 3 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jmaurin
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • GertjanG Offline
        Gertjan
        last edited by

        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.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • J Offline
          jmaurin
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • R Offline
            ray2000
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.