@purchasely/cordova-plugin-purchasely 2.2.1 → 2.2.2
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/VERSIONS.md +2 -1
- package/example/config.xml +1 -1
- package/example/package-lock.json +2 -2
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/PLYProductActivity.java +1 -0
- package/src/android/PurchaselyPlugin.java +3 -0
- package/src/ios/Hybrid/PLYSubscription+Hybrid.m +6 -2
package/VERSIONS.md
CHANGED
package/example/config.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<widget id="
|
|
2
|
+
<widget id="com.purchasely.demo" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
|
3
3
|
<name>HelloCordova</name>
|
|
4
4
|
<description>
|
|
5
5
|
A sample Apache Cordova application that responds to the deviceready event.
|
|
@@ -546,7 +546,7 @@
|
|
|
546
546
|
"node_modules/ios-sim/node_modules/bplist-parser": {
|
|
547
547
|
"version": "0.0.6",
|
|
548
548
|
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz",
|
|
549
|
-
"integrity": "
|
|
549
|
+
"integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw==",
|
|
550
550
|
"dev": true
|
|
551
551
|
},
|
|
552
552
|
"node_modules/ios-sim/node_modules/nopt": {
|
|
@@ -1661,7 +1661,7 @@
|
|
|
1661
1661
|
"bplist-parser": {
|
|
1662
1662
|
"version": "0.0.6",
|
|
1663
1663
|
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz",
|
|
1664
|
-
"integrity": "
|
|
1664
|
+
"integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw==",
|
|
1665
1665
|
"dev": true
|
|
1666
1666
|
},
|
|
1667
1667
|
"nopt": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purchasely/cordova-plugin-purchasely",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
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="2.2.
|
|
2
|
+
<plugin id="@purchasely/cordova-plugin-purchasely" version="2.2.2" 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" />
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<source url="https://github.com/CocoaPods/Specs.git"/>
|
|
29
29
|
</config>
|
|
30
30
|
<pods use-frameworks="true">
|
|
31
|
-
<pod name="Purchasely" spec="3.2.
|
|
31
|
+
<pod name="Purchasely" spec="3.2.2"/>
|
|
32
32
|
</pods>
|
|
33
33
|
</podspec>
|
|
34
34
|
</platform>
|
|
@@ -63,6 +63,7 @@ public class PLYProductActivity extends AppCompatActivity {
|
|
|
63
63
|
|
|
64
64
|
PurchaselyPlugin.ProductActivity productActivity = new PurchaselyPlugin.ProductActivity();
|
|
65
65
|
productActivity.presentationId = presentationId;
|
|
66
|
+
productActivity.placementId = placementId;
|
|
66
67
|
productActivity.productId = productId;
|
|
67
68
|
productActivity.planId = planId;
|
|
68
69
|
productActivity.contentId = contentId;
|
|
@@ -669,6 +669,7 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
669
669
|
|
|
670
670
|
public static class ProductActivity {
|
|
671
671
|
String presentationId = null;
|
|
672
|
+
String placementId = null;
|
|
672
673
|
String productId = null;
|
|
673
674
|
String planId = null;
|
|
674
675
|
String contentId = null;
|
|
@@ -681,6 +682,7 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
681
682
|
&& !backgroundActivity.isDestroyed()) {
|
|
682
683
|
Intent intent = new Intent(cordova.getActivity(), PLYProductActivity.class);
|
|
683
684
|
intent.putExtra("presentationId", presentationId);
|
|
685
|
+
intent.putExtra("placementId", placementId);
|
|
684
686
|
intent.putExtra("productId", productId);
|
|
685
687
|
intent.putExtra("planId", planId);
|
|
686
688
|
intent.putExtra("contentId", contentId);
|
|
@@ -690,6 +692,7 @@ public class PurchaselyPlugin extends CordovaPlugin {
|
|
|
690
692
|
} else {
|
|
691
693
|
Intent intent = PLYProductActivity.newIntent(cordova.getActivity());
|
|
692
694
|
intent.putExtra("presentationId", presentationId);
|
|
695
|
+
intent.putExtra("placementId", placementId);
|
|
693
696
|
intent.putExtra("productId", productId);
|
|
694
697
|
intent.putExtra("planId", planId);
|
|
695
698
|
intent.putExtra("contentId", contentId);
|
|
@@ -14,14 +14,18 @@
|
|
|
14
14
|
NSMutableDictionary<NSString *, NSObject *> *dict = [NSMutableDictionary new];
|
|
15
15
|
|
|
16
16
|
[dict setObject:self.plan.asDictionary forKey:@"plan"];
|
|
17
|
+
[dict setObject:self.product.asDictionary forKey:@"product"];
|
|
17
18
|
[dict setObject:[NSNumber numberWithInt:self.subscriptionSource] forKey:@"subscriptionSource"];
|
|
18
19
|
|
|
20
|
+
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
|
|
21
|
+
[dateFormat setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
|
|
22
|
+
|
|
19
23
|
if (self.nextRenewalDate != nil) {
|
|
20
|
-
[dict setObject
|
|
24
|
+
[dict setObject:[dateFormat stringFromDate:self.nextRenewalDate] forKey:@"nextRenewalDate"];
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
if (self.cancelledDate != nil) {
|
|
24
|
-
[dict setObject
|
|
28
|
+
[dict setObject:[dateFormat stringFromDate:self.cancelledDate] forKey:@"cancelledDate"];
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
return dict;
|