B2BPaymentDownloadManager provides methods for paymentdownload functionalities.
To use Samsung B2B API,
<script type="text/javascript" src="$B2BAPIS/b2bapis/b2bapis.js"></script>
Should be loaded in index.html
Specifies parameter types for the update function. app will be terminated while updating when you call update function
enum updateTiming {"UPDATE_NOW","UPDATE_LATER"};
The interface defines what is instantiated by the paymentdownload object of Tizen Samsung Kiosk Product API. There will be a b2bapis.paymentdownload object that allows access to the functionality of the paymentdownload API.
[NoInterfaceObject]interface B2BPaymentDownloadManagerObject{
readonly attribute B2BPaymentDownloadManager paymentdownload;
};
B2bApi implements B2BPaymentDownloadManagerObject;
Provides methods for paymentdownload functionalities.
Name | Type | Description |
---|---|---|
url | DOMString | Server url to download package file except domain. |
value | updateTiming | Whether to update right now(true) or after the next boot(false) |
Example
try {
var url = "/samsung/updatePackages/updatePackgever1.zip";
b2bapis.paymentdownload.update(url, UPDATE_NOW);
// Print 'Please wait update' application will be terminated.
} catch (error) {
console.log(" error code = " + error.code);
}
Example:
try {
var ret = null;
ret = b2bapis.paymentdownload.getVersion();
console.log(?payment Web app version is : ?+ret);
} catch (error) {
console.log(" error code = " + error.code);
}