-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listening for event: MicroTxnAuthorizationResponse_t #12
Comments
Update: Stupid error on my part. I was failing to call Steam.onEnterFrame anywhere in my main program. In addition, this extension makes use of a 'report' function to trace output, with a very similar format to the output displayed by the actual event broadcasting function. Again, leading me to believe that the event system was functioning without the need to call Steam.onEnterFrame |
sir i am also stuck in game purchase steam can you please help me public class website : MonoBehaviour CSteamID j;
} |
Working on a system where I need to listen for the "MicroTxnAuthorizationResponse_t" callback. (Briefly covered here: https://partner.steamgames.com/documentation/MicroTxn#InGamePurchasing)
SteamWrap is already set up to listen for some events, so I attempted to piggyback the current system. I started by defining a new event in SteamWrap.cpp
static const char* kEventTypeOnMicroTxnAuthorizationResponse = "MicroTxnAuthorizationResponse";
Then I updated CallbackHandler with the following:
STEAM_CALLBACK( CallbackHandler, OnMicroTxnAuthorizationResponse, MicroTxnAuthorizationResponse_t , m_CallbackMicroTxnAuthorizationResponse );
and
m_CallbackMicroTxnAuthorizationResponse( this, &CallbackHandler::OnMicroTxnAuthorizationResponse )
Then I added the actual callback function:
For now the event just returns true for testing. Lastly I updated Steam.hx to recognize the event inside of steamWrap_onEvent
There appear to be no errors when rebuilding the extension with build.bat. However, no event is fired when I attempt to authorize a purchase in-game. Will keep digging, but not sure where to go next. Is there another step for adding an event that I have missed?
My only guess so far is that something also needs to show up in Steam.cpp. When searching for the other event names it seems they show up in that file a few times, but that file also seems like it was the result of some kind of build or auto-generation process. I thought rebuilding the extension might fix that, but I was wrong.
The text was updated successfully, but these errors were encountered: