@jimrising/easymerchantsdk-react-native 1.6.8 → 1.6.9

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.
@@ -300,6 +300,17 @@
300
300
  <option name="screenX" value="384" />
301
301
  <option name="screenY" value="384" />
302
302
  </PersistentDeviceSelectionData>
303
+ <PersistentDeviceSelectionData>
304
+ <option name="api" value="35" />
305
+ <option name="brand" value="motorola" />
306
+ <option name="codename" value="eqe" />
307
+ <option name="id" value="eqe" />
308
+ <option name="manufacturer" value="Motorola" />
309
+ <option name="name" value="edge 50 pro" />
310
+ <option name="screenDensity" value="450" />
311
+ <option name="screenX" value="1220" />
312
+ <option name="screenY" value="2712" />
313
+ </PersistentDeviceSelectionData>
303
314
  <PersistentDeviceSelectionData>
304
315
  <option name="api" value="33" />
305
316
  <option name="brand" value="google" />
package/README.md CHANGED
@@ -7,7 +7,7 @@ To add the path of sdk in your project. Open your `package.json` file and inside
7
7
 
8
8
  ```json
9
9
  "dependencies": {
10
- "@jimrising/easymerchantsdk-react-native": "^1.6.8"
10
+ "@jimrising/easymerchantsdk-react-native": "^1.6.9"
11
11
  },
12
12
  ```
13
13
 
@@ -39,8 +39,9 @@ repositories {
39
39
  }
40
40
 
41
41
  dependencies {
42
- implementation 'com.app:paysdk:1.3.2'
42
+ implementation 'com.app:paysdk:1.3.3'
43
43
  implementation 'com.hbb20:ccp:2.7.3'
44
+ implementation 'com.github.bumptech.glide:glide:4.16.0'
44
45
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1"
45
46
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1"
46
47
  implementation 'com.github.androidmads:QRGenerator:1.0.1'
@@ -504,9 +504,9 @@ class OTPVerificationVC: BaseVC {
504
504
  if let data = serviceData,
505
505
  let responseObj = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any],
506
506
  let message = responseObj["message"] as? String {
507
- DispatchQueue.main.async {
508
- self.showToast(message: message)
509
- }
507
+ DispatchQueue.main.async {
508
+ self.showToast(message: message)
509
+ }
510
510
  }
511
511
  }
512
512
  }
@@ -540,7 +540,7 @@ class OTPVerificationVC: BaseVC {
540
540
  uRLRequest.addValue(apiSecret, forHTTPHeaderField: "x-api-secret")
541
541
  }
542
542
 
543
- // let emailPrefix = email?.components(separatedBy: "@").first ?? ""
543
+ let emailPrefix = userEmail?.components(separatedBy: "@").first ?? ""
544
544
 
