This is an old revision of the document!
RADIUSdesk Top-Up Functionality
Overview Of Top-Up System
There are three types of Top-Up transactions
A Top-Up transaction can only be one of the three available types.
Each Top-Up transaction has to be associated with an existing Permanent User.
Each Top-Up transaction is owned by an Access Provider.
Top-Up transactions can be done by:
Every *Create*, *Update* and *Delete* transaction on the top-ups table will have a ripple effect to adjust the corresponding FreeRADIUS attribute of the associated Permanent User. Let us take a practical example:
A 3rd Party system creates a Permanent User with a profile for data Top-Ups.
The Rd-Total-Data attribute will be missing since there is no Top-Up loaded for this user.
The 3rd Party system add the first free Top-Up of 20Mb.
Rd-Total-Data will now have a value of 20971520 (20*1024*1024).
The user then purchase 1Gb of data through the 3rd Party CC Payment Gateway.
Rd-Total-Data will now have a value of 1094713344 (1073741824+20971520).
Profile Requirements For The Top-Up System
The Top-Up system can only support one specific type of top up.
Data Top-Up for Permanent Users who have a data based counter.
Time Top-Up for Permanent Users who have a time based counter.
Days to use for Permanent Users who have a set expiry date some time in the future.
To implement a Data and Time Top-Up you have to assign the Permanent User to a profile with profile component containing a never reset counter.
This never reset counter will have the Rd-Total-Time / Rd-Total-Data attribute missing since it will be assigned to the specific Permanent User as a private attribute.