There are 2 ways to initialize the SDK:
Option 1 | Pass a configuration object
- Create a configuration object called
ConfigModel
:
ConfigModel config = new ConfigModel(
checkoutPublicKey = "XXXXXXXxxxxxxxXXXXXXXxxxxxxXXXXXXXX",
environment = "sandbox", // "sandbox" or "production"
customerId = "PLAYER_ID"
)
Argument | Type | Required? | Description |
---|---|---|---|
checkoutPublicKey | string | Yes | The checkout public key, located in the Publisher Dashboard. In the sidebar menu, click Settings, then select the Integration tab. Copy the Checkout Public Key value. |
environment | string | Yes | The checkout environment. One of: - sandbox : For testing.- production : For live operations. |
customerId | string | Yes | The player ID. |
- Initialize the SDK via the
UpdateController
instance with theConfigModel
:
UpdateController.Instance.Init(ConfigModel config, IUpdateCallback callback) {...}
Argument | Type | Description |
---|---|---|
config | ConfigModel | Configuration options for the initialization. |
callback | IUpdateCallback | Interface callback. |
Option 2 | Pass arguments directly
Initialize the SDK via the UpdateController
instance with the individual arguments:
UpdateController.Instance.Init(
string environment,
string checkoutPublicKey,
string customerId,
IUpdateCallback callback
) {...}
Argument | Type | Description |
---|---|---|
environment | String | The checkout environment. One of: - sandbox : For testing.- production : For live operations. |
checkoutPublicKey | String | The checkout public key, located in the Publisher Dashboard. In the sidebar menu, click Settings, then select the Integration tab. Copy the Checkout Public Key value. |
customerId | String | The player ID. |
callback | IUpdateCallback | Interface callback. |