Skip to content

Releases: j3k0/cordova-plugin-purchase

v13.10.4

15 May 20:10
257cdec
Compare
Choose a tag to compare

Fix build issue on android

Java compiler started complaining about an implicit parameter. This patch fixes it.

Ref issue #1564

v13.10.3

15 May 20:10
011d57f
Compare
Choose a tag to compare

Fix issue when a callback is null or undefined

Ref issue #1557

v13.10.2

15 May 20:09
48917b9
Compare
Choose a tag to compare

Add validationDate to verified receipts

validationDate can be set server side (the validation request response), to provide a more reliable clock time than the device's when needed.

v13.10.1

19 Jan 15:18
09253c5
Compare
Choose a tag to compare

Fix store.initialize() when passed a single value

store.initialize() was supposed to work when passed a single value instead of an array. It turns out there was a regression, fixed with this release.

Add store.when().initiated(transaction)

Allows monitoring INITIATED (new) transactions.

store.when().initiated(transaction => {
  // a new transaction has been initiated.
});

v13.10.0

19 Jan 15:18
39eab03
Compare
Choose a tag to compare

(googleplay) Add "isConsumed" to consumed transactions

Local Google Play transaction now contain isConsumed, which is the same as isAcknowledged, but only set for consumable products.

Make it easier to debug callback calls

It's now possible to add a name to callbacks registered with "store.when()"

When callbacks are triggered, the reason is logged to the console.

Prevent instanciating CdvPurchase.store twice

So when ionic packages the plugin with the app code, no double instantiations of the plugin is performed.

v13.9.0

19 Jan 15:17
aaa2e9c
Compare
Choose a tag to compare

(appstore) store.restorePurchases() return potential errors

The return value for store.restorePurchases() has been changed from Promise<void> to Promise<IError|undefined>.

You can now inspect the value returned to figure out if processing complete with or without errors.

(appstore) Fix forceReceiptReload

In certain conditions (calls to order and restorePurchases), the AppStore adapter wants to force a refresh of the application receipt. This fix prevents it from returning the version cached in memory.

v13.8.6

19 Jan 15:17
a3c34d7
Compare
Choose a tag to compare

Add CdvPurchase.Utils.platformName()

Convert CdvPurchase.Platform enum values to a more user friendly version.

Usage:

console.log(CdvPurchase.Utils.platformName(myTransaction.platform));

// returns "App Store" or "Google Play" or "Braintree", ....

Increase expiry monitor's grace period on Google Play

The 10 seconds wait before refreshing an expired subscription on Google Play wasn't enough: increased to 30 seconds.

Ref #1468

v13.8.5

19 Jan 15:16
8113f31
Compare
Choose a tag to compare

Fixes for Apple AppStore's introductory periods and
subscription renewals.

Load products and receipts in parallel on Apple

This solves the issue with processing the eligibility of
introductory periods.

Increase grace period for Apple subscription before refresh

After observing that Apple sometime needs more than a
minute before the API returns the subscription renewal
transaction, we increased the local grace period (time
before refresh) to 90 seconds.

CdvPurchase.Internal.ExpiryMonitor.GRACE_PERIOD_MS[Platform.APPLE_APPSTORE] = 90000;

v13.8.4

19 Jan 15:16
fadfae6
Compare
Choose a tag to compare

Trim product titles on Google Play

Google Play returns the app name in parenthesis in product titles. The plugin
now automatically trims it from the app name.

This behavior can be disabled by setting:

CdvPurchase.GooglePlay.Adapter.trimProductTitles = false

Automatically re-validate just-expired subscriptions

The plugin will now monitor active subscripion purchases (as returned by a
receipt validation service) and re-validate the receipt automatically when the
subscription expires or renews.

You can customize the expiry monitor (which should rarely be needed):

// interval between checks in milliseconds
CdvPurchase.Internal.ExpiryMonitor.INTERVAL_MS = 10000; // default: 10s

// extra time before a subscription is considered expired (when re-validating
// too early, sometime the new transaction isn't available yet).
CdvPurchase.Internal.ExpiryMonitor.GRACE_PERIOD_MS = 10000; // default: 10s

Add expiry date to Test Adapter's subscription

The expiry date was missing from the test product:

CdvPurchase.Test.testProducts.PAID_SUBSCRIPTION

v13.8.2

22 Sep 10:23
ebeea9d
Compare
Choose a tag to compare

store.applicationUsername can return undefined

If no user is logged in, you applicationUsername function can return
undefined.

Add "productId" and "platform" to Error objects

All errors now include the "platform" and "productId" field (when applicable),
to get more context.