question

zipswich avatar image
0 Votes"
zipswich asked ·

Windows.ApplicationModel.Store.CurrentAppSimulator.RequestProductPurchaseAsync() no longer works

The following code used to work:

 Windows.ApplicationModel.Store.PurchaseResults pr = await Windows.ApplicationModel.Store.CurrentAppSimulator.RequestProductPurchaseAsync(_ud.sInAppTokenName);

It no longer shows a window. Instead, it returns immediately with
pr.Status == Windows.ApplicationModel.Store.ProductPurchaseStatus.NotPurchased

Both the targe and min versions of the UWP app are 18362. Could anyone shed some light on this?

windows-uwp
· 7
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

According to the document: CurrentAppSimulator.RequestProductPurchaseAsync Method, the method should show the UI for purchasing. Is the product ID that you want to purchase valid? Does the WindowsStoreProxy.xml that is used by CurrentAppSimulator contain the requested product? Could you please confirm this first?



0 Votes 0 ·

Thank you for trying to help.
This is not a new app. The app including its IAP has been working for quite a few years. I had not tested the simulator for a while.
Yes, WindowsStoreProxy.xml modified from the sample has the requested product.
This is the case for two apps that I have tested.


0 Votes 0 ·

Not sure why the API shows such behavior if you had double-checked the requested product in the WindowsStoreProxy.xml. Your app is running a device with build 18362, right? If you change the min version to lower and run your app in a lower version. Will this happen again?

Another thing I have to say is that APIs from Windows.ApplicationModel.Store Namespace is no longer updated. And it is recommended to use APIs from Windows.Services.Store Namespace if your app targets Windows 10 Anniversary Edition (10.0; Build 14393) or a later release.


0 Votes 0 ·
Show more comments

0 Answers