Ejemplo n.º 1
0
 public Inventory(StoreKitProduct[] products)
 {
     foreach (var product in products) {
         string sku = OpenIAB_iOS.StoreSku2Sku(product.identifier);
         _skuMap.Add(sku, new SkuDetails(product));
         if (OpenIAB_iOS.IsProductPurchased(product.identifier)) {
             _purchaseMap.Add(sku, Purchase.CreateFromSku(sku));
         }
     }
 }
Ejemplo n.º 2
0
        public SkuDetails(StoreKitProduct storeKitProduct)
        {
            //Debug.Log(storeKitProduct);

            Sku = OpenIAB_iOS.StoreSku2Sku(storeKitProduct.identifier);
            //Debug.Log(storeKitProduct.identifier);

            Price = storeKitProduct.localPrice + storeKitProduct.priceSymbol;
            //Debug.Log(storeKitProduct.localPrice);

            Title = storeKitProduct.localizedTitle;
            //Debug.Log(storeKitProduct.localizedTitle);

            Description = storeKitProduct.localizedDescription;
            //Debug.Log(storeKitProduct.localizedDescription);
        }
Ejemplo n.º 3
0
        public SkuDetails(StoreKitProduct storeKitProduct)
        {
            //Debug.Log(storeKitProduct);

            Sku = OpenIAB_iOS.StoreSku2Sku(storeKitProduct.identifier);
            //Debug.Log(storeKitProduct.identifier);

            Price = storeKitProduct.localPrice;
            //Debug.Log(storeKitProduct.localPrice);

            Title = storeKitProduct.localizedTitle;
            //Debug.Log(storeKitProduct.localizedTitle);

            Description = storeKitProduct.localizedDescription;
            //Debug.Log(storeKitProduct.localizedDescription);
        }
    private void OnBillingSupported(string productIdentifiers)
    {
        string[] delimiters = new string[] { ";" };
        string[] identifiers = productIdentifiers.Split(delimiters,System.StringSplitOptions.RemoveEmptyEntries);

        OnePF.StoreKitProduct[] productArray = new OnePF.StoreKitProduct[identifiers.Length];
        int index = 0;
        foreach ( string identifier in identifiers) {
            productArray[index] = OpenIAB_iOS.detailsForProductWithIdentifier(identifier);
            index++;
        }

        OpenIAB_iOS.CreateInventory(productArray);

        if (billingSupportedEvent != null) {
            billingSupportedEvent();
        }
    }
Ejemplo n.º 5
0
    private void OnBillingSupported(string productIdentifiers)
    {
        string[] delimiters  = new string[] { ";" };
        string[] identifiers = productIdentifiers.Split(delimiters, System.StringSplitOptions.RemoveEmptyEntries);

        OnePF.StoreKitProduct[] productArray = new OnePF.StoreKitProduct[identifiers.Length];
        int index = 0;

        foreach (string identifier in identifiers)
        {
            productArray[index] = OpenIAB_iOS.detailsForProductWithIdentifier(identifier);
            index++;
        }

        OpenIAB_iOS.CreateInventory(productArray);

        if (billingSupportedEvent != null)
        {
            billingSupportedEvent();
        }
    }
Ejemplo n.º 6
0
		public static void CreateInventory(StoreKitProduct[] products) {
			_inventory = new Inventory(products);
		}