IAP Fails to Initialize on UWP

Hello,

we believe we are hitting the same issue. Any news on this? If I understand this thread correctly, UWP IAPs are currently not working at all from Unity? Or are there any workarounds I missed, other than implementing it ourselves?

Thanks in advance

That is correct, we are still looking into it.

I need this too, been waiting almost a year now to publish my app due to bugs in unity.
Is there any solution in sight?

You mean just on the Windows store, correct? This is still on our radar for an upcoming release.

Well yeah, that the IAP system works on windows (not just windows, but also).
It sounds very vague… how long would you guess?
This seems like a huge bug, at least for me I can’t publish my update (trying to work around it with a different plugin but it is very hacky).

Is there any way around this bug, to use IAP on windows? (going back also doesn’t really work because there are other app-breaking bugs in older versions (like toggles and input fields not working correctly on windows)).

There is no work around that I am familiar with, otherwise we would naturally share here.

@wouter_vugt I think you’re taking that multiplatform ideal of Unity too literally :wink: We’ve decided to drop support for both Windows Store and Facebook because there were too many issues here and there either blocking releases on other platforms or making it too much effort to work around. Now that we’re settled on iOS and Android it’s much easier as these platforms are fully supported.

But as for a workaround for Windows Store IAP, here’s a plugin that we’ve been considering. Haven’t used it, but it looked solid:

We ended up making our own implementation that resembles the Unity Purchaser. It’s a bit of a hassle but definitely doable. If you choose to take this path, make sure you don’t mix different Microsoft namespaces as explained here: https://docs.microsoft.com/en-us/windows/uwp/monetize/in-app-purchases-and-trials

haha yeah guess so, but they told me before Iap was supported on windows, so that was what I was going with.
I think unity is pretty buggy in general, which I think is a shame, even just on ios and android there are enough things that break with each new release in my experience (especially when an app gets more complicated).
Regardless I still like it in general…

I am going to try wsa-native, problem is I rely on unity IAP heavily for lots of internal calls, so I would need to hack around that, which is very ugly, but well… hopefully this works (windows iap used to work in the past btw)

I think either Windows Store is supported or it’s not supported. But Unity saying it’s supported but not fixing a bug that makes it basically unusable for the better part of a year is not acceptable.

We also ended up implementing Windows Store IAPs on our own instead of using the Unity API.

1 Like

Sorry for the delay. We have confirmed that the issues look to be configuration related and do not require an IAP update. Basically you need to make sure your app and products are made public. Testers still need the key to install. The steps we followed successfully are here: In-app purchases and trials - Microsoft Store | Microsoft Learn

That is not true. My app is already published and even then I get this…

Can you elaborate? Your published app was working at one point, but then stopped? If you didn’t follow the mentioned directions, an published app would still behave similarly.

Yes, I published a version of the app a year ago, using a different IAP version, which worked fine.
Now using this version, but the same code, it does not work, keeps polling for products (works fine on other platform).
Have given up on the windows store update for a few months, am now going to try reinstalling the previous version of unity IAP which did work to see if that fixes it.

1 Like

No have the same problem using an older version of IAP…

If it was working previously, that may imply a change on the Microsoft Store.

Well maybe…
Using the asset available on the unity store, it does retrieve and find my add-ons…
So I would reason that it has to do with unity-iap right?

But my app is pretty intertwined with unity iap plugin, so to set it up using anything else would take too much time (based on revenue on the windows app store).

But you said it worked on your end? what version do you use?
I have simply build the app, associated it with the app in the store and then run… I keep getting the ‘poll for products’ and then the ‘building full product list with existing products’ one after another…

Edit:
Now I have turned off the mocking and it seems to work…
However this seems kinda shady still… do you have any idea why this is?
I think it should be viable for update now… but since I don’t understand why it is working now I am still a little hesitant, what do you think?

btw this is with an older version of unity-iap…

Sorry, I don’t follow. In your case, my understanding is that originally your app worked on Windows Store. When did this change, and stop working? What do you mean by mocking? It has always worked in our testing, but given the above prerequisite advice.

with mocking I mean using the test configuration (useMockBillingSystem).
The problem is definitely not the configuration, the configuration on microsoft’s side (since it does work now, with nothing changed).
And like I said wsa-native (asset plugin) would get all the available add ons as well.
The reason it works now, at least I think, is because I switched to an older IAP version…

So again the problem, as far as I can tell, must be somewhere in an update with unity IAP.
Weird thing is that it works for you, but not for me or anyone else who reported here.
Which version of unity and which version of unity IAP did you use?

I suspect it was due the fake store setup that you had, it wouldn’t have worked previously either with that setting. I’m not familiar with wsa-native, I’m glad it’s working for you now. I wouldn’t recommend changing anything if it’s working now.