@jimrising/easymerchantsdk-react-native 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/.idea/caches/deviceStreaming.xml +22 -0
  2. package/.idea/easymerchantsdk-react-native.iml +9 -0
  3. package/.idea/em-MobileCheckoutSDK-ReactNative.iml +0 -0
  4. package/.idea/misc.xml +5 -0
  5. package/.idea/modules.xml +8 -0
  6. package/.idea/vcs.xml +0 -1
  7. package/.idea/workspace.xml +20 -56
  8. package/README.md +2 -2
  9. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/results.bin +1 -0
  10. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
  11. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
  12. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
  13. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
  14. package/android/build/.transforms/27d3a0c22098810ca42038b1b8102417/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  15. package/android/build/.transforms/41cd2635778c1bb5c18af2c46eb9196e/results.bin +1 -0
  16. package/android/build/.transforms/41cd2635778c1bb5c18af2c46eb9196e/transformed/classes/classes_dex/classes.dex +0 -0
  17. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/results.bin +1 -0
  18. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
  19. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
  20. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
  21. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
  22. package/android/build/.transforms/6b36622787f586c4b6e3df98c5efa11c/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  23. package/android/build/.transforms/7eb7ceaa43c9e8323ac65b4f785987b6/results.bin +1 -0
  24. package/android/build/.transforms/7eb7ceaa43c9e8323ac65b4f785987b6/transformed/classes/classes_dex/classes.dex +0 -0
  25. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/results.bin +1 -0
  26. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/BuildConfig.dex +0 -0
  27. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule$1.dex +0 -0
  28. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkModule.dex +0 -0
  29. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/reactlibrary/RNEasymerchantsdkPackage.dex +0 -0
  30. package/android/build/.transforms/a8b93af4be449a0e2cca4bd6ddb6685e/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  31. package/android/build/.transforms/f1a160720415bc76d8d6c6734c5acf3e/results.bin +1 -0
  32. package/android/build/.transforms/f1a160720415bc76d8d6c6734c5acf3e/transformed/classes/classes_dex/classes.dex +0 -0
  33. package/android/build/generated/source/buildConfig/debug/com/reactlibrary/BuildConfig.java +10 -0
  34. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
  35. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  36. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  37. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  38. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  39. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  40. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  41. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  42. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  43. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  44. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  45. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  46. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/BuildConfig.class +0 -0
  47. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  48. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  49. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
  50. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  51. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
  52. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
  53. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  54. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  55. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/BuildConfig.class +0 -0
  56. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule$1.class +0 -0
  57. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkModule.class +0 -0
  58. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/reactlibrary/RNEasymerchantsdkPackage.class +0 -0
  59. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  60. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  61. package/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
  62. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule$1.class.uniqueId2 +0 -0
  63. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkModule.class.uniqueId1 +0 -0
  64. package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/RNEasymerchantsdkPackage.class.uniqueId0 +0 -0
  65. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  66. package/android/build.gradle +1 -1
  67. package/android/src/main/java/com/reactlibrary/RNEasymerchantsdkModule.java +4 -5
  68. package/ios/Bundle/EasyPayBundle.swift +1 -0
  69. package/ios/Classes/EasyMerchantSdk.m +14 -16
  70. package/ios/Classes/EasyMerchantSdk.swift +30 -1
  71. package/ios/Classes/EasyPayViewController.swift +19 -15
  72. package/ios/EnvironmentConfig.swift +63 -0
  73. package/ios/Example/ViewController.swift +16 -14
  74. package/ios/Models/Request.swift +18 -37
  75. package/ios/Pods/ViewControllers/AdditionalInfoVC.swift +92 -37
  76. package/ios/Pods/ViewControllers/BillingInfoVC/BillingInfoVC.swift +1 -1
  77. package/ios/Pods/ViewControllers/EmailVerificationVC.swift +15 -6
  78. package/ios/Pods/ViewControllers/OTPVerificationVC.swift +90 -36
  79. package/ios/Pods/ViewControllers/PaymentInformation/PaymentInfoVC.swift +223 -108
  80. package/package.json +15 -6
  81. package/src/index.js +2 -2
@@ -69,6 +69,17 @@
69
69
  <option name="screenX" value="1080" />
70
70
  <option name="screenY" value="2400" />
71
71
  </PersistentDeviceSelectionData>
