Skip to main content
Question

User issue with Flutter Revenuecat providing free trial with promo code

  • February 22, 2023
  • 1 reply
  • 117 views

Forum|alt.badge.img+4

I have promo codes that I created on google play for my user. With this code, the user can use 3 months free of charge. When the user logs in on another device, I can't get the information that the user is in the trial period. Therefore, the purchase screen appears again. how can i solve this. I understand from the code below that the user is a premium member.

 

Future updatePurchaseStatus() async {

final purchaserInfo = await Purchases.getCustomerInfo();

final entitlements = purchaserInfo.entitlements.active.values.toList();

_entitlement =
    entitlements.isEmpty ? Entitlement.free : Entitlement.premium;

if (entitlements.isNotEmpty) {
  _entitlementInfo = purchaserInfo.entitlements.active.values.last;
}
notifyListeners();
}
This post has been closed for comments

1 reply

Forum|alt.badge.img+8
  • RevenueCat Staff
  • 579 replies
  • March 3, 2023

final entitlements = purchaserInfo.entitlements.active.values.toList();

On the device, what is being returned here? I suggest you print this out to see that you are properly getting their entitlement and that it isn’t empty or an incorrect value.

 

The next thing to check is what the receipt from Google looks like. I can do this for you, but can you open a support ticket about this issue as sensitive information shouldn’t be shared here?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings