I have used Unity codeless IAP (4.5) in my app and google is automatically refunding every transaction (non-consumable). I found out it happens because purchase is not acknowledged and I can’t find out how to do that. On top of that, I get an error that I think is connected to that.
This appears when I click buy in the Unity fake store.
InvalidOperationException: Collection was modified; enumeration operation may not execute.
System.ThrowHelper.ThrowInvalidOperationException (System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Collections.Generic.List1+Enumerator[T].MoveNextRare () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Collections.Generic.List
1+Enumerator[T].MoveNext () (at <695d1cc93cca45069c528c15c9fdd749>:0)
UnityEngine.Purchasing.CodelessIAPStoreListener.ProcessPurchase (UnityEngine.Purchasing.PurchaseEventArgs e) (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Codeless/CodelessIAPStoreListener.cs:291)
UnityEngine.Purchasing.StoreListenerProxy.ProcessPurchase (UnityEngine.Purchasing.PurchaseEventArgs e) (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Purchasing/StoreListenerProxy.cs:34)
UnityEngine.Purchasing.PurchasingManager.ProcessPurchaseIfNew (UnityEngine.Purchasing.Product product) (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Purchasing/PurchasingManager.cs:288)
UnityEngine.Purchasing.PurchasingManager.OnPurchaseSucceeded (System.String id, System.String receipt, System.String transactionId) (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Purchasing/PurchasingManager.cs:123)
UnityEngine.Purchasing.JSONStore.OnPurchaseSucceeded (System.String id, System.String receipt, System.String transactionID) (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Stores/BaseStore/JSONStore.cs:168)
UnityEngine.Purchasing.FakeStore.<>n__0 (System.String id, System.String receipt, System.String transactionID) (at <35881548a71544f7871157fd9b4b55fa>:0)
UnityEngine.Purchasing.FakeStore+<>c__DisplayClass15_0.g__handleAllowPurchase|0 (System.Boolean allow, UnityEngine.Purchasing.PurchaseFailureReason failureReason) (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Stores/FakeStore/FakeStore.cs:142)
UnityEngine.Purchasing.UIFakeStore+<>c__DisplayClass10_0`1[T].b__0 (System.Boolean result, System.Int32 codeValue) (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Stores/FakeStore/UIFakeStore.cs:72)
UnityEngine.Purchasing.UIFakeStore.OkayButtonClicked () (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Stores/FakeStore/UIFakeStore.cs:253)
UnityEngine.Purchasing.UIFakeStoreWindow.OnOkClicked () (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Stores/FakeStore/UIFakeStoreWindow.cs:89)
UnityEngine.Purchasing.UIFakeStoreWindow.DoMainGUI (System.Int32 windowID) (at Library/PackageCache/com.unity.purchasing@4.5.0/Runtime/Stores/FakeStore/UIFakeStoreWindow.cs:68)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) (at <3daff4fe4f0b4833be3dfb2f95e3414a>:0)