question

Ilya Meparishvili avatar image
Ilya Meparishvili asked

How to update Client when Xsolla payment is successful

Hello

I managed everything to integrate Xsolla with Playfab, everything works very well.

Just I have one stupied question, I want to update player virtual currency balance in unity client when payment is successful on Xsolla, I can manually call PlayFabClientAPI.GetUserInventory in 1 or 2 minute but, is there better way to update Immediately when currency is changed??

10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

Hi, according to your description, I assume that everything is done (transaction completed, player’s currency added in PlayFab ) except that the display of currency is not updated in Unity. If this is the case, I think the key issue here is that you cannot automatically update the currency display. However, I found in this doc that the Xsolla transaction won’t take 2-3 seconds to complete, so my thinking is that you can check the transaction status by polling the Client API GetPurchase, if the transaction status returned “Succeeded”, then call GetUserInventory to update your inventory in Unity Client in the success callback. If I got you wrong, please explain your situation to me more specifically so I can help you, 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.

Ilya Meparishvili avatar image
Ilya Meparishvili answered

Thanks, that was what I was interested in

1 comment
10 |1200

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

Citrus Yan avatar image Citrus Yan commented ·

Hey, glad it helped:)

0 Likes 0 ·

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.