@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.
Files changed (81) hide show
  1. package/.idea/caches/deviceStreaming.xml +55 -0
  2. package/.idea/vcs.xml +1 -0
  3. package/.idea/workspace.xml +39 -24
  4. package/README.md +2 -2
  5. package/android/build.gradle +1 -1
  6. package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java +5 -4
  7. package/ios/Bundle/EasyPayBundle.swift +0 -1
  8. package/ios/Classes/EasyMerchantSdk.m +16 -14
  9. package/ios/Classes/EasyMerchantSdk.swift +1 -30
  10. package/ios/Classes/EasyPayViewController.swift +15 -19
  11. package/ios/Example/ViewController.swift +14 -16
  12. package/ios/Models/Request.swift +37 -18
  13. package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +37 -92
  14. package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +403 -296
  15. package/ios/Pods/ViewControllers/EmailVerificationVC.swift +6 -15
  16. package/ios/Pods/ViewControllers/OTPVerificationVC.swift +36 -90
  17. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +107 -222
  18. package/ios/easymerchantsdk.podspec +2 -17
  19. package/package.json +6 -15
  20. package/src/index.js +2 -2
  21. package/.idea/em-MobileCheckoutSDK-ReactNative.iml +0 -0
  22. package/.idea/misc.xml +0 -6
  23. package/.idea/modules.xml +0 -0
  24. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/results.bin +0 -1
  25. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
  26. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
  27. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
  28. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
  29. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  30. package/android/build/.transforms/41cd2635778c1bb5c18af2c46eb9196e/results.bin +0 -1
  31. package/android/build/.transforms/41cd2635778c1bb5c18af2c46eb9196e/transformed/classes/classes_dex/classes.dex +0 -0
  32. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/results.bin +0 -1
  33. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
  34. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
  35. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
  36. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
  37. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  38. package/android/build/.transforms/7eb7ceaa43c9e8323ac65b4f785987b6/results.bin +0 -1
  39. package/android/build/.transforms/7eb7ceaa43c9e8323ac65b4f785987b6/transformed/classes/classes_dex/classes.dex +0 -0
  40. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/results.bin +0 -1
  41. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
  42. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
  43. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
  44. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
  45. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  46. package/android/build/.transforms/f1a160720415bc76d8d6c6734c5acf3e/results.bin +0 -1
  47. package/android/build/.transforms/f1a160720415bc76d8d6c6734c5acf3e/transformed/classes/classes_dex/classes.dex +0 -0
  48. package/android/build/generated/source/buildConfig/debug/com/reactlibrary/BuildConfig.java +0 -10
  49. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
  50. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  51. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  52. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  53. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  54. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  55. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  56. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  57. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  58. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  59. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  60. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
  61. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/BuildConfig.class +0 -0
  62. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  63. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  64. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
  65. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
  66. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
  67. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
  68. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  69. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  70. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/BuildConfig.class +0 -0
  71. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  72. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  73. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
  74. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  75. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
  76. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -17
  77. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$1.class.uniqueId2 +0 -0
  78. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule.class.uniqueId1 +0 -0
  79. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkPackage.class.uniqueId0 +0 -0
  80. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  81. package/ios/EnvironmentConfig.swift +0 -63
@@ -124,6 +124,17 @@
124
124
  <option name="screenX" value="2220" />
125
125
  <option name="screenY" value="1080" />
126
126
  </PersistentDeviceSelectionData>
127
+ <PersistentDeviceSelectionData>
128
+ <option name="api" value="34" />
129
+ <option name="brand" value="samsung" />
130
+ <option name="codename" value="dm2q" />
131
+ <option name="id" value="dm2q" />
132
+ <option name="manufacturer" value="Samsung" />
133
+ <option name="name" value="S23 Plus" />
134
+ <option name="screenDensity" value="450" />
135
+ <option name="screenX" value="1080" />
136
+ <option name="screenY" value="2340" />
137
+ </PersistentDeviceSelectionData>
127
138
  <PersistentDeviceSelectionData>
128
139
  <option name="api" value="34" />
129
140
  <option name="brand" value="samsung" />
@@ -146,6 +157,28 @@
146
157
  <option name="screenX" value="1080" />
147
158
  <option name="screenY" value="2340" />
148
159
  </PersistentDeviceSelectionData>
