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
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.
}
}