我无法找到用户订阅的商品的移动操作系统。我正在尝试做的是仅允许将订阅升级/降级到相同的操作系统。 (不允许将每月订阅从ios更改为android的年度订阅)
为解释当前设置,我将相同的ID映射到一个产品上。
[offering: monthly]
ios: com.blah.products.monthly
android: com.blah.products.monthly
但是,这种方法似乎无法知道用户已订阅了哪个OS订阅项。
响应数据:
{
"allExpirationDates": {
"com.blah.products.monthly": "2019-04-25T05:07:02Z",
"com.blah.products.yearly": "2019-04-25T08:07:02Z"
},
"activeEntitlements": [
"premium"
],
"activeSubscriptions": [
"com.blah.products.yearly"
],
"expirationsForActiveEntitlements": {
"premium": "2019-04-25T08:07:02Z"
},
"latestExpirationDate": "2019-04-25T08:07:02Z",
"purchaseDatesForActiveEntitlements": {
"premium": "2019-04-25T07:07:02Z"
},
"allPurchasedProductIdentifiers": [
"com.blah.products.monthly",
"com.blah.products.yearly"
]
}
要实现我的目标,我是否需要改变策略,将不同的身份映射到这样的产品上?
[offering: monthly]
ios: com.something.ios.monthly
android: com.something.android.monthly
答案 0 :(得分:1)
尚未在API或SDK中返回操作系统。一种解决方法是在App Store Connect与Play Billing中更改产品ID,这样您就可以通过查看产品ID来了解向用户收取费用的地方。
对此的真正解决方法是在公共路线图的“计划中”阶段,该阶段将在GET /subscribers
端点:https://trello.com/c/ialNFe86/50-add-additional-subscription-details-to-api