我无法找到用户订阅的项目的移动操作系统。我要做的是只允许订阅升级/降级到相同的操作系统。(不允许将每月订阅从 ios 更改为从 android 订阅)
为了解释当前的设置,我将相同的 ID 映射到一个产品。
[offering: monthly]
ios: com.blah.products.monthly
android: com.blah.products.monthly
但是,这种方法似乎无法知道用户订阅了哪个操作系统订阅项。
响应数据:
{
"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