예제 #1
0
파일: Inventory.cs 프로젝트: raenoh/OpenIAB
 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));
         }
     }
 }
예제 #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);
        }
예제 #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();
        }
    }
예제 #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();
        }
    }
예제 #6
0
파일: OpenIAB.cs 프로젝트: Kero-it/OpenIAB
		public static void CreateInventory(StoreKitProduct[] products) {
			_inventory = new Inventory(products);
		}