@jimrising/easymerchantsdk-react-native 1.3.9 → 1.4.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.
Files changed (31) 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/ios/Classes/EasyMerchantSdk.m +106 -55
  13. package/ios/Classes/EasyMerchantSdk.swift +199 -77
  14. package/ios/Classes/EasyPayViewController.swift +1 -1
  15. package/ios/CustomComponents/DatePickerHandler.swift +15 -4
  16. package/ios/EnvironmentConfig.swift +32 -30
  17. package/ios/Models/Request.swift +176 -14
  18. package/ios/Models/Result.swift +12 -5
  19. package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +845 -358
  20. package/ios/Pods/ViewControllers/BaseVC.swift +39 -35
  21. package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +1975 -170
  22. package/ios/Pods/ViewControllers/CountryListVC.swift +0 -1
  23. package/ios/Pods/ViewControllers/EmailVerificationVC.swift +74 -5
  24. package/ios/Pods/ViewControllers/GrailPayVC.swift +131 -107
  25. package/ios/Pods/ViewControllers/OTPVerificationVC.swift +296 -106
  26. package/ios/Pods/ViewControllers/PaymentDoneVC.swift +21 -12
  27. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +1273 -513
  28. package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +104 -12
  29. package/ios/easymerchantsdk.podspec +1 -1
  30. package/ios/easymerchantsdk.storyboard +467 -412
  31. 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,33 @@ 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 = UIColor.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
78
+
79
+ // Set max width and calculate height based on text
80
+ let horizontalPadding: CGFloat = 22
81
+ let maxWidth = self.view.frame.width - 2 * horizontalPadding
79
82
 
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
-
83
+ let expectedSize = 30
84
+
85
+ toastLabel.frame = CGRect(
86
+ x: horizontalPadding,
87
+ y: self.view.frame.height - CGFloat(expectedSize) - 100,
88
+ width: maxWidth,
89
+ height: CGFloat(expectedSize + 20) // Add vertical padding
90
+ )
91
+
88
92
  self.view.addSubview(toastLabel)
89
-
93
+
90
94
  UIView.animate(withDuration: 0.5, animations: {
91
95
  toastLabel.alpha = 1.0
92
96
  }) { _ in