To verify if a plugin is successfully integrated to your Unity project, you can test it using service app operating mode and check it for OpenIAB plugin error returns and integration errors.
Service App Operating Mode
Your service app operations can be switched between normal, commercial production mode, and development modes for testing using
samsungIapMode(int mode). For operating mode details, see Item Purchase Processing Modes.
You can force-set the app store option to Samsung Galaxy Apps using
storeModeSamsung(boolean enabled). For more details about the values for these methods, see OpenIAB Unity Plugin API Classes.
OpenIAB plugin error returns and integration errors
|IAP_ERROR_PRODUCT_DOES_NOT_EXIST||Encountered when the SKU mapping does not match the itemID or itemGroupID.||
Ensure that the itemID or itemGroupID matches the SKU mapping.
The itemID and itemGroupID are located at the Samsung Galaxy Apps Seller Office website.
Note: The itemGroupID (12-digit numeric string) can be omitted, but if you add it, note that it is unique to every service app.
|IAP_ERROR_ALREADY_PURCHASED||Encountered when a non-consumable, non-recurring subscription, or auto-recurring subscription item being purchased has already been bought.||Ensure that service app logic and code prevents users from purchasing non-consumable, non-recurring subscriptions, or auto-recurring subscription items that have already been bought.|
|Incorrect app store is chosen||Encountered when the billing store is incorrectly set during sideloading through ADB.||
Force the service app to select Samsung IAP when it is set in conjunction with the BEST_FIT mode, regardless of the options set during sideloading.
This solution was applied in the sample service app (City Flyer) in OpenIAB Unity Plugin Integration to ensure that it selects Samsung IAP, whether or not a billing store was specified during sideloading.
|Nothing happens after purchase or query||Purchases and queries launch events after they execute. These events are defined in the OpenIABEventManager.prefab file (e.g., OnBillingSupported, OnPurchaseSucceeded). Nothing will happen after purchases or queries if this is not attached to your project.||Attach the OpenIABEventManager.prefab file to your project. Refer to the first step in Configure and Initialize the OpenIAB Unity Plugin.|
|NullPointerException: IAPConnector is null||This error is due to not initializing the IAPConnector. Without initialization, it will be null and, consequently, the events that need it will use a null object.||Initalize OpenIAB during startup using the OpenIAB.init() function. This will initialize the IAPConnector as well.|
|Billing fails during setup||No requested OpenIAB plugin API method calls based on Samsung IAP functionality are executed, because Samsung Billing Client is not installed on the test device.||Ensure that Samsung Billing Client is installed on the test device.|