Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

IAP Price

Discussion in 'Unity IAP' started by KeeLo, Nov 30, 2018.

  1. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    Hello! I get product.metadata.localizedPrice.ToString() and after that i change price in Google Developer Console for example from 1$ to 2$ and product.metadata.localizedPrice.ToString() doesn't change price instantly however if i click to buy this item, i will see changed price (2$). Why product.metadata.localizedPrice.ToString() doesn't change? how can i update or fresfresh product.metadata.localizedPrice.ToString()? Even if i diactivate in Google Dev Console this product, product.metadata.localizedPrice.ToString() still getting price 1$
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Does this occur when you restart your app? We only retrieve the price during IAP Initialization (or during a purchase).
     
  3. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    Even after restart my app show me price 1$ somewhere in an hour this price changed to 2$
    So it should not happen?
    Code (CSharp):
    1. private void ProductInfo(string productId)
    2.     {
    3.         try
    4.         {
    5.             if (IsInitialized())
    6.             {
    7.                 Product product = m_StoreController.products.WithID(productId);
    8.  
    9.                 // If the look up found a product for this device's store and that product is ready to be sold ...
    10.                 if (product != null && product.availableToPurchase)
    11.                 {
    12.                     label.text = product.metadata.localizedPrice.ToString() + " " + product.metadata.isoCurrencyCode;
    13.                 }
    14.             }
    15.         }
    16.         catch (Exception e)
    17.         {
    18.             label.text = e.ToString();
    19.         }
    20.     }
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We have no control over this, we are receiving the data as provided by Google. If this is in Alpha/Beta test, it may be expected to take longer for them to update the prices than in Release.
     
  5. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    Hm... OK it may be ... Thank you!!!