OnPurchaseFailed Can't access ANY methods

I’ve attached the script to all three methods on the IAP Button and OnPurchasedComplete and OnProductFetched works and can access the methods but OnPurchaseFailed can seem to see any of the methods.

I’m using Unity 2021.3.19f1 and the lastest 4.10.0 API

1 Like

Unable to call this also, when changing to legacy > new. Could you solve it?

Solved it Handling purchase failures - In App Purchasing v4.9.3

you need to define the method with the signature
PurchaseFailureDescription and not PurchaseFailureReason, since it is deprecated.

///


/// Called when a purchase fails.
///

public void OnPurchaseFailed (Product i, PurchaseFailureDescription p)
{
if (p.reason == PurchaseFailureReason.PurchasingUnavailable) {
// IAP may be disabled in device settings.
}
}

2 Likes

Thank you!. It make sense :smiley: