[isf-wifidog] Pre-paid users

Raphael Alla raphael.alla at gmail.com
Lun 11 Déc 01:16:17 EST 2006


The prepaid model which I have is as follows:

1) Customer purchases time credit and can use that credit as required. When
purchasing time, only a specific qty of data will be allowed
2) Customer purchases data credit

Therefore, there are 3 fields that need to be recorded for each user:

   - credit_time - amount of time in seconds which was pre-paid
   - credit_timedata - amount of data in Mb which was part of the
   pre-paid package
   - credit_data - amount of data purchased

I will try to catch up with you on IRC.

PS: For info, the project takes place in the French Territory of Wallis and
Futuna, in the pacific. This will be an interesting new location to add to
your list of communities





On 12/11/06, Benoit Grégoire <bock at step.polymtl.ca> wrote:
>
> On Sunday 10 December 2006 22:02, Raphael Alla wrote:
> > Hi,
> >
> > I am currently planning to use wifidog in a context where users purchase
> > pre-paid credit, either in time or in data. When they are connected they
> > use their credit and then when their credit has expired, they get logged
> > off.
> >
> > I am currently writing an Authenticator class, which is relatively
> > straightforward. The auth/index.php file however does not have the
> > capability to check whether the acctUpdate function returns a true value
> or
> > not.
>
> Humm, you're right.  While this will probably change in the future, the
> way to
> fix this for now is to modify the base Authenticator class to have
> acctUpdate
> return one of the "ACCOUNT_STATUS" constants, and take an additional
> output
> parameter which will contain the returned error message (if applicable).
>
> > All my code is GPL and I am more than happy to contribute the changes
> back
> > to the list once done.
>
> Excellent, welcome!
>
> > Some questions:
> >
> >    - what are the rules to submit patches to the list?
>
> Usually, the way to sent significant patches is as an attachements to a
> trac
> ticket.  Note that this is in no way meant to discurrage discussing a
> patch
> on the list.
>
> >    - i need additional fields for users. Would it be better to store
> >    those in the user table by altering it or would it be better to
> create a
> > new table that can be used by my extension only. The second option has
> the
> > benefits that users can install the extra table only when they require
> and
> > maintains compatibility with the code coming from cvs
>
> It really depends on what the fields are and do.  There is a sizeable
> amount
> of design on how connections are to be limited (time, bandwith) which is a
> completely generic problem.  Depending on the fields the answer will be
> one
> or more of either:
> -Extend the connections table
> -Extend the users table
> -Create a table specifically for your authenticator,  linked to the users
> table
> -Use a Key-Value-Pair style system.
>
> Try to catch me on IRC, or send your proposed fields here for discussion.
> --
> Benoit Grégoire
> Technologies Coeus inc.
>
>
> _______________________________________________
> WiFiDog mailing list
> WiFiDog at listes.ilesansfil.org
> http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog
>
>
>


-- 
Raphael Alla
Mitija Australia
+61 4 15 678 576
http://www.mitija.com
-------------- section suivante --------------
Une pièce jointe HTML a été enlevée...
URL: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20061211/20bcbfc7/attachment.htm


Plus d'informations sur la liste de diffusion WiFiDog