cordova-plugin-purchase
Advanced tools
Comparing version 13.10.1 to 13.10.3
{ | ||
"name": "cordova-plugin-purchase", | ||
"version": "13.10.1", | ||
"version": "13.10.3", | ||
"description": "Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)", | ||
@@ -36,2 +36,3 @@ "cordova": { | ||
"typedoc": "typedoc --hideGenerator --excludePrivate --excludeProtected --excludeInternal --disableSources --readme src/ts/README.md --hideBreadcrumbs true --hideInPageTOC false --out api --pretty --plugin typedoc-plugin-markdown --theme markdown --basePath src/ts src/ts/store.ts", | ||
"typedoc-html": "typedoc --plugin typedoc-theme-hierarchy --theme hierarchy --hideGenerator --excludePrivate --excludeProtected --excludeInternal --disableSources --readme src/ts/README.md --out api-html --pretty --basePath src/ts src/ts/store.ts", | ||
"typedoc-dev": "typedoc --hideGenerator --readme src/ts/README.md --out api-dev --pretty --plugin typedoc-plugin-markdown --theme markdown --basePath src/ts src/ts/store.ts" | ||
@@ -50,5 +51,6 @@ }, | ||
"ts-jest": "^29.1.1", | ||
"typedoc": "^0.23.15", | ||
"typedoc-github-wiki-theme": "^1.0.1", | ||
"typedoc-plugin-markdown": "^3.13.6", | ||
"typedoc": "^0.25.13", | ||
"typedoc-github-wiki-theme": "^1.1.0", | ||
"typedoc-plugin-markdown": "^3.17.1", | ||
"typedoc-theme-hierarchy": "^4.1.2", | ||
"typescript": "^4.7.4" | ||
@@ -55,0 +57,0 @@ }, |
@@ -9,14 +9,2 @@ # Cordova Purchase Plugin | ||
I dedicate a considerable amount of my free time to developing and maintaining | ||
this Cordova plugin, along with my other Open Source software. To help ensure | ||
this plugin is kept updated, new features are added and bugfixes are | ||
implemented quickly, please donate a couple of dollars (or a little more if you | ||
can stretch) as this will help me to afford to dedicate time to its | ||
maintenance. Please consider donating if you're using this plugin in an app | ||
that makes you money, if you're being paid to make the app, if you're asking | ||
for new features or priority bug fixes. Thank you! | ||
* [Patreon](https://www.patreon.com/join/2219243?) | ||
* [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7A4826SH6RJSE&source=url) | ||
## Summary | ||
@@ -28,3 +16,3 @@ | ||
This is a plugin for the **Apache Cordova** framework that provides an easy and flexible way to integrate **in-app purchases** into Cordova-based mobile applications, including popular frameworks such as **Ionic and PhoneGap**.. With this plugin, you can easily add support for in-app purchases of digital content, such as subscriptions, consumables, and non-consumables, using the store-specific purchase APIs provided by the major mobile platforms. The plugin also supports requesting payments through popular payment providers such as **Braintree**, allowing you to easily accept payments from your users. | ||
This is a plugin for the **Apache Cordova** framework that provides an easy and flexible way to integrate **in-app purchases** into Cordova-based mobile applications, including popular frameworks such as **Ionic and PhoneGap**. With this plugin, you can easily add support for in-app purchases of digital content, such as subscriptions, consumables, and non-consumables, using the store-specific purchase APIs provided by the major mobile platforms. The plugin also supports requesting payments through popular payment providers such as **Braintree**, allowing you to easily accept payments from your users. | ||
@@ -44,3 +32,2 @@ The Cordova-Plugin-Purchase plugin is designed to be easy to use and integrate into your Cordova app, and it provides a consistent API across all supported platforms, so you can focus on building your app without worrying about platform-specific differences. Whether you are building a subscription-based app, a freemium app, or any other app that requires in-app purchases, the Cordova-Plugin-Purchase plugin can help you get started quickly and easily. | ||
## Installation | ||
@@ -149,4 +136,6 @@ | ||
There's a specific page for the [version 13](./wiki/Version-13). | ||
There's a specific page for the [version 13](https://github.com/j3k0/cordova-plugin-purchase/wiki/Version-13). | ||
API documentation can be found here: [cordova-plugin-purchase API](https://www.iaptic.com/documentation/cordova-plugin-api/) | ||
### Upgrading to Version 13 | ||
@@ -153,0 +142,0 @@ |
@@ -5,2 +5,14 @@ # Release Notes - Cordova Plugin Purchase | ||
### 13.10.3 | ||
#### Fix issue when a callback is null or undefined | ||
Ref issue #1557 | ||
### 13.10.2 | ||
#### 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. | ||
### 13.10.1 | ||
@@ -36,3 +48,3 @@ | ||
So when ionic packages the plugin with the app code, no double instanciations of the plugin is performed. | ||
So when ionic packages the plugin with the app code, no double instantiations of the plugin is performed. | ||
@@ -39,0 +51,0 @@ ## 13.9.0 |
@@ -1,6 +0,1 @@ | ||
/** | ||
* The platform doesn't send notifications when a subscription expires. | ||
* | ||
* However this is useful, so let's do just that. | ||
*/ | ||
namespace CdvPurchase { | ||
@@ -23,2 +18,9 @@ | ||
/** | ||
* Send a notification when a subscription expires. | ||
* | ||
* The platform doesn't send notifications when a subscription expires. | ||
* | ||
* However this is useful, so let's do just that. | ||
*/ | ||
export class ExpiryMonitor { | ||
@@ -25,0 +27,0 @@ |
@@ -27,2 +27,4 @@ namespace CdvPurchase { | ||
// From https://github.com/apache/cordova-plugin-network-information | ||
// This event fires when an application goes online, and the device becomes connected to the Internet. | ||
document.addEventListener("online", () => { | ||
@@ -29,0 +31,0 @@ const a = this.retries; |
@@ -81,3 +81,3 @@ namespace CdvPurchase | ||
/** | ||
* Add warning logs on a console describing an exceptions. | ||
* Add warning logs on a console describing an exception. | ||
* | ||
@@ -87,3 +87,3 @@ * This method is mostly used when executing user registered callbacks. | ||
* @param context - a string describing why the method was called | ||
* @param error - a javascript Error object thrown by a exception | ||
* @param error - a javascript Error object thrown by an exception | ||
*/ | ||
@@ -112,4 +112,4 @@ logCallbackException(context: string, err: Error | string) { | ||
* Logger.console = { | ||
* log: (message) => { remoteLog('LOG', message); } | ||
* warn: (message) => { remoteLog('WARN', message); } | ||
* log: (message) => { remoteLog('LOG', message); }, | ||
* warn: (message) => { remoteLog('WARN', message); }, | ||
* error: (message) => { remoteLog('ERROR', message); } | ||
@@ -116,0 +116,0 @@ * } |
@@ -5,7 +5,7 @@ # Overview | ||
- The [Store](./classes/CdvPurchase.Store.md) class - Entry point to the features of the plugin. | ||
- The [Product](./classes/CdvPurchase.Product.md) class - Contains the definition of a product on the store. | ||
- The [Receipt](./classes/CdvPurchase.Receipt.md) class - Contains the information of the users purchases. | ||
- The {@link CdvPurchase.Store Store} class - Entry point to the features of the plugin. | ||
- The {@link CdvPurchase.Product Product} class - Contains the definition of a product on the store. | ||
- The {@link CdvPurchase.Receipt Receipt} class - Contains the information of the users purchases. | ||
In general, you will only interact with direct members of the [CdvPurchase](./modules/CdvPurchase.md) namespace. | ||
In general, you will only interact with direct members of the {@link CdvPurchase} namespace. | ||
@@ -12,0 +12,0 @@ # Contributing to the API documentation |
@@ -35,3 +35,3 @@ /// <reference path="types.ts" /> | ||
*/ | ||
export const PLUGIN_VERSION = '13.10.1'; | ||
export const PLUGIN_VERSION = '13.10.3'; | ||
@@ -740,2 +740,4 @@ /** | ||
} | ||
/** @private */ | ||
function initCDVPurchase() { | ||
@@ -742,0 +744,0 @@ console.log('Create CdvPurchase...'); |
@@ -26,2 +26,5 @@ namespace CdvPurchase { | ||
export function safeCall<T>(logger: Logger, className: string, callback: Callback<T>, value: T, callbackName: string | undefined, reason: string): void { | ||
if (!callback) { | ||
return; // cannot call an undefined callback. | ||
} | ||
if (!callbackName) { | ||
@@ -28,0 +31,0 @@ callbackName = callback.name || ('#' + md5(callback.toString())); |
@@ -32,2 +32,7 @@ namespace CdvPurchase { | ||
warning?: string; | ||
/** Date and time the receipt was validated. | ||
* | ||
* It will provide the client with a more reliable clock time | ||
* than the user's device when needed. */ | ||
date?: ISODate; | ||
} | ||
@@ -34,0 +39,0 @@ } |
@@ -24,2 +24,5 @@ namespace CdvPurchase { | ||
/** Date and time the receipt was verified */ | ||
validationDate: Date; | ||
/** Platform this receipt originated from */ | ||
@@ -74,2 +77,3 @@ get platform(): Platform { return this.sourceReceipt.platform; } | ||
this.warning = response.warning; | ||
this.validationDate = response.date ? new Date(response.date) : new Date(); | ||
Object.defineProperty(this, 'raw', { 'enumerable': false, get() { return response; } }); | ||
@@ -76,0 +80,0 @@ Object.defineProperty(this, 'finish', { 'enumerable': false, get() { return () => decorator.finish(this); } }); |
@@ -10,2 +10,3 @@ import '../www/store'; | ||
className: 'VerifiedReceipt', | ||
validationDate: new Date(), | ||
set: (receipt, response) => { }, | ||
@@ -12,0 +13,0 @@ platform: CdvPurchase.Platform.APPLE_APPSTORE, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1352103
25103
9
208