Add Method



 
The Add method adds an amount.


Syntax

    Account.Add(amount, duration, mode, comment)
    
Parameters
    amount Long value that specifies the amount to add (if mode is 1).
    duration Long value that specifies the duration to add (if mode is 3).
    mode Long value that specifies the payment mode.
    comment String that contains a comment.
Return Value
    None.
Remarks
    Possible modes are:

    1 : decrease credit (prepaid)
    3 : decrease remaining time (prepaid)
    4 : increase time (payment after surfing)
Examples
    The following example adds 5 dollars or 30 seconds to the first available account depending on its mode.

    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    account = SiteCafe.Server.Accounts.GetAccountByIndex(1);
    if (account.Mode == 1) account.Add(5, 0, 1, "Added 5 dollars");
    if (account.Mode == 3) account.Add(0, 30, 3, "Added 30 seconds");
    </SCRIPT>
    

Applies to
    SiteKiosk v6.2 (and later versions).

Back to top