Initialize the SDK using the following function:
CheckoutController.Instance.Init(string CustomerId, string GAID, ICheckoutPurchase callback);
Argument | Type | Description |
---|---|---|
customerId | string | Customer ID. |
GAID | string | Google Advertising ID. |
callback | ICheckoutPurchase | Interface callback. |
Important: This function must be called during the game's boot process.
If the request is successful, the OnInitialize
callback is triggered, indicating that the initialization was completed. If the request fails, the OnInitializeFailed
callback is triggered with an error code. Follow the instructions in the WebGL SDK troubleshooting article and try to re-initialize again based on the error.
For more details on the callbacks you need to implement and how to handle them, refer to the Implement the WebGL SDK Callbacks article.