-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
- [✅] I have updated Purchases SDK to the latest version
- [✅] I have read the Contribution Guidelines
- [✅] I have searched the Community
- [✅] I have read docs.revenuecat.com
- [✅] I have searched for existing Github issues
Describe the bug
I am currently in the testing phase and facing an issue where, after a successful payment, the result returned is PAYWALL_RESULT.CANCELLED
instead of PAYWALL_RESULT.PURCHASED
. I have tried multiple times, and I am sure the payment was successful. I can also see the successful subscription in my account.
Here is the code I am using:
const handlePaywallClick = async () => {
try {
const result = await RevenueCatUI.presentPaywall();
console.log('Paywall result:', result);
switch (result) {
case PAYWALL_RESULT.PURCHASED:
console.log('User completed the purchase');
// Handle post-purchase actions, such as unlocking features
break;
case PAYWALL_RESULT.RESTORED:
console.log('User restored the purchase');
// Handle purchase restoration
break;
case PAYWALL_RESULT.CANCELLED:
console.log('User closed the paywall');
// Handle user closing the paywall
break;
}
} catch (error) {
console.error('Error with the paywall:', error);
}
};
Could you please advise on what I should do to resolve this?
Thank you.
- Environment
- Platform: IOS
- SDK version:8.8.0
- OS version:18.2
- Xcode/Android Studio version: 16.2
- React Native version:0.76.7
- SDK installation (CocoaPods + version or manual): CocoaPods
- How widespread is the issue. Percentage of devices affected.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working