Hi,
I’m testing my IAP implementation for Android right now.
I mainly followed the codeless implementation guide Unity - Manual: Codeless IAP because my shop is very very simple with just 3 different sets of coins that can be purchased.
This is all working fine unless I test with Google “slow” credit card, where the purchase is only confirmed after 1 or 2 minutes. In that case I never receive the purchase within the app. The Play dialog closes and neither the purchase complete nor the purchase failed are getting called.
If I stay on the screen purchase complete is getting called after a minute or two (then when the play confirmation arrives) but this seems like it is not a real scenario.
I read about the IAP Listener (it is on the same page). It says:
“Codeless IAP dispatches successful and failed purchase events to an active IAP Button component in the hierarchy. However, there may be times when it is difficult or undesirable to have an active IAP Button when handling a successful purchase. For example, if a purchase is interrupted before completing, Unity IAP attempts to process the purchase again the next time it is initialized.”
So I thought lets implement the IAP Listener on the first scene of my game and was expecting that it gets called on app start if the purchase was completed while the app was not running or the scene was closed or the purchase pending etc.
But… just nothing happens when I start the app after a successfull purchase.
What do I have to do different? Do I have to manually check for pending purchases? And if so, how? I didn’t find anything within the documentation…
Thank you!