Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

iOS crash/resume: Repeatedly charges customer

Discussion in 'Unity IAP' started by PanicEnsues, Sep 21, 2019.

  1. PanicEnsues

    PanicEnsues

    Joined:
    Jul 17, 2014
    Posts:
    187
    I'm using UnityIAP (currently 2.0.6) + Codeless IAP Button (1.22.0); yesterday I was contacted by a customer with a problem:

    1) The app froze/crashed while he was making an IAP purchase of in-game currency. He tried again and it didn’t go through again. On third try it went through successfully.
    2) Every time he launched the app after that, on startup it would make the purchase (and award the in-game currency) again.
    3) He wound up being charged 6 times before he uninstalled the app.
    4) The next day, he re-downloaded/re-installed.
    5) It continues to award him the in-game currency every time he launches the app, but does NOT appear to be charging his iTunes account any more.

    So it seems like some local data file(s) that UnityIAP uses to track an in-progress purchase is stuck and not being deleted. Can anyone provide any guidance on how to further troubleshoot this?

    Thanks!

    -Scott
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please provide the device logs, if possible. Are you returning Complete from ProcessPurchase? It sounds like Pending was returned. Can you elaborate, "on startup would make the purchase", did the user get prompted for a purchase each time? Unfortunately since the user has reinstalled, there would not be a way to further troubleshoot. We would need the logs.
     
  3. PanicEnsues

    PanicEnsues

    Joined:
    Jul 17, 2014
    Posts:
    187
    Unfortunately, I don't have access to any device logs; I only heard from the customer after he had uninstalled/reinstalled, so I just had to piece together the narrative from what he told me.

    My impression is that on startup there were NOT any prompts, just the sound/vfx that my game makes as it applies the new in-game currency after a purchase (triggered by IAP Button's OnPurchaseComplete event).

    I know it's not enough info to properly debug, I'm just hoping for a general direction to go in if I were to try and repro the issue.

    Thanks for your help!
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You might try turning off the WiFi in the middle of a transaction. Make sure to capture the device logs when you run these tests. https://forum.unity.com/threads/how-to-capturing-device-logs-on-android.528680/