question

nkcreativepk avatar image
nkcreativepk asked

Unity C# Steam in app purchases

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.

nkcreativepk avatar image nkcreativepk commented ·

Hi! I am trying to integrate steam in app purchases into my game, but i get

PlayFabError(ServiceUnavailable, 500 Internal Server Error , 400 BadRequest)
What am i doing wrong?

1.Login to playfab via steam

2. start purchase

public void TesztVasarol(){
       // Steamworks.
        ItemPurchaseRequest i = new ItemPurchaseRequest();
        i.ItemId = "g11";
        i.Quantity = 1;
        i.UpgradeFromItems = new List<string>();
        i.UpgradeFromItems.Add(""); 
StartPurchaseRequest rq = new StartPurchaseRequest(); // rq.StoreId="TesztStore"; rq.Items = new List<ItemPurchaseRequest>(); rq.Items.Add(i); PlayFabClientAPI.StartPurchase(rq,startPurchaseCallback,ErrorCallback); // TesztItemVasarol(); }

3. error

Please help, thanks

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Please remove the UpgradeFromItems parameter - it actually was added for a specific use case (https://community.playfab.com/questions/7221/how-to-use-upgradefromitems-on-startpurchase.html), so adding an empty entry to that array is likely the issue, here.

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.