Search Unity

Testing restore in iOS sandbox

Discussion in 'Unity IAP' started by hansg, Aug 14, 2019.

  1. hansg

    hansg

    Joined:
    May 12, 2014
    Posts:
    39
    I'm testing in the sandbox. The docs say that ProcessPurchase should get called for each owned non-consumable purchase when I call RestoreTransactions on iOS. However, I never receive a a request to enter my password and I never receive a call to ProcessPurchase. I know that this account has at least one non-expired subscription purchases. After a few seconds, the callback Action for RestoreTransactions is called with the bool parameter set true.

    Is this expected behavior in the sandbox? Will it behave differently in production?

    Thanks
     
    Last edited: Aug 14, 2019
    Plummers likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,944
    Hmm, I would expect it to work as expected in Sandbox too. Can this same account make additional purchases of other products?
     
  3. hansg

    hansg

    Joined:
    May 12, 2014
    Posts:
    39
    I have tested it on iOS with purchasing other subscriptions in the same group, and it works. I have not tested on Android yet.

    This is what I see in the xcode output, after I execute RestoreTransactions. I can see that UnityIAP is doing something with each transaction I have previously tested with, but it's never passing any of them to ProcessPurchase.

    2019-08-13 16:28:08.593439-0700 AllowanceBot[22468:5152840] Restore
    2019-08-13 16:28:08.593675-0700 AllowanceBot[22468:5152840] UnityIAP: Restore transactions
    2019-08-13 16:28:08.593763-0700 AllowanceBot[22468:5152840] UnityIAP: RestorePurchase
    2019-08-13 16:28:10.592619-0700 AllowanceBot[22468:5152840] UnityIAP: UpdatedTransactions
    2019-08-13 16:28:10.645643-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317294
    2019-08-13 16:28:10.646052-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317295
    2019-08-13 16:28:10.646336-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317296
    2019-08-13 16:28:10.646613-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317297
    2019-08-13 16:28:10.646887-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317298
    2019-08-13 16:28:10.647155-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317299
    2019-08-13 16:28:10.647421-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317300
    2019-08-13 16:28:10.647687-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317301
    2019-08-13 16:28:10.647968-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317302
    2019-08-13 16:28:10.648227-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317303
    2019-08-13 16:28:10.648478-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317304
    2019-08-13 16:28:10.649626-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317305
    2019-08-13 16:28:10.649921-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317306
    2019-08-13 16:28:10.650192-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317307
    2019-08-13 16:28:10.650458-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317308
    2019-08-13 16:28:10.650726-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317309
    2019-08-13 16:28:10.651004-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317310
    2019-08-13 16:28:10.651592-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317311
    2019-08-13 16:28:10.651906-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317312
    2019-08-13 16:28:10.652176-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317313
    2019-08-13 16:28:10.654941-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317314
    2019-08-13 16:28:10.655228-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317315
    2019-08-13 16:28:10.655517-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317316
    2019-08-13 16:28:10.655831-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317317
    2019-08-13 16:28:10.656120-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317318
    2019-08-13 16:28:10.656390-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317319
    2019-08-13 16:28:10.656667-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317320
    2019-08-13 16:28:10.656931-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317321
    2019-08-13 16:28:10.657188-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317322
    2019-08-13 16:28:10.659030-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317323
    2019-08-13 16:28:10.659322-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317324
    2019-08-13 16:28:10.659592-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317325
    2019-08-13 16:28:10.659857-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317326
    2019-08-13 16:28:10.660116-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317327
    2019-08-13 16:28:10.660373-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317328
    2019-08-13 16:28:10.660650-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317329
    2019-08-13 16:28:10.660909-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317330
    2019-08-13 16:28:10.661172-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317331
    2019-08-13 16:28:10.661433-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317332
    2019-08-13 16:28:10.663339-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317333
    2019-08-13 16:28:10.663629-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317334
    2019-08-13 16:28:10.663898-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317335
    2019-08-13 16:28:10.664162-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317336
    2019-08-13 16:28:10.664422-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317337
    2019-08-13 16:28:10.664683-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317338
    2019-08-13 16:28:10.664958-0700 AllowanceBot[22468:5152840] UnityIAP: Finishing transaction 1000000557317339
    2019-08-13 16:28:10.665765-0700 AllowanceBot[22468:5152840] UnityIAP: PaymentQueueRestoreCompletedTransactionsFinished
    2019-08-13 16:28:10.666129-0700 AllowanceBot[22468:5152840] FinishRestore True
     
    Last edited: Aug 14, 2019
  4. hansg

    hansg

    Joined:
    May 12, 2014
    Posts:
    39
    Btw, ProcessPurchase is getting called when I purchase a product and execute InitiatePurchase.
     
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,944
    Got it, thanks for testing. I will attempt to confirm here also.