I just finished my implementation of RevenueCat in my Flutter app. People can buy premium version to turn off ads. They pay once and then they will never see the ads.
I just tried it with the test card. And the purchase shows up under Customers in the Play Console - but not in RevenueCat. I tried refunding in Play Console and clicked the revoke entitlement box. But seems like no mate what I do, I still have the entitlement in the app.
I purchase like this:
final customerInfo = await Purchases.purchaseStoreProduct(widget.storeProduct);
final adsFreeEntitlement = customerInfo.entitlements.alla'remove_ads'];
if (adsFreeEntitlement != null && adsFreeEntitlement.isActive) {
await _checkPremiumStatus();
}
And I have a provider that checks the premium status like this:
Future<void> checkPremiumStatus() async {
try {
final customerInfo = await Purchases.getCustomerInfo();
final entitlements = customerInfo.entitlements.active.values;
_hasPremium = entitlements.any((entitlement) => entitlement.identifier == 'remove_ads');
notifyListeners();
} catch (error) {
debugPrint('Error checking premium status: $error');
_hasPremium = false;
notifyListeners();
}
}
Does this mean that if I refund any of my customers they will still have premium? How do I sync this?