72
+ <PersistentDeviceSelectionData>
73
+ <option name="api" value="34" />
74
+ <option name="brand" value="motorola" />
75
+ <option name="codename" value="arcfox" />
76
+ <option name="id" value="arcfox" />
77
+ <option name="manufacturer" value="Motorola" />
78
+ <option name="name" value="razr plus 2024" />
79
+ <option name="screenDensity" value="360" />
80
+ <option name="screenX" value="1080" />
81
+ <option name="screenY" value="1272" />
82
+ </PersistentDeviceSelectionData>
72
83
  <PersistentDeviceSelectionData>
73
84
  <option name="api" value="33" />
74
85
  <option name="brand" value="samsung" />
@@ -223,6 +234,17 @@
223
234
  <option name="screenX" value="720" />
224
235
  <option name="screenY" value="1600" />
225
236
  </PersistentDeviceSelectionData>
237
+ <PersistentDeviceSelectionData>
238
+ <option name="api" value="34" />
239
+ <option name="brand" value="samsung" />
240
+ <option name="codename" value="g0q" />
241
+ <option name="id" value="g0q" />
242
+ <option name="manufacturer" value="Samsung" />
243
+ <option name="name" value="SM-S906U1" />
244
+ <option name="screenDensity" value="450" />
245
+ <option name="screenX" value="1080" />
246
+ <option name="screenY" value="2340" />
247
+ </PersistentDeviceSelectionData>
226
248
  <PersistentDeviceSelectionData>
227
249
  <option name="api" value="33" />
228
250
  <option name="brand" value="samsung" />
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="JAVA_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
7
+ <orderEntry type="sourceFolder" forTests="false" />
8
+ </component>
9
+ </module>
File without changes
package/.idea/misc.xml ADDED
@@ -0,0 +1,5 @@
1
+ <project version="4">
2
+ <component name="ProjectRootManager">
3
+ <output url="file://$PROJECT_DIR$/out" />
4
+ </component>
5
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/easymerchantsdk-react-native.iml" filepath="$PROJECT_DIR$/.idea/easymerchantsdk-react-native.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
package/.idea/vcs.xml CHANGED
@@ -2,6 +2,5 @@
2
2
  <project version="4">
3
3
  <component name="VcsDirectoryMappings">
4
4
  <mapping directory="" vcs="Git" />
5
- <mapping directory="$PROJECT_DIR$/SampleApp" vcs="Git" />
6
5
  </component>
7
6
  </project>
@@ -4,28 +4,7 @@
4
4
  <option name="autoReloadType" value="NONE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
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" />
15
- <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" 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" />
23
- <change beforePath="$PROJECT_DIR$/ios/Classes/EasyPayViewController.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/EasyPayViewController.swift" afterDir="false" />
24
- <change beforePath="$PROJECT_DIR$/ios/Pods/ViewControllers/AdditionalInfoVC.swift" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Pods/ViewControllers/AdditionalInfoVC.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" />
26
- <change beforePath="$PROJECT_DIR$/ios/easymerchantsdk.podspec" beforeDir="false" afterPath="$PROJECT_DIR$/ios/easymerchantsdk.podspec" afterDir="false" />
27
- <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
28
- </list>
7
+ <list default="true" id="3e2fa6c1-ea79-4c71-afdb-28176876a8c4" name="Changes" comment="" />
29
8
  <option name="SHOW_DIALOG" value="false" />
30
9
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
31
10
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -38,32 +17,28 @@
38
17
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
39
18
  </component>
40
19
  <component name="ProjectColorInfo">{
41
- &quot;associatedIndex&quot;: 7
20
+ &quot;customColor&quot;: &quot;&quot;,
21
+ &quot;associatedIndex&quot;: 4
42
22
  }</component>
43
- <component name="ProjectId" id="2rO9yZCgAc9Uez0WlOGxOdZqRte" />
23
+ <component name="ProjectId" id="2qKXhyciB6aZPLbATAZVTXWQsw3" />
44
24
  <component name="ProjectViewState">
45
25
  <option name="hideEmptyMiddlePackages" value="true" />
46
26
  <option name="showLibraryContents" value="true" />
47
27
  </component>
