@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 CHANGED
@@ -19,4 +19,5 @@ This file provides the underlying native SDK versions that the Cordova SDK relie
19
19
  | 2.1.0 | 3.1.0 | 3.1.0 |
20
20
  | 2.1.1 | 3.1.0 | 3.1.0 |
21
21
  | 2.2.0 | 3.2.0 | 3.2.0 |
22
- | 2.2.1 | 3.2.1 | 3.2.1 |
22
+ | 2.2.1 | 3.2.1 | 3.2.1 |
23
+ | 2.2.2 | 3.2.2 | 3.2.2 |
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <widget id="io.purchasely.sample" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
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": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=",
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": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=",
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.1",
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.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
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.1"/>
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:@(self.nextRenewalDate.timeIntervalSince1970) forKey:@"nextRenewalDate"];
24
+ [dict setObject:[dateFormat stringFromDate:self.nextRenewalDate] forKey:@"nextRenewalDate"];
21
25
  }
22
26
 
23
27
  if (self.cancelledDate != nil) {
24
- [dict setObject:@(self.cancelledDate.timeIntervalSince1970) forKey:@"cancelledDate"];
28
+ [dict setObject:[dateFormat stringFromDate:self.cancelledDate] forKey:@"cancelledDate"];
25
29
  }
26
30
 
27
31
  return dict;