KIOSK

GUIDE
top

B2BPaymentDownload API

B2BPaymentDownloadManager provides methods for paymentdownload functionalities.

PaymentDownload API

To use Samsung B2B API, 

<script type="text/javascript" src="$B2BAPIS/b2bapis/b2bapis.js"></script>

Should be loaded in index.html

Privilege

None

Type definitions

updateTiming

Specifies parameter types for the update function. app will be terminated while updating when you call update function

enum updateTiming {"UPDATE_NOW","UPDATE_LATER"};

Version

1.0

Since

4.0

B2BPaymentDownloadManagerObject

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;

Version

1.0

Since

4.0

B2BPaymentDownloadManager

Provides methods for paymentdownload functionalities.

void update(DOMString url, Boolean instance);

The Update function combines the domain information entered in advance with the detailed URL information delivered by parameters to download and update the package file.

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)

Exceptions


WebAPIException with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

WebAPIException with error type InvalidValuesError, If any of the input parameter contains an invalid value.

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);
}

Version

1.0

Since

4.0

DOMString getVersion();

This function returns the api version.

Returns:

DOMString value of plugin?™s version

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);
}


Version

1.0

Since

4.0
위로가기