Home > Payment Devices > Pullmode - Debiting One-Time Charges

Pull Mode - Debiting One-Time Charges by Script

The so-called pull mode allows you to use the payment module for debiting one-time charges on a website with the help of a script. This functionality is provided by the SiteKiosk Object Model.

This function lets you generate additional revenue on top of the turnover you achieve by charging rates on a per-minute basis by allowing you to charge one-time fees for certain services/websites. This feature is already used by default for the fees that are charged for services such as paid printing or paid downloads. Refer to the service rates for more information.

You can also use the scripting option presented here to add your own ways to charge one-time amounts for certain services. For instance, you could use this option to implement your own online shop.

Look at the following example to understand how this function works:

function OnPullRequestCompleted(success)
{
if (success)
window.location.href="http://www.google.com/";
}
SiteKiosk.Plugins("SiteCash").Script.Dispatch.StartPullRequest(
"Navigation", 0.5, OnPullRequestCompleted, 30);

In this example, the website google.com will be opened provided an amount equaling 0.5 monetary units is deposited within 30 seconds. You can use this example to incorporate this feature into your own HTML page, whether it be stored locally or on the Web.

The StartPullRequest function is implemented in the file SiteKiosk\SiteCash\SiteCashScript.js and can be modified to fit your requirements. The file SiteCashScript.js is loaded automatically when you launch SiteKiosk.

ATTENTION:
Please make sure to allow scripting for your HTML page in SiteKiosk. To do so, enter the page and the path to the page under ACCESS-> URLs with scripting permission.

See also

Zone Rates
Service Rates
Advanced Settings
Supported Payment Devices

Back to top