如何处理免费试用订阅:Android订阅:

时间:2019-08-04 01:23:23

标签: android in-app-subscription android-inapp-purchase

我研究了有关购买订阅的回复,并发现了一些有关处理免费试用订阅的问题。

我目前正在沙盒环境中使用测试卡。在进行7天免费试用测试我的订阅时,我发现Purchases.subscriptions触发的响应中没有任何参数:请获取归因于P7D(免费试用参数)的密钥,请告诉我处理免费试用案?

第二,按照Google订阅的测试时间表,用户会在5分钟后续约。因此,请您告诉我如何模拟以下测试用例:

  1. 5分钟后用户免费试用退订
  2. 5分钟前用户免费试用退订
  3. 5分钟后用户免费试用退订并恢复
  4. 用户免费试用5分钟后退订并恢复

https://developer.android.com/google/play/billing/billing_reference.html#getSkuDetails

{
  "kind": "androidpublisher#subscriptionPurchase",
  "startTimeMillis": long,
  "expiryTimeMillis": long,
  "autoResumeTimeMillis": long,
  "autoRenewing": boolean,
  "priceCurrencyCode": string,
  "priceAmountMicros": long,
  "introductoryPriceInfo": {
    "introductoryPriceCurrencyCode": string,
    "introductoryPriceAmountMicros": long,
    "introductoryPricePeriod": string,
    "introductoryPriceCycles": integer
  },
  "countryCode": string,
  "developerPayload": string,
  "paymentState": integer,
  "cancelReason": integer,
  "userCancellationTimeMillis": long,
  "cancelSurveyResult": {
    "cancelSurveyReason": integer,
    "userInputCancelReason": string
  },
  "orderId": string,
  "linkedPurchaseToken": string,
  "purchaseType": integer,
  "priceChange": {
    "newPrice": {
      "priceMicros": string,
      "currency": string
    },
    "state": integer
  },
  "profileName": string,
  "emailAddress": string,
  "givenName": string,
  "familyName": string,
  "profileId": string,
  "acknowledgementState": integer
}

0 个答案:

没有答案