545
545
  var params: [String: Any] = [
546
546
  "name": nameOnCard ?? "",
@@ -550,15 +550,18 @@ class OTPVerificationVC: BaseVC {
550
550
  "exp_year": expiryDate?.components(separatedBy: "/").last ?? "",
551
551
  "cvc": cvv ?? "",
552
552
  "currency": "usd",
553
- // "payment_method": selectedPaymentMethod ?? "",
554
- "save_card": "1",
553
+ "payment_method": selectedPaymentMethod ?? "",
554
+ "save_card": 1,
555
555
  "is_default": "1",
556
556
  // "create_customer": "1"
557
- "email": userEmail ?? ""
557
+ "email": userEmail ?? "",
558
+ // "price":"6.0",
559
+ "tokenize": request.tokenOnly ?? "",
560
+ "username": emailPrefix
558
561
  ]
559
562
 
560
563
  if let customerId = customerId {
561
- // params["customer"] = customerId
564
+ params["customer"] = customerId
562
565
  params["customer_id"] = customerId
563
566
  }
564
567
  // else {
@@ -566,6 +569,10 @@ class OTPVerificationVC: BaseVC {
566
569
  // params["email"] = userEmail ?? ""
567
570
  // }
568
571
 
572
+ if customerId == nil {
573
+ params["create_customer"] = "1"
574
+ }
575
+
569
576
  if let billingInfoData = request.billingInfoData {
570
577
  do {
571
578
  let fieldSection = try JSONDecoder().decode(FieldSection.self, from: billingInfoData)
@@ -793,6 +800,10 @@ class OTPVerificationVC: BaseVC {
793
800
  params["email"] = email ?? ""
794
801
  }
795
802
 
803
+ if customerId == nil {
804
+ params["create_customer"] = "1"
805
+ }
806
+
796
807
  // Add these if recurring is enabled
797
808
  if let req = request, req.is_recurring == true {
798
809
  if let recurringType = req.recurringStartDateType, recurringType == .custom {
@@ -948,6 +959,10 @@ class OTPVerificationVC: BaseVC {
948
959
  params["username"] = emailPrefix
949
960
  }
950
961
 
962
+ if customerId == nil {
963
+ params["create_customer"] = "1"
964
+ }
965
+
951
966
  if let billingInfoData = request.billingInfoData {
952
967
  do {
953
968
  let fieldSection = try JSONDecoder().decode(FieldSection.self, from: billingInfoData)
@@ -1174,6 +1189,10 @@ class OTPVerificationVC: BaseVC {
1174
1189
  params["username"] = emailPrefix
1175
1190
  }
1176
1191
 
1192
+ if customerId == nil {
1193
+ params["create_customer"] = "1"
1194
+ }
1195
+
1177
1196
  // Add these if recurring is enabled
1178
1197
  if let req = request, req.is_recurring == true {
1179
1198
  if let recurringType = req.recurringStartDateType, recurringType == .custom {
@@ -1316,6 +1335,10 @@ class OTPVerificationVC: BaseVC {
1316
1335
  params["username"] = emailPrefix
1317
1336
  }
1318
1337
 
1338
+ if customerId == nil {
1339
+ params["create_customer"] = "1"
1340
+ }
1341
+
1319
1342
  // // Billing Info
1320
1343
  // if let visibility = visibility, visibility.billing == true,
1321
1344
  // let billing = billingInfo, !billing.isEmpty {
@@ -1534,6 +1557,10 @@ class OTPVerificationVC: BaseVC {
1534
1557
  "customer_id": customerId ?? ""
1535
1558
  ]
1536
1559
 
1560
+ if customerId == nil {
1561
+ params["create_customer"] = "1"
1562
+ }
1563
+
1537
1564
  // Add these if recurring is enabled
1538
1565
  if let req = request, req.is_recurring == true {
1539
1566
  if let recurringType = req.recurringStartDateType, recurringType == .custom {
@@ -1670,9 +1697,14 @@ class OTPVerificationVC: BaseVC {
1670
1697
  "tokenize": request.tokenOnly ?? false,
1671
1698
  "save_card": "1",
1672
1699
  "is_default": "1",
1673
- "customer_id": customerId ?? ""
1700
+ "customer_id": customerId ?? "",
1701
+ "customer" : customerId ?? ""
1674
1702
  ]
1675
1703
 
1704
+ if customerId == nil {
1705
+ params["create_customer"] = "1"
1706
+ }
1707
+
1676
1708
  // Always include Billing Info if available
1677
1709
  if let billing = billingInfo, !billing.isEmpty {
1678
1710
  var billingDict: [String: Any] = [:]
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'easymerchantsdk'
3
- s.version = '1.6.8'
3
+ s.version = '1.6.9'
4
4
  s.summary = 'A React Native SDK for Easy Merchant.'
5
5
  s.description = <<-DESC
6
6
  A React Native SDK to enable Easy Merchant functionality in mobile applications.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimrising/easymerchantsdk-react-native",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {