- Home /
Unity IAP non-consumable product does not go to ProcessPurchase
The issue I'm facing is as follows:
After purchasing a non-consumable product successfully and restarting my app I do not receive a callback to the ProcessPurchase function (same as in the Unity IAP demo).
After looking in the logcat I can see that the purchase is processed correctly, according to the following log:
11-26 11:38:16.859 23156 23383 I UnityIAP: Querying owned items, item type: inapp
11-26 11:38:16.859 23156 23383 I UnityIAP: Package name: [PRODUCT_NAME]
11-26 11:38:16.859 23156 23383 I UnityIAP: Calling getPurchases with continuation token: null
11-26 11:38:16.859 11442 11453 I Finsky : [204489] com.google.android.finsky.billing.iab.w.b(29): [PRODUCT_NAME]: Account determined from installer data - [XXXXXXXX]
11-26 11:38:16.859 23156 23383 I UnityIAP: Owned items response: 0
11-26 11:38:16.859 23156 23383 I UnityIAP: Sku is owned: [PRODUCT_NAME].nonconsumable.removeads
11-26 11:38:16.859 23156 23383 I UnityIAP: Continuation token: null
11-26 11:38:16.859 23156 23383 I UnityIAP: Querying SKU details.
11-26 11:38:16.859 11442 11452 I Finsky : [204488] com.google.android.finsky.billing.iab.w.b(29): [PRODUCT_NAME]: Account determined from installer data - [XXXXXXXX]
How come I own a specific non-consumable SKU but I do not receive the callbacks to my ProcessPurchase function? I'm obviously missing something here... In addition, why do I get a "Owned items response: 0" when the next line is detailing the specific SKU that I do own.
Any help will be much appreciated!
UPDATE: I uninstalled the app for an unrelated test and then when I reinstalled and ran the app the ProcessPurchase function was called. However, this only happens for the first time I run the app after reinstall.
(sorry for bad formatting, can't seem to get it right...) link to stackoverflow question