0

我正在使用测试帐户在具有 Play 商店访问权限的 Android 模拟器中进行测试,因此不会收取任何实际费用。我可以购买产品和包,但无法使用UpgradeInfo 文档测试更改包。Play Store 可能有什么问题,或者我需要在某处进行其他配置吗?

当我选择要更改的包时,我看到以下内容,这些在我的日志中看起来都是正确的。找到了 SKU,并且Flutter purchase_flutter 包清楚地显示了此时一切顺利。

D/[Purchases] - DEBUG(25398): ℹ️ Vending Offerings from cache
D/[Purchases] - DEBUG(25398):  Product change started:  com.revenuecat.purchases.models.ProductDetails@1e0bf2c4  - offering: packages UpgradeInfo: UpgradeInfo(oldSku=package_3.99_monthly, prorationMode=1)
D/[Purchases] - DEBUG(25398): ℹ️ Querying Purchase with package_3.99_monthly and type SUBS
D/[Purchases] - DEBUG(25398): ℹ️ Checking if cache is stale AppInBackground false
D/[Purchases] - DEBUG(25398):  Found existing purchase for SKU: package_3.99_monthly
D/[Purchases] - DEBUG(25398):  Moving from old SKU package_3.99_monthly to sku package_39.95_yearly

但是,然后我在屏幕上看到了这个:

在此处输入图像描述

然后在单击确定后的日志中:

W/ProxyBillingActivity(25398): Activity finished with resultCode 0 and billing's responseCode: 2
W/BillingHelper(25398): Couldn't find purchase lists, trying to find single data.
W/BillingHelper(25398): Received a bad purchase data.
W/BillingHelper(25398): Couldn't find single purchase data as well.
W/BillingHelper(25398): Couldn't find purchase lists, trying to find single data.
W/BillingHelper(25398): Received a bad purchase data.
W/BillingHelper(25398): Couldn't find single purchase data as well.
E/[Purchases] - ERROR(25398): ‼️ BillingWrapper purchases failed to update: DebugMessage: . ErrorCode: SERVICE_UNAVAILABLE.null
E/[Purchases] - ERROR(25398): ‼️ There was a problem with the Play Store.
I/flutter (25398): PlatformException(2, There was a problem with the Play Store., {code: 2, message: There was a problem with the Play Store., readableErrorCode: StoreProblemError, readable_error_code: StoreProblemError, underlyingErrorMessage: Error updating purchases. DebugMessage: . ErrorCode: SERVICE_UNAVAILABLE., userCancelled: false}, null)

颤振代码:

await Purchases.purchasePackage(
  myProductList[index],
  upgradeInfo: UpgradeInfo(
    subscriptionTypeString ==
            monthlySubscriptionString
        ? yearlySubscriptionSKU
        : monthlySubscriptionSKU,
    prorationMode: ProrationMode
        .immediateWithTimeProration,
  ),
);
4

0 回答 0