Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

ProcessPurchase after app restart

Discussion in 'Unity IAP' started by michaeltepl, Dec 15, 2020.

  1. michaeltepl

    michaeltepl

    Joined:
    Dec 26, 2013
    Posts:
    22
    Hi! I have a question when ProcessPurchase method is called for pending purchases? Righ after store initialization callback or there can be a delay?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    There is no delay. I haven't timed it exactly, but I might expect all ProcessPurchase events to fire before Initialization completes. How are your purchases still in Pending? Perhaps by returning Pending from ProcessPurchase, I just want to confirm.
     
  3. michaeltepl

    michaeltepl

    Joined:
    Dec 26, 2013
    Posts:
    22
    Yes, you are right, I return Pending and then perform validation on my backend, and then call ConfirmPendingPurchase.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it! Make sure to use the latest IAP 2.2.4, we have made some changes in this area. 2.2.5 will be available before the end of the week.
     
  5. michaeltepl

    michaeltepl

    Joined:
    Dec 26, 2013
    Posts:
    22
    Thanks a lot!