question

teemu-sillanpaa avatar image
teemu-sillanpaa asked

Updating the virtual currency of a user from PlayFab?

A simple way seems to do this seems to be by updating the virtual currency directly through the Game Manager (Player > Virtual currency), but it doesn't look like there's a way to update the client this way?

The usage here would be for example for customer support rewarding the player with X amount of X currency for whatever reason, so the initiation should be from the server and not the server. The server should just let the client know that their currency has been updated.

How could this be done? Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

The first thing is, except for the Game Manager we can also update the player’s VC via the admin/server API AddUserVirtualCurrency.

About this demand ”The server should just let the client know that their currency has been updated”. It looks like a message pushing service. PlayFab has a feature PlayFab PubSub which is a flexible system for pushing information in real time between services and clients. But this feature is currently in Private Preview. If you are Pro and Enterprise tier, you can contact us to try it. If you are Essential and Indie tier you can wait for the public preview, or you can implement the information pushing system by yourself. You can also learn about external message queue service, like Azure service bus, etc.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.