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

Question Pending purchase encountered! This is not supported?

Discussion in 'Unity IAP' started by Sparticus, Jun 23, 2023.

  1. Sparticus

    Sparticus

    Joined:
    Mar 15, 2014
    Posts:
    149
    I have implemented IAP within my Unity game using Unity IAP. I wrote the code myself (I didn't use the codeless version)

    My game has been live now for 6 months and I see new purchases that are successful on a regular basis. So I know it's working....

    Well, at least some of it is. Maybe once a week I get the following error in my logs :
    "Pending purchase encountered! This is not supported"

    I'm not sure what a pending purchase is. How does a user submit a pending purchase? At first I thought this was just something I could ignore, but now I am thinking I have players that are trying to spend money in my game and I am unable to process their "pending purchase"

    Anyone handle this before and can point me in the right direction?

    Thanks!
     
  2. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,162
    Pending purchases are not something specific to Unity IAP, you can do a Google search for them. In Google Play they call them "deferred" purchases:
    https://developer.android.com/google/play/billing/unity#deferred-purchases

    Quote: "pending purchases—where users can create a purchase and complete it later using cash in stores"

    Or, a snippet that mentions pending in Unity IAP:
    https://docs.unity3d.com/Manual/UnityIAPProcessingPurchases.html

    Since I run a server-validation service and check for purchase status, I can tell you that pending purchases happen quite often. Even more often in games users want to cheat by unlocking purchases they did not pay for yet. Some months ago, deferred purchases were something that you can actively enable (or not) for your app. I think they are mandatory now, but you want to check that in your Google Play developer console.

    If pending/deferred purchases are enabled for your app, you should check the purchase status of the transaction before granting the reward in ProcessPurchase. In the latest Unity IAP version, pending transactions are not forwarded to ProcessPurchase by default, so you do not have to act when using it.
     
  3. Sparticus

    Sparticus

    Joined:
    Mar 15, 2014
    Posts:
    149
    @Baroni Thanks for your reply!

    Would you say deferred payments is something I should investigate and implement in my game (as I a missing out on money people are trying to spend)?

    Or is it better to just disable and not allow these types of payments as they generally are people trying to scam the game?
     
  4. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,162
    While most of these transactions are usually coming from people trying to get your in app products for free, I have looked through the Google Play developer console and was not able to find any way to disable them. As I mentioned above, it seems to be the case that deferred purchasing is enabled by default. So, to avoid bad reviews from legit people who are trying to purchase something in your game, but their credit card was temporarily declined for whatever reason, you should definitely update to the latest Unity IAP version (which handles these cases automatically, see above).