You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the receipt validator to verify if a user has an active subscription. When the subscription is active , the validator is very quick. When it is not , it never resolves.
export async function validateSubscription(email: string, purchases: any[]): number {
const sortedPurchases = sortPurchases(purchases);
const validationData = await receiptValidator(sortedPurchases[0].transactionReceipt);
if (validationData.auto_renew_status === 1) {
return +validationData.receipt.expires_date;
}
return 0;
}
The text was updated successfully, but these errors were encountered:
I think you may access the data in a wrong way.
The expire_date path should be validationData.latest_receipt_info[latestInfoIndex].expires_date_ms. (or .expires_date for Date format).
I use the receipt validator to verify if a user has an active subscription. When the subscription is active , the validator is very quick. When it is not , it never resolves.
The text was updated successfully, but these errors were encountered: