ZolozRequest
ZolozRequest class is an abstract description of the operation to be performed. It can be used together with ZolozFacade to launch the ZOLOZ SDK.
Fields
Field Name | Required | Data Type | Description |
zlzConfig | Yes | string | The configuration information used to launch the ZOLOZ SDK. This information is generated by the ZOLOZ server when the merchant calls the initialize API. |
bizConfig | Yes | The merchant's configuration information, including UI context, public key, language, etc. |
Constructor
Definition: constructor(zlzConfig: string, bizConfig: ZolozBizConfig)
Description: Creates a ZolozRequest instance.
Parameter List
Parameter Name | Required | Data Type | Description |
zlzConfig | Yes | Context | The |
bizConfig | Yes | ZolozBizConfig | Business configuration information. |
ZolozBizConfig
ZolozBizConfig is used to set the bizConfig field. All fields are optional, but it is recommended to pass rsaPubKey during actual integration.
Field Name | Required | Data Type | Description |
rsaPubKey | Recommended | string | The public key, used for SDK request encryption. It can be obtained from the ZOLOZ Portal. |
currentUIContext | No | Context | The UI context of the current page, used for SDK pop-ups. |
locale | No | string | The language used by the ZOLOZ SDK. |
chameleonConfig | No | string | The path to the UI configuration file. |
Example
const bizConfig: ZolozBizConfig = {
currentUIContext: getContext(this),
rsaPubKey: 'YOUR_RSA_PUBLIC_KEY',
locale: 'zh-CN',
chameleonConfig: 'path/to/chameleon/config.zip'
};
const request = new ZolozRequest(clientCfg, bizConfig);