@umituz/react-native-subscription 2.22.0 → 2.22.2
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-subscription",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.2",
|
|
4
4
|
"description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -62,6 +62,7 @@ export async function handlePurchase(
|
|
|
62
62
|
|
|
63
63
|
const consumableIds = deps.config.consumableProductIdentifiers || [];
|
|
64
64
|
const isConsumable = isConsumableProduct(pkg, consumableIds);
|
|
65
|
+
const entitlementIdentifier = deps.config.entitlementIdentifier;
|
|
65
66
|
|
|
66
67
|
try {
|
|
67
68
|
if (__DEV__) {
|
|
@@ -69,21 +70,10 @@ export async function handlePurchase(
|
|
|
69
70
|
productId: pkg.product.identifier,
|
|
70
71
|
packageIdentifier: pkg.identifier,
|
|
71
72
|
offeringIdentifier: pkg.offeringIdentifier,
|
|
72
|
-
timestamp: new Date().toISOString()
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
const
|
|
77
|
-
const purchaseResult = await Purchases.purchasePackage(pkg);
|
|
78
|
-
const duration = Date.now() - startTime;
|
|
79
|
-
const customerInfo = purchaseResult.customerInfo;
|
|
80
|
-
|
|
81
|
-
if (__DEV__) {
|
|
82
|
-
console.log('[DEBUG PurchaseHandler] Purchases.purchasePackage returned', {
|
|
83
|
-
duration: `${duration}ms`,
|
|
84
|
-
productId: pkg.product.identifier
|
|
85
|
-
});
|
|
86
|
-
}
|
|
76
|
+
const { customerInfo } = await Purchases.purchasePackage(pkg);
|
|
87
77
|
|
|
88
78
|
if (__DEV__) {
|
|
89
79
|
console.log('[DEBUG PurchaseHandler] Purchase completed', {
|
|
@@ -118,7 +108,6 @@ export async function handlePurchase(
|
|
|
118
108
|
};
|
|
119
109
|
}
|
|
120
110
|
|
|
121
|
-
const entitlementIdentifier = deps.config.entitlementIdentifier;
|
|
122
111
|
const isPremium = !!customerInfo.entitlements.active[entitlementIdentifier];
|
|
123
112
|
|
|
124
113
|
if (__DEV__) {
|