I have done each and every thing said in different articles about this error. I have added the test account. I am upgrading the version code when i change project code.
In log file i am getting this purchase error
D/Finsky﹕ [1] PurchaseFragment.handleError: Error: PurchaseError{type=3 subtype=4}
where i am mistaking? I have also delete and clear data of my application and set version code to 1 that is default. Here is my unity code
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Soomla.Store;
public class ExampleAssets : IStoreAssets{
public int GetVersion() {
return 1;
}
public VirtualCurrency[] GetCurrencies() {
return new VirtualCurrency[]{};
}
public VirtualGood[] GetGoods() {
return new VirtualGood[] {NO_ADS_LTVG};
}
public VirtualCurrencyPack[] GetCurrencyPacks() {
return new VirtualCurrencyPack[] {};
}
public VirtualCategory[] GetCategories() {
return new VirtualCategory[]{};
}
/** Static Final members **/
public const string NO_ADS_LIFETIME_PRODUCT_ID = "1";
/** LifeTimeVGs **/
// Note: create non-consumable items using LifeTimeVG with PuchaseType of PurchaseWithMarket
public static VirtualGood NO_ADS_LTVG = new LifetimeVG(
"No Adss", // name
"No More Ads!", // description
"1", // item id
new PurchaseWithMarket(NO_ADS_LIFETIME_PRODUCT_ID, 1)); // the way this virtual good is purchased
}
and the other file is
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using Soomla;
using Soomla.Store;
public class IAPCode : MonoBehaviour {
public static VirtualItem virtualGoods = null;
// Use this for initialization
void Start () {
StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreInitialized;
SoomlaStore.Initialize(new ExampleAssets());
foreach (VirtualGood vg in StoreInfo.Goods) {
Debug.LogError(vg.Name+"");
}
}
public void onSoomlaStoreInitialized()
{
virtualGoods = StoreInfo.GetItemByItemId ("1");
}
// Update is called once per frame
void Update () {
}
public void no_ads() // This function is calling from a canvas button then error appears
{
StoreInventory.BuyItem (virtualGoods.ItemId);
}catch(UnityException e)
{
Debug.Log(e.Message);
}
}
}
The product name, id and description is same as in google play developer console and item is active. I am doing this only for no_ads item.