After creating my app using Expo and integrating Revenuecat for payments, I encountered an issue while testing it. Whenever I try to subscribe, the purchase popup keeps reappearing in Sandbox mode even after clicking 'Done'. Despite entering valid sandbox user details, there is no record of the subscription in my Revenuecat account.
I am new to Sandbox testing and am using iOS simulator (17). I have searched online for a solution but haven't found anything helpful yet. The code does not seem to progress beyond validation, as the console logs are not showing up after calling the purchase function:
const subscribe = async(item) => {
try {
const {purchaserInfo} = await Purchases.purchasePackage(item)
console.log('purchase info: ', purchaserInfo)
const purchase = await Purchases.getCustomerInfo()
console.log('purchase: ', purchase)
if(typeof purchase.entitlements.active['pro'] !== 'undefined') {
await navigation.navigate('Account')
}
} catch (error) {
console.log(error)
}
}
My expectation is that the purchasing process should proceed smoothly, register a test user on the Revenuecat dashboard, display the console results, and then navigate to the designated page.