PurchaseFailureReason vs PurchaseFailureDescription

Hello everyone and thank you so much for reading my post!
I’m trying to implement the PurchaseFailureReason for my in-app purchase. However, in the Inspector the function to implement is called PurchaseFailureDescription. I have the latest IAP-package. I have using UnityEngine.Purchasing at the top of my code. Even after I implement PurchaseFailureReason as such:

public void purchaseFailed(Product product, PurchaseFailureReason p)
    {
        purchaseFailedText.SetActive(true);
    }

the function doesn’t show up in the inspector, and I believe its because PurchaseFailureReason doesn’t match PurchaseFailureDescription in the inspector. As you can see in the screenshot I’ve attached, in the Inspector the function which is triggered by a failed purchase takes the parameters Product and PurchaseFailureDesription. But in the Unity docs this doesn’t even exist - what exists is PurchaseFailureReason. What can I do to solve this issue?

Nevermind, I’ve solved my problem. I needed to add using UnityEngine.Purchasing.Extension; to the top of my code

1 Like