Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-purchase

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-purchase - npm Package Compare versions

Comparing version 13.1.6 to 13.2.0

api/interfaces/CdvPurchase.UnverifiedReceipt.md

19

api/interfaces/CdvPurchase.When.md

@@ -15,2 +15,3 @@ # Interface: When

- [receiptUpdated](CdvPurchase.When.md#receiptupdated)
- [unverified](CdvPurchase.When.md#unverified)
- [updated](CdvPurchase.When.md#updated)

@@ -93,2 +94,20 @@ - [verified](CdvPurchase.When.md#verified)

### unverified
▸ **unverified**(`cb`): [`When`](CdvPurchase.When.md)
Register a function called when a receipt failed validation.
#### Parameters
| Name | Type |
| :------ | :------ |
| `cb` | [`Callback`](../modules/CdvPurchase.md#callback)<[`UnverifiedReceipt`](CdvPurchase.UnverifiedReceipt.md)\> |
#### Returns
[`When`](CdvPurchase.When.md)
___
### updated

@@ -95,0 +114,0 @@

3

api/modules/CdvPurchase.md

@@ -69,2 +69,3 @@ # Namespace: CdvPurchase

- [TransactionMonitor](../interfaces/CdvPurchase.TransactionMonitor.md)
- [UnverifiedReceipt](../interfaces/CdvPurchase.UnverifiedReceipt.md)
- [VerifiedPurchase](../interfaces/CdvPurchase.VerifiedPurchase.md)

@@ -156,3 +157,3 @@ - [When](../interfaces/CdvPurchase.When.md)

• `Const` **PLUGIN\_VERSION**: ``"13.1.6"``
• `Const` **PLUGIN\_VERSION**: ``"13.2.0"``

@@ -159,0 +160,0 @@ Current release number of the plugin.

{
"name": "cordova-plugin-purchase",
"version": "13.1.6",
"version": "13.2.0",
"description": "Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)",

@@ -5,0 +5,0 @@ "cordova": {

@@ -61,3 +61,6 @@ namespace CdvPurchase {

*/
get pricing(): PricingPhase | undefined { return this.offers[0]?.pricingPhases[0]; }
get pricing(): PricingPhase | undefined {
// see Object.defineProperty in the constructor for the actual implementation.
return this.offers[0]?.pricingPhases[0];
}

@@ -89,3 +92,3 @@ /**

this.offers = [];
Object.defineProperty(this, 'pricing', { enumerable: false });
Object.defineProperty(this, 'pricing', { enumerable: false, get: () => this.offers[0]?.pricingPhases[0] });
Object.defineProperty(this, 'canPurchase', { enumerable: false, get: () => decorator.canPurchase(this) });

@@ -92,0 +95,0 @@ Object.defineProperty(this, 'owned', { enumerable: false, get: () => decorator.owned(this) });

@@ -27,3 +27,3 @@ /// <reference path="validator/validator.ts" />

*/
export const PLUGIN_VERSION = '13.1.6';
export const PLUGIN_VERSION = '13.2.0';

@@ -154,2 +154,5 @@ /**

/** Callbacks when a receipt has been validated */
private unverifiedCallbacks = new Internal.Callbacks<UnverifiedReceipt>(this.log, 'unverified()');
/** Callbacks for errors */

@@ -181,2 +184,3 @@ private errorCallbacks = new Internal.Callbacks<IError>(this.log, 'error()');

verifiedCallbacks: this.verifiedCallbacks,
unverifiedCallbacks: this.unverifiedCallbacks,
finish: (receipt: VerifiedReceipt) => this.finish(receipt),

@@ -277,2 +281,3 @@ }, this.log);

verified: (cb: Callback<VerifiedReceipt>) => (this.verifiedCallbacks.push(cb), ret),
unverified: (cb: Callback<UnverifiedReceipt>) => (this.unverifiedCallbacks.push(cb), ret),
};

@@ -279,0 +284,0 @@ return ret;

@@ -285,2 +285,5 @@ /// <reference path="store.ts" />

verified(cb: Callback<VerifiedReceipt>): When;
/** Register a function called when a receipt failed validation. */
unverified(cb: Callback<UnverifiedReceipt>): When;
}

@@ -287,0 +290,0 @@

@@ -44,2 +44,3 @@ namespace CdvPurchase {

get verifiedCallbacks(): Callbacks<VerifiedReceipt>;
get unverifiedCallbacks(): Callbacks<UnverifiedReceipt>;
finish(receipt:VerifiedReceipt): Promise<void>;

@@ -106,5 +107,5 @@ }

}
// else {
// }
// TODO: update transactions
else {
this.controller.unverifiedCallbacks.trigger({receipt, payload});
}
};

@@ -111,0 +112,0 @@ receipts.forEach(receipt => this.runOnReceipt(receipt, onResponse));

@@ -13,2 +13,7 @@ namespace CdvPurchase {

export interface UnverifiedReceipt {
receipt: Receipt;
payload: Validator.Response.ErrorPayload;
}
/** Receipt data as validated by the receipt validation server */

@@ -15,0 +20,0 @@ export class VerifiedReceipt {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc