I am following the unity tutorial for using unity IAP, found here. So far, I have followed it and modified it to fit my own code. When I preview the game in the editor, it passes a "OnInitialized: PASS", but when I actually try to click the IAP button, I get an error in the console that says "Purchase failed because purchasing was not initialized correctly". It then says the failure reason is "PurchasingUnavailable".
I have tried to use the default code from the unity website and just set my button to that code, but even then it still fails for the same reason.
My code is just an adapted version of this with variable names and ID's changed to fit my program, but if you want to see a specific function, please let me know, because to my eyes it looks almost the same with just different variable names, but its possible that im missing something important.
At one point i was able to change the IsInitialized() function to return true, which would sometimes make the unity "fake store" to pop up when i clicked the button, but now it doesnt even do that.