@capgo/native-purchases 8.3.0 → 8.3.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.
|
@@ -41,7 +41,7 @@ import org.json.JSONArray;
|
|
|
41
41
|
@CapacitorPlugin(name = "NativePurchases")
|
|
42
42
|
public class NativePurchasesPlugin extends Plugin {
|
|
43
43
|
|
|
44
|
-
private final String pluginVersion = "8.3.
|
|
44
|
+
private final String pluginVersion = "8.3.3";
|
|
45
45
|
public static final String TAG = "NativePurchases";
|
|
46
46
|
private static final Phaser semaphoreReady = new Phaser(1);
|
|
47
47
|
private BillingClient billingClient;
|
|
@@ -364,7 +364,18 @@ public class NativePurchasesPlugin extends Plugin {
|
|
|
364
364
|
);
|
|
365
365
|
try {
|
|
366
366
|
Log.d(TAG, "Waiting for billing client setup to finish");
|
|
367
|
-
semaphoreReady.await();
|
|
367
|
+
boolean setupCompleted = semaphoreReady.await(10, TimeUnit.SECONDS);
|
|
368
|
+
|
|
369
|
+
if (!setupCompleted) {
|
|
370
|
+
Log.e(TAG, "Billing client setup timed out after 10 seconds");
|
|
371
|
+
if (pendingCall != null) {
|
|
372
|
+
pendingCall.reject("BILLING_SETUP_TIMEOUT", "Billing client initialization timed out");
|
|
373
|
+
pendingCall = null;
|
|
374
|
+
}
|
|
375
|
+
closeBillingClient();
|
|
376
|
+
throw new RuntimeException("Billing setup timed out");
|
|
377
|
+
}
|
|
378
|
+
|
|
368
379
|
Log.d(TAG, "Billing client setup wait completed");
|
|
369
380
|
|
|
370
381
|
// Check if billing setup failed
|
|
@@ -21,7 +21,7 @@ public class NativePurchasesPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
21
21
|
CAPPluginMethod(name: "isEntitledToOldBusinessModel", returnType: CAPPluginReturnPromise)
|
|
22
22
|
]
|
|
23
23
|
|
|
24
|
-
private let pluginVersion: String = "8.3.
|
|
24
|
+
private let pluginVersion: String = "8.3.3"
|
|
25
25
|
private var transactionUpdatesTask: Task<Void, Never>?
|
|
26
26
|
|
|
27
27
|
@objc func getPluginVersion(_ call: CAPPluginCall) {
|