【问题标题】:Upgrade purchase licences to iap purchases将购买许可证升级为 iap 购买
【发布时间】:2019-06-03 15:08:45
【问题描述】:

我想将我的活动 Windows 应用商店应用程序从带有购买选项的试用版(试用结束后)更改为带有应用内购买的免费版本(到完整版)。我想免费为已经购买该应用的用户提供应用内购买。我该怎么做?

【问题讨论】:

    标签: c# in-app-purchase windows-store-apps desktop-bridge


    【解决方案1】:

    要在桌面桥应用中实现应用内购买,您应该使用 Windows.Services.Store 命名空间。如果要验证给定客户是否购买了产品,可以使用Microsoft Store collection REST API 中的query for products 方法。此方法的返回数据确认指定客户是否拥有给定产品的权利,并为用户获取产品的交易提供数据。 (来自文档:Receipts for in-app purchases

    步骤:

    1.Configure a Web application in Azure AD.

    2.Associate your Azure AD client ID with your application in the Windows Dev Center dashboard.

    3.在您的服务中,create Azure AD access tokens 代表您的发布者身份。

    4.在您的 Windows 应用程序的客户端代码中,create a Windows Store ID key 代表当前用户的身份,并将 Windows 应用商店 ID 密钥传递回您的服务。

    5.获得所需的 Azure AD 访问令牌和 Windows Store ID 密钥后,call the Windows Store collection API or purchase API from your service

    6.使用参数(skuType,startDate..)分析用户之前是否购买过你的应用。

    【讨论】:

      猜你喜欢
      • 2022-01-09
      • 2022-06-14
      • 1970-01-01
      • 2019-11-12
      • 2013-06-11
      • 2014-07-11
      • 1970-01-01
      • 1970-01-01
      • 2011-05-15
      相关资源
      最近更新 更多