philippj / SteamworksPy

A working Python API system for Valve's Steamworks.
MIT License
212 stars 39 forks source link

It is possible to do micro transactions with your current code ? #71

Closed ThomasBonnelye closed 2 years ago

ThomasBonnelye commented 2 years ago

Hello,

We would like to implement micro transactions in our game developed in Python (with Pygame). I don't have the impression that it is possible to do it with your module. Could you please tell us how to "convert" the micro transaction interface of the steam API to work in Python.

(Documentation link : https://partner.steamgames.com/doc/features/microtransactions/implementation)

Thank you in advance. We would be happy to contribute to this in your repository.

philippj commented 2 years ago

The basic loading of Steamworks and getting the described parameters is possible with this library.

Microtransactions primarily require a server side implementation, so you have to still make your own authentication, and transaction processing using the Steam Partner Web API.

ThomasBonnelye commented 2 years ago

Hello,

It is mentionned that server side needs to be able to get a callback ISteamUser::MicroTxnAuthorizationResponseçt and to use the methods ISteamMicroTxn/FinalizeTxn, is it possible with your code, and if not, could you give us hints towards achieving this goal ?

Thanks again for the answer

philippj commented 2 years ago

ISteamUser::MicroTxnAuthorizationResponse_t is not currently implemented, feel free to create a PR for it. An example would be https://github.com/philippj/SteamworksPy/blob/master/library/SteamworksPy.cpp#L94.

ISteamMicroTxn/FinalizeTxn is a Partner Web API call and must be called from your secure server.

ThomasBonnelye commented 2 years ago

Hello,

We have looked at your code and the SDK official files. Unfortunately, we were unable to understand how to reproduice the targeted callbacks (for the Workshop #L94). We think it is not that hard to implement but without any knowledge, we are at a complete lost. In the the SDK only 2 files seems to mention the callback and we can't figure out how to translate it in Python like your program does. sdk-screen

Would you consider giving it a try, or giving us an advanced explanation on the way to go ?

Thanks for your response, any help would be gladly appreciated ! ;D

philippj commented 2 years ago

I have implemented the interface and made all necessary adjustments. However, I am not able to test it since I do no longer have a Steam app. So give this a test and please report back.

ThomasBonnelye commented 2 years ago

Hello ! Thank you very much for your help. We will implement this and get back to you to let you know about the success or problems with your code, so that we can contribute to the repository.

ThomasBonnelye commented 2 years ago

Hello,

Your code worked fine (no changes were necessary).

Thanks again for this modification!