This repository was archived by the owner on Oct 16, 2025. It is now read-only.
Commit 2081fdd
authored
fix: corrected transactionReason when a previously cancelled subscription was purchased again (#21)
Hello, I discovered that `transactionReason` was incorrectly set to
`RENEW` instead of `PURCHASE`, for iOS purchases that had been
previously cancelled and then purchased again in the
`purchaseUpdatedListener` callback.
This fix restores the previous logic for determining
`transactionReason`, consistent with the behavior in react-native-iap
versions 12.x.x and 13.x.x and real App Store data encoded in
`jsonRepresentation`.
hyochan/react-native-iap#3056
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved accuracy in detecting subscription renewals, ensuring renewal
events are correctly identified.
* Reduces instances where subscriptions might appear incorrectly as new
purchases or non-renewals.
* Leads to more reliable subscription status, history, and related
notifications for users.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent c146f80 commit 2081fdd
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
336 | 340 | | |
337 | 341 | | |
338 | 342 | | |
| |||
358 | 362 | | |
359 | 363 | | |
360 | 364 | | |
361 | | - | |
362 | | - | |
363 | | - | |
| 365 | + | |
| 366 | + | |
364 | 367 | | |
365 | 368 | | |
366 | 369 | | |
| |||
0 commit comments