Playfab: Create product which costs currency and earn currency / Title, Description and price aren't fetch



  • Hello,

    i using SIS with playfab integration. Now i have two problems:

    1. Problem:
      I create two currencies (credits and energy). Credits will be purchase by RM, while energy will be purchase by credits. I try to create a virtual product which costs 1000 credits and earn 100 energy, but it doesn't work. How can i do something like that?

    2. Problem:
      I activate FETCH in IAPSetting window and the system fetches the real price, but only in the background. The title, description and the shown price is wrong. Do i miss something?

    Nochmal auf Deutsch:
    Ich nutze das SIS mit der Playfab Integration und stoße dabei auf zwei Probleme:

    1. Problem:
      Ich benutze zwei Währungen (Credits und Energy). Credits werden nur mit Echtgeld erworben, während die Energy nur mit Credits erworben werden soll. Ich habe im IAPSetting Fenster probiert ein Produkt zu erstellen welches 1000 Credits kostet und 100 Energy dem Spieler hinzufügt. Das klappt allerdings nicht. Gibt es dort eine Möglichkeit (außer über den IAPListener)?

    2. Problem:
      Ich habe im IAPSetting Fenster bei allen Produkten FETCH aktiviert. Nun hat das Produkt in Unity den Preis von 9,99, während ich in Playfab den Preis auf 1,99 geändert habe. Im Shop wird mir trotzdem (neben dem lokalen Titel und Beschreibung) noch der lokale Preis von 9,99 angezeigt. Starte ich den Kauf wird aber nur 1,99 verbucht, also dementsprechend der Online Preis.
      Habe ich da irgendwas übersehen? Das verwendete Prefab ist ein Prefab von euch, genau so wie der Container.



  • Hey there,

    1. The Cost/Earnings field in the IAP Editor can be negative, effectively granting currency rather than substracting it. In your case, add a "Virtual" product, set credits to 1000 and energy to -100. This will handle the Unity side locally. On PlayFab's website, add a bundle item with "Bundle Contents" set to 100 energy and "Prices" set to 1000 credits.

    2. Title, description etc. are not fetched from PlayFab. Also see this thread:
      https://www.rebound-games.com/forum/topic/2270/updating-rm-price-of-currency-bundle-on-playfab

    Could you please let me know which platform and store are you running on? I can see that there is a use case for fetching data for virtual items, which otherwise could not be updated (without updating the app itself), so I will look into this for the next update. For real money products though, see the post above.



  • @Baroni said in Playfab: Create product which costs currency and earn currency / Title, Description and price aren't fetch:

    Hey there,

    1. The Cost/Earnings field in the IAP Editor can be negative, effectively granting currency rather than substracting it. In your case, add a "Virtual" product, set credits to 1000 and energy to -100. This will handle the Unity side locally. On PlayFab's website, add a bundle item with "Bundle Contents" set to 100 energy and "Prices" set to 1000 credits.

    Try it and it works, but only in the background. After a app restart i see the correct amount of energy, but after purchase the DBManager's energy amount is wrong.

    Ich habe es ausprobiert, aber es funktioniert nur im Hintergrund. Nachdem Kauf wird im Playfab die Energy Menge korrekt erhöht, aber im DBManager steht immer noch der alte Wert. Erst nach einem kompletten Neustart des Spiels kommt im DBManager der korrekte Wert an.

    1. Title, description etc. are not fetched from PlayFab. Also see this thread:
      https://www.rebound-games.com/forum/topic/2270/updating-rm-price-of-currency-bundle-on-playfab

    Could you please let me know which platform and store are you running on? I can see that there is a use case for fetching data for virtual items, which otherwise could not be updated (without updating the app itself), so I will look into this for the next update. For real money products though, see the post above.

    Currently i use no store. Later it should be mobile (Google Play) and WebGL (Paypal). Its okay that SIS doesn't fetch the title and description from Playfab, but it is necessary to fetch the correct price from Playfab.

    Zurzeit benutze ich noch keinen Store. Geplant ist aber die mobile Plattform (mit Google Play) und WebGL (mit Paypal). Es ist okay dass SIS nicht den Titel und die Beschreibung von Playfab holt, allerdings empfinde ich es als notwendig dass der korrekte Preis von PlayFab geholt wird um diesen dem Spieler auch korrekt anzuzeigen.



    1. What do you mean by "only in the background"? I have tested this yesterday before writing the reply, and could see the correct amount modified to both currencies when looking at the local database via Window > Simple IAP System > Show Database. I was using PlayFab "Full Suite" during my tests which modifies data in the memory, not on disk.

    2. As I wrote in that other thread, I will look into fetching data from PlayFab for PayPal very soon. If this is urgent, you could do the same code change mentioned in the thread. For Google Play however, you should update the price on both stores Google Play and PlayFab, since otherwise receipt validation on PlayFab will fail. Mobile stores like Google Play are the leading data providers and SIS does fetch data (like localized pricing) from there already.



  • @Baroni said in Playfab: Create product which costs currency and earn currency / Title, Description and price aren't fetch:

    1. What do you mean by "only in the background"? I have tested this yesterday before writing the reply, and could see the correct amount modified to both currencies when looking at the local database via Window > Simple IAP System > Show Database. I was using PlayFab "Full Suite" during my tests which modifies data in the memory, not on disk.

    Maybe i do something wrong, but i create a Debug.Log before and after buying (in IAPListener):
    Log Screenshot

    Yes i use PlayFab FullSuite. The credits balance is correctly (100 energy for 200 credits).
    After restarting the app, the energy balance is correctly too.

    Vielleicht mache ich was falsch, aber ich habe jetzt vor dem Kauf und nachdem Kauf (im IAPListener) einen Log erzeugt, welcher mir beide Währungen ausgibt (siehe Screenshot). Die 200 Credits werden korrekt abgezogen, während die 100 Energy nur bei PlayFab und nicht im DBManager hinzugefügt werden. Nach einem Neustart des Spiels stimmt die Anzahl der Energy dann auch, da in Playfab selber schon zum Zeitpunkt des Kaufs die Menge korrekt gesetzt wurde. Ich nutze ebenfalls PlayFab FullSuite Modus (also nichts wird lokal gespeichert).

    1. As I wrote in that other thread, I will look into fetching data from PlayFab for PayPal very soon. If this is urgent, you could do the same code change mentioned in the thread. For Google Play however, you should update the price on both stores Google Play and PlayFab, since otherwise receipt validation on PlayFab will fail. Mobile stores like Google Play are the leading data providers and SIS does fetch data (like localized pricing) from there already.

    Okay, thank you :)



  • Thanks for the follow up, I tested again including deleting all local PlayerPrefs beforehand, and I can now see the same issue you're experiencing. I did a quick investigation and while checking the PlayfabStore - OnPurchaseSucceeded method, remembered that PlayFab does only support one currency price... I assume a workaround is needed to check for the bundle contents and grant them locally too. This is something I am going to implement at the end of next week as well.

    Da ich ab morgen auf Kreuzfahrt (ohne Internet) bin, bitte ich um etwas Geduld :)



  • Perfect, thank you. No stress.

    Viel Spaß und eine erholsame Kreuzfahrt wünsche ich! :)



  • As a follow up to this, version 4.3.1 is live and includes the following additions based on your feedback:

    • fixed granting currency locally too when using PlayFab Bundles
    • added fetching product data and price from PlayFab on PayPal & Steam


  • It works. Thank you for the new version.


Log in to reply