@capgo/native-purchases 0.0.17 → 0.0.19

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <h2><a href="https://capgo.app/">Check out: Capgo — live updates for capacitor</a></h2>
6
6
  </div>
7
7
 
8
- In-app Subscriptions Made Easy
8
+ In-app Purchases Made Easy
9
9
 
10
10
  ## Install
11
11
 
@@ -212,6 +212,12 @@ public class NativePurchasesPlugin extends Plugin {
212
212
  BillingResult billingResult,
213
213
  List<ProductDetails> productDetailsList
214
214
  ) {
215
+ if(productDetailsList.size() == 0) {
216
+ billingClient.endConnection();
217
+ billingClient = null;
218
+ call.reject("Product not found");
219
+ return;
220
+ }
215
221
  // Process the result
216
222
  List<BillingFlowParams.ProductDetailsParams> productDetailsParamsList = new ArrayList<>();
217
223
  for (ProductDetails productDetailsItem : productDetailsList) {
@@ -293,6 +299,12 @@ public class NativePurchasesPlugin extends Plugin {
293
299
  BillingResult billingResult,
294
300
  List<ProductDetails> productDetailsList
295
301
  ) {
302
+ if(productDetailsList.size() == 0) {
303
+ billingClient.endConnection();
304
+ billingClient = null;
305
+ call.reject("Product not found");
306
+ return;
307
+ }
296
308
  Log.i(
297
309
  "NativePurchases",
298
310
  "onProductDetailsResponse" + billingResult + productDetailsList
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/native-purchases",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "In-app Subscriptions Made Easy",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",