# SiteCash Object The SiteCash object controls the environment of the Payment Module plugin. Members Table The following table lists the members provided by the SiteCash object.
Members
Objects | Description
AccumulatedMoneyStorage | Information about the accumulated sales.
LastSessionInfo | Information about the last session.
ProgressBarSettings | Controls the progress bar.
RuntimeMenuSettings | Contains the settings of the runtime administration menu.
Script | Controls the SiteCash script.
SessionSettings | Information provided by the payment devices.
ReceiptSettings | Contains the receipt settings.
SiteKiosk | Main object of the SiteKiosk object model.
ZoneDispatch | Information about the current zone.
Collections | Description
Devices | Contains the payment devices.
Devices2 | Contains additional payment devices.
Zones | Contains the configured zones.
Properties | Description
AccessStatus | Whether an access control device allows access.
AccountBalance | Current credit without limbo money.
ApplicationPrice | Price per hour for using applications.
CDRecordingPrice | Price per recording process.
CountDown | If the countdown is active.
CreditStatus | If there is credit or not.
CurrentBalance | Current credit.
DiscardMoneyOnShutdown | Whether credit is discarded after shutdown.
DownloadPrice | Price per download.
DisplayText | Text in the progress bar.
Enabled | If the Payment Module is enabled.
Macromap | Object providing template variables.
MediaMailPrice | Price per media mail.
Name | Name of this plugin.
PayApplications | Whether using applications is charged.
PayCDRecordings | Whether recording CDs is charged.
PayDownloads | Whether downloads are charged.
PayMediaMails | Whether sending media mails is charged.
PricePerHour | Price per hour.
PricePerHourAsString | Price per hour as a string.
PricePerPage | Price per page.
PullMode | If the pull mode is currently active.
RemainingSurftime | Remaining time.
ShowZoneInfo | If the zone information should be shown.
TimePercentage | Remaining time in percent.
WarningTime | Remaining surftime when payment request is displayed.
ZoneName | Name of the current zone.
Methods | Description
CheckChange | Checks if remaining credit can be returned.
CheckChange2 | Checks if remaining credit can be returned.
CreateCurrencyFormatter | Currency functionality.
CreateZone | Creates a new zone.
Credit | Increases the credit.
Debit | Decreases the credit.
GetCoinImageFilename | Returns a coin or note image filename.
GetPricePerHourForURL | Returns the price per hour of an URL.
Inpayment | Deposits an amount of a device.
Logoff | Ends a session.
PayOutChange | Changes the pay out credit.
ShowPaymentInfoDialog | Displays the payment information dialog.
ShowRuntimeMenu | Displays the runtime administration menu.
TerminateSession | Terminates the session.
Events | Description
OnAccessStatusChanged | Fires when the access status changes.
OnBalanceChange | Fires when credit changes.
OnCreditStatusChange | Fires when the credit status changes.
OnDisplayTextChange | Fires when the credit information text changes.
OnEscrowed | Fires when an escrow device keeps money.
OnInpayment | Fires when a device received credit.
OnInpaymentFailed | Fires when an inpayment failed.
OnNewSessionSettingsAvailable | Fires when the session settings changed.
OnRunningOutOfCredit | Fires when credit is low.
OnSessionBegin | Fires when a session begins.
OnSessionEnd | Fires when a session ends.
OnZoneBecameInvalid | Fires when a zone became invalid.
OnZoneCrossing | Fires when the zone changes.
Remarks This object is available through the collection Plugins. Note that the path of a file using SiteKiosk objects must be allowed in the SiteKiosk configuration (Security -> Access -> URL's With Script Permission) if it is not a browser skin file. Examples The following example shows information about the Payment Module plugin of SiteKiosk.
    <html>
    <body>
    <table border="0" bgcolor="#ebebeb" width="600" cellspacing="5"
    cellpadding="5" style="font-family:verdana;font-size:8pt;"
    align="center">
    <tr><td bgcolor="f8f8f8">
    The following example shows information about the
    Payment Module of SiteKiosk. The statusbar contains the
    connection status, name and price of the current
    zone and the current credit. When the link is
    clicked, the credit will be decreased by the
    specified value.
    </td></tr>
    <tr><td style="font-family:verdana;font-size:8pt;">
    <pre>
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    if (SiteKiosk.Plugins('SiteCash').Enabled)
    {
       pmstatus = "SiteCash plugin is active";
       pmdevices = SiteKiosk.Plugins('SiteCash').Devices.Count;
       pmzone = SiteKiosk.Plugins('SiteCash').ZoneName;
       pmprice = SiteKiosk.Plugins('SiteCash').PricePerHourAsString;
       pmstartbal = SiteKiosk.Plugins('SiteCash').CurrentBalance;
       pmpphas = SiteKiosk.Plugins('SiteCash').PricePerHourAsString;
    }
    else
    {
       pmstatus = "The Payment Module has not been configured";
       pmdevices = "-";
       pmzone = "-";
       pmprice = "-";
       pmstartbal = "-";
       pmpphas = "free";
    }
    document.writeln("Status: " + pmstatus);
    document.writeln("Devices: " + pmdevices);
    mycfm = SiteKiosk.Plugins("SiteCash").CreateCurrencyFormatter();
    if (SiteKiosk.Plugins('SiteCash').Enabled)
    {
       mycur = mycfm.CurrencySymbol;
       myzone = SiteKiosk.Plugins('SiteCash').ZoneName;
    }
    else
    {
       mycur = "";
       myzone = "No zone";
    }
    document.writeln("\n<table border='0' bgcolor='#dbdbdb'><tr>");
    document.writeln("<td width='25'><img border='0'" +
    "name='id_offon' src='" + SiteKiosk.SiteKioskDirectory +
    "skins\\default\\img\\icons\\online.gif'></td>");
    document.writeln("<td width='8'><img border='0' src='" +
    SiteKiosk.SiteKioskDirectory +
    "skins\\default\\img\\icons\\line.gif'></td>");
    document.writeln("<td width='20'><img border='0' src='" +
    SiteKiosk.SiteKioskDirectory +
    "skins\\default\\img\\icons\\world.gif'></td>");
    document.write("<td width='230' style='font-size:11px;'>" +
    "<span id='id_pmzname'>" + myzone + "</span>" +
    " (<span id='id_ph'>" + pmpphas + "</span>)</td>");
    document.writeln("<td width='8'><img border='0' src='" +
    SiteKiosk.SiteKioskDirectory +
    "skins\\default\\img\\icons\\line.gif'></td>");
    document.writeln("<td width='130' style='font-size:11px;'>" +
    "<span id='id_pmbalance'>Credit: " + pmstartbal + "</span>" +
    " " + mycur +" </td>");
    document.write("</tr></table>");
    SiteKiosk.Plugins('SiteCash').OnBalanceChange = OnBalanceChange;
    SiteKiosk.Plugins('SiteCash').OnZoneCrossing = OnZoneCrossing;
    SiteKiosk.Dialup.OnConnect = OnConnCh;
    SiteKiosk.Dialup.OnDisconnect = OnConnCh;
    function OnConnCh()
    {
       if (SiteKiosk.Dialup.ConnectionStatus) id_offon.src =
       SiteKiosk.SiteKioskDirectory +
       "skins\\default\\img\\icons\\online.gif";
       else id_offon.src = SiteKiosk.SiteKioskDirectory +
       "skins\\default\\img\\icons\\offline.gif";
    }
    OnConnCh();

    function OnBalanceChange()
    {
       id_pmbalance.innerHTML = "Credit: " +
       SiteKiosk.Plugins('SiteCash').CurrentBalance;
    }
    function OnZoneCrossing()
    {
       id_pmzname.innerHTML = SiteKiosk.Plugins('SiteCash').ZoneName;
       pphas = SiteKiosk.Plugins('SiteCash').PricePerHourAsString;
       id_ph.innerHTML = pphas;
    }
    function OnPullRequestCompleted(success)
    {
       if (success)
       {
            var lk_skwindow = SiteKiosk.SiteKioskUI.CreateBrowserWindow();
            lk_skwindow.SiteKioskWebBrowser.Navigate(id_scurl.value);
    		lk_skwindow.Show();
       }
    }
    function pullmode()
    {
       if (SiteKiosk.Plugins('SiteCash').Enabled)
       {
          if ((id_scinput.value > 0) && (id_scinput.value <= 1000))
          {
             antw = confirm("This costs " + id_scinput.value);
             if (antw) SiteKiosk.Plugins("SiteCash").Script.Dispatch.
             StartPullRequest("Navigation", id_scinput.value,
             OnPullRequestCompleted, 30);
          }
          else alert("Please enter a value between 0 and 1000");
       }
       else alert("SiteCash plugin has not been configured");
    }
    </SCRIPT>
    <br>
    URL:
    <input name="id_scurl" type="text" value="http://www.yahoo.com"
    style="width:225px;" onfocus="mymerk=value;"
    onblur="if (value == '') value = mymerk;">
    <br>
    Price (in current currency):
    <input name="id_scinput" type="text" maxlength="4" value="1"
    style="width:225px;" onfocus="mymerk=value;"
    onblur="if (value == '') value = mymerk;">
    </pre>
    </td></tr>
    </table>
    <br><br>
    <div align="center">
    <a href="javascript:pullmode()">Open URL</a>
    </div>
    </body>
    </html>
Applies to SiteKiosk v5.0 (and later versions). Back to top