4.12.2 Unity IAP Documentation Issue

using UnityEngine;
using UnityEngine.Purchasing;
using UnityEngine.Purchasing.Extension;

public class MyIAPManager : IDetailedStoreListener {

    private IStoreController controller;
    private IExtensionProvider extensions;

    public MyIAPManager () {
        var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
        builder.AddProduct("100_gold_coins", ProductType.Consumable, new IDs
        {
            {"100_gold_coins_google", GooglePlay.Name},
            {"100_gold_coins_mac", MacAppStore.Name}
        });

        UnityPurchasing.Initialize (this, builder);
    }

    /// <summary>
    /// Called when Unity IAP is ready to make purchases.
    /// </summary>
    public void OnInitialized (IStoreController controller, IExtensionProvider extensions)
    {
        this.controller = controller;
        this.extensions = extensions;
    }

    /// <summary>
    /// Called when Unity IAP encounters an unrecoverable initialization error.
    ///
    /// Note that this will not be called if Internet is unavailable; Unity IAP
    /// will attempt initialization until it becomes available.
    /// </summary>
    public void OnInitializeFailed (InitializationFailureReason error)
    {
    }

    /// <summary>
    /// Called when a purchase completes.
    ///
    /// May be called at any time after OnInitialized().
    /// </summary>
    public PurchaseProcessingResult ProcessPurchase (PurchaseEventArgs e)
    {
        return PurchaseProcessingResult.Complete;
    }

    /// <summary>
    /// Called when a purchase fails.
    /// IStoreListener.OnPurchaseFailed is deprecated,
    /// use IDetailedStoreListener.OnPurchaseFailed instead.
    /// </summary>
    public void OnPurchaseFailed (Product i, PurchaseFailureReason p)
    {
    }

    /// <summary>
    /// Called when a purchase fails.
    /// </summary>
    public void OnPurchaseFailed (Product i, PurchaseFailureDescription p)
    {
    }
}

My IAP is throwing an issue with the IDetailedStoreListener, even with the script from the unity documentation on version 4.12.2. Any recommendations?

Hi @RobertDeWolfe,

The error you are receiving on the IDetailedStoreListener is occurring because your code only implemented the OnInitializeFailed(InitializationFailureReason error) interface member. There is a new interface member that also includes the reason as a string.

So, if you update your code around Ln36 to include the new interface member you should be fine.
e.g. something like

    public void OnInitializeFailed(InitializationFailureReason error) {
        OnInitializeFailed(error, null);
    }


    public void OnInitializeFailed(InitializationFailureReason error,string reason)
    {
        Debug.Log("IAP Initialization Failed");
        Debug.Log("Error " + error.ToString());
        Debug.Log("Reason " + reason);
    }