我在WP8 SL上发现IAP的奇怪行为,一旦从IAP任务完成购买,await请求之后的代码根本没有运行,它以某种方式跳过它,我有一个try-catch但是没有抛出异常。如果你试一试,我将不胜感激。如果您需要更多信息,请告诉我。
private async void Button_Click_1(object sender, RoutedEventArgs e)
{
var listing2 = await CurrentApp.LoadListingInformationAsync();
var noads = listing2.ProductListings.FirstOrDefault(p => p.Value.ProductId == "RemoveAds" && p.Value.ProductType == ProductType.Durable);
try
{
await CurrentApp.RequestProductPurchaseAsync(noads.Value.ProductId, false);
//nothing happen from here
MessageBox.Show("Done");
}
catch (Exception ex)
{
MessageBox.Show(ex.InnerException.Message);
}
}