Skip to main content

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();
}

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?