我正在尝试编写代码,以模拟Windows 8(商店)应用程序的购买过程。
这段代码相当简单,并使用了Windows API:
var result = await CurrentAppSimulator.RequestProductPurchaseAsync("product", true);
// this is still false...
var active = CurrentAppSimulator.LicenseInformation.ProductLicenses["product"].IsActive;
第一次调用会打开对话框,允许我模拟购买的返回代码。
即使我选择了S_OK,下一行仍然检查许可证是否激活并返回false。
这里出了什么问题?