@jimrising/easymerchantsdk-react-native 1.1.1 → 1.1.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 (44) hide show
  1. package/.idea/caches/deviceStreaming.xml +132 -0
  2. package/.idea/modules.xml +0 -8
  3. package/.idea/workspace.xml +142 -3
  4. package/README.md +10 -8
  5. package/ios/Bundle/EasyPayBundle.swift +0 -1
  6. package/ios/Classes/EasyMerchantSdk.m +17 -4
  7. package/ios/Classes/EasyMerchantSdk.swift +12 -5
  8. package/ios/Classes/EasyPayViewController.swift +11 -15
  9. package/ios/CustomComponents/CheckboxButton.swift +40 -3
  10. package/ios/CustomComponents/FilledButton.swift +31 -3
  11. package/ios/CustomComponents/TextFieldStackView.swift +57 -17
  12. package/ios/Example/Base.lproj/Main.storyboard +4 -3
  13. package/ios/Example/ViewController.swift +19 -8
  14. package/ios/Extensions/UIColor.swift +17 -0
  15. package/ios/Extensions/UIFont.swift +1 -0
  16. package/ios/Models/PaymentInfo.swift +1 -2
  17. package/ios/Models/Request.swift +1 -1
  18. package/ios/Pods/UserDefaults/UserStoreSingleton.swift +0 -3
  19. package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +127 -73
  20. package/ios/Pods/ViewControllers/BaseVC.swift +9 -0
  21. package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +215 -145
  22. package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CityListTVC.swift +21 -0
  23. package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CountryListTVC.swift +23 -1
  24. package/ios/Pods/ViewControllers/BillingInfoVC/Cells/StateListTVC.swift +21 -0
  25. package/ios/Pods/ViewControllers/CountryListVC.swift +25 -0
  26. package/ios/Pods/ViewControllers/EmailVerificationVC.swift +48 -12
  27. package/ios/Pods/ViewControllers/OTPVerificationVC.swift +176 -68
  28. package/ios/Pods/ViewControllers/PaymentDoneVC.swift +52 -0
  29. package/ios/Pods/ViewControllers/PaymentErrorVC.swift +40 -0
  30. package/ios/Pods/ViewControllers/PaymentInformation/AccountTypeTVC.swift +18 -2
  31. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +1024 -252
  32. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInformationCVC.swift +13 -4
  33. package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.swift +32 -0
  34. package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.xib +5 -5
  35. package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.swift +27 -1
  36. package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.xib +5 -5
  37. package/ios/Pods/ViewControllers/TermAndConditionsVC.swift +33 -3
  38. package/ios/Resources/Assets.xcassets/Card/MasterCard.imageset/Contents.json +392 -2
  39. package/ios/ThirdParty/Keyboad Handling/KeyboardObserver.swift +1 -1
  40. package/ios/easymerchantsdk.podspec +3 -3
  41. package/package.json +1 -1
  42. package/src/index.js +4 -4
  43. package/.idea/easymerchantsdk-react-native.iml +0 -9
  44. package/ios/easymerchantsdk.storyboard +0 -5885
@@ -9,11 +9,32 @@ import UIKit
9
9
 
10
10
  class CityListTVC: UITableViewCell {
11
11
 
12
+ @IBOutlet weak var viewCell: UIView!
12
13
  @IBOutlet weak var lblCityName: UILabel!
13
14
 
14
15
  override func awakeFromNib() {
15
16
  super.awakeFromNib()
16
17
 
18
+ if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
19
+ let uiColor = UIColor(hex: primaryFontColor) {
20
+ lblCityName.textColor = uiColor
21
+ }
22
+
23
+ // Set background color for the main view
24
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
25
+ let uiColor = UIColor(hex: containerBGcolor) {
26
+ self.contentView.backgroundColor = uiColor
27
+ }
28
+ }
29
+
30
+ override func layoutSubviews() {
31
+ super.layoutSubviews()
32
+
33
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
34
+ let uiColor = UIColor(hex: containerBGcolor) {
35
+ self.contentView.backgroundColor = uiColor
36
+ viewCell?.backgroundColor = uiColor // Prevents crash if viewCell is nil
37
+ }
17
38
  }
18
39
 
19
40
  }
