首页 文章

在Windows 10中恢复/验证应用内购买

提问于
浏览
1

任何人都可以指向我的资源,或向我解释如何检查用户已经在Windows UWP应用程序中进行的购买 . 我的应用程序没有任何可以识别个人用户的信息 . 我查看了文档,但在检索已购买商品的收据时找不到任何内容 .

我可以通知我的服务器任何成功的购买并识别用户的设备 . 但是,同一个用户将无法在其他设备上访问他/她的IAP . 我需要的是一种方法,它检索当前登录到Windows应用商店的用户的所有收据 .

谢谢!

1 回答

  • 2

    毕竟我在文档中找到了它(对于模拟器):

    LicenseInformation licenseInformation = CurrentAppSimulator.LicenseInformation;
    
    // get the license info for one of the app's in-app offers
    ProductLicense inAppOfferLicense = 
        licenseInformation.ProductLicenses["MyFavoriteInAppOffer"];
    
    // get the expiration date of this in-app offer
    DateTimeOffset expirationDate = inAppOfferLicense.ExpirationDate;
    

相关问题