Beispiel #1
0
 public void startBilling()
 {
     ConfigureStoreKitEvents();
     EasyStoreKit.AssignIdentifiers(productIdentifiers);
     if (Application.internetReachability != NetworkReachability.NotReachable)
     {
         if (EasyStoreKit.CanMakePayments())
         {
             //nullify previously loaded products
             this.products = null;
             EasyStoreKit.LoadProducts();
         }
         else
         {
             //				message = "Application is not allowed to make payments!";
         }
     }
 }
Beispiel #2
0
    public void callBilling(string identifier)
    {
        bool hasString = false;

        for (int i = 0; i < GOODS_COUNT_PRICE; i++)
        {
            if (products[i].identifier == identifier)
            {
                hasString = true;
            }
        }
        if (!hasString)
        {
            Debug.LogError("callBilling error: wrong id");
            return;
        }
        if (EasyStoreKit.BuyProductWithIdentifier(identifier, 1))
        {
            Debug.Log("identifier is right");
        }
    }