Create Method

The Create method creates an account.


    [long=] SiteCafe.Server.Accounts.Create(mode, expiryDate, vDuration,
            eDuration, amount, duration, paid, persistent)
    mode Long value that specifies the payment mode.
    expiryDate Long value that specifies the expiry date (0 = never).
    vDuration Long value that specifies the number of seconds the account will be valid after the activation (first login).
    eDuration Long value that specifies the expiry duration. When the account is logged out for this contiguous period of time, it expires (0 = never).
    amount Currency value that specifies the amount (mode 1).
    duration Long value that specifies the surftime (mode 3).
    paid Boolean value that specifies whether payment occurred.
    persistent Long value that specifies whether the account is persistent.
Return Value
    Returns a Long value containing the account index.
    Dates are specified by the return value of the Date.getVarDate method divided by 1000.
    Durations are a number of seconds.

    Possible payment modes are:

    1 : decrease credit (prepaid)
    3 : decrease remaining time (prepaid)
    4 : increase time (payment after surfing)

    Use the CurrencyFormatter object for currency functionality.
    The following example creates a new persistent account that decreases credit and does not expire.

    <SCRIPT TYPE="text/javascript">
    accID = SiteCafe.Server.Accounts.Create(1, 0, 0, 0, 5, 0, true, true);

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

Back to top