@jimrising/easymerchantsdk-react-native 1.3.9 → 1.4.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.
Files changed (80) hide show
  1. package/.idea/caches/deviceStreaming.xml +77 -0
  2. package/README.md +140 -81
  3. package/android/.gradle/8.10/checksums/checksums.lock +0 -0
  4. package/android/.gradle/8.10/checksums/md5-checksums.bin +0 -0
  5. package/android/.gradle/8.10/checksums/sha1-checksums.bin +0 -0
  6. package/android/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  8. package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
  9. package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
  10. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  12. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/results.bin +1 -0
  13. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
  14. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
  15. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$2.dex +0 -0
  16. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
  17. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
  18. package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  19. package/android/build/.transforms/e9a664a11ce12edf79cd87b1e07aa243/results.bin +1 -0
  20. package/android/build/.transforms/e9a664a11ce12edf79cd87b1e07aa243/transformed/classes/classes_dex/classes.dex +0 -0
  21. package/android/build/generated/source/buildConfig/debug/com/reactlibrary/BuildConfig.java +10 -0
  22. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
  23. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  24. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  25. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  26. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  27. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  28. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  29. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  30. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  31. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  32. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  33. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  34. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/BuildConfig.class +0 -0
  35. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  36. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
  37. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  38. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
  39. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  40. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
  41. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
  42. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  43. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  44. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/BuildConfig.class +0 -0
  45. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  46. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
  47. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  48. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
  49. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  50. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  51. package/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
  52. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$1.class.uniqueId2 +0 -0
  53. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$2.class.uniqueId0 +0 -0
  54. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule.class.uniqueId3 +0 -0
  55. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkPackage.class.uniqueId1 +0 -0
  56. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  57. package/android/build.gradle +4 -1
  58. package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java +158 -36
  59. package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkPackage.java +45 -13
  60. package/ios/Classes/EasyMerchantSdk.m +106 -55
  61. package/ios/Classes/EasyMerchantSdk.swift +199 -77
  62. package/ios/Classes/EasyPayViewController.swift +1 -1
  63. package/ios/CustomComponents/DatePickerHandler.swift +15 -4
  64. package/ios/EnvironmentConfig.swift +32 -30
  65. package/ios/Models/Request.swift +176 -14
  66. package/ios/Models/Result.swift +12 -5
  67. package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +855 -366
  68. package/ios/Pods/ViewControllers/BaseVC.swift +51 -36
  69. package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +1985 -178
  70. package/ios/Pods/ViewControllers/CountryListVC.swift +20 -1
  71. package/ios/Pods/ViewControllers/CustomOverlay.swift +199 -0
  72. package/ios/Pods/ViewControllers/EmailVerificationVC.swift +74 -5
  73. package/ios/Pods/ViewControllers/GrailPayVC.swift +131 -107
  74. package/ios/Pods/ViewControllers/OTPVerificationVC.swift +296 -106
  75. package/ios/Pods/ViewControllers/PaymentDoneVC.swift +35 -26
  76. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +1276 -545
  77. package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +607 -24
  78. package/ios/easymerchantsdk.podspec +1 -1
  79. package/ios/easymerchantsdk.storyboard +1388 -1165
  80. package/package.json +1 -1
@@ -16,25 +16,25 @@ class BaseVC: UIViewController {
16
16
  super.viewDidLoad()
17
17
  }
18
18
 
19
- func addOverlayView() {
20
- guard let keyWindowScene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene,
21
- let keyWindow = keyWindowScene.windows.first(where: { $0.isKeyWindow }) else {
22
- return
23
- }
24
- DispatchQueue.main.async {
25
- let overlayView = UIView(frame: keyWindow.bounds)
26
- overlayView.backgroundColor = UIColor.black.withAlphaComponent(0.3)
27
- keyWindow.addSubview(overlayView)
28
- self.overlayView = overlayView
29
- }
30
- }
31
-
32
- func removeOverlayView() {
33
- DispatchQueue.main.async {
34
- self.overlayView?.removeFromSuperview()
35
- self.overlayView = nil
36
- }
37
- }
19
+ // func addOverlayView() {
20
+ // guard let keyWindowScene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene,
21
+ // let keyWindow = keyWindowScene.windows.first(where: { $0.isKeyWindow }) else {
22
+ // return
23
+ // }
24
+ // DispatchQueue.main.async {
25
+ // let overlayView = UIView(frame: keyWindow.bounds)
26
+ // overlayView.backgroundColor = UIColor.black.withAlphaComponent(0.3)
27
+ // keyWindow.addSubview(overlayView)
28
+ // self.overlayView = overlayView
29
+ // }
30
+ // }
31
+ //
32
+ // func removeOverlayView() {
33
+ // DispatchQueue.main.async {
34
+ // self.overlayView?.removeFromSuperview()
35
+ // self.overlayView = nil
36
+ // }
37
+ // }
38
38
 
