@jimrising/easymerchantsdk-react-native 2.5.1 → 2.5.3

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 (37) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/android/build.gradle +1 -1
  3. package/ios/ApiManager/APIHeaders.swift +0 -6
  4. package/ios/ApiManager/APIRequest.swift +3 -8
  5. package/ios/Classes/EasyMerchantSdk.m +2 -2
  6. package/ios/Classes/EasyMerchantSdk.swift +25 -13
  7. package/ios/Helper/GrailPayHelper.swift +1 -0
  8. package/ios/Models/Request.swift +3 -3
  9. package/ios/Pods/Storyboard/EasyPaySdk.storyboard +9089 -0
  10. package/ios/Pods/UserDefaults/UserStoreSingleton.swift +424 -0
  11. package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +2917 -0
  12. package/ios/Pods/ViewControllers/BaseVC.swift +142 -0
  13. package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +3686 -0
  14. package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CityListTVC.swift +46 -0
  15. package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CountryListTVC.swift +47 -0
  16. package/ios/Pods/ViewControllers/BillingInfoVC/Cells/StateListTVC.swift +46 -0
  17. package/ios/Pods/ViewControllers/Clean Runner_2025-07-23T14-58-05.txt +13 -0
  18. package/ios/Pods/ViewControllers/CountryListVC.swift +435 -0
  19. package/ios/Pods/ViewControllers/EmailVerificationVC.swift +286 -0
  20. package/ios/Pods/ViewControllers/GrailPayVC.swift +475 -0
  21. package/ios/Pods/ViewControllers/OTPVerificationVC.swift +2254 -0
  22. package/ios/Pods/ViewControllers/PaymentDoneVC.swift +284 -0
  23. package/ios/Pods/ViewControllers/PaymentErrorVC.swift +85 -0
  24. package/ios/Pods/ViewControllers/PaymentInformation/AccountTypeTVC.swift +41 -0
  25. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +13010 -0
  26. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInformationCVC.swift +35 -0
  27. package/ios/Pods/ViewControllers/PaymentInformation/RecurringTVC.swift +43 -0
  28. package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.swift +80 -0
  29. package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.xib +163 -0
  30. package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.swift +81 -0
  31. package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.xib +188 -0
  32. package/ios/Pods/ViewControllers/PaymentStatusWebViewVC.swift +127 -0
  33. package/ios/Pods/ViewControllers/TermAndConditionsVC.swift +63 -0
  34. package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +1220 -0
  35. package/ios/easymerchantsdk.podspec +1 -1
  36. package/package.json +1 -1
  37. package/ACH_CHARGE_ENDPOINT_TRACE.md +0 -69
