@capgo/native-purchases 8.8.1 → 8.8.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.
package/README.md CHANGED
@@ -1,11 +1,29 @@
1
1
  # native-purchases
2
- <a href="https://capgo.app/"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-native-purchases" alt="Capgo - Instant updates for Capacitor" /></a>
2
+
3
+ Sell in-app purchases and subscriptions in your Capacitor app with StoreKit on iOS and Google Play Billing on Android, without a third-party payments service.
4
+
5
+ <a href="https://capgo.app/?ref=plugin_native_purchases"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-native-purchases" alt="Capgo - Instant updates for Capacitor" /></a>
3
6
 
4
7
  <div align="center">
5
- <h2><a href="https://capgo.app/?ref=plugin_native_purchases"> ➡️ Get Instant updates for your App with Capgo</a></h2>
6
- <h2><a href="https://capgo.app/consulting/?ref=plugin_native_purchases"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
8
+ <p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</p>
9
+ <h2><a href="https://capgo.app/register/?ref=plugin_native_purchases">➡️ Get started for free</a></h2>
10
+ <p>14-day unlimited free trial. No credit card required</p>
11
+ <p><a href="https://capgo.app/consulting/?ref=plugin_native_purchases">Missing a feature? We'll build the plugin for you 💪</a></p>
7
12
  </div>
8
13
 
14
+ <p align="center">
15
+ <img src="https://raw.githubusercontent.com/Cap-go/capacitor-native-purchases/main/assets/github-social-preview.png" alt="@capgo/native-purchases for Capacitor apps" width="300" />
16
+ </p>
17
+
18
+ ## Key features
19
+
20
+ - **Products**: `getProducts()` and `getProduct()` return localized prices and details.
21
+ - **Purchases**: `purchaseProduct()` for consumables, non-consumables and subscriptions, with `acknowledgePurchase()`, plus `consumePurchase()` on Android.
22
+ - **Restore and history**: `restorePurchases()` and `getPurchases()`.
23
+ - **Subscription tools**: `manageSubscriptions()`, `presentOfferCodeRedeemSheet()` and `getStorefront()`.
24
+ - **Server validation**: receipt data and the `transactionUpdated` and `transactionVerificationFailed` events on iOS, purchase tokens on Android.
25
+ - **Platforms**: iOS and Android. Web mocks the purchase calls for development, except `consumePurchase()`, which is Android only.
26
+
9
27
  ## In-app Purchases Made Easy
10
28
 
11
29
  This plugin allows you to implement in-app purchases and subscriptions in your Capacitor app using native APIs.
@@ -1318,7 +1336,7 @@ If you're coming from cordova-plugin-purchase, here's the mapping:
1318
1336
  | cordova-plugin-purchase | @capgo/native-purchases | Platform | Notes |
1319
1337
  |-------------------------|-------------------------|----------|-------|
1320
1338
  | `transaction.transactionReceipt` | `transaction.receipt` (base64) | iOS | Legacy StoreKit receipt format (same value as Cordova) |
1321
- | — | `transaction.jwsRepresentation` (JWS) | iOS | StoreKit 2 JWS format (iOS 15+, additional field with no Cordova equivalent; Apple's recommended modern format for new implementations) |
1339
+ | - | `transaction.jwsRepresentation` (JWS) | iOS | StoreKit 2 JWS format (iOS 15+, additional field with no Cordova equivalent; Apple's recommended modern format for new implementations) |
1322
1340
  | `transaction.purchaseToken` | `transaction.purchaseToken` | Android | Same field name |
1323
1341
 
1324
1342
  **This plugin already exposes everything you need for backend verification!** The `receipt` and `purchaseToken` fields contain the complete verified receipt data, and `jwsRepresentation` provides an additional StoreKit 2 representation when available.
@@ -49,7 +49,7 @@ repositories {
49
49
 
50
50
 
51
51
  dependencies {
52
- implementation "com.google.guava:guava:33.7.1-android"
52
+ implementation "com.google.guava:guava:33.7.2-android"
53
53
  def billing_version = "9.1.0"
54
54
  implementation "com.android.billingclient:billing:$billing_version"
55
55
  implementation fileTree(dir: 'libs', include: ['*.jar'])
@@ -45,7 +45,7 @@ import org.json.JSONArray;
45
45
  @CapacitorPlugin(name = "NativePurchases")
46
46
  public class NativePurchasesPlugin extends Plugin {
47
47
 
48
- private final String pluginVersion = "8.8.1";
48
+ private final String pluginVersion = "8.8.3";
49
49
  public static final String TAG = "NativePurchases";
50
50
  private static final int BILLING_CONNECTION_MAX_ATTEMPTS = 2;
51
51
  private static final long BILLING_SETUP_TIMEOUT_SECONDS = 5;
@@ -23,7 +23,7 @@ public class NativePurchasesPlugin: CAPPlugin, CAPBridgedPlugin {
23
23
  CAPPluginMethod(name: "getStorefront", returnType: CAPPluginReturnPromise)
24
24
  ]
25
25
 
26
- private let pluginVersion: String = "8.8.1"
26
+ private let pluginVersion: String = "8.8.3"
27
27
  private var transactionUpdatesTask: Task<Void, Never>?
28
28
 
29
29
  @objc func getPluginVersion(_ call: CAPPluginCall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/native-purchases",
3
- "version": "8.8.1",
3
+ "version": "8.8.3",
4
4
  "description": "In-app Subscriptions Made Easy",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",