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)); } } }
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); }
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(); } }
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(); } }
public static void CreateInventory(StoreKitProduct[] products) { _inventory = new Inventory(products); }