Links
Comment on page

Initializing DigitalRiver.js

Learn how to use your public API key to initialize DigitalRiver.js
‌Use DigitalRiver(publishableAPIKey) to create an instance of the DigitalRiver object. The function requires a public API key.
let digitalriver = new DigitalRiver("YOUR_PUBLIC_API_KEY", {
"locale": "ja"
});
It also accepts options (optional) using the following format: DigitalRiver(publishableApiKey[, options])

‌Localizing DigitalRiver.js

In options, you can specify a locale to localize the library.
For a list of accepted values, refer to Supported languages.
The following example translates the various display and error strings within DigitalRiver.js into Italian ‌by assigning it to locale.
let digitalriver = new DigitalRiver("YOUR_PUBLIC_API_KEY", {
"locale": "it"
});