Search…
Compliance element
Learn how to use the Compliance element.
With DigitalRiver.js, you can create a Compliance element that will automatically retrieve and build the compliance links that are required by Digital River. These links can be styled and placed on your page like other DigitalRiver.js elements.

Creating a compliance element

To create a Compliance element, you should use the createElement function exposed through the DigitalRiver object.
Example
1
var complianceOptions = {
2
classes: {
3
base: 'DRElement'
4
},
5
compliance: {
6
locale: 'en-US',
7
entity: 'DR_INC-ENTITY'
8
}
9
}
10
var compliance = digitalRiver.createElement('compliance', complianceOptions);
Copied!
Parameter
Required/Optional
Description
Accepted Values
locale
Optional
The language associated with the returned data. If you do not provide a locale and you provided a default locale when you started the DigitalRiver.js library, the strings will be localized to that default value. If you did not provide a default locale, the default language is English.
ar-EG, cs-CZ, da-DK, de-AT, de-CH, de-DE, el-GR, en-AU, en-BE, en-CA, en-CH, en-DK, en-FI, en-GB, en-IE, en-IN, en-MY, en-NL, en-NO, en-NZ, en-PR, en-SE, en-SG, en-US, en-ZA, es-AR, es-CL, es-CO, es-EC, es-ES, es-MX, es-PE, es-VE, et-EE, fi-FI, fr-BE, fr-CA, fr-CH, fr-FR, hu-HU, it-CH, it-IT, iw-IL, ja-JP, ko-KR, lt-LT, lv-LV, nl-BE, nl-NL, no-NO, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sl-SI, sr-YU, sv-SE, th-TH, tr-TR, zh-CN, zh-HK, zh-TW
entity
Required
The entity facilitating the transaction.
DRES_INC-ENTITY, DR_WP-ENTITY, DR_WPAB-ENTITY, C5_INC-ENTITY, DR_BRAZIL-ENTITY, DR_BRAZIL2-ENTITY, DR_CHINA-ENTITY, DR_GMBH-ENTITY, DR_INC-ENTITY, DR_INDIA-ENTITY, DR_IRELAND-ENTITY, DR_JAPAN-ENTITY, DR_KOREA-ENTITY, DR_MEXICO-ENTITY, DR_RUSSIA-ENTITY, DR_TAIWAN-ENTITY, DR_SARL-ENTITY, DR_UK-ENTITY

compliance.mount();

Call this function to place the created Compliance element on your page.
Example
1
<div id="compliance"></div>
2
3
compliance.mount('compliance');
Copied!

compliance.unmount();

Call this function to remove the Compliance element from your page. The element may be re-added to your page by calling mount().
Example
1
compliance.unmount();
Copied!

compliance.destroy();

Call this function to remove the Compliance element from your page as well as remove its functionality. You cannot re-add the destroyed element to your page via mount().
Example
1
compliance.destroy();
Copied!

compliance.update();

Call this function to update the Compliance element's data.
Example
1
let complianceOptions = {
2
classes: {
3
base: 'DRElement'
4
},
5
compliance: {
6
locale: 'ja-JP',
7
entity: 'DR_JAPAN-ENTITY'
8
}
9
}
10
compliance.update(complianceOptions);
Copied!
Last modified 25d ago