Current app is Expo for React Native which is ejected to the bare workflow.
Using expo-in-app-purchases
for IAP.
How can you tell if a subscription is active or not?
When I grab the purchase history via:
const { results } = InAppPurchases.connectAsync();
if you look at the results, a result returns the following fields:
- purchaseTime
- transactionReceipt
- orderId
- productId
- acknowledged
- originalPurchaseTime
- originalOrderId
- purchaseState
Now purchaseState is always an integer. I'm mostly seeing 3
(I think I've seen a 1
one time...) Not sure this actually tells me anything valuable as they are all 3
s
Short of manually taking the most recent purchase and adding 30 days (this is a monthly subscription) then seeing if this date is in the past, I'm not sure how to find if current user has active subscription. Help!
Thanks in advance!