@jimrising/easymerchantsdk-react-native 2.4.2 → 2.4.4
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.
- package/README.md +42 -113
- package/android/build.gradle +1 -1
- package/ios/Classes/EasyMerchantSdk.m +2 -2
- package/ios/easymerchantsdk.podspec +1 -1
- package/package.json +1 -1
- package/.idea/caches/deviceStreaming.xml +0 -340
- package/.idea/em-MobileCheckoutSDK-ReactNative.iml +0 -9
- package/.idea/misc.xml +0 -5
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/android/build/generated/source/buildConfig/debug/com/reactlibrary/BuildConfig.java +0 -10
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$3.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/ios/Pods/UserDefaults/UserStoreSingleton.swift +0 -425
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +0 -2996
- package/ios/Pods/ViewControllers/BaseVC.swift +0 -142
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +0 -3807
- package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CityListTVC.swift +0 -46
- package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CountryListTVC.swift +0 -47
- package/ios/Pods/ViewControllers/BillingInfoVC/Cells/StateListTVC.swift +0 -46
- package/ios/Pods/ViewControllers/Clean Runner_2025-07-23T14-58-05.txt +0 -13
- package/ios/Pods/ViewControllers/CountryListVC.swift +0 -435
- package/ios/Pods/ViewControllers/EmailVerificationVC.swift +0 -300
- package/ios/Pods/ViewControllers/GrailPayVC.swift +0 -492
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +0 -2278
- package/ios/Pods/ViewControllers/PaymentDoneVC.swift +0 -287
- package/ios/Pods/ViewControllers/PaymentErrorVC.swift +0 -85
- package/ios/Pods/ViewControllers/PaymentInformation/AccountTypeTVC.swift +0 -41
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +0 -13115
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInformationCVC.swift +0 -35
- package/ios/Pods/ViewControllers/PaymentInformation/RecurringTVC.swift +0 -40
- package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.swift +0 -80
- package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.xib +0 -163
- package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.swift +0 -81
- package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.xib +0 -188
- package/ios/Pods/ViewControllers/PaymentStatusWebViewVC.swift +0 -167
- package/ios/Pods/ViewControllers/TermAndConditionsVC.swift +0 -63
- package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +0 -1254
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// BaseVC.swift
|
|
3
|
-
// EasyPay
|
|
4
|
-
//
|
|
5
|
-
// Created by Mony's Mac on 12/08/24.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
import UIKit
|
|
9
|
-
|
|
10
|
-
class BaseVC: UIViewController {
|
|
11
|
-
|
|
12
|
-
private let activityIndicator: UIActivityIndicatorView? = nil
|
|
13
|
-
private var overlayView: UIView?
|
|
14
|
-
|
|
15
|
-
override func viewDidLoad() {
|
|
16
|
-
super.viewDidLoad()
|
|
17
|
-
}
|
|
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
|
-
}
|
|
38
|
-
|
|
39
|
-
func showLoadingIndicator() {
|
|
40
|
-
DispatchQueue.main.async {
|
|
41
|
-
let activityIndicator = UIActivityIndicatorView(style: .large)
|
|
42
|
-
activityIndicator.center = self.view.center
|
|
43
|
-
activityIndicator.hidesWhenStopped = true
|
|
44
|
-
activityIndicator.startAnimating()
|
|
45
|
-
self.addOverlayView()
|
|
46
|
-
self.view.addSubview(activityIndicator)
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
func hideLoadingIndicator() {
|
|
51
|
-
DispatchQueue.main.async {
|
|
52
|
-
// Find and remove the activity indicator from its superview
|
|
53
|
-
for subview in self.view.subviews {
|
|
54
|
-
if let activityIndicator = subview as? UIActivityIndicatorView {
|
|
55
|
-
activityIndicator.stopAnimating()
|
|
56
|
-
self.removeOverlayView()
|
|
57
|
-
activityIndicator.removeFromSuperview()
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// MARK: - Toast Method
|
|
64
|
-
func showToast(message: String, duration: Double = 3.0) {
|
|
65
|
-
DispatchQueue.main.async { [weak self] in
|
|
66
|
-
guard let self = self else { return }
|
|
67
|
-
|
|
68
|
-
let toastLabel = UILabel()
|
|
69
|
-
toastLabel.text = message
|
|
70
|
-
toastLabel.textColor = .black
|
|
71
|
-
toastLabel.backgroundColor = .systemGray5
|
|
72
|
-
toastLabel.textAlignment = .center
|
|
73
|
-
toastLabel.font = UIFont.systemFont(ofSize: 15)
|
|
74
|
-
toastLabel.numberOfLines = 0
|
|
75
|
-
toastLabel.alpha = 0.0
|
|
76
|
-
toastLabel.layer.cornerRadius = 10
|
|
77
|
-
toastLabel.clipsToBounds = true
|
|
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
|
-
|
|
102
|
-
self.view.addSubview(toastLabel)
|
|
103
|
-
|
|
104
|
-
UIView.animate(withDuration: 0.5, animations: {
|
|
105
|
-
toastLabel.alpha = 1.0
|
|
106
|
-
}) { _ in
|
|
107
|
-
UIView.animate(withDuration: 0.5, delay: duration, options: .curveEaseOut, animations: {
|
|
108
|
-
toastLabel.alpha = 0.0
|
|
109
|
-
}) { _ in
|
|
110
|
-
toastLabel.removeFromSuperview()
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
func showAlert(title: String = "Alert", message: String, actionTitle: String = "OK", handler: ((UIAlertAction) -> Void)? = nil) {
|
|
117
|
-
DispatchQueue.main.async {
|
|
118
|
-
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
|
|
119
|
-
let action = UIAlertAction(title: actionTitle, style: .default, handler: handler)
|
|
120
|
-
alert.addAction(action)
|
|
121
|
-
self.present(alert, animated: true, completion: nil)
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// Helper function to validate email format using regex
|
|
126
|
-
func isValidEmail(_ email: String) -> Bool {
|
|
127
|
-
let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"
|
|
128
|
-
let emailPred = NSPredicate(format: "SELF MATCHES %@", emailRegEx)
|
|
129
|
-
return emailPred.evaluate(with: email)
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
extension String {
|
|
134
|
-
func matches(_ pattern: String) -> Bool {
|
|
135
|
-
return NSPredicate(format: "SELF MATCHES %@", pattern).evaluate(with: self)
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|