@capgo/native-purchases 8.0.15 → 8.0.16
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.
|
@@ -42,7 +42,7 @@ import org.json.JSONArray;
|
|
|
42
42
|
@CapacitorPlugin(name = "NativePurchases")
|
|
43
43
|
public class NativePurchasesPlugin extends Plugin {
|
|
44
44
|
|
|
45
|
-
private final String pluginVersion = "8.0.
|
|
45
|
+
private final String pluginVersion = "8.0.16";
|
|
46
46
|
public static final String TAG = "NativePurchases";
|
|
47
47
|
private static final Phaser semaphoreReady = new Phaser(1);
|
|
48
48
|
private BillingClient billingClient;
|
|
@@ -20,7 +20,7 @@ public class NativePurchasesPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
20
20
|
CAPPluginMethod(name: "isEntitledToOldBusinessModel", returnType: CAPPluginReturnPromise)
|
|
21
21
|
]
|
|
22
22
|
|
|
23
|
-
private let pluginVersion: String = "8.0.
|
|
23
|
+
private let pluginVersion: String = "8.0.16"
|
|
24
24
|
private var transactionUpdatesTask: Task<Void, Never>?
|
|
25
25
|
|
|
26
26
|
@objc func getPluginVersion(_ call: CAPPluginCall) {
|
|
@@ -158,7 +158,9 @@ public class NativePurchasesPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
158
158
|
|
|
159
159
|
@objc func getProducts(_ call: CAPPluginCall) {
|
|
160
160
|
let productIdentifiers = call.getArray("productIdentifiers", String.self) ?? []
|
|
161
|
+
let productType = call.getString("productType", "inapp")
|
|
161
162
|
print("productIdentifiers \(productIdentifiers)")
|
|
163
|
+
print("productType \(productType)")
|
|
162
164
|
Task {
|
|
163
165
|
do {
|
|
164
166
|
let products = try await Product.products(for: productIdentifiers)
|
|
@@ -174,7 +176,9 @@ public class NativePurchasesPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
174
176
|
|
|
175
177
|
@objc func getProduct(_ call: CAPPluginCall) {
|
|
176
178
|
let productIdentifier = call.getString("productIdentifier") ?? ""
|
|
179
|
+
let productType = call.getString("productType", "inapp")
|
|
177
180
|
print("productIdentifier \(productIdentifier)")
|
|
181
|
+
print("productType \(productType)")
|
|
178
182
|
if productIdentifier.isEmpty {
|
|
179
183
|
call.reject("productIdentifier is empty")
|
|
180
184
|
return
|