Search Unity

In app purchases are being restored automatically on iOS in Sandbox mode

Discussion in 'Unity IAP' started by Tiknius, Jan 20, 2020.

  1. Tiknius

    Tiknius

    Joined:
    Sep 17, 2018
    Posts:
    2
    It looks like the application tries to restore purchases automatically on iOS. These messages were logged just after initializing Purchasing:

    2020-01-21 14:18:02.765087+0200 free[28255:1538694] UnityIAP UnityEarlyTransactionObserver: Created
    2020-01-21 14:18:02.766898+0200 free[28255:1538694] UnityIAP UnityEarlyTransactionObserver: Registered for lifecycle events
    2020-01-21 14:18:03.866027+0200 free[28255:1538694] UnityIAP UnityEarlyTransactionObserver: Added to the payment queue
    UnityIAP Version: 1.23.1
    2020-01-21 14:18:06.803612+0200 free[28255:1538694] UnityIAP: Requesting 4 products
    2020-01-21 14:18:06.889569+0200 free[28255:1538694] UnityIAP: Requesting product data...
    2020-01-21 14:18:10.593383+0200 free[28255:1538694] UnityIAP: Received 4 products
    2020-01-21 14:18:10.757474+0200 free[28255:1538694] UnityIAP: Transaction 1000000617041903 not pending, nothing to finish here

    After these messages all non-consumables were automatically restored.
    Unity version is 2019.2.12f1, UnityIAP version is 1.23.1.

    Did anyone encounter a similar issue? Any help would be kindly appreciated.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So you are receiving the ProcessPurchase call back for these products?
     
  3. Tiknius

    Tiknius

    Joined:
    Sep 17, 2018
    Posts:
    2
    I do not think so, because there is this line for every product that is being purchased:
    "Debug.Log(string.Format("ProcessPurchase: PASS. Product: '{0}'", args.purchasedProduct.definition.id));" and we did not encounter similar messages while checking logs.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    If ProcessPurchase is not called, then restore is not occurring and users would not be awarded the products.