Initialization

After creating the configuration object, we can now initialize the checkout as follows:

CheckoutController.Instance.Init(callback);
ArgumentDescription
callbackA callback interface implementation: ICheckoutPurchase

The ICheckoutPurchase interface acts as a callback. The methods within the interface will be triggered based on the following events:

MethodDescriptionArguments
OnInitializedTriggered when the checkout initialization is completed.
OnInitializeFailedTriggered when initialization has failed.ErrorMessage containing a code and reason for the failure.
OnPurchaseSuccessTriggered when the purchase is completed successfully.OrderResponseModel containing detailed properties for the order.
OnPurchaseFailedTriggered when the purchase fails for any reason.ErrorMessage containing a code and reason for the failure.
OnPurchaseConsumedTriggered when the purchase is consumed by the client.true if the purchase is consumed successfully, or false otherwise.
OnPricePointsSuccessTriggered when price points are successfully retrieved.PricePointsModel containing details about the price points.
OnPricePointsFailTriggered when price points are not retrieved properly.ErrorMessage containing a code and reason for the failure.
OnGetNonConsumeOrdersSuccessTriggered when none-consumed operation was success.Message will contain a List of order IDs that are waiting for being consumed.
OnGetNonConsumeOrdersFailTriggered when none-consumed operation failed to execute.ErrorMessage containing a code and reason for the failure.