160
+ <PersistentDeviceSelectionData>
161
+ <option name="api" value="34" />
162
+ <option name="brand" value="samsung" />
163
+ <option name="codename" value="e3q" />
164
+ <option name="id" value="e3q" />
165
+ <option name="manufacturer" value="Samsung" />
166
+ <option name="name" value="Galaxy S24 Ultra" />
167
+ <option name="screenDensity" value="450" />
168
+ <option name="screenX" value="1440" />
169
+ <option name="screenY" value="3120" />
170
+ </PersistentDeviceSelectionData>
171
+ <PersistentDeviceSelectionData>
172
+ <option name="api" value="33" />
173
+ <option name="brand" value="google" />
174
+ <option name="codename" value="eos" />
175
+ <option name="id" value="eos" />
176
+ <option name="manufacturer" value="Google" />
177
+ <option name="name" value="Eos" />
178
+ <option name="screenDensity" value="320" />
179
+ <option name="screenX" value="384" />
180
+ <option name="screenY" value="384" />
181
+ </PersistentDeviceSelectionData>
149
182
  <PersistentDeviceSelectionData>
150
183
  <option name="api" value="33" />
151
184
  <option name="brand" value="google" />
@@ -179,6 +212,17 @@
179
212
  <option name="screenX" value="2208" />
180
213
  <option name="screenY" value="1840" />
181
214
  </PersistentDeviceSelectionData>
215
+ <PersistentDeviceSelectionData>
216
+ <option name="api" value="34" />
217
+ <option name="brand" value="motorola" />
218
+ <option name="codename" value="fogona" />
219
+ <option name="id" value="fogona" />
220
+ <option name="manufacturer" value="Motorola" />
221
+ <option name="name" value="moto g play - 2024" />
222
+ <option name="screenDensity" value="280" />
223
+ <option name="screenX" value="720" />
224
+ <option name="screenY" value="1600" />
225
+ </PersistentDeviceSelectionData>
182
226
  <PersistentDeviceSelectionData>
183
227
  <option name="api" value="33" />
184
228
  <option name="brand" value="samsung" />
@@ -234,6 +278,17 @@
234
278
  <option name="screenX" value="1080" />
235
279
  <option name="screenY" value="2400" />
236
280
  </PersistentDeviceSelectionData>
281
+ <PersistentDeviceSelectionData>
282
+ <option name="api" value="33" />
283
+ <option name="brand" value="motorola" />
284
+ <option name="codename" value="maui" />
285
+ <option name="id" value="maui" />
286
+ <option name="manufacturer" value="Motorola" />
287
+ <option name="name" value="moto g play - 2023" />
288
+ <option name="screenDensity" value="280" />
289
+ <option name="screenX" value="720" />
290
+ <option name="screenY" value="1600" />
291
+ </PersistentDeviceSelectionData>
237
292
  <PersistentDeviceSelectionData>
238
293
  <option name="api" value="31" />
239
294
  <option name="brand" value="google" />
package/.idea/vcs.xml CHANGED
@@ -2,5 +2,6 @@
2
2
  <project version="4">
3
3
  <component name="VcsDirectoryMappings">
4
4
  <mapping directory="" vcs="Git" />
5
+ <mapping directory="$PROJECT_DIR$/SampleApp" vcs="Git" />
5
6
  </component>
6
7
  </project>
@@ -4,27 +4,27 @@
4
4
  <option name="autoReloadType" value="NONE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="3e2fa6c1-ea79-4c71-afdb-28176876a8c4" name="Changes" comment="">
8
- <change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.gitignore" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/.idea/caches/deviceStreaming.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/caches/deviceStreaming.xml" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/.idea/em-MobileCheckoutSDK-ReactNative.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/em-MobileCheckoutSDK-ReactNative.iml" afterDir="false" />
11
- <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
12
- <change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
7
+ <list default="true" id="8a0ded78-c462-4ead-a826-2c18fddbe814" name="Changes" comment="">
8
+ <change afterPath="$PROJECT_DIR$/SampleApp/App.js" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/.idea/caches/deviceStreaming.xml" beforeDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/.idea/em-MobileCheckoutSDK-ReactNative.iml" beforeDir="false" />
12
+ <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" />
13
+ <change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" />
14
+ <change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" />
13
15
  <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