48
- <component name="PropertiesComponent">{
49
- &quot;keyToString&quot;: {
50
- &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
51
- &quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
52
- &quot;RunOnceActivity.readMode.enableVisualFormatting&quot;: &quot;true&quot;,
53
- &quot;cf.first.check.clang-format&quot;: &quot;false&quot;,
54
- &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
55
- &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
56
- &quot;git-widget-placeholder&quot;: &quot;main&quot;,
57
- &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
58
- &quot;last_opened_file_path&quot;: &quot;/Users/appdev/Downloads/em-MobileCheckoutSDK-ReactNative/SampleApp&quot;,
59
- &quot;show.migrate.to.gradle.popup&quot;: &quot;false&quot;
28
+ <component name="PropertiesComponent"><![CDATA[{
29
+ "keyToString": {
30
+ "RunOnceActivity.ShowReadmeOnStart": "true",
31
+ "RunOnceActivity.cidr.known.project.marker": "true",
32
+ "RunOnceActivity.readMode.enableVisualFormatting": "true",
33
+ "cf.first.check.clang-format": "false",
34
+ "cidr.known.project.marker": "true",
35
+ "dart.analysis.tool.window.visible": "false",
36
+ "git-widget-placeholder": "dev-branch",
37
+ "kotlin-language-version-configured": "true",
38
+ "last_opened_file_path": "/Users/appdev/Desktop/easymerchantsdk-react-native",
39
+ "show.migrate.to.gradle.popup": "false"
60
40
  }
61
- }</component>
62
- <component name="RecentsManager">
63
- <key name="CopyFile.RECENT_KEYS">
64
- <recent name="$PROJECT_DIR$/SampleApp" />
65
- </key>
66
- </component>
41
+ }]]></component>
67
42
  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
68
43
  <component name="SwiftWorkspaceSettings">
69
44
  <option name="detectedToolchain" value="true" />
@@ -71,23 +46,12 @@
71
46
  </component>
72
47
  <component name="TaskManager">
73
48
  <task active="true" id="Default" summary="Default task">
74
- <changelist id="8a0ded78-c462-4ead-a826-2c18fddbe814" name="Changes" comment="" />
75
- <created>1736419509849</created>
49
+ <changelist id="3e2fa6c1-ea79-4c71-afdb-28176876a8c4" name="Changes" comment="" />
50
+ <created>1734412363752</created>
76
51
  <option name="number" value="Default" />
77
52
  <option name="presentableId" value="Default" />
78
- <updated>1736419509849</updated>
53
+ <updated>1734412363752</updated>
79
54
  </task>
80
55
  <servers />
81
56
  </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>
93
57
  </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.9"
11
+ "@jimrising/easymerchantsdk-react-native": "^1.1.0"
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,'z','apiKey','secretKey');
186
+ const response = await RNEasymerchantsdk.billing(amount, null,'sandbox','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') {
@@ -0,0 +1 @@
1
+ o/bundleLibRuntimeToDirDebug
@@ -0,0 +1 @@
1
+ o/bundleLibRuntimeToDirDebug
@@ -0,0 +1 @@
1
+ o/bundleLibRuntimeToDirDebug
@@ -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,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.reactlibrary" >
4
+
5
+ <uses-sdk android:minSdkVersion="16" />
6
+
7
+ </manifest>
@@ -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,6 @@
1
+ aarFormatVersion=1.0
2
+ aarMetadataVersion=1.0
3
+ minCompileSdk=1
4
+ minCompileSdkExtension=0
5
+ minAndroidGradlePluginVersion=1.0.0
6
+ coreLibraryDesugaringEnabled=false
@@ -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:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/SampleApp/node_modules/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:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk/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:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/demo/node_modules/easymerchantsdk-react-native/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/demo/node_modules/easymerchantsdk-react-native/android/src/debug/shaders"/></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:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/demo/node_modules/easymerchantsdk-react-native/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/demo/node_modules/easymerchantsdk-react-native/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/appdev/Desktop/demo/node_modules/easymerchantsdk-react-native/android/build/intermediates/shader_assets/debug/compileDebugShaders/out"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ R_DEF: Internal format may change without notice
2
+ local
@@ -0,0 +1,7 @@
1
+ 1<?xml version="1.0" encoding="utf-8"?>
2
+ 2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ 3 package="com.reactlibrary" >
4
+ 4
5
+ 5 <uses-sdk android:minSdkVersion="16" />
6
+ 6
7
+ 7</manifest>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.reactlibrary" >
4
+
5
+ <uses-sdk android:minSdkVersion="16" />
6
+
7
+ </manifest>
@@ -0,0 +1,17 @@
1
+ -- Merging decision tree log ---
2
+ manifest
3
+ ADDED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml:2:1-4:12
4
+ INJECTED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml:2:1-4:12
5
+ package
6
+ ADDED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml:3:11-37
7
+ INJECTED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
8
+ xmlns:android
9
+ ADDED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml:2:11-69
10
+ uses-sdk
11
+ INJECTED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
12
+ INJECTED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
13
+ INJECTED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
14
+ android:targetSdkVersion
15
+ INJECTED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
16
+ android:minSdkVersion
17
+ INJECTED from /Users/appdev/Desktop/SampleApp/node_modules/easymerchantsdk-react-native/android/src/main/AndroidManifest.xml
@@ -39,7 +39,7 @@ repositories {
39
39
  }
40
40
 
41
41
  dependencies {
42
- implementation 'com.app:paysdk:1.1.7'
42
+ implementation 'com.app:paysdk:1.1.9'
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, Promise promise) {
42
+ public void billing(String amount, String billinginfo,String env,String apiKey, String secretKey, Promise promise) {
43
43
  Activity currentActivity = getCurrentActivity();
44
44
  if (currentActivity == null) {
45
45
  promise.reject("ERROR", "Activity is not initialized");
@@ -48,16 +48,15 @@ public class RNEasymerchantsdkModule extends ReactContextBaseJavaModule {
48
48
 
49
49
  try {
50
50
 
51
- // Making the payment call
52
- new EasyPaymentService(currentActivity).makePayment(amount, (billinginfo == null) ? null : new JSONObject(billinginfo), new EasyPaymentFactory.OnTransactionListener() {
51
+ new EasyPaymentService(currentActivity,env,apiKey,secretKey).makePayment(amount, (billinginfo == null) ? null : new JSONObject(billinginfo), new EasyPaymentFactory.OnTransactionListener() {
53
52
  @Override
54
53
  public void onSuccess(String response) {
55
- promise.resolve(response); // Resolve the promise on success
54
+ promise.resolve(response);
56
55
  }
57
56
 
58
57
  @Override
59
58
  public void onError(String error) {
60
- promise.reject("ERROR", error); // Reject the promise on error
59
+ promise.reject("ERROR", error);
61
60
  }
62
61
  });
63
62
  } catch (Exception e) {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import Foundation
9
9
 
10
+ @available(iOS 16.0, *)
10
11
  extension Bundle {
11
12
  static let easyPayBundle: Bundle = {
12
13
  let frameworkBundle = Bundle(for: EasyPayViewController.self)
@@ -3,38 +3,36 @@
3
3
  #import <React/RCTBridgeModule.h>
4
4
  #import "easymerchantsdk-Swift.h"
5
5
 
6
-
7
6
  @implementation EasyMerchantSdk
8
7
 
9
8
  RCT_EXPORT_MODULE()
10
9
 
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
13
16
  resolve:(RCTPromiseResolveBlock)resolve
14
17
  reject:(RCTPromiseRejectBlock)reject)
15
18
  {
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];
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];
24
25
  }
25
26
 
26
27
  RCT_EXPORT_METHOD(setViewController:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
27
28
  {
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
-
29
+ UIViewController *rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
30
+ EasyMerchantSdkPlugin *sdkPlugin = [[EasyMerchantSdkPlugin alloc] init];
31
+ [sdkPlugin setViewController:rootViewController];
35
32
  resolve(@"ViewController set successfully");
36
33
  }
37
34
 
35
+ // Set platform version method: Returns the platform version (e.g., iOS version)
38
36
  RCT_EXPORT_METHOD(getPlatformVersion:(RCTPromiseResolveBlock)resolve
39
37
  rejecter:(RCTPromiseRejectBlock)reject)
40
38
  {
@@ -8,6 +8,30 @@ 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
11
35
  @objc public func setViewController(_ viewController: UIViewController) {
12
36
  viewControllerQueue.sync {
13
37
  self.viewController = viewController
@@ -15,6 +39,7 @@ public class EasyMerchantSdkPlugin: NSObject {
15
39
  print("ViewController set: \(String(describing: self.viewController))")
16
40
  }
17
41
 
42
+ // Billing method: Handles payment request
18
43
  @objc public func billing(
19
44
  _ amount: String,
20
45
  billinginfo: String,
@@ -37,7 +62,11 @@ public class EasyMerchantSdkPlugin: NSObject {
37
62
  let paymentController = EasyPayViewController(request: request, delegate: self)
38
63
 
39
64
  DispatchQueue.main.async {
40
- if let rootViewController = UIApplication.shared.windows.first(where: { $0.isKeyWindow })?.rootViewController {
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 {
41
70
  rootViewController.present(paymentController, animated: true) {
42
71
  resolver("Payment process started for amount \(amount)")
43
72
  }