@@ -10,10 +10,32 @@ import UIKit
10
10
  class CountryListTVC: UITableViewCell {
11
11
 
12
12
  @IBOutlet weak var lblCountryName: UILabel!
13
+ @IBOutlet weak var viewCell: UIView!
13
14
 
14
15
  override func awakeFromNib() {
15
16
  super.awakeFromNib()
16
17
 
18
+ if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
19
+ let uiColor = UIColor(hex: primaryFontColor) {
20
+ lblCountryName.textColor = uiColor
21
+ }
22
+
23
+ // Set background color for the main view
24
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
25
+ let uiColor = UIColor(hex: containerBGcolor) {
26
+ self.contentView.backgroundColor = uiColor
27
+ }
28
+
17
29
  }
18
-
30
+
31
+ override func layoutSubviews() {
32
+ super.layoutSubviews()
33
+
34
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
35
+ let uiColor = UIColor(hex: containerBGcolor) {
36
+ self.contentView.backgroundColor = uiColor
37
+ viewCell?.backgroundColor = uiColor // Prevents crash if viewCell is nil
38
+ }
39
+ }
40
+
19
41
  }
@@ -10,10 +10,31 @@ import UIKit
10
10
  class StateListTVC: UITableViewCell {
11
11
 
12
12
  @IBOutlet weak var lblStateName: UILabel!
13
+ @IBOutlet weak var viewCell: UIView!
13
14
 
14
15
  override func awakeFromNib() {
15
16
  super.awakeFromNib()
16
17
 
18
+ if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
19
+ let uiColor = UIColor(hex: primaryFontColor) {
20
+ lblStateName.textColor = uiColor
21
+ }
22
+
23
+ // Set background color for the main view
24
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
25
+ let uiColor = UIColor(hex: containerBGcolor) {
26
+ self.contentView.backgroundColor = uiColor
27
+ }
28
+ }
29
+
30
+ override func layoutSubviews() {
31
+ super.layoutSubviews()
32
+
33
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
34
+ let uiColor = UIColor(hex: containerBGcolor) {
35
+ self.contentView.backgroundColor = uiColor
36
+ viewCell?.backgroundColor = uiColor // Prevents crash if viewCell is nil
37
+ }
17
38
  }
18
39
 
19
40
  }