14
- <change beforePath="$PROJECT_DIR$/android/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/android/build.gradle" afterDir="false" />
15
- <change beforePath="$PROJECT_DIR$/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java" afterDir="false" />
16
- <change beforePath="$PROJECT_DIR$/ios/Classes/EasyMerchantSdk.m" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/EasyMerchantSdk.m" afterDir="false" />
17
- <change beforePath="$PROJECT_DIR$/ios/Classes/EasyMerchantSdk.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/EasyMerchantSdk.swift" afterDir="false" />
16
+ <change beforePath="$PROJECT_DIR$/SampleApp/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/SampleApp/index.js" afterDir="false" />
17
+ <change beforePath="$PROJECT_DIR$/SampleApp/ios/Podfile" beforeDir="false" afterPath="$PROJECT_DIR$/SampleApp/ios/Podfile" afterDir="false" />
18
+ <change beforePath="$PROJECT_DIR$/SampleApp/ios/SampleApp.xcodeproj/project.pbxproj" beforeDir="false" afterPath="$PROJECT_DIR$/SampleApp/ios/SampleApp.xcodeproj/project.pbxproj" afterDir="false" />
19
+ <change beforePath="$PROJECT_DIR$/SampleApp/ios/SampleApp/AppDelegate.swift" beforeDir="false" afterPath="$PROJECT_DIR$/SampleApp/ios/SampleApp/AppDelegate.swift" afterDir="false" />
20
+ <change beforePath="$PROJECT_DIR$/SampleApp/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/SampleApp/package-lock.json" afterDir="false" />
21
+ <change beforePath="$PROJECT_DIR$/SampleApp/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/SampleApp/package.json" afterDir="false" />
22
+ <change beforePath="$PROJECT_DIR$/ios/Bundle/EasyPayBundle.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Bundle/EasyPayBundle.swift" afterDir="false" />
18
23
  <change beforePath="$PROJECT_DIR$/ios/Classes/EasyPayViewController.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/EasyPayViewController.swift" afterDir="false" />
19
- <change beforePath="$PROJECT_DIR$/ios/Example/ViewController.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Example/ViewController.swift" afterDir="false" />
20
- <change beforePath="$PROJECT_DIR$/ios/Models/Request.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Models/Request.swift" afterDir="false" />
21
24
  <change beforePath="$PROJECT_DIR$/ios/Pods/ViewControllers/AdditionalInfoVC.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Pods/ViewControllers/AdditionalInfoVC.swift" afterDir="false" />
22
- <change beforePath="$PROJECT_DIR$/ios/Pods/ViewControllers/EmailVerificationVC.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Pods/ViewControllers/EmailVerificationVC.swift" afterDir="false" />
23
- <change beforePath="$PROJECT_DIR$/ios/Pods/ViewControllers/OTPVerificationVC.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Pods/ViewControllers/OTPVerificationVC.swift" afterDir="false" />
24
- <change beforePath="$PROJECT_DIR$/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift" afterDir="false" />
25
+ <change beforePath="$PROJECT_DIR$/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift" afterDir="false" />
25
26
  <change beforePath="$PROJECT_DIR$/ios/easymerchantsdk.podspec" beforeDir="false" afterPath="$PROJECT_DIR$/ios/easymerchantsdk.podspec" afterDir="false" />
26
27
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
27
- <change beforePath="$PROJECT_DIR$/src/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/index.js" afterDir="false" />
28
28
  </list>
29
29
  <option name="SHOW_DIALOG" value="false" />
30
30
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -38,10 +38,9 @@
38
38
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
39
39
  </component>
40
40
  <component name="ProjectColorInfo">{
41
- &quot;customColor&quot;: &quot;&quot;,
42
- &quot;associatedIndex&quot;: 4
41
+ &quot;associatedIndex&quot;: 7
43
42
  }</component>
44
- <component name="ProjectId" id="2qKXhyciB6aZPLbATAZVTXWQsw3" />
43
+ <component name="ProjectId" id="2rO9yZCgAc9Uez0WlOGxOdZqRte" />
45
44
  <component name="ProjectViewState">
46
45
  <option name="hideEmptyMiddlePackages" value="true" />
47
46
  <option name="showLibraryContents" value="true" />
