Hi,
I am currently working on Microtransactions with Steam. The serverside Part of the whole transaction process is already working and currently i need to implement the SteamCallback OnMicroTxnAuthorizationResponse
after I click “authorize” in my SteamOverlay. However the Callback is not working at the Moment, this is how I got so far:
Header file:
#include "steam/steam_api.h"
#include "steam/isteamuser.h"
/**
* Controller UCLASS
*/
class SteamCallbacks{
public:
SteamCallbacks();
STEAM_CALLBACK(SteamCallbacks, OnMicroTxnAuthorizationResponse, MicroTxnAuthorizationResponse_t, m_MicroTxnAuthorizationResponse);
};
CPP File:
SteamCallbacks::SteamCallbacks()
: m_MicroTxnAuthorizationResponse(this, &SteamCallbacks::OnMicroTxnAuthorizationResponse)
{};
void SteamCallbacks::OnMicroTxnAuthorizationResponse(MicroTxnAuthorizationResponse_t *pCallback){
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("CALLBACK RECEIVED"));
}
This Class is in a PlayerController which is parent to a BlueprintController which is DefaultController in a shop only Gamemode. In addition im calling SteamAPI_RunCallbacks()
every frame from a blueprint library.
I do not know what I am missing to make the callback work and neither the Steamworks Documentation nor the example project are helpfull.
I hope someone knows how to fix my issue.
Kind Regards
Alex