Hey!
We haven’t been able to get restoring purchases working. I have added a Debug.Log line into process purchases which is supposed to run after a reinstall, but don’t even get the debug message. The purchases however can’t be bought again after a reinstall if they were already bought before, since they are non-consumable. Seems like UnityIAP doesn’t know/save the products that have been bought.
Unity version is 5.5.0f3 and UnityIAP is 1.14.0
P.S. only trying this on Android
Edit: Added purchaser.cs
Any help will be appreciated!
3262588–251659–Purchaser.cs (14.5 KB)
If you look in your RestorePurchases method, you are only handling the case for IPhonePlayer and OSXPlayer, not Android. Also the documentation mentions to expect ProcessPurchase to be called for each restored product https://support.unity3d.com/hc/en-us/articles/115000158886-How-does-Unity-IAP-handle-restoring-transactions-
Please show which Debug.Log statement you are referring to. Also, if you could provide the device logs, it would be helpful.
I have the same issue, Unity 2017.2.0f3, Unity IAP 1.14.1. This is on Android, the “ProcessPurchase” method of my “IStoreListener” is not getting called.
10-24 14:20:39.833 2688-2719/? I/Unity: UnityIAP StandardPurchasingModule Version: 1.14.1
(Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
10-24 14:20:39.920 2688-2719/? I/UnityIAP: IAB helper created.
10-24 14:20:40.029 2688-2719/? I/UnityIAP: Starting in-app billing setup.
10-24 14:20:40.034 2688-2688/? I/UnityIAP: Billing service connected.
10-24 14:20:40.036 2688-2822/? I/UnityIAP: invoking callback
10-24 14:20:40.036 2688-2822/? I/UnityIAP: Checking for in-app billing 3 support.
10-24 14:20:40.059 2688-2822/? I/UnityIAP: In-app billing version 3 supported for XXXXXXXXXXX
10-24 14:20:40.063 2688-2822/? I/UnityIAP: Subscriptions AVAILABLE.
10-24 14:20:40.068 2688-2822/? I/UnityIAP: VR supported.
10-24 14:20:40.069 2688-2822/? I/UnityIAP: onIabSetupFinished: 0
10-24 14:20:40.069 2688-2822/? I/UnityIAP: Requesting 1 products
10-24 14:20:40.069 2688-2822/? I/UnityIAP: QueryInventory: 1
10-24 14:20:40.069 2688-2822/? I/UnityIAP: invoking callback
10-24 14:20:40.070 2688-2822/? I/UnityIAP: Querying owned items, item type: inapp
10-24 14:20:40.070 2688-2822/? I/UnityIAP: Package name: XXXXXXXXXX
10-24 14:20:40.070 2688-2822/? I/UnityIAP: Calling getPurchases with continuation token: null
10-24 14:20:40.073 2688-2822/? I/UnityIAP: Owned items response: 0
10-24 14:20:40.073 2688-2822/? I/UnityIAP: Sku is owned: remove_ads
10-24 14:20:40.073 2688-2822/? I/UnityIAP: Continuation token: null
10-24 14:20:40.073 2688-2822/? I/UnityIAP: Querying SKU details.
10-24 14:20:40.926 2688-2822/? I/UnityIAP: Querying owned items, item type: subs
10-24 14:20:40.926 2688-2822/? I/UnityIAP: Package name: XXXXXXXXXXXX
10-24 14:20:40.926 2688-2822/? I/UnityIAP: Calling getPurchases with continuation token: null
10-24 14:20:40.935 2688-2822/? I/UnityIAP: Owned items response: 0
10-24 14:20:40.935 2688-2822/? I/UnityIAP: Continuation token: null
10-24 14:20:40.935 2688-2822/? I/UnityIAP: Querying SKU details.
10-24 14:20:41.117 2688-2822/? I/UnityIAP: onQueryInventoryFinished: true
10-24 14:20:41.117 2688-2822/? I/UnityIAP: Inventory refresh successful. (response: 0:OK)
10-24 14:20:42.036 2688-2719/? I/UnityIAP: Finish transaction:GPA.XXXXXXXXXXX
@kaarelr , @Giles-Coope
We’ve had reports of similar issues with some versions of Android.
- Which version of Android are you currently testing with?
- Do you have any other plugins in your project? Particularly anything that would persist data after an app is uninstalled.
We believe the underlying issue is that data is not being removed fully after an uninstall, so our transaction log thinks the transaction has already been handled. We will continue to investigate this issue.
Thanks for looking into this. I’m away from my office until Monday so can’t get you exact info or test anything but off the top of my head this issue is happening on my Nexus 5x running android 8.0 and on my Nexus 7 2012 running android 5.1.
The other frameworks I have are Google play games services, Google mobile ads, and Firebase analytics. I believe these are all at the latest versions.
If there’s anything you want me to try out on Monday let me know.