IAP不适用于Win10Mobile的UWP应用程序

问题描述:

我开发了一个包含IAP的免费UWP应用程序。IAP不适用于Win10Mobile的UWP应用程序

我为Windows 10 Mobile开发了这个应用程序。我发布了一个名为customBackground的商店的IAP,并将我的应用以及IAP发布到商店。

在他们两人都发布后,我从商店下载了我发布的应用程序并尝试购买IAP。

但是,它返回了一个系统弹出窗口,显示“这个应用内商品不再适用于MY-APP-NAME”。我不知道为什么会发生这种情况。

有问题:

  1. 当我使用CurrentAppSimulator类,它不弹出我的手机或模拟器上购买状态选择正试图在调试模式下在Visual Studio中,但它会弹出在桌面版上。它只读取WindowsStoreProxy.xml中的存储状态。

  2. 我也试着使用在调试/释放模式CurrentApp类IAP公布后,但没有运气,它返回相同的错误店里版本。

  3. Package.appxmanifest中的Internet权限已启用。

下面的代码在我的商店发布的应用程序:

private async void buy_Click(object sender, RoutedEventArgs e) 
    { 
     LicenseInformation licenseInformation = CurrentApp.LicenseInformation; 
     if (!licenseInformation.ProductLicenses["customBackground"].IsActive) 
     { 
      Debug.WriteLine("Buying this feature..."); 
      try 
      { 
       await CurrentApp.RequestProductPurchaseAsync("customBackground"); 
       if (licenseInformation.ProductLicenses["customBackground"].IsActive) 
       { 
        var purchaseStat = LocalizedStrings.GetString(LocalizedStringEnum.havePurchased); 
        var b = new MessageDialog(purchaseStat); 
        b.ShowAsync(); 
        Debug.WriteLine("You bought this feature."); 
        isIAPValid = true; 
       } 
       else 
       { 
        var purchaseStat = LocalizedStrings.GetString(LocalizedStringEnum.notPurchased); 
        var b = new MessageDialog(purchaseStat); 
        b.ShowAsync(); 
        Debug.WriteLine("this feature was not purchased."); 

       } 
      } 
      catch (Exception) 
      { 
       var purchaseStat = LocalizedStrings.GetString(LocalizedStringEnum.purchaseFailed); 
       var b = new MessageDialog(purchaseStat); 
       b.ShowAsync(); 
       Debug.WriteLine("Unable to buy this feature."); 
      } 
     } 
     else 
     { 
      var purchaseStat = LocalizedStrings.GetString(LocalizedStringEnum.alreadyOwned); 
      var b = new MessageDialog(purchaseStat); 
      b.ShowAsync(); 
      Debug.WriteLine("You already own this feature."); 
      isIAPValid = true; 

     } 
    } 

谢谢!

+0

我有同样的问题。你能解决它吗?也许这只是在发布应用程序后才暂时,在等待一段时间后一切都会好起来? – tipa

+0

是的,这是暂时的。 – oscarxvita

后来过了一天,我发现我的iap正在工作。 似乎是一个暂时的问题,微软确实需要改进他们的商店系统。