OnSiteCashDebit Event



 
Fires when debiting the script device account.


Syntax

    SiteKiosk.Plugins("SiteCash").Devices("ScriptDevice").
    OnSiteCashDebit = handler
    
Parameters
    payed Currency value that contains the payed amount.
    newbalance Currency value that contains the new balance of the script device account.
Remarks
    Use the CurrencyFormatter object for currency functionality.

    The object that caused the event can be referenced in the event function using "this".
Examples
    The following example shows an alert window when credit is being subracted from the script device account.

    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    sdevice = SiteKiosk.Plugins("SiteCash").Devices("ScriptDevice");
    sdevice.OnSiteCashDebit = OnSiteCashDebit;
    function OnSiteCashDebit(payed, newbalance)
    {
       alert(payed + " subtracted, new balance: " + newbalance);
    }
    </SCRIPT>
    

Applies to
    SiteKiosk v5.0 (and later versions).

Back to top