@jimrising/easymerchantsdk-react-native 2.4.8 → 2.5.0

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 (88) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/ACH_CHARGE_ENDPOINT_TRACE.md +69 -0
  3. package/README.md +1 -1
  4. package/android/.settings/org.eclipse.buildship.core.prefs +2 -2
  5. package/android/build.gradle +3 -4
  6. package/android/config.properties +5 -0
  7. package/android/config.properties.example +5 -0
  8. package/ios/ApiManager/APIHeaders.swift +8 -1
  9. package/ios/ApiManager/APIRequest.swift +8 -6
  10. package/ios/ApiManager/APIService.swift +0 -2
  11. package/ios/Classes/EasyMerchantSdk.h +0 -1
  12. package/ios/Classes/EasyMerchantSdk.m +54 -5
  13. package/ios/Classes/EasyMerchantSdk.swift +1 -15
  14. package/ios/Classes/EasyPayViewController.swift +1 -1
  15. package/ios/EnvironmentConfig.swift +0 -1
  16. package/ios/Example/SceneDelegate.swift +23 -1
  17. package/ios/Example/ViewController.swift +0 -8
  18. package/ios/Extensions/UIFont.swift +0 -1
  19. package/ios/Extensions/UIViewController+Extension.swift +0 -1
  20. package/ios/Helper/GrailPayHelper.swift +146 -58
  21. package/ios/Helper/GrailPayWebViewController.swift +416 -0
  22. package/ios/Helper/JavaScriptBridge.swift +312 -0
  23. package/ios/Helper/WebViewConfig.swift +159 -0
  24. package/ios/Models/Request.swift +48 -204
  25. package/ios/easymerchantsdk.podspec +2 -2
  26. package/package.json +1 -1
  27. package/android/build/generated/source/buildConfig/debug/com/reactlibrary/BuildConfig.java +0 -10
  28. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
  29. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  30. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  31. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  32. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  33. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  34. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  35. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  36. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  37. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
  38. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  39. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  40. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/BuildConfig.class +0 -0
  41. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1$1.class +0 -0
  42. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  43. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
  44. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$3.class +0 -0
  45. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  46. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
  47. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
  48. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
  49. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
  50. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  51. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  52. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/BuildConfig.class +0 -0
  53. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1$1.class +0 -0
  54. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  55. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$2.class +0 -0
  56. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$3.class +0 -0
  57. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  58. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
  59. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  60. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
  61. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
  62. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  63. package/ios/Pods/UserDefaults/UserStoreSingleton.swift +0 -425
  64. package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +0 -2996
  65. package/ios/Pods/ViewControllers/BaseVC.swift +0 -142
  66. package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +0 -3807
  67. package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CityListTVC.swift +0 -46
  68. package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CountryListTVC.swift +0 -47
  69. package/ios/Pods/ViewControllers/BillingInfoVC/Cells/StateListTVC.swift +0 -46
  70. package/ios/Pods/ViewControllers/Clean Runner_2025-07-23T14-58-05.txt +0 -13
  71. package/ios/Pods/ViewControllers/CountryListVC.swift +0 -435
  72. package/ios/Pods/ViewControllers/EmailVerificationVC.swift +0 -300
  73. package/ios/Pods/ViewControllers/GrailPayVC.swift +0 -492
  74. package/ios/Pods/ViewControllers/OTPVerificationVC.swift +0 -2278
  75. package/ios/Pods/ViewControllers/PaymentDoneVC.swift +0 -287
  76. package/ios/Pods/ViewControllers/PaymentErrorVC.swift +0 -85
  77. package/ios/Pods/ViewControllers/PaymentInformation/AccountTypeTVC.swift +0 -41
  78. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +0 -13115
  79. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInformationCVC.swift +0 -35
  80. package/ios/Pods/ViewControllers/PaymentInformation/RecurringTVC.swift +0 -40
  81. package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.swift +0 -80
  82. package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.xib +0 -163
  83. package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.swift +0 -81
  84. package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.xib +0 -188
  85. package/ios/Pods/ViewControllers/PaymentStatusWebViewVC.swift +0 -167
  86. package/ios/Pods/ViewControllers/TermAndConditionsVC.swift +0 -63
  87. package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +0 -1254
  88. package/ios/easymerchantsdk.storyboard +0 -9089
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:!&lt;dir>navigation"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:!&lt;dir>navigation"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:!&lt;dir>navigation"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/build/intermediates/shader_assets/debug/compileDebugShaders/out"/></dataSet></merger>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/jniLibs"/></dataSet></merger>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/debug/shaders"/></dataSet></merger>
@@ -1,2 +0,0 @@
1
- R_DEF: Internal format may change without notice
2
- local
@@ -1,7 +0,0 @@
1
- 1<?xml version="1.0" encoding="utf-8"?>
2
- 2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- 3 package="com.reactlibrary" >
4
- 4
5
- 5 <uses-sdk android:minSdkVersion="16" />
6
- 6
7
- 7</manifest>
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- package="com.reactlibrary" >
4
-
5
- <uses-sdk android:minSdkVersion="16" />
6
-
7
- </manifest>
@@ -1,16 +0,0 @@
1
- -- Merging decision tree log ---
2
- manifest
3
- ADDED from /Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml:1:1-2:12
4
- INJECTED from /Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml:1:1-2:12
5
- package
6
- INJECTED from /Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
7
- xmlns:android
8
- ADDED from /Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml:1:11-69
9
- uses-sdk
10
- INJECTED from /Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
11
- INJECTED from /Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
12
- INJECTED from /Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
13
- android:targetSdkVersion
14
- INJECTED from /Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
15
- android:minSdkVersion
16
- INJECTED from /Users/piavan/Workspace/lyfecycle/lyfecycle-sample-RN-sdk/node_modules/@jimrising/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
@@ -1,425 +0,0 @@
1
- //
2
- // UserStoreSingleton.swift
3
- // EasyPay
4
- //
5
- // Created by Mony's Mac on 13/08/24.
6
- //
7
-
8
- import Foundation
9
- import UIKit
10
-
11
- class UserStoreSingleton: NSObject {
12
-
13
- static let shared = UserStoreSingleton()
14
-
15
- private override init() {
16
- super.init()
17
- NotificationCenter.default.addObserver(self, selector: #selector(handleAppTermination), name: UIApplication.willTerminateNotification, object: nil)
18
- }
19
-
20
- var clientToken : String? {
21
- get {
22
- return (UserDefaults().object(forKey: "client_token") as? String)
23
- } set {
24
- UserDefaults.standard.setValue(newValue, forKey: "client_token")
25
- }
26
- }
27
-
28
- var paymentIntent : String? {
29
- get {
30
- return (UserDefaults().object(forKey: "payment_intent") as? String)
31
- } set {
32
- UserDefaults.standard.setValue(newValue, forKey: "payment_intent")
33
- }
34
- }
35
-
36
- var merchantEmail : String? {
37
- get {
38
- return (UserDefaults().object(forKey: "merchant_email") as? String)
39
- } set {
40
- UserDefaults.standard.setValue(newValue, forKey: "merchant_email")
41
- }
42
- }
43
-
44
- var merchantName : String? {
45
- get {
46
- return (UserDefaults().object(forKey: "merchant_name") as? String)
47
- } set {
48
- UserDefaults.standard.setValue(newValue, forKey: "merchant_name")
49
- }
50
- }
51
-
52
- var paymentAccount : String? {
53
- get {
54
- return (UserDefaults().object(forKey: "payment_account") as? String)
55
- } set {
56
- UserDefaults.standard.setValue(newValue, forKey: "payment_account")
57
- }
58
- }
59
-
60
- var price : String? {
61
- get {
62
- return (UserDefaults().object(forKey: "price") as? String)
63
- } set {
64
- UserDefaults.standard.setValue(newValue, forKey: "price")
65
- }
66
- }
67
-
68
- var amount : String? {
69
- get {
70
- return (UserDefaults().object(forKey: "amount") as? String)
71
- } set {
72
- UserDefaults.standard.setValue(newValue, forKey: "amount")
73
- }
74
- }
75
-
76
- //Recurring params
77
- var allowCycles : String? {
78
- get {
79
- return (UserDefaults().object(forKey: "allowCycles") as? String)
80
- } set {
81
- UserDefaults.standard.setValue(newValue, forKey: "allowCycles")
82
- }
83
- }
84
-
85
- var interval : String? {
86
- get {
87
- return (UserDefaults().object(forKey: "interval") as? String)
88
- } set {
89
- UserDefaults.standard.setValue(newValue, forKey: "interval")
90
- }
91
- }
92
-
93
- var isRecurring : String? {
94
- get {
95
- return (UserDefaults().object(forKey: "isRecurring") as? String)
96
- } set {
97
- UserDefaults.standard.setValue(newValue, forKey: "isRecurring")
98
- }
99
- }
100
-
101
- var startDate : String? {
102
- get {
103
- return (UserDefaults().object(forKey: "startDate") as? String)
104
- } set {
105
- UserDefaults.standard.setValue(newValue, forKey: "startDate")
106
- }
107
- }
108
-
109
- var startDateType : String? {
110
- get {
111
- return (UserDefaults().object(forKey: "startDateType") as? String)
112
- } set {
113
- UserDefaults.standard.setValue(newValue, forKey: "startDateType")
114
- }
115
- }
116
-
117
- var paymentIntentId : String? {
118
- get {
119
- return (UserDefaults().object(forKey: "paymentIntentId") as? String)
120
- } set {
121
- UserDefaults.standard.setValue(newValue, forKey: "paymentIntentId")
122
- }
123
- }
124
-
125
- var isLoggedIn : Bool? {
126
- get {
127
- return (UserDefaults().object(forKey: "isLoggedIn") as? Bool)
128
- } set {
129
- UserDefaults.standard.setValue(newValue, forKey: "isLoggedIn")
130
- }
131
- }
132
-
133
- var customerId: String? {
134
- get {
135
- return UserDefaults.standard.string(forKey: "customer_id")
136
- }
137
- set {
138
- UserDefaults.standard.set(newValue, forKey: "customer_id")
139
- }
140
- }
141
-
142
- var customerToken: String? {
143
- get {
144
- return UserDefaults.standard.string(forKey: "customer_token")
145
- }
146
- set {
147
- UserDefaults.standard.set(newValue, forKey: "customer_token")
148
- }
149
- }
150
-
151
- var customerEmail: String? {
152
- get {
153
- return UserDefaults.standard.string(forKey: "customer_email")
154
- }
155
- set {
156
- UserDefaults.standard.set(newValue, forKey: "customer_email")
157
- }
158
- }
159
-
160
- var customerName: String? {
161
- get {
162
- return UserDefaults.standard.string(forKey: "customer_name")
163
- }
164
- set {
165
- UserDefaults.standard.set(newValue, forKey: "customer_name")
166
- }
167
- }
168
-
169
- var verificationEmail: String? {
170
- get {
171
- return UserDefaults.standard.string(forKey: "verificationEmail")
172
- }
173
- set {
174
- UserDefaults.standard.set(newValue, forKey: "verificationEmail")
175
- }
176
- }
177
-
178
- //Payment Methods
179
- var paymentMethods: [String]? {
180
- get {
181
- return UserDefaults.standard.stringArray(forKey: "payment_methods")
182
- }
183
- set {
184
- UserDefaults.standard.setValue(newValue, forKey: "payment_methods")
185
- }
186
- }
187
-
188
- var companyName: String? {
189
- get {
190
- return UserDefaults.standard.string(forKey: "companyName")
191
- }
192
- set {
193
- UserDefaults.standard.set(newValue, forKey: "companyName")
194
- }
195
- }
196
-
197
- var bankWidgetKey: String? {
198
- get {
199
- return UserDefaults.standard.string(forKey: "bank_widget_key")
200
- }
201
- set {
202
- UserDefaults.standard.set(newValue, forKey: "bank_widget_key")
203
- }
204
- }
205
-
206
- var vendorID: String? {
207
- get {
208
- return UserDefaults.standard.string(forKey: "vendor_id")
209
- }
210
- set {
211
- UserDefaults.standard.set(newValue, forKey: "vendor_id")
212
- }
213
- }
214
-
215
- //apperance_settings
216
- var body_bg_col : String? {
217
- get {
218
- return (UserDefaults().object(forKey: "body_bg_col") as? String)
219
- } set {
220
- UserDefaults.standard.setValue(newValue, forKey: "body_bg_col")
221
- }
222
- }
223
-
224
- var border_radious : String? {
225
- get {
226
- return (UserDefaults().object(forKey: "border_radious") as? String)
227
- } set {
228
- UserDefaults.standard.setValue(newValue, forKey: "border_radious")
229
- }
230
- }
231
-
232
- var container_bg_col : String? {
233
- get {
234
- return (UserDefaults().object(forKey: "container_bg_col") as? String)
235
- } set {
236
- UserDefaults.standard.setValue(newValue, forKey: "container_bg_col")
237
- }
238
- }
239
-
240
- var primary_btn_bg_col : String? {
241
- get {
242
- return (UserDefaults().object(forKey: "primary_btn_bg_col") as? String)
243
- } set {
244
- UserDefaults.standard.setValue(newValue, forKey: "primary_btn_bg_col")
245
- }
246
- }
247
-
248
- var primary_btn_font_col : String? {
249
- get {
250
- return (UserDefaults().object(forKey: "primary_btn_font_col") as? String)
251
- } set {
252
- UserDefaults.standard.setValue(newValue, forKey: "primary_btn_font_col")
253
- }
254
- }
255
-
256
- var primary_btn_hover_col : String? {
257
- get {
258
- return (UserDefaults().object(forKey: "primary_btn_hover_col") as? String)
259
- } set {
260
- UserDefaults.standard.setValue(newValue, forKey: "primary_btn_hover_col")
261
- }
262
- }
263
-
264
- var primary_font_col : String? {
265
- get {
266
- return (UserDefaults().object(forKey: "primary_font_col") as? String)
267
- } set {
268
- UserDefaults.standard.setValue(newValue, forKey: "primary_font_col")
269
- }
270
- }
271
-
272
- var secondary_btn_bg_col : String? {
273
- get {
274
- return (UserDefaults().object(forKey: "secondary_btn_bg_col") as? String)
275
- } set {
276
- UserDefaults.standard.setValue(newValue, forKey: "secondary_btn_bg_col")
277
- }
278
- }
279
-
280
- var secondary_btn_font_col : String? {
281
- get {
282
- return (UserDefaults().object(forKey: "secondary_btn_font_col") as? String)
283
- } set {
284
- UserDefaults.standard.setValue(newValue, forKey: "secondary_btn_font_col")
285
- }
286
- }
287
-
288
- var secondary_btn_hover_col : String? {
289
- get {
290
- return (UserDefaults().object(forKey: "secondary_btn_hover_col") as? String)
291
- } set {
292
- UserDefaults.standard.setValue(newValue, forKey: "secondary_btn_hover_col")
293
- }
294
- }
295
-
296
- var secondary_font_col : String? {
297
- get {
298
- return (UserDefaults().object(forKey: "secondary_font_col") as? String)
299
- } set {
300
- UserDefaults.standard.setValue(newValue, forKey: "secondary_font_col")
301
- }
302
- }
303
-
304
- var fontSize : String? {
305
- get {
306
- return (UserDefaults().object(forKey: "fontSize") as? String)
307
- } set {
308
- UserDefaults.standard.setValue(newValue, forKey: "fontSize")
309
- }
310
- }
311
-
312
- func updateThemeConfiguration(with themeConfiguration: ThemeConfiguration) {
313
- self.body_bg_col = themeConfiguration.bodyBackgroundColor
314
- self.container_bg_col = themeConfiguration.containerBackgroundColor
315
- self.primary_font_col = themeConfiguration.primaryFontColor
316
- self.secondary_font_col = themeConfiguration.secondaryFontColor
317
- self.primary_btn_bg_col = themeConfiguration.primaryButtonBackgroundColor
318
- self.primary_btn_hover_col = themeConfiguration.primaryButtonHoverColor
319
- self.primary_btn_font_col = themeConfiguration.primaryButtonFontColor
320
- self.secondary_btn_bg_col = themeConfiguration.secondaryButtonBackgroundColor
321
- self.secondary_btn_hover_col = themeConfiguration.secondaryButtonHoverColor
322
- self.secondary_btn_font_col = themeConfiguration.secondaryFontColor
323
- self.border_radious = themeConfiguration.borderRadius
324
- self.fontSize = themeConfiguration.fontSize
325
- }
326
-
327
- func clearUserData() {
328
- let keysToRemove = [
329
- "payment_intent",
330
- "merchant_email",
331
- "merchant_name",
332
- "payment_account",
333
- "price",
334
- "isLoggedIn",
335
- "customer_id",
336
- "customer_token",
337
- "verificationEmail",
338
- "payment_methods",
339
- "bank_widget_key",
340
- "vendor_id",
341
- // "amount"
342
- // "allowCycles",
343
- // "interval",
344
- // "isRecurring",
345
- // "startDate",
346
- // "startDateType",
347
- // "paymentIntentId"
348
- ]
349
-
350
- for key in keysToRemove {
351
- UserDefaults.standard.removeObject(forKey: key)
352
- }
353
-
354
- UserDefaults.standard.synchronize()
355
- }
356
-
357
- @objc private func handleAppTermination() {
358
- print("App is terminating. Clearing user data...")
359
- clearUserData()
360
- }
361
-
362
- deinit {
363
- NotificationCenter.default.removeObserver(self)
364
- }
365
-
366
- }
367
-
368
- //var amount : String? {
369
- // get {
370
- // return (UserDefaults().object(forKey: "amount") as? String)
371
- // } set {
372
- // UserDefaults.standard.setValue(newValue, forKey: "amount")
373
- // }
374
- //}
375
- //
376
- ////Recurring params
377
- //var allowCycles : String? {
378
- // get {
379
- // return (UserDefaults().object(forKey: "allowCycles") as? String)
380
- // } set {
381
- // UserDefaults.standard.setValue(newValue, forKey: "allowCycles")
382
- // }
383
- //}
384
- //
385
- //var interval : String? {
386
- // get {
387
- // return (UserDefaults().object(forKey: "interval") as? String)
388
- // } set {
389
- // UserDefaults.standard.setValue(newValue, forKey: "interval")
390
- // }
391
- //}
392
- //
393
- //var isRecurring : String? {
394
- // get {
395
- // return (UserDefaults().object(forKey: "isRecurring") as? String)
396
- // } set {
397
- // UserDefaults.standard.setValue(newValue, forKey: "isRecurring")
398
- // }
399
- //}
400
- //
401
- //var startDate : String? {
402
- // get {
403
- // return (UserDefaults().object(forKey: "startDate") as? String)
404
- // } set {
405
- // UserDefaults.standard.setValue(newValue, forKey: "startDate")
406
- // }
407
- //}
408
- //
409
- //var startDateType : String? {
410
- // get {
411
- // return (UserDefaults().object(forKey: "startDateType") as? String)
412
- // } set {
413
- // UserDefaults.standard.setValue(newValue, forKey: "startDateType")
414
- // }
415
- //}
416
- //
417
- //var paymentIntentId : String? {
418
- // get {
419
- // return (UserDefaults().object(forKey: "paymentIntentId") as? String)
420
- // } set {
421
- // UserDefaults.standard.setValue(newValue, forKey: "paymentIntentId")
422
- // }
423
- //}
424
- //
425
- //