0

I’m testing in Android emulator with Play Store access using a testing account so no actual money is being charged. I am able to purchase products and packages, but not able to test changing packages using the UpgradeInfo docs. What could the issue be with Play Store or is there some other configuration I need to make somewhere?

When I select the package to change to I see the following, which all looks correct in my logs. The SKU is found and the Flutter purchases_flutter package is clearly showing everything good to go at this point.

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

However, I then see this on the screen:

enter image description here

And then in the logs after clicking OK:

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)

Flutter code:

await Purchases.purchasePackage(
  myProductList[index],
  upgradeInfo: UpgradeInfo(
    subscriptionTypeString ==
            monthlySubscriptionString
        ? yearlySubscriptionSKU
        : monthlySubscriptionSKU,
    prorationMode: ProrationMode
        .immediateWithTimeProration,
  ),
);
Zelf
  • 1,723
  • 2
  • 23
  • 40
  • Have you tried other proration modes? Do you get the same result? – Cesar Nov 18 '21 at 21:25
  • RevenueCat currently only supports IMMEDIATE_WITH_TIME_PRORATION. Without any code changes this suddenly started working. Not sure why... – Zelf Nov 19 '21 at 15:12

0 Answers0