@jimrising/easymerchantsdk-react-native 1.0.6 → 1.0.9
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/.idea/caches/deviceStreaming.xml +55 -0
- package/.idea/vcs.xml +1 -0
- package/.idea/workspace.xml +39 -24
- package/README.md +2 -2
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java +5 -4
- package/ios/Bundle/EasyPayBundle.swift +0 -1
- package/ios/Classes/EasyMerchantSdk.m +16 -14
- package/ios/Classes/EasyMerchantSdk.swift +1 -30
- package/ios/Classes/EasyPayViewController.swift +15 -19
- package/ios/Example/ViewController.swift +14 -16
- package/ios/Models/Request.swift +37 -18
- package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +37 -92
- package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +403 -296
- package/ios/Pods/ViewControllers/EmailVerificationVC.swift +6 -15
- package/ios/Pods/ViewControllers/OTPVerificationVC.swift +36 -90
- package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +107 -222
- package/ios/easymerchantsdk.podspec +2 -17
- package/package.json +6 -15
- package/src/index.js +2 -2
- package/.idea/em-MobileCheckoutSDK-ReactNative.iml +0 -0
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/results.bin +0 -1
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
- package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/41cd2635778c1bb5c18af2c46eb9196e/results.bin +0 -1
- package/android/build/.transforms/41cd2635778c1bb5c18af2c46eb9196e/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/results.bin +0 -1
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
- package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/7eb7ceaa43c9e8323ac65b4f785987b6/results.bin +0 -1
- package/android/build/.transforms/7eb7ceaa43c9e8323ac65b4f785987b6/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/results.bin +0 -1
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
- package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/f1a160720415bc76d8d6c6734c5acf3e/results.bin +0 -1
- package/android/build/.transforms/f1a160720415bc76d8d6c6734c5acf3e/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/reactlibrary/BuildConfig.java +0 -10
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -17
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$1.class.uniqueId2 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkPackage.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/ios/EnvironmentConfig.swift +0 -63
package/ios/Models/Request.swift
CHANGED
|
@@ -11,7 +11,7 @@ import UIKit
|
|
|
11
11
|
public final class Request: NSObject {
|
|
12
12
|
public let amount: Double
|
|
13
13
|
public let billingInfoData: Data?
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
public init(amount: Double, billingInfoData: Data? = nil) {
|
|
16
16
|
self.amount = amount
|
|
17
17
|
self.billingInfoData = billingInfoData
|
|
@@ -29,12 +29,15 @@ public final class Request: NSObject {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
//MARK: - Payment Intent Api
|
|
32
|
+
|
|
34
33
|
func paymentIntentApi(completion: @escaping (Bool) -> Void) {
|
|
35
34
|
// Start loader when API call starts
|
|
35
|
+
var components = URLComponents()
|
|
36
|
+
components.scheme = "https"
|
|
37
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
38
|
+
components.path = "/api/v1/paymentintent"
|
|
36
39
|
|
|
37
|
-
guard let serviceURL =
|
|
40
|
+
guard let serviceURL = components.url else {
|
|
38
41
|
print("Invalid URL")
|
|
39
42
|
completion(false)
|
|
40
43
|
return
|
|
@@ -43,8 +46,8 @@ public final class Request: NSObject {
|
|
|
43
46
|
var request = URLRequest(url: serviceURL)
|
|
44
47
|
request.httpMethod = "POST"
|
|
45
48
|
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
|
|
46
|
-
request.addValue(
|
|
47
|
-
request.addValue(
|
|
49
|
+
request.addValue("mobilesdk1980IUuCzwWl", forHTTPHeaderField: "X-Api-Key")
|
|
50
|
+
request.addValue("mobilesdk1980LVHnN0Oh", forHTTPHeaderField: "X-Api-Secret")
|
|
48
51
|
|
|
49
52
|
let params: [String: Any] = [
|
|
50
53
|
"amount": amount,
|
|
@@ -60,7 +63,7 @@ public final class Request: NSObject {
|
|
|
60
63
|
|
|
61
64
|
let task = URLSession.shared.dataTask(with: request) { data, response, error in
|
|
62
65
|
DispatchQueue.main.async {
|
|
63
|
-
|
|
66
|
+
// Stop loader when response is received
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
guard let httpResponse = response as? HTTPURLResponse, error == nil else {
|
|
@@ -108,19 +111,19 @@ public final class Request: NSObject {
|
|
|
108
111
|
task.resume()
|
|
109
112
|
}
|
|
110
113
|
|
|
111
|
-
// MARK: - Hosted Checkout API
|
|
112
114
|
func hostedCheckoutsApi(completion: @escaping (Bool) -> Void) {
|
|
113
115
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
var components = URLComponents()
|
|
117
|
+
components.scheme = "https"
|
|
118
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
119
|
+
components.path = "/api/v1/hostedcheckouts"
|
|
120
|
+
|
|
121
|
+
guard let serviceURL = components.url else {
|
|
122
|
+
print("Invalid URL")
|
|
117
123
|
completion(false)
|
|
118
124
|
return
|
|
119
125
|
}
|
|
120
126
|
|
|
121
|
-
let endpointPath = EnvironmentConfig.Endpoints.hostedCheckouts.path()
|
|
122
|
-
let serviceURL = baseURL.appendingPathComponent(endpointPath)
|
|
123
|
-
|
|
124
127
|
var request = URLRequest(url: serviceURL)
|
|
125
128
|
request.httpMethod = "POST"
|
|
126
129
|
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
|
|
@@ -158,12 +161,12 @@ public final class Request: NSObject {
|
|
|
158
161
|
UserStoreSingleton.shared.merchantEmail = merchantEmail
|
|
159
162
|
print("Saved merchantEmail: \(merchantEmail)")
|
|
160
163
|
}
|
|
161
|
-
|
|
164
|
+
|
|
162
165
|
if let merchantName = dataObject["merchant_name"] as? String {
|
|
163
166
|
UserStoreSingleton.shared.merchantName = merchantName
|
|
164
167
|
print("Saved merchantName: \(merchantName)")
|
|
165
168
|
}
|
|
166
|
-
|
|
169
|
+
|
|
167
170
|
// Save payment methods (crypto payment account)
|
|
168
171
|
if let paymentMethods = dataObject["payment_methods"] as? [String: Any],
|
|
169
172
|
let cryptoSection = paymentMethods["crypto"] as? [String: Any],
|
|
@@ -171,7 +174,7 @@ public final class Request: NSObject {
|
|
|
171
174
|
UserStoreSingleton.shared.paymentAccount = paymentAccount
|
|
172
175
|
print("Saved paymentAccount (Crypto): \(paymentAccount)")
|
|
173
176
|
}
|
|
174
|
-
|
|
177
|
+
|
|
175
178
|
// Save appearance settings
|
|
176
179
|
if let appearanceSettings = dataObject["apperance_settings"] as? [String: Any] {
|
|
177
180
|
if let bodyBgCol = appearanceSettings["body_bg_col"] as? String {
|
|
@@ -241,5 +244,21 @@ public final class Request: NSObject {
|
|
|
241
244
|
}
|
|
242
245
|
task.resume()
|
|
243
246
|
}
|
|
244
|
-
|
|
247
|
+
|
|
245
248
|
}
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
import UIKit
|
|
9
9
|
|
|
10
|
-
@available(iOS 16.0, *)
|
|
11
10
|
class AdditionalInfoVC: BaseVC {
|
|
12
11
|
|
|
13
12
|
@IBOutlet weak var viewAdditionalInfo: UIView!
|
|
@@ -208,23 +207,14 @@ class AdditionalInfoVC: BaseVC {
|
|
|
208
207
|
func paymentIntentApi() {
|
|
209
208
|
showLoadingIndicator()
|
|
210
209
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
// print("Invalid URL")
|
|
218
|
-
// self.hideLoadingIndicator()
|
|
219
|
-
// return
|
|
220
|
-
// }
|
|
221
|
-
|
|
222
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
223
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.charges.path()
|
|
224
|
-
|
|
225
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
210
|
+
var components = URLComponents()
|
|
211
|
+
components.scheme = "https"
|
|
212
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
213
|
+
components.path = "/api/v1/charges"
|
|
214
|
+
|
|
215
|
+
guard let serviceURL = components.url else {
|
|
226
216
|
print("Invalid URL")
|
|
227
|
-
hideLoadingIndicator()
|
|
217
|
+
self.hideLoadingIndicator()
|
|
228
218
|
return
|
|
229
219
|
}
|
|
230
220
|
|
|
@@ -347,21 +337,12 @@ class AdditionalInfoVC: BaseVC {
|
|
|
347
337
|
//MARK: - Credit Card Charge Api from Saved cards
|
|
348
338
|
func paymentIntentFromShowCardApi() {
|
|
349
339
|
showLoadingIndicator()
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
// print("Invalid URL")
|
|
357
|
-
// hideLoadingIndicator()
|
|
358
|
-
// return
|
|
359
|
-
// }
|
|
360
|
-
|
|
361
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
362
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.charges.path()
|
|
363
|
-
|
|
364
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
340
|
+
var components = URLComponents()
|
|
341
|
+
components.scheme = "https"
|
|
342
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
343
|
+
components.path = "/api/v1/charges"
|
|
344
|
+
|
|
345
|
+
guard let serviceURL = components.url else {
|
|
365
346
|
print("Invalid URL")
|
|
366
347
|
hideLoadingIndicator()
|
|
367
348
|
return
|
|
@@ -486,21 +467,12 @@ class AdditionalInfoVC: BaseVC {
|
|
|
486
467
|
func paymentIntentAddNewCardApi(customerId: String?) {
|
|
487
468
|
showLoadingIndicator()
|
|
488
469
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
// print("Invalid URL")
|
|
496
|
-
// hideLoadingIndicator()
|
|
497
|
-
// return
|
|
498
|
-
// }
|
|
499
|
-
|
|
500
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
501
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.charges.path()
|
|
502
|
-
|
|
503
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
470
|
+
var components = URLComponents()
|
|
471
|
+
components.scheme = "https"
|
|
472
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
473
|
+
components.path = "/api/v1/charges"
|
|
474
|
+
|
|
475
|
+
guard let serviceURL = components.url else {
|
|
504
476
|
print("Invalid URL")
|
|
505
477
|
hideLoadingIndicator()
|
|
506
478
|
return
|
|
@@ -637,21 +609,12 @@ class AdditionalInfoVC: BaseVC {
|
|
|
637
609
|
func accountChargeApi() {
|
|
638
610
|
showLoadingIndicator()
|
|
639
611
|
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
// print("Invalid URL")
|
|
647
|
-
// hideLoadingIndicator()
|
|
648
|
-
// return
|
|
649
|
-
// }
|
|
650
|
-
|
|
651
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
652
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()
|
|
653
|
-
|
|
654
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
612
|
+
var components = URLComponents()
|
|
613
|
+
components.scheme = "https"
|
|
614
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
615
|
+
components.path = "/api/v1/ach/charge"
|
|
616
|
+
|
|
617
|
+
guard let serviceURL = components.url else {
|
|
655
618
|
print("Invalid URL")
|
|
656
619
|
hideLoadingIndicator()
|
|
657
620
|
return
|
|
@@ -779,21 +742,12 @@ class AdditionalInfoVC: BaseVC {
|
|
|
779
742
|
func accountChargeSavedBankAccountApi() {
|
|
780
743
|
showLoadingIndicator()
|
|
781
744
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
// print("Invalid URL")
|
|
789
|
-
// hideLoadingIndicator()
|
|
790
|
-
// return
|
|
791
|
-
// }
|
|
792
|
-
|
|
793
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
794
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()
|
|
795
|
-
|
|
796
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
745
|
+
var components = URLComponents()
|
|
746
|
+
components.scheme = "https"
|
|
747
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
748
|
+
components.path = "/api/v1/ach/charge"
|
|
749
|
+
|
|
750
|
+
guard let serviceURL = components.url else {
|
|
797
751
|
print("Invalid URL")
|
|
798
752
|
hideLoadingIndicator()
|
|
799
753
|
return
|
|
@@ -918,21 +872,12 @@ class AdditionalInfoVC: BaseVC {
|
|
|
918
872
|
func accountChargeApi(customerId: String?) {
|
|
919
873
|
showLoadingIndicator()
|
|
920
874
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
// print("Invalid URL")
|
|
928
|
-
// hideLoadingIndicator()
|
|
929
|
-
// return
|
|
930
|
-
// }
|
|
931
|
-
|
|
932
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
933
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()
|
|
934
|
-
|
|
935
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
875
|
+
var components = URLComponents()
|
|
876
|
+
components.scheme = "https"
|
|
877
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
878
|
+
components.path = "/api/v1/ach/charge"
|
|
879
|
+
|
|
880
|
+
guard let serviceURL = components.url else {
|
|
936
881
|
print("Invalid URL")
|
|
937
882
|
hideLoadingIndicator()
|
|
938
883
|
return
|