@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
|
@@ -239,6 +239,14 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
239
239
|
override func viewDidLoad() {
|
|
240
240
|
super.viewDidLoad()
|
|
241
241
|
|
|
242
|
+
// viewCardFields.layer.borderColor = UIColor.systemGray.cgColor
|
|
243
|
+
// viewCardFields.layer.borderWidth = 1
|
|
244
|
+
// viewCardFields.layer.cornerRadius = 8
|
|
245
|
+
|
|
246
|
+
// viewBankFields.layer.borderColor = UIColor.systemGray.cgColor
|
|
247
|
+
// viewBankFields.layer.borderWidth = 1
|
|
248
|
+
// viewBankFields.layer.cornerRadius = 8
|
|
249
|
+
|
|
242
250
|
viewCryptoTryAgain.layer.borderColor = UIColor.systemGray.cgColor
|
|
243
251
|
viewCryptoTryAgain.layer.borderWidth = 1
|
|
244
252
|
viewCryptoTryAgain.layer.cornerRadius = 8
|
|
@@ -1543,32 +1551,31 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
1543
1551
|
func emailVerificationApi() {
|
|
1544
1552
|
showLoadingIndicator()
|
|
1545
1553
|
|
|
1546
|
-
|
|
1547
|
-
|
|
1554
|
+
var components = URLComponents()
|
|
1555
|
+
components.scheme = "https"
|
|
1556
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
1557
|
+
components.path = "/api/v1/customer/send_otp"
|
|
1548
1558
|
|
|
1549
|
-
guard let serviceURL =
|
|
1559
|
+
guard let serviceURL = components.url else {
|
|
1550
1560
|
print("Invalid URL")
|
|
1551
1561
|
hideLoadingIndicator()
|
|
1552
1562
|
return
|
|
1553
1563
|
}
|
|
1554
|
-
|
|
1564
|
+
|
|
1555
1565
|
var request = URLRequest(url: serviceURL)
|
|
1556
1566
|
request.httpMethod = "POST"
|
|
1557
1567
|
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
|
|
1558
1568
|
|
|
1559
|
-
// Use the clientToken from your singleton
|
|
1560
1569
|
let token = UserStoreSingleton.shared.clientToken
|
|
1561
1570
|
print("Setting clientToken header: \(token ?? "None")")
|
|
1562
1571
|
request.addValue(token ?? "", forHTTPHeaderField: "Client-Token")
|
|
1563
1572
|
|
|
1564
|
-
// Define the parameters for the request
|
|
1565
1573
|
let params: [String: Any] = [
|
|
1566
1574
|
"card_search_value": txtFieldEmail.text ?? "",
|
|
1567
1575
|
"card_search_key": "email"
|
|
1568
1576
|
]
|
|
1569
1577
|
|
|
1570
1578
|
do {
|
|
1571
|
-
// Convert the dictionary to JSON
|
|
1572
1579
|
let jsonData = try JSONSerialization.data(withJSONObject: params, options: .prettyPrinted)
|
|
1573
1580
|
request.httpBody = jsonData
|
|
1574
1581
|
if let jsonString = String(data: jsonData, encoding: .utf8) {
|
|
@@ -1601,9 +1608,11 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
1601
1608
|
if let data = serviceData {
|
|
1602
1609
|
do {
|
|
1603
1610
|
if let responseObject = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] {
|
|
1611
|
+
|
|
1604
1612
|
print("Response Data: \(responseObject)")
|
|
1613
|
+
|
|
1605
1614
|
DispatchQueue.main.async {
|
|
1606
|
-
|
|
1615
|
+
|
|
1607
1616
|
}
|
|
1608
1617
|
} else {
|
|
1609
1618
|
print("Invalid JSON format")
|
|
@@ -1624,16 +1633,18 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
1624
1633
|
//MARK: - OTP Verification Api
|
|
1625
1634
|
func otpVerificationApi() {
|
|
1626
1635
|
showLoadingIndicator()
|
|
1627
|
-
|
|
1628
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
1629
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.verifyOtp.path()
|
|
1630
1636
|
|
|
1631
|
-
|
|
1637
|
+
var components = URLComponents()
|
|
1638
|
+
components.scheme = "https"
|
|
1639
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
1640
|
+
components.path = "/api/v1/customer/verify_otp"
|
|
1641
|
+
|
|
1642
|
+
guard let serviceURL = components.url else {
|
|
1632
1643
|
print("Invalid URL")
|
|
1633
1644
|
hideLoadingIndicator()
|
|
1634
1645
|
return
|
|
1635
1646
|
}
|
|
1636
|
-
|
|
1647
|
+
|
|
1637
1648
|
var request = URLRequest(url: serviceURL)
|
|
1638
1649
|
request.httpMethod = "POST"
|
|
1639
1650
|
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
|
|
@@ -1765,21 +1776,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
1765
1776
|
func getShowCardsApi() {
|
|
1766
1777
|
showLoadingIndicator()
|
|
1767
1778
|
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
// print("Invalid URL")
|
|
1775
|
-
// hideLoadingIndicator()
|
|
1776
|
-
// return
|
|
1777
|
-
// }
|
|
1778
|
-
|
|
1779
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
1780
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.getCards.path()
|
|
1781
|
-
|
|
1782
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
1779
|
+
var components = URLComponents()
|
|
1780
|
+
components.scheme = "https"
|
|
1781
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
1782
|
+
components.path = "/api/v1/card"
|
|
1783
|
+
|
|
1784
|
+
guard let serviceURL = components.url else {
|
|
1783
1785
|
print("Invalid URL")
|
|
1784
1786
|
hideLoadingIndicator()
|
|
1785
1787
|
return
|
|
@@ -1845,21 +1847,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
1845
1847
|
func paymentIntentApi() {
|
|
1846
1848
|
showLoadingIndicator()
|
|
1847
1849
|
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
// print("Invalid URL")
|
|
1855
|
-
// hideLoadingIndicator()
|
|
1856
|
-
// return
|
|
1857
|
-
// }
|
|
1858
|
-
|
|
1859
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
1860
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.creditCharges.path()
|
|
1861
|
-
|
|
1862
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
1850
|
+
var components = URLComponents()
|
|
1851
|
+
components.scheme = "https"
|
|
1852
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
1853
|
+
components.path = "/api/v1/charges"
|
|
1854
|
+
|
|
1855
|
+
guard let serviceURL = components.url else {
|
|
1863
1856
|
print("Invalid URL")
|
|
1864
1857
|
hideLoadingIndicator()
|
|
1865
1858
|
return
|
|
@@ -1955,21 +1948,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
1955
1948
|
func paymentIntentFromShowSavedCardApi() {
|
|
1956
1949
|
showLoadingIndicator()
|
|
1957
1950
|
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
// print("Invalid URL")
|
|
1965
|
-
// hideLoadingIndicator()
|
|
1966
|
-
// return
|
|
1967
|
-
// }
|
|
1968
|
-
|
|
1969
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
1970
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.creditCharges.path()
|
|
1971
|
-
|
|
1972
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
1951
|
+
var components = URLComponents()
|
|
1952
|
+
components.scheme = "https"
|
|
1953
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
1954
|
+
components.path = "/api/v1/charges"
|
|
1955
|
+
|
|
1956
|
+
guard let serviceURL = components.url else {
|
|
1973
1957
|
print("Invalid URL")
|
|
1974
1958
|
hideLoadingIndicator()
|
|
1975
1959
|
return
|
|
@@ -2068,21 +2052,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
2068
2052
|
func paymentIntentFromAddNewCardApi(customerId: String?) {
|
|
2069
2053
|
showLoadingIndicator()
|
|
2070
2054
|
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
// print("Invalid URL")
|
|
2078
|
-
// hideLoadingIndicator()
|
|
2079
|
-
// return
|
|
2080
|
-
// }
|
|
2081
|
-
|
|
2082
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
2083
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.creditCharges.path()
|
|
2084
|
-
|
|
2085
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
2055
|
+
var components = URLComponents()
|
|
2056
|
+
components.scheme = "https"
|
|
2057
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
2058
|
+
components.path = "/api/v1/charges"
|
|
2059
|
+
|
|
2060
|
+
guard let serviceURL = components.url else {
|
|
2086
2061
|
print("Invalid URL")
|
|
2087
2062
|
hideLoadingIndicator()
|
|
2088
2063
|
return
|
|
@@ -2245,21 +2220,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
2245
2220
|
func updateCardApi(cardID: String) {
|
|
2246
2221
|
showLoadingIndicator()
|
|
2247
2222
|
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
// print("Invalid URL")
|
|
2255
|
-
// hideLoadingIndicator()
|
|
2256
|
-
// return
|
|
2257
|
-
// }
|
|
2258
|
-
|
|
2259
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
2260
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.getCards.path()+"/\(cardID)"
|
|
2261
|
-
|
|
2262
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
2223
|
+
var components = URLComponents()
|
|
2224
|
+
components.scheme = "https"
|
|
2225
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
2226
|
+
components.path = "/api/v1/card/\(cardID)" // Append the card_id to the path
|
|
2227
|
+
|
|
2228
|
+
guard let serviceURL = components.url else {
|
|
2263
2229
|
print("Invalid URL")
|
|
2264
2230
|
hideLoadingIndicator()
|
|
2265
2231
|
return
|
|
@@ -2407,21 +2373,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
2407
2373
|
func deleteCardApi(cardID: String, at index: Int) {
|
|
2408
2374
|
showLoadingIndicator()
|
|
2409
2375
|
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
// print("Invalid URL")
|
|
2417
|
-
// hideLoadingIndicator()
|
|
2418
|
-
// return
|
|
2419
|
-
// }
|
|
2420
|
-
|
|
2421
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
2422
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.getCards.path()+"/\(cardID)"
|
|
2423
|
-
|
|
2424
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
2376
|
+
var components = URLComponents()
|
|
2377
|
+
components.scheme = "https"
|
|
2378
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
2379
|
+
components.path = "/api/v1/card/\(cardID)" // Append the card_id to the path
|
|
2380
|
+
|
|
2381
|
+
guard let serviceURL = components.url else {
|
|
2425
2382
|
print("Invalid URL")
|
|
2426
2383
|
hideLoadingIndicator()
|
|
2427
2384
|
return
|
|
@@ -2499,21 +2456,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
2499
2456
|
func getShowBankAccountsApi() {
|
|
2500
2457
|
showLoadingIndicator()
|
|
2501
2458
|
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
// print("Invalid URL")
|
|
2509
|
-
// hideLoadingIndicator()
|
|
2510
|
-
// return
|
|
2511
|
-
// }
|
|
2512
|
-
|
|
2513
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
2514
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.account.path()
|
|
2515
|
-
|
|
2516
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
2459
|
+
var components = URLComponents()
|
|
2460
|
+
components.scheme = "https"
|
|
2461
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
2462
|
+
components.path = "/api/v1/ach/account"
|
|
2463
|
+
|
|
2464
|
+
guard let serviceURL = components.url else {
|
|
2517
2465
|
print("Invalid URL")
|
|
2518
2466
|
hideLoadingIndicator()
|
|
2519
2467
|
return
|
|
@@ -2613,21 +2561,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
2613
2561
|
func accountChargeApi() {
|
|
2614
2562
|
showLoadingIndicator()
|
|
2615
2563
|
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
// print("Invalid URL")
|
|
2623
|
-
// hideLoadingIndicator()
|
|
2624
|
-
// return
|
|
2625
|
-
// }
|
|
2626
|
-
|
|
2627
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
2628
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()
|
|
2629
|
-
|
|
2630
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
2564
|
+
var components = URLComponents()
|
|
2565
|
+
components.scheme = "https"
|
|
2566
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
2567
|
+
components.path = "/api/v1/ach/charge"
|
|
2568
|
+
|
|
2569
|
+
guard let serviceURL = components.url else {
|
|
2631
2570
|
print("Invalid URL")
|
|
2632
2571
|
hideLoadingIndicator()
|
|
2633
2572
|
return
|
|
@@ -2724,21 +2663,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
2724
2663
|
func accountChargeSavedBankAccountApi() {
|
|
2725
2664
|
showLoadingIndicator()
|
|
2726
2665
|
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
// print("Invalid URL")
|
|
2734
|
-
// hideLoadingIndicator()
|
|
2735
|
-
// return
|
|
2736
|
-
// }
|
|
2737
|
-
|
|
2738
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
2739
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()
|
|
2740
|
-
|
|
2741
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
2666
|
+
var components = URLComponents()
|
|
2667
|
+
components.scheme = "https"
|
|
2668
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
2669
|
+
components.path = "/api/v1/ach/charge"
|
|
2670
|
+
|
|
2671
|
+
guard let serviceURL = components.url else {
|
|
2742
2672
|
print("Invalid URL")
|
|
2743
2673
|
hideLoadingIndicator()
|
|
2744
2674
|
return
|
|
@@ -2832,21 +2762,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
2832
2762
|
func accountChargeAddNewAccountApi() {
|
|
2833
2763
|
showLoadingIndicator()
|
|
2834
2764
|
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
// print("Invalid URL")
|
|
2842
|
-
// hideLoadingIndicator()
|
|
2843
|
-
// return
|
|
2844
|
-
// }
|
|
2845
|
-
|
|
2846
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
2847
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()
|
|
2848
|
-
|
|
2849
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
2765
|
+
var components = URLComponents()
|
|
2766
|
+
components.scheme = "https"
|
|
2767
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
2768
|
+
components.path = "/api/v1/ach/charge"
|
|
2769
|
+
|
|
2770
|
+
guard let serviceURL = components.url else {
|
|
2850
2771
|
print("Invalid URL")
|
|
2851
2772
|
hideLoadingIndicator()
|
|
2852
2773
|
return
|
|
@@ -2950,21 +2871,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
2950
2871
|
func accountChargeApi(customerId: String?) {
|
|
2951
2872
|
showLoadingIndicator()
|
|
2952
2873
|
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
// print("Invalid URL")
|
|
2960
|
-
// hideLoadingIndicator()
|
|
2961
|
-
// return
|
|
2962
|
-
// }
|
|
2963
|
-
|
|
2964
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
2965
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()
|
|
2966
|
-
|
|
2967
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
2874
|
+
var components = URLComponents()
|
|
2875
|
+
components.scheme = "https"
|
|
2876
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
2877
|
+
components.path = "/api/v1/ach/charge"
|
|
2878
|
+
|
|
2879
|
+
guard let serviceURL = components.url else {
|
|
2968
2880
|
print("Invalid URL")
|
|
2969
2881
|
hideLoadingIndicator()
|
|
2970
2882
|
return
|
|
@@ -3078,21 +2990,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
3078
2990
|
func deleteAccountApi(accountID: String, at index: Int) {
|
|
3079
2991
|
showLoadingIndicator()
|
|
3080
2992
|
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
// print("Invalid URL")
|
|
3088
|
-
// hideLoadingIndicator()
|
|
3089
|
-
// return
|
|
3090
|
-
// }
|
|
3091
|
-
|
|
3092
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
3093
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.achCharge.path()+"/\(accountID)"
|
|
3094
|
-
|
|
3095
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
2993
|
+
var components = URLComponents()
|
|
2994
|
+
components.scheme = "https"
|
|
2995
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
2996
|
+
components.path = "/api/v1/ach/account/\(accountID)" // Append the account_id to the path
|
|
2997
|
+
|
|
2998
|
+
guard let serviceURL = components.url else {
|
|
3096
2999
|
print("Invalid URL")
|
|
3097
3000
|
hideLoadingIndicator()
|
|
3098
3001
|
return
|
|
@@ -3158,21 +3061,12 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
3158
3061
|
// MARK: - Crypto Charge API
|
|
3159
3062
|
func cryptoChargeApi() {
|
|
3160
3063
|
showLoadingIndicator()
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
// print("Invalid URL")
|
|
3168
|
-
// hideLoadingIndicator()
|
|
3169
|
-
// return
|
|
3170
|
-
// }
|
|
3171
|
-
|
|
3172
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
3173
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.charges.path()
|
|
3174
|
-
|
|
3175
|
-
guard let serviceURL = URL(string: fullURL) else {
|
|
3064
|
+
var components = URLComponents()
|
|
3065
|
+
components.scheme = "https"
|
|
3066
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
3067
|
+
components.path = "/api/v1/charges"
|
|
3068
|
+
|
|
3069
|
+
guard let serviceURL = components.url else {
|
|
3176
3070
|
print("Invalid URL")
|
|
3177
3071
|
hideLoadingIndicator()
|
|
3178
3072
|
return
|
|
@@ -3305,22 +3199,13 @@ class PaymentInfoVC: BaseVC, BillingInfoVCDelegate {
|
|
|
3305
3199
|
//MARK: - GET Crypto Payment Info API
|
|
3306
3200
|
func getCryptoPaymentInfoApi(chargeId: String) {
|
|
3307
3201
|
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
//
|
|
3313
|
-
// guard let serviceURL = components.url else {
|
|
3314
|
-
// print("Invalid URL")
|
|
3315
|
-
// return
|
|
3316
|
-
// }
|
|
3317
|
-
|
|
3318
|
-
// Construct the full URL using baseURL from EnvironmentConfig and path from the endpoint
|
|
3319
|
-
let fullURL = EnvironmentConfig.baseURL + EnvironmentConfig.Endpoints.charges.path()+"/\(chargeId)"
|
|
3202
|
+
var components = URLComponents()
|
|
3203
|
+
components.scheme = "https"
|
|
3204
|
+
components.host = "stage-api.stage-easymerchant.io"
|
|
3205
|
+
components.path = "/api/v1/charges/\(chargeId)" // Append chargeId to the path
|
|
3320
3206
|
|
|
3321
|
-
guard let serviceURL =
|
|
3207
|
+
guard let serviceURL = components.url else {
|
|
3322
3208
|
print("Invalid URL")
|
|
3323
|
-
hideLoadingIndicator()
|
|
3324
3209
|
return
|
|
3325
3210
|
}
|
|
3326
3211
|
|
|
@@ -39,22 +39,7 @@ Pod::Spec.new do |s|
|
|
|
39
39
|
]
|
|
40
40
|
|
|
41
41
|
# Resources and other files that need to be included
|
|
42
|
-
s.resource_bundles = {
|
|
43
|
-
"easymerchantsdk" => [
|
|
44
|
-
"Bundle/*",
|
|
45
|
-
"Classes/*",
|
|
46
|
-
"CustomComponents/**/*",
|
|
47
|
-
"Extensions/**/*",
|
|
48
|
-
"Models/*",
|
|
49
|
-
"Resources/*",
|
|
50
|
-
"ThirdParty/**/*",
|
|
51
|
-
"*.swift",
|
|
52
|
-
"*.storyboard",
|
|
53
|
-
"Example/*",
|
|
54
|
-
"Pods/**/*",
|
|
55
|
-
"ThirdParty/**/*"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
42
|
+
s.resource_bundles = {'easymerchantsdk' => ['Resources/**/*', '*.storyboard']}
|
|
58
43
|
|
|
59
44
|
s.exclude_files = [
|
|
60
45
|
"Resources/Info.plist",
|
|
@@ -77,4 +62,4 @@ Pod::Spec.new do |s|
|
|
|
77
62
|
|
|
78
63
|
# Additional settings (uncomment if you have specific resources)
|
|
79
64
|
# s.resources = 'EasyPay/Resources/**/*'
|
|
80
|
-
end
|
|
65
|
+
end
|
package/package.json
CHANGED
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimrising/easymerchantsdk-react-native",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
9
|
"keywords": [
|
|
10
|
-
"react-native"
|
|
11
|
-
"easymerchant",
|
|
12
|
-
"sdk"
|
|
10
|
+
"react-native"
|
|
13
11
|
],
|
|
14
12
|
"author": "",
|
|
15
|
-
"license": "
|
|
13
|
+
"license": "",
|
|
16
14
|
"peerDependencies": {
|
|
17
|
-
"react-native": "^0.
|
|
18
|
-
"react-native-windows": "^0.
|
|
19
|
-
},
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "https://github.com/EasyMerchant/em-MobileCheckoutSDK-ReactNative.git#dev-branch"
|
|
23
|
-
},
|
|
24
|
-
"publishConfig": {
|
|
25
|
-
"access": "restricted"
|
|
15
|
+
"react-native": "^0.77.0",
|
|
16
|
+
"react-native-windows": "^0.77.1"
|
|
26
17
|
}
|
|
27
18
|
}
|
package/src/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const platformVersion = async () => {
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
const billing = async (amount, billingInfo
|
|
17
|
+
const billing = async (amount, billingInfo) => {
|
|
18
18
|
return new Promise((resolve, reject) => {
|
|
19
19
|
const successCallback = (response) => {
|
|
20
20
|
resolve(response);
|
|
@@ -26,7 +26,7 @@ const billing = async (amount, billingInfo,env,apiKey,secretKey) => {
|
|
|
26
26
|
|
|
27
27
|
try {
|
|
28
28
|
if (Platform.OS === 'android') {
|
|
29
|
-
RNEasymerchantsdk.billing(amount, billingInfo,
|
|
29
|
+
RNEasymerchantsdk.billing(amount, billingInfo, successCallback, errorCallback);
|
|
30
30
|
} else if (Platform.OS === 'ios') {
|
|
31
31
|
EasyMerchantSdk.billing(amount, billingInfo)
|
|
32
32
|
.then(successCallback)
|
|
File without changes
|
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
o/bundleLibRuntimeToDirDebug
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
o/classes
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
o/bundleLibRuntimeToDirDebug
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
o/classes
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
o/bundleLibRuntimeToDirDebug
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
o/classes
|