react-native-purchases 6.0.0 → 6.0.1
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/android/build.gradle
CHANGED
|
@@ -45,7 +45,7 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
45
45
|
private static final String CUSTOMER_INFO_UPDATED = "Purchases-CustomerInfoUpdated";
|
|
46
46
|
private static final String LOG_HANDLER_EVENT = "Purchases-LogHandlerEvent";
|
|
47
47
|
public static final String PLATFORM_NAME = "react-native";
|
|
48
|
-
public static final String PLUGIN_VERSION = "6.0.
|
|
48
|
+
public static final String PLUGIN_VERSION = "6.0.1";
|
|
49
49
|
|
|
50
50
|
private final ReactApplicationContext reactContext;
|
|
51
51
|
|
|
@@ -146,9 +146,6 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
146
146
|
if (googleOldProductId == null) {
|
|
147
147
|
googleOldProductId = googleProductChangeInfo.hasKey("oldSKU") ? googleProductChangeInfo.getString("oldSKU") : null;
|
|
148
148
|
}
|
|
149
|
-
if (googleProrationMode == null) {
|
|
150
|
-
googleProrationMode = googleProductChangeInfo.hasKey("prorationMode") ? googleProductChangeInfo.getInt("prorationMode") : null;
|
|
151
|
-
}
|
|
152
149
|
}
|
|
153
150
|
|
|
154
151
|
Boolean googleIsPersonalized = googleInfo != null && googleInfo.hasKey("isPersonalizedPrice") ? googleInfo.getBoolean("isPersonalizedPrice") : null;
|
|
@@ -168,13 +165,23 @@ public class RNPurchasesModule extends ReactContextBaseJavaModule implements Upd
|
|
|
168
165
|
@ReactMethod
|
|
169
166
|
public void purchasePackage(final String packageIdentifier,
|
|
170
167
|
final String offeringIdentifier,
|
|
171
|
-
@Nullable final ReadableMap
|
|
168
|
+
@Nullable final ReadableMap googleProductChangeInfo,
|
|
172
169
|
@Nullable final String discountTimestamp,
|
|
173
170
|
@Nullable final ReadableMap googleInfo,
|
|
174
171
|
final Promise promise) {
|
|
175
|
-
String googleOldProductId =
|
|
176
|
-
Integer googleProrationMode =
|
|
172
|
+
String googleOldProductId = null;
|
|
173
|
+
Integer googleProrationMode = null;
|
|
174
|
+
|
|
175
|
+
if (googleProductChangeInfo != null) {
|
|
176
|
+
// GoogleProductChangeInfo in V6 and later
|
|
177
|
+
googleOldProductId = googleProductChangeInfo.hasKey("oldProductIdentifier") ? googleProductChangeInfo.getString("oldProductIdentifier") : null;
|
|
178
|
+
googleProrationMode = googleProductChangeInfo.hasKey("prorationMode") ? googleProductChangeInfo.getInt("prorationMode") : null;
|
|
177
179
|
|
|
180
|
+
// Legacy UpgradeInfo in V5 and earlier
|
|
181
|
+
if (googleOldProductId == null) {
|
|
182
|
+
googleOldProductId = googleProductChangeInfo.hasKey("oldSKU") ? googleProductChangeInfo.getString("oldSKU") : null;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
178
185
|
Boolean googleIsPersonalized = googleInfo != null && googleInfo.hasKey("isPersonalizedPrice") ? googleInfo.getBoolean("isPersonalizedPrice") : null;
|
|
179
186
|
|
|
180
187
|
CommonKt.purchasePackage(
|
package/ios/RNPurchases.m
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-purchases",
|
|
3
3
|
"title": "React Native Purchases",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.1",
|
|
5
5
|
"description": "React Native in-app purchases and subscriptions made easy. Supports iOS and Android. ",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
package/scripts/docs/index.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!DOCTYPE html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
5
|
-
<meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/react-native-purchases-docs/6.0.
|
|
5
|
+
<meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/react-native-purchases-docs/6.0.1/" />
|
|
6
6
|
</head>
|
|
7
7
|
<body>
|
|
8
8
|
</body>
|