Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  pfSense English Support» Captive Portal» Get csv vouchers using wget or curl.
Username:
Password:
 
 

Pages: [1]   Go Down
  Print  
Author Topic: Get csv vouchers using wget or curl.  (Read 1868 times)
0 Members and 1 Guest are viewing this topic.
Bansher
Jr. Member
**
Offline Offline

Posts: 44



View Profile
« on: November 10, 2011, 10:45:46 am »

Hi,all. How i can get csv vouchers from captive portal using wget or curl or other shell commands? Thanks.
My OS - Ubuntu
Pfsense 2.0
Logged
wallabybob
Hero Member
*****
Offline Offline

Posts: 4813


View Profile
« Reply #1 on: November 10, 2011, 03:44:38 pm »

Why not download them through a browser?
Logged
Bansher
Jr. Member
**
Offline Offline

Posts: 44



View Profile
« Reply #2 on: November 10, 2011, 09:15:47 pm »

Need automatic sending to internal portal of company
Logged
wallabybob
Hero Member
*****
Offline Offline

Posts: 4813


View Profile
« Reply #3 on: November 10, 2011, 11:31:56 pm »

What will the "internal portal" do with the vouchers?

My suspicion (I haven't checked the code to verify this) is that vouchers don't ever exist in CSV form in the captive portal and don't "pre exist". Hence they must be "generated" (made available for use) from web browser and there is a option to download a CSV representation of the vouchers.

As best I know there is no mechanism for generating vouchers outside a browser session. Another mouse click or two at voucher generation time will download the CSV representation.

Logged
techboi
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #4 on: January 30, 2012, 11:06:55 am »

Bansher did you have any luck with this?

I need to setup something where the internal POS system issues a voucher for every receipt printed (i.e. you make a purchase, you get an hour of free browsing). Generating CSVs and clicking through is all well and good, but that means that a front office staff guy needs access to the pfSense webGUI (which yes we can limit with a username/pw and restrict their access only to the voucher pages of the CP) but they'll also need a way to upload the values in the CSV to the POS, and also have to keep track of when the POS has run out of vouchers and needs a new roll uploaded.

I mean there are ways around it by saying for an example, every day we will upload a roll of 1000 vouchers and have them expire at the end of the day so that every morning someone knows they need to upload a new roll, but it seems old fashioned and clunky. Why cant we integrate the two on the backend itself? The POS sends a request saying "i'm almost out of vouchers" and pfSense generates a new roll based on predefined settings (time, number of vouchers, etc) and send the roll back to the POS...

Thats what I need to get working :-)
Logged
jpardobl
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #5 on: November 28, 2012, 07:03:50 am »

Try this: http://jpardobl.wordpress.com/2012/11/28/pfsense-voucher-rest-api/
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

 

Page created in 0.028 seconds with 20 queries.