@@ -54,12 +53,17 @@
54
53
  &quot;cf.first.check.clang-format&quot;: &quot;false&quot;,
55
54
  &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
56
55
  &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
57
- &quot;git-widget-placeholder&quot;: &quot;dev-branch&quot;,
56
+ &quot;git-widget-placeholder&quot;: &quot;main&quot;,
58
57
  &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
59
- &quot;last_opened_file_path&quot;: &quot;/Users/appdev/Documents/em-MobileCheckoutSDK-ReactNative&quot;,
58
+ &quot;last_opened_file_path&quot;: &quot;/Users/appdev/Downloads/em-MobileCheckoutSDK-ReactNative/SampleApp&quot;,
60
59
  &quot;show.migrate.to.gradle.popup&quot;: &quot;false&quot;
61
60
  }
62
61
  }</component>
62
+ <component name="RecentsManager">
63
+ <key name="CopyFile.RECENT_KEYS">
64
+ <recent name="$PROJECT_DIR$/SampleApp" />
65
+ </key>
66
+ </component>
63
67
  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
64
68
  <component name="SwiftWorkspaceSettings">
65
69
  <option name="detectedToolchain" value="true" />
@@ -67,12 +71,23 @@
67
71
  </component>
68
72
  <component name="TaskManager">
69
73
  <task active="true" id="Default" summary="Default task">
70
- <changelist id="3e2fa6c1-ea79-4c71-afdb-28176876a8c4" name="Changes" comment="" />
71
- <created>1734412363752</created>
74
+ <changelist id="8a0ded78-c462-4ead-a826-2c18fddbe814" name="Changes" comment="" />
75
+ <created>1736419509849</created>
72
76
  <option name="number" value="Default" />
73
77
  <option name="presentableId" value="Default" />
74
- <updated>1734412363752</updated>
78
+ <updated>1736419509849</updated>
75
79
  </task>
76
80
  <servers />
77
81
  </component>
82
+ <component name="Vcs.Log.Tabs.Properties">
83
+ <option name="TAB_STATES">
84
+ <map>
85
+ <entry key="MAIN">
86
+ <value>
87
+ <State />
88
+ </value>
89
+ </entry>
90
+ </map>
91
+ </option>
92
+ </component>
78
93
  </project>
package/README.md CHANGED
@@ -8,7 +8,7 @@ To add the path of sdk in your project. Open your `package.json` file and inside
8
8
  ```json
9
9
  "dependencies": {
10
10
  ...
11
- "@jimrising/easymerchantsdk-react-native": "^1.0.6"
11
+ "@jimrising/easymerchantsdk-react-native": "^1.0.9"
12
12
  },
13
13
  ```
14
14
  or using command
