RADIUSdesk

This is an old revision of the document!


RADIUSdesk Top-Up Functionality

  • We re-introduced the Top-Up system to RADIUSdesk Git code during October 2021.
  • This page will discuss the following
    • Overview of the Top-Up system.
    • Profile requirements to implement the Top-Up functionality correct.
    • Top-Up manager applet.
    • API for third party systems to integrate with the Top-Up system.

Overview Of Top-Up System

  • There are three types of Top-Up transactions
    • Time
    • Data
    • Days to use
  • 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:
    • The Top-Up Manager applet which can be found under the Users section of RADIUSdesk.
    • Any 3rd Party System using the API
  • 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.
  • With the latest RADIUSdesk it is very simple to create such a profile.
  • See the following screenshot

  • See the Profile Component which was automatically created for us when when we save the Profile

Top-Up Manager Applet

  • RADIUSdesk includes an applet that allows you to manually manage Top-Ups.
  • You can do the standard CRUD (Create Read Update and Delete) functions on the listed Top-Ups.
  • The applet had two tabs. The Home tab is used to do the standard CRUD.
  • There is also a Transaction History tab which can be used for audit purposes.

  • Transaction History tab