This repository was archived by the owner on Oct 17, 2025. It is now read-only.
Merged
Conversation
- Refactor requestPurchase to handle subscription replacement with platform-specific props - Use ProductRequest object in fetchProducts for consistency - Replace restorePurchases with getAvailablePurchases(null) - Disallow type=All for purchases to enforce InApp or Subs only
hyochan
added a commit
to hyochan/react-native-iap
that referenced
this pull request
Sep 29, 2025
…3039) Check if the subscription is `upgrade` and filter `obfuscatedProfileIdAndroid` field which is done in hyodotdev/openiap-google#13. ```kt val isUpgrade = !androidRequest.purchaseTokenAndroid.isNullOrEmpty() obfuscatedProfileIdAndroid = if (isUpgrade) null else androidRequest.obfuscatedProfileIdAndroid, ``` > Exact line: https://github.com/hyodotdev/openiap-google/blob/c7af9f04fbdeb42721315185d0e4ed3d8a056cfb/openiap/src/main/java/dev/hyo/openiap/OpenIapModule.kt#L309-L313 Add tests and example codes related to this. Resolve #3032 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Plan-change UI with upgrade/downgrade controls, current plan, expiry, auto-renew, and transaction display; added yearly subscription option. * **Documentation** * Simplified example links and note blocks for Purchase/Subscription/Available-Purchases/Offer-Code guides. * Updated API docs and guides to show useIAP invoked with onPurchaseSuccess/onPurchaseError callbacks (removing currentPurchase/currentPurchaseError examples). * **Tests** * Expanded subscription tests covering Android flows, ownership states, retries, connection transitions, modals, and logging. * **Chores** * Bumped a dependency patch version. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current PR introduce proper support for subscription plan changes by refactoring
requestPurchaseto use platform-specific props, switchingfetchProductsto aProductRequestobject, and replacingrestorePurchaseswithgetAvailablePurchases(null), while disallowingtype=Allfor purchases.Refactor
OpenIapStoreto use GraphQL types, fix handling ofeffectiveObfuscatedProfileIdduring plan changes, and update the example app to demonstrate subscription upgrade/downgrade scenarios.Resolve hyochan/react-native-iap#3032