How do i make subscription in react native in app purchase library. It seems the library has been updated and my code only returns available subscriptions with a subscriptionOfferDetails property. I don't see the base subscription details and prices. This is my code:
const fetchSubscriptions = async () => {
try {
const response = await getSubscriptions({ skus: myProducts });
setSubscriptions(response);
console.log(response);
const isPageUnlocked = response.length > 0;
if (isPageUnlocked) {
// Perform actions to unlock the page
Alert.alert('Success', 'Page unlocked!');
setShowads(false);
} else {
// Show message indicating no available purchases
setShowads(true);
Alert.alert('Error', 'My dear, No available subscription to unlock the page.');
}
} catch (error) {
console.log('Error fetching subscriptions: ', error);
}
};