react-native-iap 15.5.2 → 15.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1509,8 +1509,12 @@ class HybridRnIap : HybridRnIapSpec() {
1509
1509
  },
1510
1510
  isValid = item.isValid,
1511
1511
  productId = item.productId?.let { Variant_NullType_String.Second(it) },
1512
- state = mapIapkitPurchaseState(item.state.name),
1513
- store = mapIapkitStore(item.store.name)
1512
+ // Use rawValue ("pending-acknowledgment"), not the Kotlin
1513
+ // enum constant name ("PendingAcknowledgment") — the
1514
+ // mappers match separator-delimited spellings, so
1515
+ // multi-word states would otherwise degrade to UNKNOWN.
1516
+ state = mapIapkitPurchaseState(item.state.rawValue),
1517
+ store = mapIapkitStore(item.store.rawValue)
1514
1518
  )
1515
1519
  }
1516
1520
 
@@ -1525,7 +1529,7 @@ class HybridRnIap : HybridRnIapSpec() {
1525
1529
  NitroVerifyPurchaseWithProviderResult(
1526
1530
  iapkit = nitroIapkitResult?.let { Variant_NullType_NitroVerifyPurchaseWithIapkitResult.Second(it) },
1527
1531
  errors = nitroErrors?.let { Variant_NullType_Array_NitroVerifyPurchaseWithProviderError_.Second(it) },
1528
- provider = mapPurchaseVerificationProvider(result.provider.name)
1532
+ provider = mapPurchaseVerificationProvider(result.provider.rawValue)
1529
1533
  )
1530
1534
  } catch (e: Exception) {
1531
1535
  RnIapLog.failure("verifyPurchaseWithProvider", e)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-iap",
3
- "version": "15.5.2",
3
+ "version": "15.5.3",
4
4
  "description": "React Native In-App Purchases module for iOS and Android using Nitro",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",