コード例 #1
0
 private void OnPurchaseSucceeded(string sku)
 {
     if (purchaseSucceededEvent != null)
     {
         purchaseSucceededEvent(Purchase.CreateFromSku(OpenIAB_iOS.StoreSku2Sku(sku)));
     }
 }
コード例 #2
0
    private void OnBillingSupported(string inventory)
    {
        OpenIAB_iOS.CreateInventory(inventory);

        if (billingSupportedEvent != null)
        {
            billingSupportedEvent();
        }
    }
コード例 #3
0
 private void OnPurchaseSucceeded(string sku)
 {
     if (purchaseSucceededEvent != null)
     {
         // sku actually is a serialzied dictionary with 2 keys (sku & receipt);
         // make a new JSON object to easily parse these out.
         JSON json_obj = new JSON(sku);
         purchaseSucceededEvent(Purchase.CreateFromSku(OpenIAB_iOS.StoreSku2Sku(json_obj.ToString("sku")), json_obj.ToString("receipt")));
     }
 }
コード例 #4
0
        public Purchase(JSON json)
        {
            ItemType         = json.ToString("itemType");
            OrderId          = json.ToString("orderId");
            PackageName      = json.ToString("packageName");
            Sku              = json.ToString("sku");
            PurchaseTime     = json.ToLong("purchaseTime");
            PurchaseState    = json.ToInt("purchaseState");
            DeveloperPayload = json.ToString("developerPayload");
            Token            = json.ToString("token");
            OriginalJson     = json.ToString("originalJson");
            Signature        = json.ToString("signature");
            AppstoreName     = json.ToString("appstoreName");

            Sku = OpenIAB_iOS.StoreSku2Sku(Sku);
        }
コード例 #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();
        }
    }