PlayFab (using PayPal)



  • @Baroni I see the potential going for PlayFab inventory for these purchased items pulled up by my server instead of adding them from the PlayFab stream etc. So, I have another question and if I'm getting out of scope just let me know.

    I have the client side which now works fine player purchases, pays with paypal, the items added on playfab inventory and life is good, I am thinking of having another instance of PlayFab SDK and Simple IAP (is it needed?) in my server build, to handle getting inventory from playfab and adding it that way to my in-game custom inventory and consume in it when the player uses it as well, this sounds safe since only my server will interact with the players playfab inventory etc. Do I think this correctly or it will not work? Is something like that in Simple IAP ready so I can use on server side? (I see a List<ItemInstance> inventory = result.InfoResultPayload.UserInventory; which I guess is what I'm looking for ?) If I don't need the Simple IAP on my server (since no purchases will triggered from server side it will be only for inventory management), can I get inventory only using the playfab SDK?

    BTW, if all that is possible with server side? Since user logs in from there and gets the UID which logins on playfab, maybe initiating everything server side including purchases is safer? and have the user only having UI on client? Is that offers more security or not needed?

    thanks :)

    edit: Unrelated with this, is there a way to have quantity on purchased items? or should I create bundles?



  • PlayFab SDK and Simple IAP (is it needed?) in my server build, to handle getting inventory from playfab and adding it that way to my in-game custom inventory and consume in it when the player uses it as well

    I'm not quite sure what is your reason behind that, as it sounds to me as if you're just duplicating functionality which is already there within PlayFab. You're trying to establish a server-server connection with PlayFab for a secure environment for inventory management, when the PlayFab servers are already secure and allow for custom code (CloudScript) hidden from clients, if you need to run more workflows in the backend.

    Is something like that in Simple IAP ready so I can use on server side?

    Simple IAP System is a client app, it is used for getting, displaying and initiating purchases and inventory. All of these methods can be found in the PlayFab SDK using REST calls so there is no need to run a Unity instance with SIS on a server. Besides, it won't work anyway.

    Since user logs in from there and gets the UID which logins on playfab, maybe initiating everything server side including purchases is safer? and have the user only having UI on client? Is that offers more security or not needed?

    As written above, Simple IAP System does not differ from that. It does not interact with the PlayFab inventory directly. It follows the strict client-server paradigm and does not hook into any update methods directly. I have seen developers do that when they did not own Simple IAP System. Each client call is a 'request' to the server, which is then responsible for granting or denying that request. E.g. a client does not add virtual currency by itself. Having an additional server in the middle would just mean an additional bottleneck, as then the client request is sent to a server which sends a request to PlayFab, and the response comes all the way back. It would not be more secure, just more complex.

    Unrelated with this, is there a way to have quantity on purchased items? or should I create bundles?

    Depends on what type of products you mean: virtual products support quantities already and you can define them right in the IAPSettings editor. For example, buying "bullets" for virtual currency could add 200 bullets to the user's inventory about to be consumed at some later point. For real money products we did not support quantity, since this would require a checkout cart, making the process and workflow more difficult to use. Because of that, only one real money product can be bought at a time. If you wish one product to grant more other products, it is correct that you would use a bundle.



  • Hello again @baroni, everything work as intended except that if I have an item at $14.99, and someone is from a country with KR instead of dollars, it show kr. 14.99 (which is 3$), when he goes to pay he has to pay 14.99$, is just missleading on the UI. Any idea why this happening? This is for real money purchases ofc



  • Could you post screenshots from both frontends, where it shows the wrong and correct amount? Since you mentioned "it shows" "on the UI" I'm not quite sure where you mean exactly :)



  • sure:

    https://ibb.co/n15bqvh

    https://ibb.co/Wtk8J7H

    so the payment its in USD (as it should), but in the shops UI, it shows the country currency, for example a player sent me one with KR. 14.99, which is like 3 USD, in paypal he had to pay 14.99USD as it should, but in the UI is the issue. In the phot is my country's currency which is EUR



  • I guess PlayFab returns the local currency symbol as currency conversion is not handled by Simple IAP System.

    If you would like to always display the amount in Dollars, a quick fix would be to disable "Fetch" in the IAP Settings editor for the product.



  • @Baroni I guess that would also overwrite the description/names etc. will contact playfab then, thank you



  • One more question, if I disable fetch, will any functionality of the item change (if I have it consumable, or consume by time etc in playfab), or only how the name/description/price is viewed in the UI?



  • @Salaz said in PlayFab (using PayPal):

    @Baroni will contact playfab then, thank you

    If you do, please post a link here so I can track it too.

    Disabling "Fetch" only has a visual effect on the text fields in the IAP Settings (name, description, price). These are usually used for localization.



  • I have posted a question but it is under moderation still. Here is something I found that might help:

    https://community.playfab.com/questions/38580/playfab-dollar-currency-x-google-store-currency-or.html


Log in to reply