@@ -183,7 +183,7 @@ const App = () => {
183
183
  try {
184
184
  if (Platform.OS === 'android') {
185
185
  // const response = await RNEasymerchantsdk.billing(amount, null,'staging','apiKey','secretKey');
186
- const response = await RNEasymerchantsdk.billing(amount, null,'sandbox','apiKey','secretKey');
186
+ const response = await RNEasymerchantsdk.billing(amount, null,'z','apiKey','secretKey');
187
187
  // const response = await RNEasymerchantsdk.billing(amount, null,'production','apiKey','secretKey');
188
188
  setPaymentResponse(`Payment Success: ${response}`);
189
189
  } else if (Platform.OS === 'ios') {
@@ -39,7 +39,7 @@ repositories {
39
39
  }
40
40
 
41
41
  dependencies {
42
- implementation 'com.app:paysdk:1.1.9'
42
+ implementation 'com.app:paysdk:1.1.7'
43
43
  implementation 'com.hbb20:ccp:2.7.3'
44
44
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1"
45
45
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1"
@@ -39,7 +39,7 @@ public class RNEasymerchantsdkModule extends ReactContextBaseJavaModule {
39
39
  }
40
40
 
41
41
  @ReactMethod
42
- public void billing(String amount, String billinginfo,String env,String apiKey, String secretKey, Promise promise) {
42
+ public void billing(String amount, String billinginfo, Promise promise) {
43
43
  Activity currentActivity = getCurrentActivity();
44
44
  if (currentActivity == null) {
45
45
  promise.reject("ERROR", "Activity is not initialized");
@@ -48,15 +48,16 @@ public class RNEasymerchantsdkModule extends ReactContextBaseJavaModule {
48
48
 
49
49
  try {
50
50
 
51
- new EasyPaymentService(currentActivity,env,apiKey,secretKey).makePayment(amount, (billinginfo == null) ? null : new JSONObject(billinginfo), new EasyPaymentFactory.OnTransactionListener() {
51
+ // Making the payment call
52
+ new EasyPaymentService(currentActivity).makePayment(amount, (billinginfo == null) ? null : new JSONObject(billinginfo), new EasyPaymentFactory.OnTransactionListener() {
52
53
  @Override
53
54
  public void onSuccess(String response) {
54
- promise.resolve(response);
55
+ promise.resolve(response); // Resolve the promise on success
55
56
  }
56
57
 
57
58
  @Override
58
59
  public void onError(String error) {
59
- promise.reject("ERROR", error);
60
+ promise.reject("ERROR", error); // Reject the promise on error
60
61
  }
61
62
  });
62
63
  } catch (Exception e) {
@@ -7,7 +7,6 @@
7
7
 
8
8
  import Foundation
9
9
 
10
- @available(iOS 16.0, *)
11
10
  extension Bundle {
12
11
  static let easyPayBundle: Bundle = {
13
12
  let frameworkBundle = Bundle(for: EasyPayViewController.self)
@@ -3,36 +3,38 @@
3
3
  #import <React/RCTBridgeModule.h>
4
4
  #import "easymerchantsdk-Swift.h"
5
5
 
6
+
6
7
  @implementation EasyMerchantSdk
7
8
 
8
9
  RCT_EXPORT_MODULE()
9
10
 
10
- // Billing method: Initiates the payment process with the provided details
11
11
  RCT_EXPORT_METHOD(billing:(NSString *)amount
12
12
  billingInfo:(NSString *)billingInfo
13
- environment:(NSString *)environment
14
- apiKey:(NSString *)apiKey
15
- apiSecret:(NSString *)apiSecret
16
13
  resolve:(RCTPromiseResolveBlock)resolve
17
14
  reject:(RCTPromiseRejectBlock)reject)
18
15
  {
19
- EasyMerchantSdkPlugin *sdkPlugin = [[EasyMerchantSdkPlugin alloc] init];
20
-
21
- // Configure SDK with provided keys and environment
22
- [sdkPlugin configureEnvironment:environment apiKey:apiKey apiSecret:apiSecret];
23
-
24
- [sdkPlugin billing:amount billinginfo:billingInfo resolver:resolve rejecter:reject];
16
+ EasyMerchantSdk *sdkPlugin = [[EasyMerchantSdk alloc] init];
17
+
18
+ [sdkPlugin billing: amount
19
+ billingInfo: billingInfo
20
+ resolve:resolve
21
+ reject: reject];
22
+
23
+ // [sdkPlugin billing:amount billinginfo:billingInfo resolver:resolve rejecter:reject];
25
24
  }
26
25
 
27
26
  RCT_EXPORT_METHOD(setViewController:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
28
27
  {
29
- UIViewController *rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
30
- EasyMerchantSdkPlugin *sdkPlugin = [[EasyMerchantSdkPlugin alloc] init];
31
- [sdkPlugin setViewController:rootViewController];
28
+ UIViewController * rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
29
+ EasyMerchantSdk *sdkPlugin = [[EasyMerchantSdk alloc] init];
30
+
31
+ [sdkPlugin setViewController:resolve rejecter: reject];
32
+
33
+ // [sdkPlugin setViewController:rootViewController];
34
+
32
35
  resolve(@"ViewController set successfully");
33
36
  }
34
37
 
35
- // Set platform version method: Returns the platform version (e.g., iOS version)
36
38
  RCT_EXPORT_METHOD(getPlatformVersion:(RCTPromiseResolveBlock)resolve
37
39
  rejecter:(RCTPromiseRejectBlock)reject)
38
40
  {
@@ -8,30 +8,6 @@ public class EasyMerchantSdkPlugin: NSObject {
8
8
  private var viewController: UIViewController?
9
9
  private let viewControllerQueue = DispatchQueue(label: "com.easymerchantsdk.viewController")
10
10
 
11
- // Configure SDK environment and keys
12
- @objc public func configureEnvironment(_ environment: String, apiKey: String, apiSecret: String) {
13
- let selectedEnvironment: EnvironmentConfig.Environment
14
-
15
- switch environment.lowercased() {
16
- case "production":
17
- selectedEnvironment = .production
18
- case "sandbox":
19
- selectedEnvironment = .sandbox
20
- case "staging":
21
- selectedEnvironment = .staging
22
- default:
23
- selectedEnvironment = .staging // default to staging
24
- }
25
-
26
- // Configure EnvironmentConfig
27
- EnvironmentConfig.setEnvironment(selectedEnvironment)
28
- EnvironmentConfig.configure(apiKey: apiKey, apiSecret: apiSecret)
29
-
30
- // Optionally, print the base URL to confirm the correct environment is set
31
- print("Configured environment: \(selectedEnvironment), Base URL: \(EnvironmentConfig.baseURL)")
32
- }
33
-
34
- // Set a custom view controller to present the payment UI
35
11
  @objc public func setViewController(_ viewController: UIViewController) {
36
12
  viewControllerQueue.sync {
37
13
  self.viewController = viewController
@@ -39,7 +15,6 @@ public class EasyMerchantSdkPlugin: NSObject {
39
15
  print("ViewController set: \(String(describing: self.viewController))")
40
16
  }
41
17
 
42
- // Billing method: Handles payment request
43
18
  @objc public func billing(
44
19
  _ amount: String,
45
20
  billinginfo: String,
@@ -62,11 +37,7 @@ public class EasyMerchantSdkPlugin: NSObject {
62
37
  let paymentController = EasyPayViewController(request: request, delegate: self)
63
38
 
64
39
  DispatchQueue.main.async {
65
- if let customViewController = self.viewController {
66
- customViewController.present(paymentController, animated: true) {
67
- resolver("Payment process started for amount \(amount)")
68
- }
69
- } else if let rootViewController = UIApplication.shared.windows.first(where: { $0.isKeyWindow })?.rootViewController {
40
+ if let rootViewController = UIApplication.shared.windows.first(where: { $0.isKeyWindow })?.rootViewController {
70
41
  rootViewController.present(paymentController, animated: true) {
71
42
  resolver("Payment process started for amount \(amount)")
72
43
  }
@@ -7,69 +7,65 @@
7
7
 
8
8
  import UIKit
9
9
 
10
- @available(iOS 16.0, *)
11
10
  @objc
12
11
  public protocol EasyPayViewControllerDelegate {
13
12
  func easyPayController(_ controller: EasyPayViewController, didFinishWith result: Result)
14
13
  }
15
14
 
16
- @available(iOS 16.0, *)
17
15
  @objc
18
16
  public final class EasyPayViewController: UINavigationController {
19
-
17
+
20
18
  private static var isFirstTimeSetupComleted: Bool = false
21
-
19
+
22
20
  internal required init?(coder aDecoder: NSCoder) {
23
21
  fatalError("Cannot use \(#function)")
24
22
  }
25
-
23
+
26
24
  internal override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
27
25
  fatalError("Cannot use \(#function)")
28
26
  }
29
-
27
+
30
28
  internal override init(rootViewController: UIViewController) {
31
29
  fatalError("Cannot use \(#function)")
32
30
  }
33
-
31
+
34
32
  internal override init(navigationBarClass: AnyClass?, toolbarClass: AnyClass?) {
35
33
  fatalError("Cannot use \(#function)")
36
34
  }
37
-
35
+
38
36
  private let request: Request
39
37
  public weak var easyPayDelegate: EasyPayViewControllerDelegate?
40
-
38
+
41
39
  public init(request: Request, delegate: EasyPayViewControllerDelegate?) {
42
40
  if !Self.isFirstTimeSetupComleted {
43
41
  Self.runFirstTimeSetup()
44
42
  }
45
-
43
+
46
44
  self.request = request
47
45
  self.easyPayDelegate = delegate
48
46
  super.init(nibName: nil, bundle: nil)
49
-
47
+
50
48
  self.modalPresentationStyle = .fullScreen
51
49
  self.isModalInPresentation = true
52
50
  }
53
-
51
+
54
52
  public override func viewDidLoad() {
55
53
  super.viewDidLoad()
56
54
  // Disable interactive pop gesture to prevent dismissal by sliding from left
57
55
  self.interactivePopGestureRecognizer?.isEnabled = false
58
-
56
+
59
57
  let vc = UIStoryboard(name: "easymerchantsdk", bundle: Bundle.easyPayBundle).instantiateViewController(withIdentifier: "PaymentInfoVC") as! PaymentInfoVC
60
58
  vc.modalPresentationStyle = .overFullScreen
61
59
  vc.configureWith(request: request, delegate: easyPayDelegate)
62
60
  vc.amount = Int(request.amount) // Set the amount here
63
-
64
61
  self.navigationBar.isHidden = true
65
62
  self.setViewControllers([vc], animated: false)
66
63
  }
67
-
64
+
68
65
  }
69
66
 
70
- @available(iOS 16.0, *)
71
67
  private extension EasyPayViewController {
72
-
68
+
73
69
  func setupDetents() {
74
70
  if let sheetController = self.sheetPresentationController {
75
71
  sheetController.prefersGrabberVisible = false
@@ -81,10 +77,10 @@ private extension EasyPayViewController {
81
77
  }
82
78
 
83
79
  private extension EasyPayViewController {
84
-
80
+
85
81
  private static func runFirstTimeSetup() {
86
82
  UIFont.registerEasyPayFonts()
87
83
  Self.isFirstTimeSetupComleted = true
88
84
  }
89
-
85
+
90
86
  }
@@ -1,3 +1,10 @@
1
+ //
2
+ // ViewController.swift
3
+ // EasyPaySDKDemo
4
+ //
5
+ // Created by iftekhar on 13/07/24.
6
+ //
7
+
1
8
  import UIKit
2
9
 
3
10
  class ViewController: UIViewController {
@@ -7,24 +14,12 @@ class ViewController: UIViewController {
7
14
 
8
15
  override func viewDidLoad() {
9
16
  super.viewDidLoad()
10
-
11
- // Developer selects the environment
12
- EnvironmentConfig.setEnvironment(.staging) // Or .sandbox, .production
17
+ // Do any additional setup after loading the view.
18
+
13
19
  }
14
20
 
15
21
  @IBAction private func payAction() {
16
- //Staging Keys
17
- let apiKey = "mobilesdk1980IUuCzwWl"
18
- let apiSecret = "mobilesdk1980LVHnN0Oh"
19
-
20
- //Sandboxing Keys
21
- // let apiKey = "f149cf5afc3a67c79e0aa87e7"
22
- // let apiSecret = "22b9dd1e588146077ca77da82"
23
-
24
- // Configure the SDK with custom API keys
25
- EnvironmentConfig.configure(apiKey: apiKey, apiSecret: apiSecret)
26
-
27
- // Create the payment request
22
+ // Create JSON Object with the given data
28
23
  let additionalInfoRequest = [
29
24
  "name": "Test User",
30
25
  "email": "test@gmail.com",
@@ -42,12 +37,13 @@ class ViewController: UIViewController {
42
37
  "additional_info": additionalInfoRequest
43
38
  ]
44
39
 
40
+ // Convert the dictionary to JSON
45
41
  guard let jsonData = try? JSONSerialization.data(withJSONObject: json, options: []) else {
46
42
  print("Failed to serialize JSON")
47
43
  return
48
44
  }
49
45
 
50
- // Send the payment request
46
+ // let request = EasyPay.Request(amount: 99, billingInfoData: nil)
51
47
  let request = Request(amount: 99, billingInfoData: jsonData)
52
48
  let controller = EasyPayViewController(request: request, delegate: self)
53
49
  self.present(controller, animated: true)
@@ -66,6 +62,7 @@ extension ViewController: EasyPayViewControllerDelegate {
66
62
  handleSuccess(with: chargeData)
67
63
  }
68
64
  case .error:
65
+ // Handle the error and display the message on lblResponseShow
69
66
  if let chargeData = result.chargeData, let errorMessage = chargeData["errorMessage"] as? String {
70
67
  lblResponseShow.isHidden = false
71
68
  lblResponseShow.text = "Error: \(errorMessage)"
@@ -82,3 +79,4 @@ extension ViewController: EasyPayViewControllerDelegate {
82
79
  }
83
80
 
84
81
  }
82
+