2013-12-13 86 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

相關問題