Unity IAP Unavaliable Product Google Play商店

时间:2018-06-05 20:39:26

标签: unity3d google-play in-app-purchase

我在Unity IAP遇到问题。我在Play商店中发布了我的项目的alpha版本。我已经在商店中设置了iap,并通过提供正确的服务API密钥激活了编辑器上的服务iap。问题是我无法在我的android构建中初始化iap。

  1. 我在开发者控制台上的IAP设置: Here
  2. 我遇到logcat错误: Here
  3. 初始化代码:

    void Start() {
        if (!IsInitialized()) {
            var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
            builder.AddProduct("test_product", ProductType.Consumable);
    
            UnityPurchasing.Initialize(this, builder);
        }
    }
    
    public void OnInitialized(IStoreController controller, IExtensionProvider extensions) {
        Debug.Log("OnInitialized: PASS");
        storeController = controller;
        storeExtension = extensions;
    }
    
    public void OnInitializeFailed(InitializationFailureReason error) {
        Debug.LogError("OnInitializeFailed InitializationFailureReason: " + error);
    }
    

0 个答案:

没有答案