@jimrising/easymerchantsdk-react-native 1.4.1 → 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.
- package/README.md +1 -1
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/results.bin +1 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$2.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
- package/android/build/.transforms/20e1216b87bd06eaab3c9e5c68d4267a/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/e9a664a11ce12edf79cd87b1e07aa243/results.bin +1 -0
- package/android/build/.transforms/e9a664a11ce12edf79cd87b1e07aa243/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/reactlibrary/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- 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 +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- 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.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.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 +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- 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.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.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 +1 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$1.class.uniqueId2 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$2.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule.class.uniqueId3 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkPackage.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build.gradle +4 -1
- package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java +158 -36
- package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkPackage.java +45 -13
- package/ios/Classes/EasyMerchantSdk.m +2 -2
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +10 -8
- package/ios/Pods/ViewControllers/BaseVC.swift +17 -6
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +10 -8
- package/ios/Pods/ViewControllers/CountryListVC.swift +20 -0
- package/ios/Pods/ViewControllers/CustomOverlay.swift +199 -0
- package/ios/Pods/ViewControllers/PaymentDoneVC.swift +30 -30
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +3 -32
- package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +548 -57
- package/ios/easymerchantsdk.podspec +1 -1
- package/ios/easymerchantsdk.storyboard +954 -786
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ class BaseVC: UIViewController {
|
|
|
67
67
|
|
|
68
68
|
let toastLabel = UILabel()
|
|
69
69
|
toastLabel.text = message
|
|
70
|
-
toastLabel.textColor =
|
|
70
|
+
toastLabel.textColor = .black
|
|
71
71
|
toastLabel.backgroundColor = .systemGray5
|
|
72
72
|
toastLabel.textAlignment = .center
|
|
73
73
|
toastLabel.font = UIFont.systemFont(ofSize: 15)
|
|
@@ -76,17 +76,27 @@ class BaseVC: UIViewController {
|
|
|
76
76
|
toastLabel.layer.cornerRadius = 10
|
|
77
77
|
toastLabel.clipsToBounds = true
|
|
78
78
|
|
|
79
|
-
// Set max width and calculate height based on text
|
|
80
79
|
let horizontalPadding: CGFloat = 22
|
|
80
|
+
let verticalPadding: CGFloat = 16
|
|
81
81
|
let maxWidth = self.view.frame.width - 2 * horizontalPadding
|
|
82
|
-
|
|
83
|
-
let expectedSize = 30
|
|
84
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)
|
|
85
95
|
toastLabel.frame = CGRect(
|
|
86
96
|
x: horizontalPadding,
|
|
87
|
-
y: self.view.frame.height -
|
|
97
|
+
y: self.view.frame.height - calculatedHeight - 60,
|
|
88
98
|
width: maxWidth,
|
|
89
|
-
height:
|
|
99
|
+
height: calculatedHeight
|
|
90
100
|
)
|
|
91
101
|
|
|
92
102
|
self.view.addSubview(toastLabel)
|
|
@@ -102,6 +112,7 @@ class BaseVC: UIViewController {
|
|
|
102
112
|
}
|
|
103
113
|
}
|
|
104
114
|
}
|
|
115
|
+
|
|
105
116
|
|
|
106
117
|
func showAlert(title: String = "Alert", message: String, actionTitle: String = "OK", handler: ((UIAlertAction) -> Void)? = nil) {
|
|
107
118
|
DispatchQueue.main.async {
|
|
@@ -15,7 +15,7 @@ protocol BillingInfoVCDelegate: AnyObject {
|
|
|
15
15
|
|
|
16
16
|
class BillingInfoVC: BaseVC {
|
|
17
17
|
|
|
18
|
-
@IBOutlet weak var viewBillingInfo: UIView!
|
|
18
|
+
// @IBOutlet weak var viewBillingInfo: UIView!
|
|
19
19
|
@IBOutlet weak var btnPrevious: UIButton!
|
|
20
20
|
@IBOutlet weak var viewCountryList: UIView!
|
|
21
21
|
@IBOutlet weak var tblViewCountryList: UITableView!
|
|
@@ -254,10 +254,10 @@ class BillingInfoVC: BaseVC {
|
|
|
254
254
|
if let secondaryFontColor = UserStoreSingleton.shared.secondary_font_col,
|
|
255
255
|
let placeholderColor = UIColor(hex: secondaryFontColor) {
|
|
256
256
|
lblEasyMerchant.textColor = placeholderColor
|
|
257
|
-
viewBillingInfo.layer.borderColor = placeholderColor.cgColor
|
|
257
|
+
// viewBillingInfo.layer.borderColor = placeholderColor.cgColor
|
|
258
258
|
}
|
|
259
259
|
else {
|
|
260
|
-
viewBillingInfo.layer.borderColor = UIColor.systemGray.cgColor
|
|
260
|
+
// viewBillingInfo.layer.borderColor = UIColor.systemGray.cgColor
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
if let borderRadiusString = UserStoreSingleton.shared.border_radious,
|
|
@@ -265,17 +265,17 @@ class BillingInfoVC: BaseVC {
|
|
|
265
265
|
btnNext.layer.cornerRadius = CGFloat(borderRadius) // Set corner radius
|
|
266
266
|
btnPrevious.layer.cornerRadius = CGFloat(borderRadius)
|
|
267
267
|
btnPrevious.layer.borderWidth = 1
|
|
268
|
-
viewBillingInfo.layer.cornerRadius = CGFloat(borderRadius)
|
|
269
|
-
viewBillingInfo.layer.borderWidth = 1
|
|
268
|
+
// viewBillingInfo.layer.cornerRadius = CGFloat(borderRadius)
|
|
269
|
+
// viewBillingInfo.layer.borderWidth = 1
|
|
270
270
|
} else {
|
|
271
271
|
btnNext.layer.cornerRadius = 8 // Default value
|
|
272
272
|
btnPrevious.layer.cornerRadius = 8
|
|
273
|
-
viewBillingInfo.layer.borderWidth = 1
|
|
274
|
-
viewBillingInfo.layer.cornerRadius = 8
|
|
273
|
+
// viewBillingInfo.layer.borderWidth = 1
|
|
274
|
+
// viewBillingInfo.layer.cornerRadius = 8
|
|
275
275
|
}
|
|
276
276
|
btnNext.layer.masksToBounds = true // Ensure the corners are clipped properly
|
|
277
277
|
btnPrevious.layer.masksToBounds = true
|
|
278
|
-
viewBillingInfo.layer.masksToBounds = true
|
|
278
|
+
// viewBillingInfo.layer.masksToBounds = true
|
|
279
279
|
|
|
280
280
|
if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
|
|
281
281
|
let uiColor = UIColor(hex: primaryFontColor) {
|
|
@@ -1193,6 +1193,7 @@ class BillingInfoVC: BaseVC {
|
|
|
1193
1193
|
// Pass billing and additional info
|
|
1194
1194
|
// Conditionally pass raw FieldItem array
|
|
1195
1195
|
paymentDoneVC.visibility = self.visibility
|
|
1196
|
+
paymentDoneVC.amount = self.amount
|
|
1196
1197
|
|
|
1197
1198
|
if self.visibility?.billing == true {
|
|
1198
1199
|
paymentDoneVC.billingInfoData = self.billingInfo
|
|
@@ -1369,6 +1370,7 @@ class BillingInfoVC: BaseVC {
|
|
|
1369
1370
|
// Pass billing and additional info
|
|
1370
1371
|
// Conditionally pass raw FieldItem array
|
|
1371
1372
|
paymentDoneVC.visibility = self.visibility
|
|
1373
|
+
paymentDoneVC.amount = self.amount
|
|
1372
1374
|
|
|
1373
1375
|
if self.visibility?.billing == true {
|
|
1374
1376
|
paymentDoneVC.billingInfoData = self.billingInfo
|
|
@@ -55,6 +55,26 @@ class CountryListVC: UIViewController {
|
|
|
55
55
|
searchBarCountry.searchTextField.font = UIFont.systemFont(ofSize: fontSize)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
if let secondaryFontColor = UserStoreSingleton.shared.secondary_font_col,
|
|
59
|
+
let uiColor = UIColor(hex: secondaryFontColor) {
|
|
60
|
+
// Set placeholder text color
|
|
61
|
+
let placeholderAttributes: [NSAttributedString.Key: Any] = [
|
|
62
|
+
.foregroundColor: uiColor
|
|
63
|
+
]
|
|
64
|
+
searchBarCountry.searchTextField.attributedPlaceholder = NSAttributedString(
|
|
65
|
+
string: searchBarCountry.searchTextField.placeholder ?? "Search here",
|
|
66
|
+
attributes: placeholderAttributes
|
|
67
|
+
)
|
|
68
|
+
// Set search icon color
|
|
69
|
+
searchBarCountry.searchTextField.leftView?.tintColor = uiColor
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if let searchBar = self.searchBarCountry {
|
|
73
|
+
searchBar.backgroundImage = UIImage() // Removes background line
|
|
74
|
+
searchBar.layer.borderWidth = 0
|
|
75
|
+
searchBar.layer.borderColor = UIColor.clear.cgColor
|
|
76
|
+
}
|
|
77
|
+
|
|
58
78
|
tblViewCountry.delegate = self
|
|
59
79
|
tblViewCountry.dataSource = self
|
|
60
80
|
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
////
|
|
2
|
+
//// CustomOverlay.swift
|
|
3
|
+
//// EasyPay
|
|
4
|
+
////
|
|
5
|
+
//// Created by Mony's Mac on 21/03/25.
|
|
6
|
+
////
|
|
7
|
+
//
|
|
8
|
+
////import BlinkCard
|
|
9
|
+
//
|
|
10
|
+
//protocol CustomOverlayDelegate: AnyObject {
|
|
11
|
+
// func didFinishScanningCard(cardNumber: String, expiryDate: String, cvv: String, nameOnCard: String)
|
|
12
|
+
//}
|
|
13
|
+
//
|
|
14
|
+
//class CustomOverlay: MBCCustomOverlayViewController, MBCScanningRecognizerRunnerViewControllerDelegate,
|
|
15
|
+
// MBCFirstSideFinishedRecognizerRunnerViewControllerDelegate {
|
|
16
|
+
//
|
|
17
|
+
// @IBOutlet weak var tooltipLabel: UILabel!
|
|
18
|
+
// @IBOutlet weak var centerView: UIView!
|
|
19
|
+
// @IBOutlet weak var lblScanCardCount: UILabel!
|
|
20
|
+
// @IBOutlet weak var btnRotate: UIButton!
|
|
21
|
+
// @IBOutlet weak var imgProcessing: UIImageView!
|
|
22
|
+
//
|
|
23
|
+
// var currentScanStep = 1 // Start with 1 for the first scan step
|
|
24
|
+
//
|
|
25
|
+
// var blinkCardEditScreen: MBCBlinkCardEditViewController?
|
|
26
|
+
// var blinkcardNavigationViewController: MBCBlinkCardEditNavigationController?
|
|
27
|
+
// var blinkCardRecognizerResult: MBCBlinkCardRecognizerResult?
|
|
28
|
+
//
|
|
29
|
+
// static func initFromStoryboard() -> CustomOverlay {
|
|
30
|
+
// let viewController = UIStoryboard(name: "easymerchantsdk", bundle: .easyPayBundle).instantiateViewController(withIdentifier: "CustomOverlay")
|
|
31
|
+
//
|
|
32
|
+
// guard let customOverlay = viewController as? CustomOverlay else {
|
|
33
|
+
// fatalError("CustomOverlay should always be an instance of \(CustomOverlay.self) here because we instantiate it from the Storyboard")
|
|
34
|
+
// }
|
|
35
|
+
//
|
|
36
|
+
// return customOverlay
|
|
37
|
+
// }
|
|
38
|
+
//
|
|
39
|
+
// weak var delegate: CustomOverlayDelegate?
|
|
40
|
+
//
|
|
41
|
+
// override func viewDidLoad() {
|
|
42
|
+
// super.viewDidLoad()
|
|
43
|
+
//
|
|
44
|
+
// super.scanningRecognizerRunnerViewControllerDelegate = self
|
|
45
|
+
// super.metadataDelegates.firstSideFinishedRecognizerRunnerViewControllerDelegate = self
|
|
46
|
+
//
|
|
47
|
+
// lblScanCardCount.text = "Scan Card (1/2)"
|
|
48
|
+
//
|
|
49
|
+
// centerView.layer.borderColor = UIColor.white.cgColor
|
|
50
|
+
// centerView.layer.borderWidth = 2.0
|
|
51
|
+
// centerView.layer.cornerRadius = 8.0
|
|
52
|
+
//
|
|
53
|
+
// imgProcessing.image = UIImage(systemName: "exclamationmark.circle")
|
|
54
|
+
// tooltipLabel.text = "Place the front side of your card inside the frame"
|
|
55
|
+
// }
|
|
56
|
+
//
|
|
57
|
+
// func updateScanProgress() {
|
|
58
|
+
// if currentScanStep < 2 {
|
|
59
|
+
// currentScanStep += 1
|
|
60
|
+
// lblScanCardCount.text = "Scan Card (\(currentScanStep)/2)"
|
|
61
|
+
// }
|
|
62
|
+
// }
|
|
63
|
+
//
|
|
64
|
+
// func showBorderColorForOneSeconds() {
|
|
65
|
+
// centerView.layer.borderColor = UIColor.green.cgColor
|
|
66
|
+
// centerView.layer.borderWidth = 2.0
|
|
67
|
+
// centerView.layer.cornerRadius = 8.0
|
|
68
|
+
//
|
|
69
|
+
// DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
|
70
|
+
// self.centerView.layer.borderColor = UIColor.white.cgColor
|
|
71
|
+
// self.centerView.layer.borderWidth = 2.0
|
|
72
|
+
// }
|
|
73
|
+
// }
|
|
74
|
+
//
|
|
75
|
+
// func recognizerRunnerViewControllerDidFinishScanning(_ recognizerRunnerViewController: UIViewController & MBCRecognizerRunnerViewController, state: MBCRecognizerResultState) {
|
|
76
|
+
// if state == .valid {
|
|
77
|
+
// recognizerRunnerViewController.pauseScanning()
|
|
78
|
+
//
|
|
79
|
+
// DispatchQueue.main.async {
|
|
80
|
+
// self.showBorderColorForOneSeconds()
|
|
81
|
+
//
|
|
82
|
+
// // Show loader while processing final results
|
|
83
|
+
// self.imgProcessing.image = UIImage(named: "loaderImage")
|
|
84
|
+
// self.tooltipLabel.text = "Keep it in frame while we’re processing..."
|
|
85
|
+
// self.startRotationAnimation(on: self.imgProcessing)
|
|
86
|
+
//
|
|
87
|
+
// for recognizer in self.recognizerCollection.recognizerList where recognizer.baseResult?.resultState == .valid {
|
|
88
|
+
// if recognizer is MBCBlinkCardRecognizer {
|
|
89
|
+
// let blinkCardRecognizer = recognizer as? MBCBlinkCardRecognizer
|
|
90
|
+
// self.blinkCardRecognizerResult = blinkCardRecognizer?.result
|
|
91
|
+
// }
|
|
92
|
+
// }
|
|
93
|
+
//
|
|
94
|
+
// self.imgProcessing.image = UIImage(named: "check")
|
|
95
|
+
// self.tooltipLabel.text = "Done"
|
|
96
|
+
// self.stopRotationAnimation(on: self.imgProcessing)
|
|
97
|
+
//
|
|
98
|
+
// guard let blinkCardResult = self.blinkCardRecognizerResult else { return }
|
|
99
|
+
//
|
|
100
|
+
// // Extract card details
|
|
101
|
+
// let cardNumber = blinkCardResult.cardNumber
|
|
102
|
+
// let expiryDate = "\(blinkCardResult.expiryDate.month)/\(blinkCardResult.expiryDate.year)"
|
|
103
|
+
// let cvv = blinkCardResult.cvv
|
|
104
|
+
// let nameOnCard = blinkCardResult.owner
|
|
105
|
+
//
|
|
106
|
+
// // Pass data to delegate
|
|
107
|
+
// self.delegate?.didFinishScanningCard(cardNumber: cardNumber, expiryDate: expiryDate, cvv: cvv, nameOnCard: nameOnCard)
|
|
108
|
+
//
|
|
109
|
+
// // Dismiss the scanner
|
|
110
|
+
// recognizerRunnerViewController.dismiss(animated: true, completion: nil)
|
|
111
|
+
// }
|
|
112
|
+
// }
|
|
113
|
+
// }
|
|
114
|
+
//
|
|
115
|
+
// func recognizerRunnerViewControllerDidFinishRecognition(ofFirstSide recognizerRunnerViewController: UIViewController & MBCRecognizerRunnerViewController) {
|
|
116
|
+
// DispatchQueue.main.async {
|
|
117
|
+
// // Show loader image during scanning
|
|
118
|
+
// self.imgProcessing.image = UIImage(named: "loaderImage", in: .easyPayBundle, with: nil)
|
|
119
|
+
// self.tooltipLabel.text = "Keep it in frame while we’re processing..."
|
|
120
|
+
// self.startRotationAnimation(on: self.imgProcessing)
|
|
121
|
+
//
|
|
122
|
+
// self.updateScanProgress()
|
|
123
|
+
// self.showBorderColorForOneSeconds()
|
|
124
|
+
//
|
|
125
|
+
// // Update tooltip and show check image after completing the first side
|
|
126
|
+
// DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
|
127
|
+
// self.imgProcessing.image = UIImage(named: "check", in: .easyPayBundle, with: nil)
|
|
128
|
+
// self.tooltipLabel.text = "Done"
|
|
129
|
+
// self.stopRotationAnimation(on: self.imgProcessing)
|
|
130
|
+
//
|
|
131
|
+
// DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
|
132
|
+
// self.imgProcessing.image = UIImage(systemName: "exclamationmark.circle")
|
|
133
|
+
// self.tooltipLabel.text = "Place the back side of your card inside the frame"
|
|
134
|
+
// self.stopRotationAnimation(on: self.imgProcessing)
|
|
135
|
+
// }
|
|
136
|
+
// }
|
|
137
|
+
// }
|
|
138
|
+
// }
|
|
139
|
+
//
|
|
140
|
+
// func startRotationAnimation(on imageView: UIImageView) {
|
|
141
|
+
// let rotationAnimation = CABasicAnimation(keyPath: "transform.rotation")
|
|
142
|
+
// rotationAnimation.fromValue = 0
|
|
143
|
+
// rotationAnimation.toValue = CGFloat.pi * 2
|
|
144
|
+
// rotationAnimation.duration = 1.0 // Duration of one full rotation
|
|
145
|
+
// rotationAnimation.repeatCount = Float.infinity // Repeat indefinitely
|
|
146
|
+
// imageView.layer.add(rotationAnimation, forKey: "rotationAnimation")
|
|
147
|
+
// }
|
|
148
|
+
//
|
|
149
|
+
// func stopRotationAnimation(on imageView: UIImageView) {
|
|
150
|
+
// imageView.layer.removeAnimation(forKey: "rotationAnimation")
|
|
151
|
+
// }
|
|
152
|
+
//
|
|
153
|
+
// @IBAction func didTapClose(_ sender: Any) {
|
|
154
|
+
// self.recognizerRunnerViewController?.overlayViewControllerWillCloseCamera(self)
|
|
155
|
+
// self.dismiss(animated: true, completion: nil)
|
|
156
|
+
// }
|
|
157
|
+
//
|
|
158
|
+
// func showEditScreen(blinkCardRecognizerResult: MBCBlinkCardRecognizerResult) {
|
|
159
|
+
// blinkCardEditScreen = MBCBlinkCardEditViewController(blinkCardRecognizerResult: blinkCardRecognizerResult, fieldConfiguration: MBCBlinkCardEditFieldConfiguration(), delegate: self)
|
|
160
|
+
// blinkcardNavigationViewController = MBCBlinkCardEditNavigationController(rootViewController: blinkCardEditScreen!)
|
|
161
|
+
// self.present(blinkcardNavigationViewController!, animated: true, completion: nil)
|
|
162
|
+
// }
|
|
163
|
+
//
|
|
164
|
+
// @IBAction func actionBtnRotate(_ sender: UIButton) {
|
|
165
|
+
// UIView.animate(withDuration: 0.5, animations: {
|
|
166
|
+
// // Rotate the centerView by 180 degrees
|
|
167
|
+
// self.centerView.transform = self.centerView.transform.rotated(by: .pi/2)
|
|
168
|
+
// })
|
|
169
|
+
// }
|
|
170
|
+
//
|
|
171
|
+
//}
|
|
172
|
+
//
|
|
173
|
+
//extension CustomOverlay: MBCBlinkCardEditViewControllerDelegate {
|
|
174
|
+
// func blinkCardEditViewControllerDidFinishEditing(_ blinkCardEditViewController: MBCBlinkCardEditViewController, editResult: MBCBlinkCardEditResult) {
|
|
175
|
+
// self.recognizerRunnerViewController?.pauseScanning()
|
|
176
|
+
//
|
|
177
|
+
// DispatchQueue.main.async {
|
|
178
|
+
// let alertController: UIAlertController = UIAlertController.init(title: "BlinkCard Edit Results", message: editResult.description, preferredStyle: .alert)
|
|
179
|
+
//
|
|
180
|
+
// let okAction: UIAlertAction = UIAlertAction.init(title: "OK", style: .default, handler: { (action) -> Void in
|
|
181
|
+
// self.blinkCardEditScreen?.dismiss(animated: true, completion: nil)
|
|
182
|
+
// self.dismiss(animated: true, completion: nil)
|
|
183
|
+
// })
|
|
184
|
+
// alertController.addAction(okAction)
|
|
185
|
+
// blinkCardEditViewController.present(alertController, animated: true, completion: nil)
|
|
186
|
+
// }
|
|
187
|
+
// }
|
|
188
|
+
//
|
|
189
|
+
// func blinkCardEditViewControllerDidTapClose(_ blinkCardEditViewController: MBCBlinkCardEditViewController) {
|
|
190
|
+
// DispatchQueue.main.async {
|
|
191
|
+
// blinkCardEditViewController.dismiss(animated: true, completion: nil)
|
|
192
|
+
// }
|
|
193
|
+
// }
|
|
194
|
+
//}
|
|
195
|
+
//
|
|
196
|
+
//
|
|
197
|
+
//
|
|
198
|
+
//
|
|
199
|
+
//
|
|
@@ -87,7 +87,7 @@ class PaymentDoneVC: UIViewController {
|
|
|
87
87
|
showDateAndTime()
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
// showBillingInfo()
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
override func viewWillAppear(_ animated: Bool) {
|
|
@@ -154,35 +154,35 @@ class PaymentDoneVC: UIViewController {
|
|
|
154
154
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
func showBillingInfo() {
|
|
158
|
-
var displayText = ""
|
|
159
|
-
|
|
160
|
-
if let visibility = visibility {
|
|
161
|
-
if visibility.billing, let billing = billingInfo {
|
|
162
|
-
displayText += "Billing Info:-\n"
|
|
163
|
-
for (key, value) in billing {
|
|
164
|
-
displayText += "\(key.capitalized): \(value)\n"
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if visibility.additional, let additional = additionalInfo {
|
|
169
|
-
if !displayText.isEmpty {
|
|
170
|
-
displayText += "\n"
|
|
171
|
-
}
|
|
172
|
-
displayText += "Additional Info:-\n"
|
|
173
|
-
for (key, value) in additional {
|
|
174
|
-
displayText += "\(key.capitalized): \(value)\n"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if displayText.isEmpty {
|
|
180
|
-
lblBillingInfo.isHidden = true
|
|
181
|
-
} else {
|
|
182
|
-
lblBillingInfo.text = displayText.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
183
|
-
lblBillingInfo.isHidden = false
|
|
184
|
-
}
|
|
185
|
-
}
|
|
157
|
+
// func showBillingInfo() {
|
|
158
|
+
// var displayText = ""
|
|
159
|
+
//
|
|
160
|
+
// if let visibility = visibility {
|
|
161
|
+
// if visibility.billing, let billing = billingInfo {
|
|
162
|
+
// displayText += "Billing Info:-\n"
|
|
163
|
+
// for (key, value) in billing {
|
|
164
|
+
// displayText += "\(key.capitalized): \(value)\n"
|
|
165
|
+
// }
|
|
166
|
+
// }
|
|
167
|
+
//
|
|
168
|
+
// if visibility.additional, let additional = additionalInfo {
|
|
169
|
+
// if !displayText.isEmpty {
|
|
170
|
+
// displayText += "\n"
|
|
171
|
+
// }
|
|
172
|
+
// displayText += "Additional Info:-\n"
|
|
173
|
+
// for (key, value) in additional {
|
|
174
|
+
// displayText += "\(key.capitalized): \(value)\n"
|
|
175
|
+
// }
|
|
176
|
+
// }
|
|
177
|
+
// }
|
|
178
|
+
//
|
|
179
|
+
// if displayText.isEmpty {
|
|
180
|
+
// lblBillingInfo.isHidden = true
|
|
181
|
+
// } else {
|
|
182
|
+
// lblBillingInfo.text = displayText.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
183
|
+
// lblBillingInfo.isHidden = false
|
|
184
|
+
// }
|
|
185
|
+
// }
|
|
186
186
|
|
|
187
187
|
// Helper method to check if the date string is valid
|
|
188
188
|
func isValidDate(_ dateString: String) -> Bool {
|
|
@@ -4452,38 +4452,7 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
4452
4452
|
|
|
4453
4453
|
//MARK: - Card Scan Button Action
|
|
4454
4454
|
@IBAction func actionButtonScanCard(_ sender: UIButton) {
|
|
4455
|
-
|
|
4456
|
-
// let licenseErrorMessage = BlinkCardHelper.setupLicense()
|
|
4457
|
-
// if !licenseErrorMessage.isEmpty {
|
|
4458
|
-
// // Show alert if the license is invalid or expired
|
|
4459
|
-
// showLicenseErrorAlert(message: licenseErrorMessage)
|
|
4460
|
-
// return
|
|
4461
|
-
// }
|
|
4462
|
-
//
|
|
4463
|
-
// // Proceed with card scanning if the license is valid
|
|
4464
|
-
// blinkCardRecognizer = MBCBlinkCardRecognizer()
|
|
4465
|
-
// blinkCardRecognizer.returnFullDocumentImage = true
|
|
4466
|
-
//
|
|
4467
|
-
// let recognizerList = [blinkCardRecognizer!]
|
|
4468
|
-
// let recognizerCollection = MBCRecognizerCollection(recognizers: recognizerList)
|
|
4469
|
-
//
|
|
4470
|
-
// let customOverlayViewController: CustomOverlay = CustomOverlay.initFromStoryboard()
|
|
4471
|
-
//
|
|
4472
|
-
// // Reconfigure recognizers with the overlay
|
|
4473
|
-
// customOverlayViewController.reconfigureRecognizers(recognizerCollection)
|
|
4474
|
-
//
|
|
4475
|
-
// // Create the recognizer runner view controller with custom overlay
|
|
4476
|
-
// guard let recognizerRunnerViewController =
|
|
4477
|
-
// MBCViewControllerFactory.recognizerRunnerViewController(withOverlayViewController: customOverlayViewController) else {
|
|
4478
|
-
// showLicenseErrorAlert(message: "Failed to initialize the recognizer view controller.")
|
|
4479
|
-
// return
|
|
4480
|
-
// }
|
|
4481
|
-
//
|
|
4482
|
-
// customOverlayViewController.delegate = self
|
|
4483
|
-
// recognizerRunnerViewController.modalPresentationStyle = .fullScreen
|
|
4484
|
-
//
|
|
4485
|
-
// // Present the recognizer runner view controller
|
|
4486
|
-
// self.present(recognizerRunnerViewController, animated: true, completion: nil)
|
|
4455
|
+
|
|
4487
4456
|
}
|
|
4488
4457
|
|
|
4489
4458
|
private func showLicenseErrorAlert(message: String) {
|
|
@@ -6914,6 +6883,7 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
6914
6883
|
paymentDoneVC.redirectURL = urlString
|
|
6915
6884
|
paymentDoneVC.chargeData = responseObject
|
|
6916
6885
|
paymentDoneVC.easyPayDelegate = self.easyPayDelegate
|
|
6886
|
+
paymentDoneVC.amount = self.amount
|
|
6917
6887
|
// Pass billingInfo and additionalInfo
|
|
6918
6888
|
if let billingData = self.request.billingInfoData,
|
|
6919
6889
|
let billingInfoDict = try? JSONSerialization.jsonObject(with: billingData, options: []) as? [String: Any] {
|
|
@@ -7148,6 +7118,7 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
7148
7118
|
paymentDoneVC.redirectURL = urlString
|
|
7149
7119
|
paymentDoneVC.chargeData = responseObject
|
|
7150
7120
|
paymentDoneVC.easyPayDelegate = self.easyPayDelegate
|
|
7121
|
+
paymentDoneVC.amount = self.amount
|
|
7151
7122
|
// Pass billingInfo and additionalInfo
|
|
7152
7123
|
if let billingData = self.request.billingInfoData,
|
|
7153
7124
|
let billingInfoDict = try? JSONSerialization.jsonObject(with: billingData, options: []) as? [String: Any] {
|