39
39
  func showLoadingIndicator() {
40
40
  DispatchQueue.main.async {
@@ -42,8 +42,7 @@ class BaseVC: UIViewController {
42
42
  activityIndicator.center = self.view.center
43
43
  activityIndicator.hidesWhenStopped = true
44
44
  activityIndicator.startAnimating()
45
-
46
- self.addOverlayView()
45
+ // self.addOverlayView()
47
46
  self.view.addSubview(activityIndicator)
48
47
  }
49
48
  }
@@ -54,7 +53,7 @@ class BaseVC: UIViewController {
54
53
  for subview in self.view.subviews {
55
54
  if let activityIndicator = subview as? UIActivityIndicatorView {
56
55
  activityIndicator.stopAnimating()
57
- self.removeOverlayView()
56
+ // self.removeOverlayView()
58
57
  activityIndicator.removeFromSuperview()
59
58
  }
60
59
  }
@@ -65,28 +64,43 @@ class BaseVC: UIViewController {
65
64
  func showToast(message: String, duration: Double = 3.0) {
66
65
  DispatchQueue.main.async { [weak self] in
67
66
  guard let self = self else { return }
68
-
67
+
69
68
  let toastLabel = UILabel()
70
69
  toastLabel.text = message
71
- toastLabel.textColor = UIColor.white
72
- toastLabel.backgroundColor = UIColor.black.withAlphaComponent(0.7)
70
+ toastLabel.textColor = .black
71
+ toastLabel.backgroundColor = .systemGray5
73
72
  toastLabel.textAlignment = .center
74
- toastLabel.font = UIFont.systemFont(ofSize: 14)
73
+ toastLabel.font = UIFont.systemFont(ofSize: 15)
75
74
  toastLabel.numberOfLines = 0
76
75
  toastLabel.alpha = 0.0
77
76
  toastLabel.layer.cornerRadius = 10
78
77
  toastLabel.clipsToBounds = true
79
-
80
- // Set the position of the toast
81
- let toastWidth: CGFloat = min(self.view.frame.width - 40, 250)
82
- let toastHeight: CGFloat = 50
83
- toastLabel.frame = CGRect(x: (self.view.frame.width - toastWidth) / 2,
84
- y: self.view.frame.height - 100,
85
- width: toastWidth,
86
- height: toastHeight)
87
-
78
+
79
+ let horizontalPadding: CGFloat = 22
80
+ let verticalPadding: CGFloat = 16
81
+ let maxWidth = self.view.frame.width - 2 * horizontalPadding
82
+
83
+ // Calculate size based on message content
84
+ let constraintSize = CGSize(width: maxWidth - 20, height: .greatestFiniteMagnitude)
85
+ let boundingBox = NSString(string: message).boundingRect(
86
+ with: constraintSize,
87
+ options: .usesLineFragmentOrigin,
88
+ attributes: [.font: toastLabel.font!],
89
+ context: nil
90
+ )
91
+
92
+ let calculatedHeight = boundingBox.height + verticalPadding
93
+
94
+ // Position it 60pt from bottom (was 100)
95
+ toastLabel.frame = CGRect(
96
+ x: horizontalPadding,
97
+ y: self.view.frame.height - calculatedHeight - 60,
98
+ width: maxWidth,
99
+ height: calculatedHeight
100
+ )
101
+
88
102
  self.view.addSubview(toastLabel)
89
-
103
+
90
104
  UIView.animate(withDuration: 0.5, animations: {
91
105
  toastLabel.alpha = 1.0
92
106
  }) { _ in
@@ -98,6 +112,7 @@ class BaseVC: UIViewController {
98
112
  }
99
113
  }
100
114
  }
115
+
101
116
 
102
117
  func showAlert(title: String = "Alert", message: String, actionTitle: String = "OK", handler: ((UIAlertAction) -> Void)? = nil) {
103
118
  DispatchQueue.main.async {