@jimrising/easymerchantsdk-react-native 1.3.5 → 1.3.7
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 +11 -4
- package/android/.gradle/8.10/checksums/checksums.lock +0 -0
- package/android/.gradle/8.10/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.10/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.10/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.10/gc.properties +0 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/nb-cache/trust/0B5D6BE682AD6AEE9815EC13516BF075752CAE5AD5BECDCC00315C37622C2FD3 +1 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/ios/Classes/EasyMerchantSdk.m +42 -29
- package/ios/Classes/EasyMerchantSdk.swift +68 -9
- package/ios/CustomComponents/PlanSelector.swift +28 -30
- package/ios/EnvironmentConfig.swift +30 -30
- package/ios/Example/ViewController.swift +47 -51
- package/ios/Models/AdditionalInfo.swift +43 -6
- package/ios/Models/BillingInfo.swift +50 -6
- package/ios/Models/RecurringIntervals.swift +34 -0
- package/ios/Models/RecurringStartDateType.swift +13 -0
- package/ios/Models/Request.swift +120 -11
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +609 -79
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +72 -25
- package/ios/Pods/ViewControllers/EmailVerificationVC.swift +14 -0
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +459 -42
- package/ios/Pods/ViewControllers/PaymentDoneVC.swift +16 -2
- package/ios/Pods/ViewControllers/PaymentErrorVC.swift +0 -2
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +1553 -372
- package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.swift +6 -2
- package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.swift +6 -1
- package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +105 -0
- package/ios/easymerchantsdk.podspec +1 -1
- package/ios/easymerchantsdk.storyboard +554 -57
- package/package.json +2 -2
- package/.idea/caches/deviceStreaming.xml +0 -571
- 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
|
@@ -29,18 +29,22 @@ class SavedAccountTVC: UITableViewCell {
|
|
|
29
29
|
if let primaryBtnBackGroundColor = UserStoreSingleton.shared.primary_btn_bg_col,
|
|
30
30
|
let uiColor = UIColor(hex: primaryBtnBackGroundColor) {
|
|
31
31
|
btnSelectAccount.tintColor = uiColor
|
|
32
|
+
if let image = btnThreeDotBank.image(for: .normal)?.withRenderingMode(.alwaysTemplate) {
|
|
33
|
+
btnThreeDotBank.setImage(image, for: .normal)
|
|
34
|
+
btnThreeDotBank.tintColor = uiColor
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
|
|
35
39
|
let uiColor = UIColor(hex: primaryFontColor) {
|
|
36
|
-
lblAccountNumber.
|
|
40
|
+
lblAccountNumber.textColor = uiColor
|
|
37
41
|
btnThreeDotBank.tintColor = uiColor
|
|
38
42
|
imgViewBank.tintColor = uiColor
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
if let primaryFontColor = UserStoreSingleton.shared.secondary_font_col,
|
|
42
46
|
let uiColor = UIColor(hex: primaryFontColor) {
|
|
43
|
-
lblAccountType.
|
|
47
|
+
lblAccountType.textColor = uiColor
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
if let bodyBackGroundColor = UserStoreSingleton.shared.body_bg_col,
|
|
@@ -33,12 +33,17 @@ class SavedCardsTVC: UITableViewCell {
|
|
|
33
33
|
let uiColor = UIColor(hex: primaryBtnBackGroundColor) {
|
|
34
34
|
btnSelectCard.tintColor = uiColor
|
|
35
35
|
btnUpdateCard.tintColor = uiColor
|
|
36
|
+
if let image = btnThreeDot.image(for: .normal)?.withRenderingMode(.alwaysTemplate) {
|
|
37
|
+
btnThreeDot.setImage(image, for: .normal)
|
|
38
|
+
btnThreeDot.tintColor = uiColor
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
|
|
39
43
|
let uiColor = UIColor(hex: primaryFontColor) {
|
|
40
|
-
lblCardNumber.
|
|
44
|
+
lblCardNumber.textColor = uiColor
|
|
41
45
|
lblExpireDate.textColor = uiColor
|
|
46
|
+
imgViewCard.tintColor = uiColor
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
if let bodyBackGroundColor = UserStoreSingleton.shared.body_bg_col,
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ThreeDSecurePaymentDoneVC.swift
|
|
3
|
+
// EasyPay
|
|
4
|
+
//
|
|
5
|
+
// Created by Mony's Mac on 20/05/25.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import UIKit
|
|
9
|
+
|
|
10
|
+
class ThreeDSecurePaymentDoneVC: UIViewController {
|
|
11
|
+
|
|
12
|
+
@IBOutlet weak var lblCompleteAuthentication: UILabel!
|
|
13
|
+
@IBOutlet weak var btnDone: UIButton!
|
|
14
|
+
@IBOutlet weak var lblPaymentLink: UILabel!
|
|
15
|
+
|
|
16
|
+
var easyPayDelegate: EasyPayViewControllerDelegate?
|
|
17
|
+
var redirectURL: String?
|
|
18
|
+
var chargeData: [String: Any] = [:]
|
|
19
|
+
|
|
20
|
+
override func viewDidLoad() {
|
|
21
|
+
super.viewDidLoad()
|
|
22
|
+
uiFinishingTouchElements()
|
|
23
|
+
|
|
24
|
+
setupTapOnLabel()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
override func viewWillAppear(_ animated: Bool) {
|
|
28
|
+
uiFinishingTouchElements()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
private func setupTapOnLabel() {
|
|
32
|
+
if let url = redirectURL {
|
|
33
|
+
lblPaymentLink.text = url
|
|
34
|
+
}
|
|
35
|
+
lblPaymentLink.textColor = .systemBlue
|
|
36
|
+
lblPaymentLink.isUserInteractionEnabled = true
|
|
37
|
+
|
|
38
|
+
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(linkTapped))
|
|
39
|
+
lblPaymentLink.addGestureRecognizer(tapGesture)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@objc private func linkTapped() {
|
|
43
|
+
guard let text = lblPaymentLink.text,
|
|
44
|
+
let url = URL(string: text),
|
|
45
|
+
UIApplication.shared.canOpenURL(url) else {
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@IBAction func actionBtnDone(_ sender: UIButton) {
|
|
52
|
+
let result = Result(type: .success, chargeData: chargeData)
|
|
53
|
+
easyPayDelegate?.easyPayController(self.navigationController as! EasyPayViewController, didFinishWith: result)
|
|
54
|
+
|
|
55
|
+
if let easyPayVC = self.navigationController as? EasyPayViewController {
|
|
56
|
+
easyPayVC.dismiss(animated: true, completion: {
|
|
57
|
+
// Ensure the chargeData is sent back to the starting screen
|
|
58
|
+
if let delegate = easyPayVC.easyPayDelegate {
|
|
59
|
+
UserStoreSingleton.shared.isLoggedIn = false
|
|
60
|
+
delegate.easyPayController(easyPayVC, didFinishWith: result)
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
func uiFinishingTouchElements() {
|
|
67
|
+
// Set background color for the main view
|
|
68
|
+
if let containerBGcolor = UserStoreSingleton.shared.container_bg_col,
|
|
69
|
+
let uiColor = UIColor(hex: containerBGcolor) {
|
|
70
|
+
self.view.backgroundColor = uiColor
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if let primaryBtnBackGroundColor = UserStoreSingleton.shared.primary_btn_bg_col,
|
|
74
|
+
let uiColor = UIColor(hex: primaryBtnBackGroundColor) {
|
|
75
|
+
btnDone.backgroundColor = uiColor
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if let primaryBtnFontColor = UserStoreSingleton.shared.primary_btn_font_col,
|
|
79
|
+
let secondaryUIColor = UIColor(hex: primaryBtnFontColor) {
|
|
80
|
+
btnDone.setTitleColor(secondaryUIColor, for: .normal)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if let borderRadiusString = UserStoreSingleton.shared.border_radious,
|
|
84
|
+
let borderRadius = Double(borderRadiusString) { // Convert String to Double
|
|
85
|
+
btnDone.layer.cornerRadius = CGFloat(borderRadius) // Set corner radius
|
|
86
|
+
} else {
|
|
87
|
+
btnDone.layer.cornerRadius = 8 // Default value
|
|
88
|
+
}
|
|
89
|
+
btnDone.layer.masksToBounds = true // Ensure the corners are clipped properly
|
|
90
|
+
|
|
91
|
+
if let primaryFontColor = UserStoreSingleton.shared.primary_font_col,
|
|
92
|
+
let uiColor = UIColor(hex: primaryFontColor) {
|
|
93
|
+
lblCompleteAuthentication.textColor = uiColor
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if let fontSizeString = UserStoreSingleton.shared.fontSize,
|
|
97
|
+
let fontSizeDouble = Double(fontSizeString) { // Convert String to Double
|
|
98
|
+
let fontSize = CGFloat(fontSizeDouble) // Convert Double to CGFloat
|
|
99
|
+
lblCompleteAuthentication.font = UIFont.systemFont(ofSize: fontSize, weight: .semibold)
|
|
100
|
+
lblPaymentLink.font = UIFont.systemFont(ofSize: fontSize, weight: .medium)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
}
|