2013-12-13 81 views
0

我希望在我的Windows Phone 8应用中购买应用。我发布了我的应用程序作为测试版,还有3款产品可以购买这款应用程序。我从Visual Studio 2013中的开发人员中心复制了我的ID。现在我想测试它。 问题是,当我点击这个按钮:Windows Phone 8应用内购买

private async void buttonInfo_Click(object sender, RoutedEventArgs e) 
    { 
     StringBuilder sb = new StringBuilder(); 

     var listing = await CurrentApp.LoadListingInformationAsync(); 
     foreach (var product in listing.ProductListings) 
     { 
      sb.AppendLine(string.Format("{0}, {1}, {2},{3}, {4}", 
       product.Key, 
       product.Value.Name, 
       product.Value.FormattedPrice, 
       product.Value.ProductType, 
       product.Value.Description)); 
     } 

     MessageBox.Show(sb.ToString(), "List all products", MessageBoxButton.OK); 
    } 

然后MessageBox中显示,但没有内容。为什么不?

回答

0

有人定了日子之后的结果。代码没有变化。 xD也许服务器还没有准备好

0

你可以在它刚刚调试..确保

等待CurrentApp.LoadListingInformationAsync()

返回你所期望

+1

告诉别人只是“调试它”不是很有帮助,是吗? – Joeytje50

相关问题