Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

User's purchase history

Discussion in 'Unity IAP' started by seungho6858, Mar 3, 2020.

Thread Status:
Not open for further replies.
  1. seungho6858

    seungho6858

    Joined:
    Feb 21, 2018
    Posts:
    4
    No matter what type of product (even consumable), I want to know what product and how many of it a user bought.

    Code (CSharp):
    1. Product product = m_StoreController.products.WithID(myProductID);
    2. if (product != null && product.hasReceipt)
    3. {
    4.    // you buy it!
    5. }
    This code only notifies whether you buy non-consumable product
     
  2. seungho6858

    seungho6858

    Joined:
    Feb 21, 2018
    Posts:
    4
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    You could track previous purchases in PlayerPrefs. Some studios choose to save purchase history to the cloud.
     
  4. seungho6858

    seungho6858

    Joined:
    Feb 21, 2018
    Posts:
    4
    But isn't the PlayerPrefs removed if user deletes an app?

    furthermore, if app is shutdown right after billing is processed... (before saving PlayerPrefs) I can't track
     
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    May I ask, why do you need to see how many purchases? You are describing an exception, not the general case.
     
  6. seungho6858

    seungho6858

    Joined:
    Feb 21, 2018
    Posts:
    4
    Actually, I'm planning to do show my user's records of purchasing.

    for example, If a user bought a consumable product (acquires 100 gold) 10 times, I'll make a kinda history of your purchasing with date, price and so on
     
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
  8. rtblox

    rtblox

    Joined:
    Feb 15, 2022
    Posts:
    24
     
  9. rtblox

    rtblox

    Joined:
    Feb 15, 2022
    Posts:
    24
  10. rtblox

    rtblox

    Joined:
    Feb 15, 2022
    Posts:
    24
  11. rtblox

    rtblox

    Joined:
    Feb 15, 2022
    Posts:
    24
  12. rtblox

    rtblox

    Joined:
    Feb 15, 2022
    Posts:
    24
    Can you please help me
     
  13. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry I don't understand "too fix is thing". Are you a developer? What things, for what project?
     
  14. rtblox

    rtblox

    Joined:
    Feb 15, 2022
    Posts:
    24
  15. rtblox

    rtblox

    Joined:
    Feb 15, 2022
    Posts:
    24
    it was a boat and a map and a water map and a car and a town
     
  16. rtblox

    rtblox

    Joined:
    Feb 15, 2022
    Posts:
    24
    yes I'm a developer
     
  17. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    You bought a town? And a car and a boat? How is this related to Unity IAP?
     
  18. rtblox

    rtblox

    Joined:
    Feb 15, 2022
    Posts:
    24
    wait i will try too find them
     
  19. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    You are in the wrong forum. In looking at your threads, you are talking about things you bought from the asset store, not Unity IAP. I will lock this thread.
     
Thread Status:
Not open for further replies.