@capgo/native-purchases 0.0.35 → 0.0.37
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.
|
@@ -253,7 +253,7 @@ public class NativePurchasesPlugin extends Plugin {
|
|
|
253
253
|
ImmutableList<QueryProductDetailsParams.Product> productList = ImmutableList.of(
|
|
254
254
|
QueryProductDetailsParams.Product
|
|
255
255
|
.newBuilder()
|
|
256
|
-
.setProductId(productIdentifier)
|
|
256
|
+
.setProductId(productType.equals("subs") ? planIdentifier : productIdentifier)
|
|
257
257
|
.setProductType(
|
|
258
258
|
productType.equals("inapp")
|
|
259
259
|
? BillingClient.ProductType.INAPP
|
|
@@ -290,7 +290,7 @@ public class NativePurchasesPlugin extends Plugin {
|
|
|
290
290
|
ProductDetails.SubscriptionOfferDetails selectedOfferDetails =
|
|
291
291
|
null;
|
|
292
292
|
for (ProductDetails.SubscriptionOfferDetails offerDetails : productDetailsItem.getSubscriptionOfferDetails()) {
|
|
293
|
-
if (offerDetails.getOfferId().equals(
|
|
293
|
+
if (offerDetails.getOfferId().equals(productIdentifier)) {
|
|
294
294
|
selectedOfferDetails = offerDetails;
|
|
295
295
|
break;
|
|
296
296
|
}
|
|
@@ -405,10 +405,10 @@ public class NativePurchasesPlugin extends Plugin {
|
|
|
405
405
|
Number productIdIndex = 0;
|
|
406
406
|
for (ProductDetails productDetails : productDetailsList) {
|
|
407
407
|
JSObject product = new JSObject();
|
|
408
|
-
product.put("identifier", productDetails.getProductId());
|
|
409
408
|
product.put("title", productDetails.getName());
|
|
410
409
|
product.put("description", productDetails.getDescription());
|
|
411
410
|
if (productType.equals("inapp")) {
|
|
411
|
+
product.put("identifier", productDetails.getProductId());
|
|
412
412
|
product.put(
|
|
413
413
|
"price",
|
|
414
414
|
productDetails
|
|
@@ -451,6 +451,8 @@ public class NativePurchasesPlugin extends Plugin {
|
|
|
451
451
|
selectedOfferDetails =
|
|
452
452
|
productDetails.getSubscriptionOfferDetails().get(0);
|
|
453
453
|
}
|
|
454
|
+
product.put("planIdentifier", productDetails.getProductId());
|
|
455
|
+
product.put("identifier", selectedOfferDetails.getBasePlanId());
|
|
454
456
|
product.put(
|
|
455
457
|
"price",
|
|
456
458
|
selectedOfferDetails
|