@jimrising/easymerchantsdk-react-native 2.4.6 → 2.4.8
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/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/mergeDebugAssets/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/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 +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$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 +1 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/ios/Pods/UserDefaults/UserStoreSingleton.swift +425 -0
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +2996 -0
- package/ios/Pods/ViewControllers/BaseVC.swift +142 -0
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +3807 -0
- package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CityListTVC.swift +46 -0
- package/ios/Pods/ViewControllers/BillingInfoVC/Cells/CountryListTVC.swift +47 -0
- package/ios/Pods/ViewControllers/BillingInfoVC/Cells/StateListTVC.swift +46 -0
- package/ios/Pods/ViewControllers/Clean Runner_2025-07-23T14-58-05.txt +13 -0
- package/ios/Pods/ViewControllers/CountryListVC.swift +435 -0
- package/ios/Pods/ViewControllers/EmailVerificationVC.swift +300 -0
- package/ios/Pods/ViewControllers/GrailPayVC.swift +492 -0
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +2278 -0
- package/ios/Pods/ViewControllers/PaymentDoneVC.swift +287 -0
- package/ios/Pods/ViewControllers/PaymentErrorVC.swift +85 -0
- package/ios/Pods/ViewControllers/PaymentInformation/AccountTypeTVC.swift +41 -0
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +13115 -0
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInformationCVC.swift +35 -0
- package/ios/Pods/ViewControllers/PaymentInformation/RecurringTVC.swift +40 -0
- package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.swift +80 -0
- package/ios/Pods/ViewControllers/PaymentInformation/SavedAccountsTVC/SavedAccountTVC.xib +163 -0
- package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.swift +81 -0
- package/ios/Pods/ViewControllers/PaymentInformation/SavedCardsTVC/SavedCardsTVC.xib +188 -0
- package/ios/Pods/ViewControllers/PaymentStatusWebViewVC.swift +167 -0
- package/ios/Pods/ViewControllers/TermAndConditionsVC.swift +63 -0
- package/ios/Pods/ViewControllers/ThreeDSecurePaymentDoneVC.swift +1254 -0
- package/ios/easymerchantsdk.podspec +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automatically generated file. DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
package com.reactlibrary;
|
|
5
|
+
|
|
6
|
+
public final class BuildConfig {
|
|
7
|
+
public static final boolean DEBUG = Boolean.parseBoolean("true");
|
|
8
|
+
public static final String LIBRARY_PACKAGE_NAME = "com.reactlibrary";
|
|
9
|
+
public static final String BUILD_TYPE = "debug";
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"artifactType": {
|
|
4
|
+
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
|
|
5
|
+
"kind": "Directory"
|
|
6
|
+
},
|
|
7
|
+
"applicationId": "com.reactlibrary",
|
|
8
|
+
"variantName": "debug",
|
|
9
|
+
"elements": [
|
|
10
|
+
{
|
|
11
|
+
"type": "SINGLE",
|
|
12
|
+
"filters": [],
|
|
13
|
+
"attributes": [],
|
|
14
|
+
"outputFile": "AndroidManifest.xml"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"elementType": "File"
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#Tue Oct 21 17:12:08 IST 2025
|
|
@@ -0,0 +1,2 @@
|
|
|
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:.*:<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:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:!<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:.*:<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:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:!<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:.*:<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:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~:!<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>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<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:.*:<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:.*:<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>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<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:.*:<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>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<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:.*:<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>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0 Warning/Error
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
com.reactlibrary
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
|
@@ -0,0 +1,425 @@
|
|
|
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
|
+
//
|