Search Unity

How do I display the value of donation in the game?

Discussion in 'Unity IAP' started by Wokernick, Jul 25, 2019.

  1. Wokernick

    Wokernick

    Joined:
    Sep 18, 2018
    Posts:
    9
    There are in-game purchases (unity iap) in my game. I want the user to see the cost of the purchase before it is made (before adding the card and displaying the cost in google pay). With that, I know that for each country the cost is converted into local currency. I've seen this in other games and I want to do it in mine. You may need to use some API to find out the purchase price from google console and display it in the game.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    626
    You can use product.metadata.localizedPrice to get the localized purchase price, and you can also use the product.metadata.
    isoCurrencyCode to get the ISO code. The ISO code is the product’s localized currency.

    https://docs.unity3d.com/Manual/UnityIAPBrowsingMetadata.html
     
    Last edited: Jul 26, 2019