rlabrecque / Steamworks.NET

Steamworks wrapper for Unity / C#
http://steamworks.github.io
MIT License
2.77k stars 366 forks source link

No example for Steam IAP (microtransaction) #229

Closed keyserjaya closed 5 years ago

keyserjaya commented 6 years ago

Hello, first of all. I wanna say thanks to you for this very useful assets.

I want to make an IAP for my game but i can't find any example for Steam IAP. I found microTransaction on SteamUserTest.cs but the callback isn't responding. I was new on publishing in steam so...

Can you upload an example project or script that using Steam IAP, please? :)) Thanks!

Athomield commented 6 years ago

Would be greatful if there was an example too :)

PaulNK commented 6 years ago

I was checking out the micro transactions recently and I think they don’t have an example because it’s mainly all custom server side code. The only only thing you can do is listen for MicroTxnAuthorizationResponse_t. https://partner.steamgames.com/doc/features/microtransactions/implementation has more details.

If you don’t want to create your own server I’d suggest checking out the “Steam Inventory Service” instead. Products/prices are added on the steam site. RequestPrices is used to show the users local currency and prices. StartPurchase has a basic completed callback, the item is applied and ConsumeItem is used to remove the item from steam. When the game starts you can call GetAllItems to apply failed consumables or to get non-consumables.

keyserjaya commented 6 years ago

Thanks @PaulNK it give me some clue :)

And 1 more thing, i'm still confuse at... where i should put the (ItemID, Quantity, Amount, etc...) ? image

Thanks :)

PaulNK commented 6 years ago

I think the item list is just itemid[index], we only posted one item at a time so it looked like ?itemid[0]=8&qty[0]=1&.... https://partner.steamgames.com/doc/webapi/ISteamMicroTxn#InitTxn

keyserjaya commented 6 years ago

I see... Thanks :)

BTW i'm trying playfab SDK right now :D

iletai commented 4 years ago

I see... Thanks :)

BTW i'm trying playfab SDK right now :D

Could you help to share solution with iap in steamworks.net?

zaminFareed commented 4 years ago

if u found solution please let me know as well

jasielmacedo commented 3 years ago

Hey guys afters years implementing Steam IAP. I decided to create an repository trying to explain how to use it into a game. And I've created an example using Steamworks.net https://github.com/jasielmacedo/steam-microtransaction-api