@@ -0,0 +1,127 @@
1
+ //
2
+ // PaymentStatusWebViewVC.swift
3
+ // EasyPay
4
+ //
5
+ // Created by Mony's Mac on 17/07/25.
6
+ //
7
+
8
+ import UIKit
9
+ import WebKit
10
+
11
+ class PaymentStatusWebViewVC: UIViewController, WKNavigationDelegate {
12
+
13
+ var urlString: String?
14
+ private var webView: WKWebView!
15
+ private var closeButton: UIButton!
16
+ private var activityIndicator: UIActivityIndicatorView!
17
+ private var didShowCloseButton = false // 👈 Flag
18
+
19
+ override func viewDidLoad() {
20
+ super.viewDidLoad()
21
+ setupWebView()
22
+ setupCloseButton()
23
+ setupActivityIndicator()
24
+ loadRequestedURL()
25
+ }
26
+
27
+ private func setupWebView() {
28
+ webView = WKWebView(frame: self.view.bounds)
29
+ webView.navigationDelegate = self
30
+ webView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
31
+ self.view.addSubview(webView)
32
+ }
33
+
34
+ private func setupCloseButton() {
35
+ closeButton = UIButton(type: .system)
36
+ if let closeImage = UIImage(systemName: "xmark.circle.fill") {
37
+ closeButton.setImage(closeImage, for: .normal)
38
+ closeButton.tintColor = .systemGray
39
+ } else {
40
+ closeButton.setTitle("X", for: .normal)
41
+ closeButton.setTitleColor(.systemGray, for: .normal)
42
+ closeButton.titleLabel?.font = UIFont.systemFont(ofSize: 24, weight: .bold)
43
+ }
44
+ closeButton.frame = CGRect(x: self.view.bounds.width - 50, y: 50, width: 40, height: 40)
45
+ closeButton.autoresizingMask = [.flexibleLeftMargin, .flexibleBottomMargin]
46
+ closeButton.addTarget(self, action: #selector(closeButtonTapped), for: .touchUpInside)
47
+ closeButton.isHidden = true
48
+ self.view.addSubview(closeButton)
49
+ }
50
+
51
+ private func setupActivityIndicator() {
52
+ activityIndicator = UIActivityIndicatorView(style: .large)
53
+ activityIndicator.center = self.view.center
54
+ activityIndicator.hidesWhenStopped = true
55
+ self.view.addSubview(activityIndicator)
56
+ }
57
+
58
+ private func loadRequestedURL() {
59
+ guard let urlString = urlString, let url = URL(string: urlString) else {
60
+ return
61
+ }
62
+ let request = URLRequest(url: url)
63
+ webView.load(request)
64
+ }
65
+
66
+ @objc private func closeButtonTapped() {
67
+ self.navigationController?.popViewController(animated: true)
68
+ }
69
+
70
+ // MARK: - WKNavigationDelegate
71
+ func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
72
+ activityIndicator.startAnimating()
73
+ closeButton.isHidden = true
74
+ didShowCloseButton = false // 👈 Reset the flag
75
+ }
76
+
77
+ func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
78
+ if !didShowCloseButton {
79
+ waitForPageToBeReady()
80
+ } else {
81
+ }
82
+ }
83
+
84
+ func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) {
85
+ activityIndicator.stopAnimating()
86
+ closeButton.isHidden = false
87
+ }
88
+
89
+ func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
90
+ activityIndicator.stopAnimating()
91
+ closeButton.isHidden = false
92
+ }
93
+
94
+ private func waitForPageToBeReady() {
95
+ webView.evaluateJavaScript("document.readyState") { [weak self] result, error in
96
+ guard let self = self else { return }
97
+ if let state = result as? String {
98
+ if state == "complete" {
99
+ self.checkIfPaymentUILoaded()
100
+ } else {
101
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
102
+ self.waitForPageToBeReady()
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+
109
+ private func checkIfPaymentUILoaded() {
110
+ guard !didShowCloseButton else { return }
111
+
112
+ // Replace '.loader' with your actual loader class or ID
113
+ let js = "document.querySelector('.loader') == null"
114
+ webView.evaluateJavaScript(js) { [weak self] result, error in
115
+ guard let self = self else { return }
116
+ if let loaded = result as? Bool, loaded == true {
117
+ self.activityIndicator.stopAnimating()
118
+ self.closeButton.isHidden = false
119
+ self.didShowCloseButton = true // 👈 Mark as shown
120
+ } else {
121
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
122
+ self.checkIfPaymentUILoaded()
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
@@ -0,0 +1,63 @@
1
+ //
2
+ // TermAndConditionsVC.swift
3
+ // EasyPay
4
+ //
5
+ // Created by Mony's Mac on 02/09/24.
6
+ //
7
+
8
+ import UIKit
9
+
10
+ class TermAndConditionsVC: UIViewController {
11
+
12
+ @IBOutlet weak var lblTermAndConditions: UILabel!
13
+ @IBOutlet weak var lblSubHead1: UILabel!
14
+ @IBOutlet weak var lblInfo1: UILabel!
15
+ @IBOutlet weak var lblSubHead2: UILabel!
16
+ @IBOutlet weak var lblInfo2: UILabel!
17
+ @IBOutlet weak var lblSubHead3: UILabel!
18
+ @IBOutlet weak var lblInfo3: UILabel!
19
+ @IBOutlet weak var lblInfo4: UILabel!
20
+
21
+ override func viewDidLoad() {
22
+ super.viewDidLoad()
23
+
24
+ uiFinishingTouchElements()
25
+ }
26
+
27
+ func uiFinishingTouchElements() {
28
+ if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
29
+ let uiColor = UIColor(hex: primaryFontColor) {
30
+ lblTermAndConditions.textColor = uiColor
31
+ lblInfo1.textColor = uiColor
32
+ lblInfo2.textColor = uiColor
33
+ lblInfo3.textColor = uiColor
34
+ lblInfo4.textColor = uiColor
35
+ }
36
+
37
+ if let primaryFontColor = UserStoreSingleton.shared.secondary_font_col,
38
+ let uiColor = UIColor(hex: primaryFontColor) {
39
+ lblSubHead1.textColor = uiColor
40
+ lblSubHead2.textColor = uiColor
41
+ lblSubHead3.textColor = uiColor
42
+ }
43
+
44
+ if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
45
+ let uiColor = UIColor(hex: containerBGcolor) {
46
+ self.view.backgroundColor = uiColor
47
+ }
48
+
49
+ if let fontSizeString = UserStoreSingleton.shared.fontSize,
50
+ let fontSizeDouble = Double(fontSizeString) { // Convert String to Double
51
+ let fontSize = CGFloat(fontSizeDouble) // Convert Double to CGFloat
52
+ lblInfo1.font = UIFont.systemFont(ofSize: fontSize)
53
+ lblInfo2.font = UIFont.systemFont(ofSize: fontSize)
54
+ lblInfo3.font = UIFont.systemFont(ofSize: fontSize)
55
+ lblInfo4.font = UIFont.systemFont(ofSize: fontSize)
56
+ }
57
+ }
58
+
59
+ @IBAction func actionBtnClose(_ sender: UIButton) {
60
+ self.dismiss(animated: true)
61
+ }
62
+
63
+ }