@@ -13,6 +13,7 @@ protocol CountryListVCDelegate: AnyObject {
13
13
 
14
14
  class CountryListVC: UIViewController {
15
15
 
16
+ @IBOutlet var viewClass: UIView!
16
17
  @IBOutlet weak var searchBarCountry: UISearchBar!
17
18
  @IBOutlet weak var tblViewCountry: UITableView!
18
19
 
@@ -24,6 +25,23 @@ class CountryListVC: UIViewController {
24
25
  override func viewDidLoad() {
25
26
  super.viewDidLoad()
26
27
 
28
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
29
+ let uiColor = UIColor(hex: containerBGcolor) {
30
+ self.view.backgroundColor = uiColor
31
+ self.searchBarCountry.backgroundColor = uiColor
32
+ self.searchBarCountry.barTintColor = uiColor
33
+ }
34
+
35
+ if let primaryFontColor = UserStoreSingleton.shared.primary_btn_bg_col,
36
+ let uiColor = UIColor(hex: primaryFontColor) {
37
+ searchBarCountry.tintColor = uiColor
38
+ }
39
+
40
+ if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
41
+ let uiColor = UIColor(hex: primaryFontColor) {
42
+ searchBarCountry.searchTextField.textColor = uiColor
43
+ }
44
+
27
45
  tblViewCountry.delegate = self
28
46
  tblViewCountry.dataSource = self
29
47
 
@@ -339,6 +357,13 @@ extension CountryListVC: UITableViewDelegate, UITableViewDataSource {
339
357
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
340
358
  let cell = tableView.dequeueReusableCell(withIdentifier: "cell")
341
359
  cell?.textLabel?.text = "\(self.searchList[indexPath.row].flag!) \(self.searchList[indexPath.row].name!)"
360
+
361
+ // Apply color from UserStoreSingleton
362
+ if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
363
+ let uiColor = UIColor(hex: primaryFontColor) {
364
+ cell?.textLabel?.textColor = uiColor
365
+ }
366
+
342
367
  return cell!
343
368
  }
344
369
 
@@ -9,7 +9,10 @@ import UIKit
9
9
 
10
10
  class EmailVerificationVC: BaseVC {
11
11
 
12
+ @IBOutlet weak var lblUsedSavedInfo: UILabel!
13
+ @IBOutlet weak var subLblUsedSavedInfo: UILabel!
12
14
  @IBOutlet weak var txtFieldEmail: UITextField!
15
+ @IBOutlet weak var btnGetOTP: UIButton!
13
16
 
14
17
  var cardNumber: String?
15
18
  var expiryDate: String?
@@ -28,15 +31,48 @@ class EmailVerificationVC: BaseVC {
28
31
  var easyPayDelegate: EasyPayViewControllerDelegate?
29
32
 
30
33
  var isSavedForFuture: Bool = false
31
-
34
+
32
35
  override func viewDidLoad() {
33
36
  super.viewDidLoad()
34
37
 
38
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
39
+ let uiColor = UIColor(hex: containerBGcolor) {
40
+ self.view.backgroundColor = uiColor
41
+ }
42
+
43
+ if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
44
+ let uiColor = UIColor(hex: primaryFontColor) {
45
+ lblUsedSavedInfo.textColor = uiColor
46
+ }
47
+
48
+ if let primaryFontColor = UserStoreSingleton.shared.secondary_font_col,
49
+ let uiColor = UIColor(hex: primaryFontColor) {
50
+ subLblUsedSavedInfo.textColor = uiColor
51
+ }
52
+
53
+ if let primaryFontColor = UserStoreSingleton.shared.primary_btn_bg_col,
54
+ let uiColor = UIColor(hex: primaryFontColor) {
55
+ btnGetOTP.backgroundColor = uiColor
56
+ }
57
+
58
+ if let secondaryBtnBackgroundColor = UserStoreSingleton.shared.primary_btn_font_col,
59
+ let secondaryUIColor = UIColor(hex: secondaryBtnBackgroundColor) {
60
+ btnGetOTP.setTitleColor(secondaryUIColor, for: .normal)
61
+ }
62
+
63
+ if let borderRadiusString = UserStoreSingleton.shared.border_radious,
64
+ let borderRadius = Double(borderRadiusString) { // Convert String to Double
65
+ btnGetOTP.layer.cornerRadius = CGFloat(borderRadius) // Set corner radius
66
+ } else {
67
+ btnGetOTP.layer.cornerRadius = 8 // Default value
68
+ }
69
+ btnGetOTP.layer.masksToBounds = true // Ensure the corners are clipped properly
70
+
35
71
  // Add tap gesture recognizer to dismiss the keyboard
36
72
  let tapGesture = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard))
37
73
  view.addGestureRecognizer(tapGesture)
38
74
 
39
- print(isSavedForFuture)
75
+ print(isSavedForFuture)
40
76
  print(cardNumber ?? "")
41
77
  print(expiryDate ?? "")
42
78
  print(cvv ?? "")
@@ -51,16 +87,16 @@ class EmailVerificationVC: BaseVC {
51
87
  // MARK: - Send OTP Email Verification Api
52
88
  func emailVerificationApi() {
53
89
  showLoadingIndicator()
54
- // var components = URLComponents()
55
- // components.scheme = "https"
56
- // components.host = "stage-api.stage-easymerchant.io"
57
- // components.path = "/api/v1/customer/send_otp"
58
- //
59
- // guard let serviceURL = components.url else {
60
- // print("Invalid URL")
61
- // hideLoadingIndicator()
62
- // return
63
- // }
90
+ // var components = URLComponents()
91
+ // components.scheme = "https"
92
+ // components.host = "stage-api.stage-easymerchant.io"
93
+ // components.path = "/api/v1/customer/send_otp"
94
+ //
95
+ // guard let serviceURL = components.url else {
96
+ // print("Invalid URL")
97
+ // hideLoadingIndicator()
98
+ // return
99
+ // }
64
100
 
65
101
  // Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
66
102
  let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.emailVerification.path()
@@ -26,6 +26,10 @@ class OTPVerificationVC: BaseVC {
26
26
  @IBOutlet weak var lblUntillResendOtp: UILabel!
27
27
  @IBOutlet weak var btnResendOTP: UIButton!
28
28
 
29
+ @IBOutlet weak var btnConfirmCode: UIButton!
30
+ @IBOutlet weak var lblUsedSavedInfo: UILabel!
31
+ @IBOutlet weak var lblEnterOTP: UILabel!
32
+
29
33
  var cardNumber: String?
30
34
  var expiryDate: String?
31
35
  var cvv: String?
@@ -54,6 +58,8 @@ class OTPVerificationVC: BaseVC {
54
58
  override func viewDidLoad() {
55
59
  super.viewDidLoad()
56
60
 
61
+ uiFinishingTouchElements()
62
+
57
63
  // Add tap gesture recognizer to dismiss the keyboard
58
64
  let tapGesture = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard))
59
65
  view.addGestureRecognizer(tapGesture)
@@ -65,6 +71,82 @@ class OTPVerificationVC: BaseVC {
65
71
 
66
72
  override func viewWillAppear(_ animated: Bool) {
67
73
  startTimer()
74
+ uiFinishingTouchElements()
75
+ }
76
+
77
+ //MARK: - Ui Colors Setup.
78
+ func uiFinishingTouchElements() {
79
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
80
+ let uiColor = UIColor(hex: containerBGcolor) {
81
+ self.view.backgroundColor = uiColor
82
+ }
83
+
84
+ if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
85
+ let uiColor = UIColor(hex: primaryFontColor) {
86
+ lblUsedSavedInfo.textColor = uiColor
87
+ txtFieldOTPText1.textColor = uiColor
88
+ txtFieldOTPText2.textColor = uiColor
89
+ txtFieldOTPText3.textColor = uiColor
90
+ txtFieldOTPText4.textColor = uiColor
91
+ txtFieldOTPText5.textColor = uiColor
92
+ txtFieldOTPText6.textColor = uiColor
93
+ }
94
+
95
+ if let primaryFontColor = UserStoreSingleton.shared.secondary_font_col,
96
+ let uiColor = UIColor(hex: primaryFontColor) {
97
+ lblEnterOTP.textColor = uiColor
98
+ lblUntillResendOtp.textColor = uiColor
99
+ }
100
+
101
+ if let primaryFontColor = UserStoreSingleton.shared.primary_btn_bg_col,
102
+ let uiColor = UIColor(hex: primaryFontColor) {
103
+ btnConfirmCode.backgroundColor = uiColor
104
+ btnResendOTP.tintColor = uiColor
105
+ txtFieldOTPText1.tintColor = uiColor
106
+ txtFieldOTPText2.tintColor = uiColor
107
+ txtFieldOTPText3.tintColor = uiColor
108
+ txtFieldOTPText4.tintColor = uiColor
109
+ txtFieldOTPText5.tintColor = uiColor
110
+ txtFieldOTPText6.tintColor = uiColor
111
+ }
112
+
113
+ if let secondaryBtnBackgroundColor = UserStoreSingleton.shared.primary_btn_font_col,
114
+ let secondaryUIColor = UIColor(hex: secondaryBtnBackgroundColor) {
115
+ btnConfirmCode.setTitleColor(secondaryUIColor, for: .normal)
116
+ }
117
+
118
+ if let borderRadiusString = UserStoreSingleton.shared.border_radious,
119
+ let borderRadius = Double(borderRadiusString) { // Convert String to Double
120
+ btnConfirmCode.layer.cornerRadius = CGFloat(borderRadius) // Set corner radius
121
+ viewTextOTP1.layer.cornerRadius = CGFloat(borderRadius)
122
+ viewTextOTP2.layer.cornerRadius = CGFloat(borderRadius)
123
+ viewTextOTP3.layer.cornerRadius = CGFloat(borderRadius)
124
+ viewTextOTP4.layer.cornerRadius = CGFloat(borderRadius)
125
+ viewTextOTP5.layer.cornerRadius = CGFloat(borderRadius)
126
+ viewTextOTP6.layer.cornerRadius = CGFloat(borderRadius)
127
+ } else {
128
+ btnConfirmCode.layer.cornerRadius = 8 // Default value
129
+ }
130
+ btnConfirmCode.layer.masksToBounds = true // Ensure the corners are clipped properly
131
+
132
+ if let viewOtpPrimaryBackgroundColor = UserStoreSingleton.shared.primary_btn_bg_col,
133
+ let primaryUIColor = UIColor(hex: viewOtpPrimaryBackgroundColor),
134
+ let viewOtpSecondaryColor = UserStoreSingleton.shared.secondary_font_col,
135
+ let secondaryUIColor = UIColor(hex: viewOtpSecondaryColor) {
136
+
137
+ viewTextOTP1.layer.borderWidth = 1.0
138
+ viewTextOTP1.layer.borderColor = txtFieldOTPText1.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
139
+ viewTextOTP2.layer.borderWidth = 1.0
140
+ viewTextOTP2.layer.borderColor = txtFieldOTPText2.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
141
+ viewTextOTP3.layer.borderWidth = 1.0
142
+ viewTextOTP3.layer.borderColor = txtFieldOTPText3.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
143
+ viewTextOTP4.layer.borderWidth = 1.0
144
+ viewTextOTP4.layer.borderColor = txtFieldOTPText4.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
145
+ viewTextOTP5.layer.borderWidth = 1.0
146
+ viewTextOTP5.layer.borderColor = txtFieldOTPText5.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
147
+ viewTextOTP6.layer.borderWidth = 1.0
148
+ viewTextOTP6.layer.borderColor = txtFieldOTPText6.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
149
+ }
68
150
  }
69
151
 
70
152
  // Method to dismiss the keyboard
@@ -116,16 +198,16 @@ class OTPVerificationVC: BaseVC {
116
198
  func otpVerificationApi() {
117
199
  showLoadingIndicator()
118
200
 
119
- // var components = URLComponents()
120
- // components.scheme = "https"
121
- // components.host = "stage-api.stage-easymerchant.io"
122
- // components.path = "/api/v1/customer/verify_otp"
123
- //
124
- // guard let serviceURL = components.url else {
125
- // print("Invalid URL")
126
- // hideLoadingIndicator()
127
- // return
128
- // }
201
+ // var components = URLComponents()
202
+ // components.scheme = "https"
203
+ // components.host = "stage-api.stage-easymerchant.io"
204
+ // components.path = "/api/v1/customer/verify_otp"
205
+ //
206
+ // guard let serviceURL = components.url else {
207
+ // print("Invalid URL")
208
+ // hideLoadingIndicator()
209
+ // return
210
+ // }
129
211
 
130
212
  // Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
131
213
  let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.verifyOtp.path()
@@ -242,16 +324,16 @@ class OTPVerificationVC: BaseVC {
242
324
  //MARK: - Send OTP Email Verification Api
243
325
  func emailVerificationApi() {
244
326
  showLoadingIndicator()
245
- // var components = URLComponents()
246
- // components.scheme = "https"
247
- // components.host = "stage-api.stage-easymerchant.io"
248
- // components.path = "/api/v1/customer/send_otp"
249
- //
250
- // guard let serviceURL = components.url else {
251
- // print("Invalid URL")
252
- // hideLoadingIndicator()
253
- // return
254
- // }
327
+ // var components = URLComponents()
328
+ // components.scheme = "https"
329
+ // components.host = "stage-api.stage-easymerchant.io"
330
+ // components.path = "/api/v1/customer/send_otp"
331
+ //
332
+ // guard let serviceURL = components.url else {
333
+ // print("Invalid URL")
334
+ // hideLoadingIndicator()
335
+ // return
336
+ // }
255
337
 
256
338
  // Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
257
339
  let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.emailVerification.path()
@@ -330,16 +412,16 @@ class OTPVerificationVC: BaseVC {
330
412
  func paymentIntentApi(customerId: String?) {
331
413
  showLoadingIndicator()
332
414
 
333
- // var components = URLComponents()
334
- // components.scheme = "https"
335
- // components.host = "stage-api.stage-easymerchant.io"
336
- // components.path = "/api/v1/charges"
337
- //
338
- // guard let serviceURL = components.url else {
339
- // print("Invalid URL")
340
- // hideLoadingIndicator()
341
- // return
342
- // }
415
+ // var components = URLComponents()
416
+ // components.scheme = "https"
417
+ // components.host = "stage-api.stage-easymerchant.io"
418
+ // components.path = "/api/v1/charges"
419
+ //
420
+ // guard let serviceURL = components.url else {
421
+ // print("Invalid URL")
422
+ // hideLoadingIndicator()
423
+ // return
424
+ // }
343
425
 
344
426
  // Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
345
427
  let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.charges.path()
@@ -477,16 +559,16 @@ class OTPVerificationVC: BaseVC {
477
559
  func paymentIntentWithSavedCardApi(customerId: String?) {
478
560
  showLoadingIndicator()
479
561
 
480
- // var components = URLComponents()
481
- // components.scheme = "https"
482
- // components.host = "stage-api.stage-easymerchant.io"
483
- // components.path = "/api/v1/charges"
484
- //
485
- // guard let serviceURL = components.url else {
486
- // print("Invalid URL")
487
- // hideLoadingIndicator()
488
- // return
489
- // }
562
+ // var components = URLComponents()
563
+ // components.scheme = "https"
564
+ // components.host = "stage-api.stage-easymerchant.io"
565
+ // components.path = "/api/v1/charges"
566
+ //
567
+ // guard let serviceURL = components.url else {
568
+ // print("Invalid URL")
569
+ // hideLoadingIndicator()
570
+ // return
571
+ // }
490
572
 
491
573
  // Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
492
574
  let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.charges.path()
@@ -610,16 +692,16 @@ class OTPVerificationVC: BaseVC {
610
692
  func accountChargeApi(customerId: String?) {
611
693
  showLoadingIndicator()
612
694
 
613
- // var components = URLComponents()
614
- // components.scheme = "https"
615
- // components.host = "stage-api.stage-easymerchant.io"
616
- // components.path = "/api/v1/ach/charge"
617
- //
618
- // guard let serviceURL = components.url else {
619
- // print("Invalid URL")
620
- // hideLoadingIndicator()
621
- // return
622
- // }
695
+ // var components = URLComponents()
696
+ // components.scheme = "https"
697
+ // components.host = "stage-api.stage-easymerchant.io"
698
+ // components.path = "/api/v1/ach/charge"
699
+ //
700
+ // guard let serviceURL = components.url else {
701
+ // print("Invalid URL")
702
+ // hideLoadingIndicator()
703
+ // return
704
+ // }
623
705
 
624
706
  // Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
625
707
  let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()
@@ -756,16 +838,16 @@ class OTPVerificationVC: BaseVC {
756
838
  func accountChargeWithSavedAccountApi(customerId: String?) {
757
839
  showLoadingIndicator()
758
840
 
759
- // var components = URLComponents()
760
- // components.scheme = "https"
761
- // components.host = "stage-api.stage-easymerchant.io"
762
- // components.path = "/api/v1/ach/charge"
763
- //
764
- // guard let serviceURL = components.url else {
765
- // print("Invalid URL")
766
- // hideLoadingIndicator()
767
- // return
768
- // }
841
+ // var components = URLComponents()
842
+ // components.scheme = "https"
843
+ // components.host = "stage-api.stage-easymerchant.io"
844
+ // components.path = "/api/v1/ach/charge"
845
+ //
846
+ // guard let serviceURL = components.url else {
847
+ // print("Invalid URL")
848
+ // hideLoadingIndicator()
849
+ // return
850
+ // }
769
851
 
770
852
  // Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
771
853
  let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()
@@ -934,7 +1016,7 @@ extension OTPVerificationVC: UITextFieldDelegate {
934
1016
  txtFieldOTPText6.resignFirstResponder()
935
1017
  // Call OTP verification API when the last field is filled
936
1018
  if getCombinedOTP().count == 6 {
937
- // otpVerificationApi()
1019
+ // otpVerificationApi()
938
1020
  }
939
1021
  default:
940
1022
  break
@@ -967,14 +1049,40 @@ extension OTPVerificationVC: UITextFieldDelegate {
967
1049
  return true
968
1050
  }
969
1051
 
970
- // Update the view colors based on text presence in OTP fields.
1052
+ // Update the view colors based on text presence in OTP fields
971
1053
  private func updateViewColors() {
972
- viewTextOTP1.backgroundColor = txtFieldOTPText1.text?.isEmpty == false ? .systemBlue : .systemGray
973
- viewTextOTP2.backgroundColor = txtFieldOTPText2.text?.isEmpty == false ? .systemBlue : .systemGray
974
- viewTextOTP3.backgroundColor = txtFieldOTPText3.text?.isEmpty == false ? .systemBlue : .systemGray
975
- viewTextOTP4.backgroundColor = txtFieldOTPText4.text?.isEmpty == false ? .systemBlue : .systemGray
976
- viewTextOTP5.backgroundColor = txtFieldOTPText5.text?.isEmpty == false ? .systemBlue : .systemGray
977
- viewTextOTP6.backgroundColor = txtFieldOTPText6.text?.isEmpty == false ? .systemBlue : .systemGray
1054
+ if let primaryBtnBackgroundColor = UserStoreSingleton.shared.primary_btn_bg_col,
1055
+ let primaryUIColor = UIColor(hex: primaryBtnBackgroundColor),
1056
+ let secondaryFontColor = UserStoreSingleton.shared.secondary_font_col,
1057
+ let secondaryUIColor = UIColor(hex: secondaryFontColor) {
1058
+
1059
+ viewTextOTP1.layer.borderWidth = 1.0
1060
+ viewTextOTP1.layer.borderColor = txtFieldOTPText1.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
1061
+ viewTextOTP2.layer.borderWidth = 1.0
1062
+ viewTextOTP2.layer.borderColor = txtFieldOTPText2.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
1063
+ viewTextOTP3.layer.borderWidth = 1.0
1064
+ viewTextOTP3.layer.borderColor = txtFieldOTPText3.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
1065
+ viewTextOTP4.layer.borderWidth = 1.0
1066
+ viewTextOTP4.layer.borderColor = txtFieldOTPText4.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
1067
+ viewTextOTP5.layer.borderWidth = 1.0
1068
+ viewTextOTP5.layer.borderColor = txtFieldOTPText5.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
1069
+ viewTextOTP6.layer.borderWidth = 1.0
1070
+ viewTextOTP6.layer.borderColor = txtFieldOTPText6.text?.isEmpty == false ? primaryUIColor.cgColor : secondaryUIColor.cgColor
1071
+ }
1072
+ else {
1073
+ viewTextOTP1.layer.borderWidth = 1.0
1074
+ viewTextOTP1.layer.borderColor = (txtFieldOTPText1.text?.isEmpty == false ? UIColor.systemBlue : UIColor.systemGray).cgColor
1075
+ viewTextOTP2.layer.borderWidth = 1.0
1076
+ viewTextOTP2.layer.borderColor = (txtFieldOTPText2.text?.isEmpty == false ? UIColor.systemBlue : UIColor.systemGray).cgColor
1077
+ viewTextOTP3.layer.borderWidth = 1.0
1078
+ viewTextOTP3.layer.borderColor = (txtFieldOTPText3.text?.isEmpty == false ? UIColor.systemBlue : UIColor.systemGray).cgColor
1079
+ viewTextOTP4.layer.borderWidth = 1.0
1080
+ viewTextOTP4.layer.borderColor = (txtFieldOTPText4.text?.isEmpty == false ? UIColor.systemBlue : UIColor.systemGray).cgColor
1081
+ viewTextOTP5.layer.borderWidth = 1.0
1082
+ viewTextOTP5.layer.borderColor = (txtFieldOTPText5.text?.isEmpty == false ? UIColor.systemBlue : UIColor.systemGray).cgColor
1083
+ viewTextOTP6.layer.borderWidth = 1.0
1084
+ viewTextOTP6.layer.borderColor = (txtFieldOTPText6.text?.isEmpty == false ? UIColor.systemBlue : UIColor.systemGray).cgColor
1085
+ }
978
1086
  }
979
1087
 
980
1088
  @objc func textFieldDidChange(_ textField: UITextField) {
@@ -13,6 +13,12 @@ class PaymentDoneVC: UIViewController {
13
13
  @IBOutlet weak var lblTransactionId: UILabel!
14
14
  @IBOutlet weak var lblPaymentSource: UILabel!
15
15
  @IBOutlet weak var lblTotal: UILabel!
16
+ @IBOutlet weak var btnDone: UIButton!
17
+
18
+ @IBOutlet weak var lblHeadingDate: UILabel!
19
+ @IBOutlet weak var lblHeadingTransactionID: UILabel!
20
+ @IBOutlet weak var lbHeadingPaymentMethod: UILabel!
21
+ @IBOutlet weak var lblHeadingTotal: UILabel!
16
22
 
17
23
  var chargeData: [String: Any]?
18
24
  var selectedPaymentMethod: String?
@@ -27,6 +33,8 @@ class PaymentDoneVC: UIViewController {
27
33
  override func viewDidLoad() {
28
34
  super.viewDidLoad()
29
35
 
36
+ uiFinishingTouchElements()
37
+
30
38
  if isFrom == "Crypto" {
31
39
  // Display the crypto data if available
32
40
  lblTotal.text = "$\(amount ?? "0.00")"
@@ -58,6 +66,49 @@ class PaymentDoneVC: UIViewController {
58
66
 
59
67
  }
60
68
 
69
+ override func viewWillAppear(_ animated: Bool) {
70
+ uiFinishingTouchElements()
71
+ }
72
+
73
+ func uiFinishingTouchElements() {
74
+ // Set background color for the main view
75
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
76
+ let uiColor = UIColor(hex: containerBGcolor) {
77
+ self.view.backgroundColor = uiColor
78
+ }
79
+
80
+ if let primaryBtnBackGroundColor = UserStoreSingleton.shared.primary_btn_bg_col,
81
+ let uiColor = UIColor(hex: primaryBtnBackGroundColor) {
82
+ btnDone.backgroundColor = uiColor
83
+ }
84
+
85
+ if let primaryBtnFontColor = UserStoreSingleton.shared.primary_btn_font_col,
86
+ let secondaryUIColor = UIColor(hex: primaryBtnFontColor) {
87
+ btnDone.setTitleColor(secondaryUIColor, for: .normal)
88
+ }
89
+
90
+ if let borderRadiusString = UserStoreSingleton.shared.border_radious,
91
+ let borderRadius = Double(borderRadiusString) { // Convert String to Double
92
+ btnDone.layer.cornerRadius = CGFloat(borderRadius) // Set corner radius
93
+ } else {
94
+ btnDone.layer.cornerRadius = 8 // Default value
95
+ }
96
+ btnDone.layer.masksToBounds = true // Ensure the corners are clipped properly
97
+
98
+ if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
99
+ let uiColor = UIColor(hex: primaryFontColor) {
100
+ lblHeadingDate.textColor = uiColor
101
+ lblHeadingTransactionID.textColor = uiColor
102
+ lbHeadingPaymentMethod.textColor = uiColor
103
+ lblHeadingTotal.textColor = uiColor
104
+ lblDate.textColor = uiColor
105
+ lblTransactionId.textColor = uiColor
106
+ lblPaymentSource.textColor = uiColor
107
+ lblTotal.textColor = uiColor
108
+ }
109
+
110
+ }
111
+
61
112
  // Helper method to check if the date string is valid
62
113
  func isValidDate(_ dateString: String) -> Bool {
63
114
  let dateFormatter = DateFormatter()
@@ -66,6 +117,7 @@ class PaymentDoneVC: UIViewController {
66
117
  }
67
118
 
68
119
  func showDateAndTime() {
120
+
69
121
  // Get the current date and time
70
122
  let currentDate = Date()
71
123
  // Format the date and time as "dd/MM/yyyy, HH:mm:ss"