@purchasely/cordova-plugin-purchasely 5.4.1 → 5.5.1
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/example/config.xml +1 -0
- package/example/package-lock.json +52 -52
- package/example/package.json +1 -1
- package/example/www/js/index.js +14 -4
- package/package.json +1 -1
- package/plugin.xml +3 -3
- package/src/android/PurchaselyPlugin.kt +3 -0
- package/www/Purchasely.js +4 -2
package/example/config.xml
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<platform name="android">
|
|
19
19
|
<allow-intent href="market:*" />
|
|
20
20
|
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
21
|
+
<preference name="GradlePluginKotlinVersion" value="2.1.21" />
|
|
21
22
|
<!--<edit-config
|
|
22
23
|
file="AndroidManifest.xml"
|
|
23
24
|
target="/manifest/application/activity[@android:name='cordova.plugin.purchasely.PLYProductActivity']"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@purchasely/cordova-plugin-puchasely-google": "file:../../purchasely-google",
|
|
13
13
|
"@purchasely/cordova-plugin-purchasely": "file:..",
|
|
14
|
-
"cordova-android": "^14.0.
|
|
14
|
+
"cordova-android": "^14.0.1",
|
|
15
15
|
"cordova-ios": "^7.1.1",
|
|
16
16
|
"cordova-plugin-puchasely-google": "file:../../purchasely-google",
|
|
17
17
|
"cordova-plugin-purchasely": "file:.."
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"..": {
|
|
21
21
|
"name": "@purchasely/cordova-plugin-purchasely",
|
|
22
|
-
"version": "5.
|
|
22
|
+
"version": "5.5.1",
|
|
23
23
|
"dev": true,
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"engines": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"../../purchasely-google": {
|
|
35
35
|
"name": "@purchasely/cordova-plugin-puchasely-google",
|
|
36
|
-
"version": "5.
|
|
36
|
+
"version": "5.5.1",
|
|
37
37
|
"dev": true,
|
|
38
38
|
"license": "ISC"
|
|
39
39
|
},
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
"link": true
|
|
97
97
|
},
|
|
98
98
|
"node_modules/@xmldom/xmldom": {
|
|
99
|
-
"version": "0.8.
|
|
100
|
-
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.
|
|
101
|
-
"integrity": "sha512-
|
|
99
|
+
"version": "0.8.11",
|
|
100
|
+
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
|
|
101
|
+
"integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
|
|
102
102
|
"dev": true,
|
|
103
103
|
"license": "MIT",
|
|
104
104
|
"engines": {
|
|
@@ -106,11 +106,14 @@
|
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
"node_modules/abbrev": {
|
|
109
|
-
"version": "
|
|
110
|
-
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-
|
|
111
|
-
"integrity": "sha512-
|
|
109
|
+
"version": "3.0.1",
|
|
110
|
+
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz",
|
|
111
|
+
"integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==",
|
|
112
112
|
"dev": true,
|
|
113
|
-
"license": "ISC"
|
|
113
|
+
"license": "ISC",
|
|
114
|
+
"engines": {
|
|
115
|
+
"node": "^18.17.0 || >=20.5.0"
|
|
116
|
+
}
|
|
114
117
|
},
|
|
115
118
|
"node_modules/android-versions": {
|
|
116
119
|
"version": "2.1.0",
|
|
@@ -232,9 +235,9 @@
|
|
|
232
235
|
"license": "MIT"
|
|
233
236
|
},
|
|
234
237
|
"node_modules/cordova-android": {
|
|
235
|
-
"version": "14.0.
|
|
236
|
-
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-14.0.
|
|
237
|
-
"integrity": "sha512-
|
|
238
|
+
"version": "14.0.1",
|
|
239
|
+
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-14.0.1.tgz",
|
|
240
|
+
"integrity": "sha512-HMBMdGu/JlSQtmBuDEpKWf/pE75SpF3FksxZ+mqYuL3qSIN8lN/QsNurwYaPAP7zWXN2DNpvwlpOJItS5VhdLg==",
|
|
238
241
|
"dev": true,
|
|
239
242
|
"license": "Apache-2.0",
|
|
240
243
|
"dependencies": {
|
|
@@ -255,32 +258,6 @@
|
|
|
255
258
|
"node": ">=20.5.0"
|
|
256
259
|
}
|
|
257
260
|
},
|
|
258
|
-
"node_modules/cordova-android/node_modules/abbrev": {
|
|
259
|
-
"version": "3.0.1",
|
|
260
|
-
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz",
|
|
261
|
-
"integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==",
|
|
262
|
-
"dev": true,
|
|
263
|
-
"license": "ISC",
|
|
264
|
-
"engines": {
|
|
265
|
-
"node": "^18.17.0 || >=20.5.0"
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
"node_modules/cordova-android/node_modules/nopt": {
|
|
269
|
-
"version": "8.1.0",
|
|
270
|
-
"resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz",
|
|
271
|
-
"integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==",
|
|
272
|
-
"dev": true,
|
|
273
|
-
"license": "ISC",
|
|
274
|
-
"dependencies": {
|
|
275
|
-
"abbrev": "^3.0.0"
|
|
276
|
-
},
|
|
277
|
-
"bin": {
|
|
278
|
-
"nopt": "bin/nopt.js"
|
|
279
|
-
},
|
|
280
|
-
"engines": {
|
|
281
|
-
"node": "^18.17.0 || >=20.5.0"
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
261
|
"node_modules/cordova-common": {
|
|
285
262
|
"version": "5.0.1",
|
|
286
263
|
"resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-5.0.1.tgz",
|
|
@@ -652,6 +629,13 @@
|
|
|
652
629
|
"node": ">=6"
|
|
653
630
|
}
|
|
654
631
|
},
|
|
632
|
+
"node_modules/ios-sim/node_modules/abbrev": {
|
|
633
|
+
"version": "1.1.1",
|
|
634
|
+
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
|
635
|
+
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
|
636
|
+
"dev": true,
|
|
637
|
+
"license": "ISC"
|
|
638
|
+
},
|
|
655
639
|
"node_modules/ios-sim/node_modules/bplist-parser": {
|
|
656
640
|
"version": "0.0.6",
|
|
657
641
|
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz",
|
|
@@ -659,6 +643,22 @@
|
|
|
659
643
|
"dev": true,
|
|
660
644
|
"license": "MIT"
|
|
661
645
|
},
|
|
646
|
+
"node_modules/ios-sim/node_modules/nopt": {
|
|
647
|
+
"version": "1.0.9",
|
|
648
|
+
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz",
|
|
649
|
+
"integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==",
|
|
650
|
+
"dev": true,
|
|
651
|
+
"license": "MIT",
|
|
652
|
+
"dependencies": {
|
|
653
|
+
"abbrev": "1"
|
|
654
|
+
},
|
|
655
|
+
"bin": {
|
|
656
|
+
"nopt": "bin/nopt.js"
|
|
657
|
+
},
|
|
658
|
+
"engines": {
|
|
659
|
+
"node": "*"
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
662
|
"node_modules/is-core-module": {
|
|
663
663
|
"version": "2.16.1",
|
|
664
664
|
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
|
|
@@ -810,19 +810,19 @@
|
|
|
810
810
|
}
|
|
811
811
|
},
|
|
812
812
|
"node_modules/nopt": {
|
|
813
|
-
"version": "1.0
|
|
814
|
-
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.
|
|
815
|
-
"integrity": "sha512-
|
|
813
|
+
"version": "8.1.0",
|
|
814
|
+
"resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz",
|
|
815
|
+
"integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==",
|
|
816
816
|
"dev": true,
|
|
817
|
-
"license": "
|
|
817
|
+
"license": "ISC",
|
|
818
818
|
"dependencies": {
|
|
819
|
-
"abbrev": "
|
|
819
|
+
"abbrev": "^3.0.0"
|
|
820
820
|
},
|
|
821
821
|
"bin": {
|
|
822
822
|
"nopt": "bin/nopt.js"
|
|
823
823
|
},
|
|
824
824
|
"engines": {
|
|
825
|
-
"node": "
|
|
825
|
+
"node": "^18.17.0 || >=20.5.0"
|
|
826
826
|
}
|
|
827
827
|
},
|
|
828
828
|
"node_modules/npm-run-path": {
|
|
@@ -1026,13 +1026,13 @@
|
|
|
1026
1026
|
}
|
|
1027
1027
|
},
|
|
1028
1028
|
"node_modules/resolve": {
|
|
1029
|
-
"version": "1.22.
|
|
1030
|
-
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.
|
|
1031
|
-
"integrity": "sha512-
|
|
1029
|
+
"version": "1.22.11",
|
|
1030
|
+
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
|
|
1031
|
+
"integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==",
|
|
1032
1032
|
"dev": true,
|
|
1033
1033
|
"license": "MIT",
|
|
1034
1034
|
"dependencies": {
|
|
1035
|
-
"is-core-module": "^2.16.
|
|
1035
|
+
"is-core-module": "^2.16.1",
|
|
1036
1036
|
"path-parse": "^1.0.7",
|
|
1037
1037
|
"supports-preserve-symlinks-flag": "^1.0.0"
|
|
1038
1038
|
},
|
|
@@ -1089,9 +1089,9 @@
|
|
|
1089
1089
|
"license": "ISC"
|
|
1090
1090
|
},
|
|
1091
1091
|
"node_modules/semver": {
|
|
1092
|
-
"version": "7.7.
|
|
1093
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.
|
|
1094
|
-
"integrity": "sha512-
|
|
1092
|
+
"version": "7.7.3",
|
|
1093
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
|
|
1094
|
+
"integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
|
|
1095
1095
|
"dev": true,
|
|
1096
1096
|
"license": "ISC",
|
|
1097
1097
|
"bin": {
|
package/example/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@purchasely/cordova-plugin-puchasely-google": "file:../../purchasely-google",
|
|
17
17
|
"@purchasely/cordova-plugin-purchasely": "file:..",
|
|
18
|
-
"cordova-android": "^14.0.
|
|
18
|
+
"cordova-android": "^14.0.1",
|
|
19
19
|
"cordova-ios": "^7.1.1",
|
|
20
20
|
"cordova-plugin-puchasely-google": "file:../../purchasely-google",
|
|
21
21
|
"cordova-plugin-purchasely": "file:.."
|
package/example/www/js/index.js
CHANGED
|
@@ -252,6 +252,9 @@ function onPuchaselySdkReady() {
|
|
|
252
252
|
} else if (result.action === Purchasely.PaywallAction.close) {
|
|
253
253
|
console.log('User wants to close paywall - close reason ' + result.parameters.closeReason);
|
|
254
254
|
Purchasely.onProcessAction(true);
|
|
255
|
+
} else if (result.action === Purchasely.PaywallAction.close_all) {
|
|
256
|
+
console.log('User wants to close all paywalls');
|
|
257
|
+
Purchasely.onProcessAction(true);
|
|
255
258
|
} else if (result.action === Purchasely.PaywallAction.login) {
|
|
256
259
|
console.log('User wants to login');
|
|
257
260
|
//Present your own screen for user to log in
|
|
@@ -262,12 +265,19 @@ function onPuchaselySdkReady() {
|
|
|
262
265
|
} else if (result.action === Purchasely.PaywallAction.open_presentation) {
|
|
263
266
|
console.log('User wants to open a new paywall');
|
|
264
267
|
Purchasely.onProcessAction(true);
|
|
268
|
+
} else if (result.action === Purchasely.PaywallAction.open_placement) {
|
|
269
|
+
console.log('User wants to open a new placement');
|
|
270
|
+
Purchasely.onProcessAction(true);
|
|
265
271
|
} else if (result.action === Purchasely.PaywallAction.purchase) {
|
|
266
272
|
console.log('User wants to purchase');
|
|
267
273
|
//If you want to intercept it, close paywall and display your screen
|
|
268
274
|
Purchasely.hidePresentation();
|
|
269
|
-
} else if (result.action === Purchasely.PaywallAction.
|
|
270
|
-
console.log('User wants to
|
|
275
|
+
} else if (result.action === Purchasely.PaywallAction.web_checkout) {
|
|
276
|
+
console.log('User wants to proceed to web checkout');
|
|
277
|
+
console.log('web checkout url: ' + result.parameters.url);
|
|
278
|
+
console.log('web checkout provider: ' + result.parameters.webCheckoutProvider);
|
|
279
|
+
console.log('web checkout client reference id: ' + result.parameters.clientReferenceId);
|
|
280
|
+
console.log('web checkout query parameter key: ' + result.parameters.queryParameterKey);
|
|
271
281
|
Purchasely.onProcessAction(true);
|
|
272
282
|
} else {
|
|
273
283
|
console.log('Action unknown ' + result.action);
|
|
@@ -279,8 +289,8 @@ function onPuchaselySdkReady() {
|
|
|
279
289
|
}
|
|
280
290
|
|
|
281
291
|
function openPresentation() {
|
|
282
|
-
Purchasely.
|
|
283
|
-
'
|
|
292
|
+
Purchasely.presentPresentationWithIdentifier(
|
|
293
|
+
'step_1', //placementId
|
|
284
294
|
null, //contentId
|
|
285
295
|
true, //fullscreen
|
|
286
296
|
(callback) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purchasely/cordova-plugin-purchasely",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.1",
|
|
4
4
|
"description": "Purchasely is a solution to ease the integration and boost your In-App Purchases & Subscriptions on the App Store, Google Play Store, Amazon Appstore and Huawei App Gallery.",
|
|
5
5
|
"cordova": {
|
|
6
6
|
"id": "@purchasely/cordova-plugin-purchasely",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@purchasely/cordova-plugin-purchasely" version="5.
|
|
2
|
+
<plugin id="@purchasely/cordova-plugin-purchasely" version="5.5.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
3
|
<name>Purchasely</name>
|
|
4
4
|
<js-module name="Purchasely" src="www/Purchasely.js">
|
|
5
5
|
<clobbers target="Purchasely" />
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<source url="https://github.com/CocoaPods/Specs.git"/>
|
|
39
39
|
</config>
|
|
40
40
|
<pods use-frameworks="true">
|
|
41
|
-
<pod name="Purchasely" spec="5.
|
|
41
|
+
<pod name="Purchasely" spec="5.5.0"/>
|
|
42
42
|
</pods>
|
|
43
43
|
</podspec>
|
|
44
44
|
</platform>
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
|
|
64
64
|
</activity>
|
|
65
65
|
</config-file>
|
|
66
|
-
<framework src="io.purchasely:core:5.
|
|
66
|
+
<framework src="io.purchasely:core:5.5.1" />
|
|
67
67
|
<source-file src="src/android/PurchaselyPlugin.kt" target-dir="java/cordova/plugin/purchasely" />
|
|
68
68
|
<source-file src="src/android/PLYProductActivity.kt" target-dir="java/cordova/plugin/purchasely" />
|
|
69
69
|
<source-file src="src/android/PLYSubscriptionsActivity.java" target-dir="src/cordova/plugin/purchasely" />
|
|
@@ -779,6 +779,9 @@ class PurchaselyPlugin : CordovaPlugin() {
|
|
|
779
779
|
parametersForCordova["presentation"] = parameters.presentation
|
|
780
780
|
parametersForCordova["placement"] = parameters.placement
|
|
781
781
|
parametersForCordova["closeReason"] = parameters.closeReason?.name
|
|
782
|
+
parametersForCordova["clientReferenceId"] = parameters?.clientReferenceId
|
|
783
|
+
parametersForCordova["queryParameterKey"] = parameters?.queryParameterKey
|
|
784
|
+
parametersForCordova["webCheckoutProvider"] = parameters?.webCheckoutProvider?.name
|
|
782
785
|
|
|
783
786
|
val result = PluginResult(
|
|
784
787
|
PluginResult.Status.OK,
|
package/www/Purchasely.js
CHANGED
|
@@ -5,7 +5,7 @@ var defaultError = (e) => { console.log(e); }
|
|
|
5
5
|
exports.start = function (apiKey, stores, storekit1, userId, logLevel, runningMode, success, error) {
|
|
6
6
|
var cordovaSdkVersion = cordova.define.moduleMap['cordova/plugin_list'].exports['metadata']['cordova-plugin-purchasely']
|
|
7
7
|
if(!cordovaSdkVersion) {
|
|
8
|
-
cordovaSdkVersion = "5.
|
|
8
|
+
cordovaSdkVersion = "5.5.1";
|
|
9
9
|
}
|
|
10
10
|
exec(success, error, 'Purchasely', 'start', [apiKey, stores, storekit1, userId, logLevel, runningMode, cordovaSdkVersion]);
|
|
11
11
|
};
|
|
@@ -300,13 +300,15 @@ exports.RunningMode = {
|
|
|
300
300
|
|
|
301
301
|
exports.PaywallAction = {
|
|
302
302
|
close: 'close',
|
|
303
|
+
close_all: 'close_all',
|
|
303
304
|
login: 'login',
|
|
304
305
|
navigate: 'navigate',
|
|
305
306
|
purchase: 'purchase',
|
|
306
307
|
restore: 'restore',
|
|
307
308
|
open_presentation: 'open_presentation',
|
|
308
|
-
|
|
309
|
+
open_placement: 'open_placement',
|
|
309
310
|
promo_code: 'promo_code',
|
|
311
|
+
web_checkout: 'web_checkout'
|
|
310
312
|
}
|
|
311
313
|
|
|
312
314
|
exports.ThemeMode = {
|