protected Callback<MicroTxnAuthorizationResponse_t> m_MicroTxnAuthorizationResponse; private void Start() { if (SteamManager.Initialized) { m_MicroTxnAuthorizationResponse = Callback<MicroTxnAuthorizationResponse_t>.Create(OnMicroTxnAuthorizationResponse); Debug.Log("SteamUserID: " + SteamUser.GetSteamID()); Debug.Log("Language: " + SteamApps.GetCurrentGameLanguage()); } } private void OnMicroTxnAuthorizationResponse(MicroTxnAuthorizationResponse_t pCallback) { text.text = "HERE"; if (pCallback.m_bAuthorized == 1) { text.text += Environment.NewLine + "Authorized Payment"; Debug.Log("Authorized Payment"); ConfirmPurchase(pCallback.m_ulOrderID.ToString()); } else { text.text += Environment.NewLine + "Failed to authorize payment"; // Player didn't authorize the payment Debug.Log("Failed to authorize payment"); } } private void ConfirmPurchase(string orderId) { PlayFabClientAPI.ConfirmPurchase(new ConfirmPurchaseRequest() { OrderId = orderId }, result => { text.text += Environment.NewLine + "CONFIRM PURCHASE"; Debug.Log("CONFIRM PURCHASE"); }, error => { text.text += Environment.NewLine + "PURCHASE FAILED: " + error.ErrorMessage; Debug.Log("PURCHASE CONFIRM FAILED: " + error.ErrorMessage); }); }
I'm trying to purchase an item, the steam overlay pops up with the item name and price in it, clicking purchase closes the window but does nothing after that the MicroTxnAuthorizationResponse_t callback does not get called.
1. Steam is initialized
2. Callback is registered
3. SteamAPI.RunCallbacks(); is running in the Update()
* I have enabled Sandbox mode in the PlayFab settings (but even with it disabled and canceling the steam purchase windows it doesn't call MicroTxnAuthorizationResponse_t)
Any other ideas?