Skip to content

Commit

Permalink
v13.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
j3k0 committed Sep 4, 2023
1 parent 7b0aac3 commit 5ee54a1
Show file tree
Hide file tree
Showing 15 changed files with 1,110 additions and 864 deletions.
22 changes: 22 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Release Notes - Cordova Plugin Purchase

## 13.7

### 13.7.0

#### Fix AppStore introctory prices

Fix a regression with introctory prices on iOS. Unclear when this happened,
according to Apple documentation, the "discounts" array should contain the
introctory prices, but it turns out it does not anymore.

#### Set ES6 as minimal javascript version

Down from ES2015, for broader compatibility.

#### Ensure verify() resolves even if there's no validator

Some user do not specify a receipt validator but want to call
"transaction.verify()" (for example app building frameworks).

This changes makes sure the behavior gets back like it used to be in earlier
versions of the plugin.

## 13.6

### 13.6.0
Expand Down
6 changes: 3 additions & 3 deletions api/classes/CdvPurchase.AppleAppStore.Adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Returns true on iOS, the only platform supported by this adapter

#### Implementation of

CdvPurchase.Adapter.isSupported
[Adapter](../interfaces/CdvPurchase.Adapter.md).[isSupported](../interfaces/CdvPurchase.Adapter.md#issupported)

___

Expand All @@ -219,7 +219,7 @@ List of products managed by the adapter.

#### Implementation of

CdvPurchase.Adapter.products
[Adapter](../interfaces/CdvPurchase.Adapter.md).[products](../interfaces/CdvPurchase.Adapter.md#products)

___

Expand All @@ -235,7 +235,7 @@ List of purchase receipts.

#### Implementation of

CdvPurchase.Adapter.receipts
[Adapter](../interfaces/CdvPurchase.Adapter.md).[receipts](../interfaces/CdvPurchase.Adapter.md#receipts)

## Methods

Expand Down
6 changes: 4 additions & 2 deletions api/classes/CdvPurchase.Braintree.Adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ ___

**products**: [`Product`](CdvPurchase.Product.md)[] = `[]`

List of products managed by the adapter.

#### Implementation of

[Adapter](../interfaces/CdvPurchase.Adapter.md).[products](../interfaces/CdvPurchase.Adapter.md#products)
Expand Down Expand Up @@ -151,7 +153,7 @@ Returns true is the adapter is supported on this device.

#### Implementation of

CdvPurchase.Adapter.isSupported
[Adapter](../interfaces/CdvPurchase.Adapter.md).[isSupported](../interfaces/CdvPurchase.Adapter.md#issupported)

___

Expand All @@ -167,7 +169,7 @@ List of purchase receipts.

#### Implementation of

CdvPurchase.Adapter.receipts
[Adapter](../interfaces/CdvPurchase.Adapter.md).[receipts](../interfaces/CdvPurchase.Adapter.md#receipts)

## Methods

Expand Down
6 changes: 3 additions & 3 deletions api/classes/CdvPurchase.GooglePlay.Adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Returns true on Android, the only platform supported by this adapter

#### Implementation of

CdvPurchase.Adapter.isSupported
[Adapter](../interfaces/CdvPurchase.Adapter.md).[isSupported](../interfaces/CdvPurchase.Adapter.md#issupported)

___

Expand All @@ -168,7 +168,7 @@ List of products managed by the GooglePlay adapter

#### Implementation of

CdvPurchase.Adapter.products
[Adapter](../interfaces/CdvPurchase.Adapter.md).[products](../interfaces/CdvPurchase.Adapter.md#products)

___

Expand All @@ -184,7 +184,7 @@ List of purchase receipts.

#### Implementation of

CdvPurchase.Adapter.receipts
[Adapter](../interfaces/CdvPurchase.Adapter.md).[receipts](../interfaces/CdvPurchase.Adapter.md#receipts)

## Methods

Expand Down
6 changes: 5 additions & 1 deletion api/classes/CdvPurchase.Test.Adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ ___

**products**: [`Product`](CdvPurchase.Product.md)[] = `[]`

List of products managed by the adapter.

#### Implementation of

[Adapter](../interfaces/CdvPurchase.Adapter.md).[products](../interfaces/CdvPurchase.Adapter.md#products)
Expand All @@ -116,6 +118,8 @@ ___

**receipts**: [`Receipt`](CdvPurchase.Receipt.md)[] = `[]`

List of purchase receipts.

#### Implementation of

[Adapter](../interfaces/CdvPurchase.Adapter.md).[receipts](../interfaces/CdvPurchase.Adapter.md#receipts)
Expand All @@ -134,7 +138,7 @@ Returns true is the adapter is supported on this device.

#### Implementation of

CdvPurchase.Adapter.isSupported
[Adapter](../interfaces/CdvPurchase.Adapter.md).[isSupported](../interfaces/CdvPurchase.Adapter.md#issupported)

## Methods

Expand Down
6 changes: 5 additions & 1 deletion api/classes/CdvPurchase.WindowsStore.Adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ ___

**products**: [`Product`](CdvPurchase.Product.md)[] = `[]`

List of products managed by the adapter.

#### Implementation of

[Adapter](../interfaces/CdvPurchase.Adapter.md).[products](../interfaces/CdvPurchase.Adapter.md#products)
Expand All @@ -101,6 +103,8 @@ ___

**receipts**: [`Receipt`](CdvPurchase.Receipt.md)[] = `[]`

List of purchase receipts.

#### Implementation of

[Adapter](../interfaces/CdvPurchase.Adapter.md).[receipts](../interfaces/CdvPurchase.Adapter.md#receipts)
Expand All @@ -119,7 +123,7 @@ Returns true is the adapter is supported on this device.

#### Implementation of

CdvPurchase.Adapter.isSupported
[Adapter](../interfaces/CdvPurchase.Adapter.md).[isSupported](../interfaces/CdvPurchase.Adapter.md#issupported)

## Methods

Expand Down
49 changes: 17 additions & 32 deletions api/interfaces/CdvPurchase.Adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ Adapter for a payment or in-app purchase platform
### Properties

- [id](CdvPurchase.Adapter.md#id)
- [name](CdvPurchase.Adapter.md#name)
- [ready](CdvPurchase.Adapter.md#ready)

### Accessors

- [isSupported](CdvPurchase.Adapter.md#issupported)
- [name](CdvPurchase.Adapter.md#name)
- [products](CdvPurchase.Adapter.md#products)
- [ready](CdvPurchase.Adapter.md#ready)
- [receipts](CdvPurchase.Adapter.md#receipts)

### Methods
Expand Down Expand Up @@ -51,58 +48,46 @@ Platform identifier

___

### name
### isSupported

**name**: `string`
**isSupported**: `boolean`

Nice name for the adapter
Returns true is the adapter is supported on this device.

___

### ready

**ready**: `boolean`

true after the platform has been successfully initialized.

The value is set by the "Adapters" class (which is responsible for initializing adapters).
### name

## Accessors
**name**: `string`

### isSupported
Nice name for the adapter

`get` **isSupported**(): `boolean`
___

Returns true is the adapter is supported on this device.
### products

#### Returns
**products**: [`Product`](../classes/CdvPurchase.Product.md)[]

`boolean`
List of products managed by the adapter.

___

### products

`get` **products**(): [`Product`](../classes/CdvPurchase.Product.md)[]
### ready

List of products managed by the adapter.
**ready**: `boolean`

#### Returns
true after the platform has been successfully initialized.

[`Product`](../classes/CdvPurchase.Product.md)[]
The value is set by the "Adapters" class (which is responsible for initializing adapters).

___

### receipts

`get` **receipts**(): [`Receipt`](../classes/CdvPurchase.Receipt.md)[]
**receipts**: [`Receipt`](../classes/CdvPurchase.Receipt.md)[]

List of purchase receipts.

#### Returns

[`Receipt`](../classes/CdvPurchase.Receipt.md)[]

## Methods

### checkSupport
Expand Down
7 changes: 2 additions & 5 deletions api/interfaces/CdvPurchase.IRegisterProduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Data provided to store.register()

`Optional` **group**: `string`

Name of the group your subscription product is a member of (default to "default").
Name of the group your subscription product is a member of.

If you don't set anything, all subscription will be members of the same group.

Expand All @@ -37,10 +37,7 @@ ___

**platform**: [`Platform`](../enums/CdvPurchase.Platform.md)

List of payment platforms the product is available on

If you do not specify anything, the product is assumed to be available only on the
default payment platform. (Apple AppStore on iOS, Google Play on Android)
The payment platform the product is available on.

___

Expand Down
25 changes: 25 additions & 0 deletions api/modules/CdvPurchase.Utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- [formatDurationEN](CdvPurchase.Utils.md#formatdurationen)
- [md5](CdvPurchase.Utils.md#md5)
- [nonEnumerable](CdvPurchase.Utils.md#nonenumerable)
- [objectValues](CdvPurchase.Utils.md#objectvalues)
- [safeCall](CdvPurchase.Utils.md#safecall)
- [safeCallback](CdvPurchase.Utils.md#safecallback)
- [uuidv4](CdvPurchase.Utils.md#uuidv4)
Expand Down Expand Up @@ -184,6 +185,30 @@ ___

___

### objectValues

**objectValues**<`T`\>(`obj`): `T`[]

Object.values() for ES6

#### Type parameters

| Name |
| :------ |
| `T` |

#### Parameters

| Name | Type |
| :------ | :------ |
| `obj` | `Object` |

#### Returns

`T`[]

___

### safeCall

**safeCall**<`T`\>(`logger`, `className`, `callback`, `value`): `void`
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-purchase",
"version": "13.6.0",
"version": "13.7.0",
"description": "Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)",
"cordova": {
"id": "cordova-plugin-purchase",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE.
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-purchase"
xmlns:android="http://schemas.android.com/apk/res/android"
version="13.6.0">
version="13.7.0">

<name>Purchase</name>
<description>Cordova Purchase plugin for iOS (AppStore), Android (PlayStore) and Windows</description>
Expand Down
2 changes: 1 addition & 1 deletion src/ts/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace CdvPurchase {
/**
* Current release number of the plugin.
*/
export const PLUGIN_VERSION = '13.6.0';
export const PLUGIN_VERSION = '13.7.0';

/**
* Entry class of the plugin.
Expand Down
19 changes: 12 additions & 7 deletions www/store.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,14 @@ declare namespace CdvPurchase {
addOffer(offer: Offer): this;
}
}
declare namespace CdvPurchase {
namespace Utils {
/** Object.values() for ES6 */
function objectValues<T>(obj: {
[key: string]: T;
}): T[];
}
}
declare namespace CdvPurchase {
/**
* @internal
Expand Down Expand Up @@ -1611,16 +1619,13 @@ declare namespace CdvPurchase {
/** Identifier of the product on the store */
id: string;
/**
* List of payment platforms the product is available on
*
* If you do not specify anything, the product is assumed to be available only on the
* default payment platform. (Apple AppStore on iOS, Google Play on Android)
* The payment platform the product is available on.
*/
platform: Platform;
/** Product type, should be one of the defined product types */
type: ProductType;
/**
* Name of the group your subscription product is a member of (default to "default").
* Name of the group your subscription product is a member of.
*
* If you don't set anything, all subscription will be members of the same group.
*/
Expand All @@ -1630,7 +1635,7 @@ declare namespace CdvPurchase {
class RegisteredProducts {
list: IRegisterProduct[];
find(platform: Platform, id: string): IRegisterProduct | undefined;
add(product: IRegisterProduct | IRegisterProduct[]): void;
add(product: IRegisterProduct | IRegisterProduct[]): IError[];
byPlatform(): {
platform: Platform;
products: IRegisterProduct[];
Expand Down Expand Up @@ -4259,7 +4264,7 @@ declare namespace CdvPurchase {
init(success: () => void, fail: ErrorCallback, options: Options): void;
load(success: () => void, fail: ErrorCallback, skus: string[], inAppSkus: string[], subsSkus: string[]): void;
listener(msg: Message): void;
getPurchases(success: (products: CdvPurchase.GooglePlay.Bridge.Purchase[]) => void, fail: ErrorCallback): void;
getPurchases(success: () => void, fail: ErrorCallback): void;
buy(success: () => void, fail: ErrorCallback, productId: string, additionalData: CdvPurchase.AdditionalData): void;
subscribe(success: () => void, fail: ErrorCallback, productId: string, additionalData: CdvPurchase.AdditionalData): void;
consumePurchase(success: () => void, fail: ErrorCallback, purchaseToken: string): void;
Expand Down
Loading

0 comments on commit 5ee54a1

Please sign in to comment.