error CS0103: The name 'StandardPurchasingModule' does not exist in the current context

I am trying to implement IAP into my app but get this error:

It seems to be a common. problem and I have tested all kinds of ways to solve this including downloading tutorial projects from this forum, but still get the same problem.

The code below is from the last project here: Sample IAP Project

I do not know what to do to get this work and would appreciate any help so I understand how to solve this.

using System;
using UnityEngine;
using UnityEngine.Purchasing;
using UnityEngine.UI;

public class KD_IAPManager : MonoBehaviour, IStoreListener
{

    private static IStoreController m_StoreController;          // The Unity Purchasing system.
    private static IExtensionProvider m_StoreExtensionProvider; // The store-specific Purchasing subsystems.
    private static Product test_product = null;


    public static string DECK_ENHANCE = "DeckEnhance";
    private static Text myText;

    private Boolean return_complete = true;

    void Start()
    {
        myText = GameObject.Find("MyText").GetComponent<Text>();

        // If we haven't set up the Unity Purchasing reference
        if (m_StoreController == null)
        {
            // Begin to configure our connection to Purchasing
            InitializePurchasing();
        }
        MyDebug("Complete = " + return_complete.ToString());
    }

    public void InitializePurchasing()
    {
        if (IsInitialized())
        {
            return;
        }
>>>> HERE IS THE PROBLEM <<<<
        var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());

        builder.AddProduct(DECK_ENHANCE, ProductType.NonConsumable);

        UnityPurchasing.Initialize(this, builder);
    }

Did you view the video and follow the steps? What version of Unity are you using? Don’t use Unity 2019 until the next IAP release in a few weeks.

1 Like

Well that is the problem I guess, using 2019.

No need to guess, it’s good to review the popular posts on this forum