Hello RC team,
We're encountering a problem on Android. When calling getCustomerInfo(), the result shows that the user doesn't have any active subscriptions. However, when attempting to subscribe, the response indicates that we are already subscribed, resulting in rejection.
Also, one user is subscribed multiple times on the same product in Dashboard even if we created unique id in configuration
Feels like, Dashboard and getCustomerInfo are not in sync.
This is the setup.
If you need some additional information, please, let me know.
const aplleApiKey =REVENUE_CAT_APPLE_API_KEY;
const androidApiKey = REVENUE_CAT_ANDROID_API_KEY;
const uniqueId = UNIQUE_ID
useEffect(() => {
const setup = async () => {
if (Platform.OS === "ios") {
Purchases.configure({
apiKey: aplleApiKey,
appUserID: uniqueId,
});
} else if (Platform.OS === "android") {
Purchases.configure({
apiKey: androidApiKey,
appUserID: uniqueId,
});
}
};
setup().catch(console.log);
}, >]);
function for checking user’s subscrition which is called always after configuring Purchases.
const checkIfUserIsSubscribed = async () => {
try {
const customerInfo = await Purchases.getCustomerInfo();
console.log("INFO", customerInfo);
……..rest of the code
} catch (error) {
console.log(error);
}
};