iamport-react-native 2.0.15 → 3.0.1-alpha.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 (430) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +12 -2
  3. package/lib/module/components/Certification/index.js +75 -72
  4. package/lib/module/components/Certification/index.js.map +1 -1
  5. package/lib/module/components/ErrorOnParams/index.js +13 -9
  6. package/lib/module/components/ErrorOnParams/index.js.map +1 -1
  7. package/lib/module/components/Loading/index.js +13 -9
  8. package/lib/module/components/Loading/index.js.map +1 -1
  9. package/lib/module/components/Payment/index.js +111 -93
  10. package/lib/module/components/Payment/index.js.map +1 -1
  11. package/lib/module/constants/index.js +2 -0
  12. package/lib/module/constants/index.js.map +1 -1
  13. package/lib/module/index.js +6 -4
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/module/package.json +1 -0
  16. package/lib/module/styles.js +2 -0
  17. package/lib/module/styles.js.map +1 -1
  18. package/lib/module/utils/IamportUrl.js +51 -29
  19. package/lib/module/utils/IamportUrl.js.map +1 -1
  20. package/lib/module/utils/Validation.js +3 -2
  21. package/lib/module/utils/Validation.js.map +1 -1
  22. package/lib/module/utils/ValidationForPayment.js +4 -2
  23. package/lib/module/utils/ValidationForPayment.js.map +1 -1
  24. package/lib/typescript/package.json +1 -0
  25. package/lib/typescript/{components → src/components}/Certification/index.d.ts +1 -2
  26. package/lib/typescript/src/components/Certification/index.d.ts.map +1 -0
  27. package/lib/typescript/src/components/ErrorOnParams/index.d.ts +6 -0
  28. package/lib/typescript/src/components/ErrorOnParams/index.d.ts.map +1 -0
  29. package/lib/typescript/src/components/Loading/index.d.ts +3 -0
  30. package/lib/typescript/src/components/Loading/index.d.ts.map +1 -0
  31. package/lib/typescript/{components → src/components}/Payment/index.d.ts +1 -2
  32. package/lib/typescript/src/components/Payment/index.d.ts.map +1 -0
  33. package/lib/typescript/src/constants/index.d.ts.map +1 -0
  34. package/lib/typescript/src/index.d.ts.map +1 -0
  35. package/lib/typescript/{styles.d.ts → src/styles.d.ts} +2 -2
  36. package/lib/typescript/src/styles.d.ts.map +1 -0
  37. package/lib/typescript/{utils → src/utils}/IamportUrl.d.ts +8 -7
  38. package/lib/typescript/src/utils/IamportUrl.d.ts.map +1 -0
  39. package/lib/typescript/src/utils/Validation.d.ts.map +1 -0
  40. package/lib/typescript/src/utils/ValidationForPayment.d.ts.map +1 -0
  41. package/package.json +81 -74
  42. package/src/components/Certification/index.tsx +7 -7
  43. package/src/components/ErrorOnParams/index.tsx +1 -2
  44. package/src/components/Loading/index.tsx +1 -2
  45. package/src/components/Payment/index.tsx +31 -7
  46. package/src/utils/IamportUrl.ts +54 -26
  47. package/.circleci/config.yml +0 -98
  48. package/.editorconfig +0 -15
  49. package/.gitattributes +0 -3
  50. package/.gitignore +0 -69
  51. package/.yarnrc +0 -3
  52. package/.yarnrc.yml +0 -1
  53. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  54. package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
  55. package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
  56. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  57. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  58. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  59. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  60. package/android/.gradle/8.9/gc.properties +0 -0
  61. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  62. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  63. package/android/.gradle/vcs-1/gc.properties +0 -0
  64. package/android/build.gradle +0 -128
  65. package/android/gradle.properties +0 -4
  66. package/android/src/main/AndroidManifest.xml +0 -4
  67. package/android/src/main/java/com/iamportreactnative/IamportReactNativePackage.kt +0 -17
  68. package/android/src/main/java/com/iamportreactnative/IamportReactNativeViewManager.kt +0 -20
  69. package/babel.config.js +0 -3
  70. package/example/.gitignore +0 -69
  71. package/example/README.md +0 -44
  72. package/example/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  73. package/example/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  74. package/example/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  75. package/example/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  76. package/example/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  77. package/example/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  78. package/example/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  79. package/example/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  80. package/example/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  81. package/example/android/.gradle/7.5.1/gc.properties +0 -0
  82. package/example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  83. package/example/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  84. package/example/android/.gradle/vcs-1/gc.properties +0 -0
  85. package/example/android/app/build.gradle +0 -183
  86. package/example/android/app/debug.keystore +0 -0
  87. package/example/android/app/proguard-rules.pro +0 -10
  88. package/example/android/app/src/debug/AndroidManifest.xml +0 -8
  89. package/example/android/app/src/debug/java/com/example/iamportreactnative/ReactNativeFlipper.java +0 -69
  90. package/example/android/app/src/main/AndroidManifest.xml +0 -34
  91. package/example/android/app/src/main/java/com/example/iamportreactnative/MainActivity.java +0 -15
  92. package/example/android/app/src/main/java/com/example/iamportreactnative/MainApplication.java +0 -80
  93. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  94. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  95. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  96. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  97. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  98. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  99. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  100. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  101. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  102. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  103. package/example/android/app/src/main/res/values/strings.xml +0 -3
  104. package/example/android/app/src/main/res/values/styles.xml +0 -9
  105. package/example/android/build.gradle +0 -21
  106. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  107. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  108. package/example/android/gradle.properties +0 -44
  109. package/example/android/gradlew +0 -183
  110. package/example/android/gradlew.bat +0 -103
  111. package/example/android/settings.gradle +0 -9
  112. package/example/app.json +0 -4
  113. package/example/babel.config.js +0 -11
  114. package/example/index.js +0 -5
  115. package/example/ios/File.swift +0 -8
  116. package/example/ios/Gemfile +0 -7
  117. package/example/ios/Gemfile.lock +0 -99
  118. package/example/ios/IamportReactNativeExample/AppDelegate.h +0 -15
  119. package/example/ios/IamportReactNativeExample/AppDelegate.mm +0 -138
  120. package/example/ios/IamportReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  121. package/example/ios/IamportReactNativeExample/Images.xcassets/Contents.json +0 -6
  122. package/example/ios/IamportReactNativeExample/Info.plist +0 -121
  123. package/example/ios/IamportReactNativeExample/LaunchScreen.storyboard +0 -58
  124. package/example/ios/IamportReactNativeExample/main.m +0 -16
  125. package/example/ios/IamportReactNativeExample-Bridging-Header.h +0 -3
  126. package/example/ios/IamportReactNativeExample.xcodeproj/project.pbxproj +0 -969
  127. package/example/ios/IamportReactNativeExample.xcodeproj/xcshareddata/xcschemes/IamportReactNativeExample.xcscheme +0 -99
  128. package/example/ios/IamportReactNativeExample.xcworkspace/contents.xcworkspacedata +0 -10
  129. package/example/ios/IamportReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  130. package/example/ios/Podfile +0 -57
  131. package/example/ios/Podfile.lock +0 -756
  132. package/example/metro.config.js +0 -66
  133. package/example/package.json +0 -40
  134. package/example/src/App.tsx +0 -17
  135. package/example/src/Certification/index.tsx +0 -30
  136. package/example/src/CertificationResult/index.tsx +0 -79
  137. package/example/src/CertificationTest/index.tsx +0 -214
  138. package/example/src/Home/index.tsx +0 -87
  139. package/example/src/Loading/index.tsx +0 -12
  140. package/example/src/NavigationService.tsx +0 -127
  141. package/example/src/Payment/index.tsx +0 -28
  142. package/example/src/PaymentResult/index.tsx +0 -96
  143. package/example/src/PaymentTest/index.tsx +0 -383
  144. package/example/src/Picker/index.tsx +0 -60
  145. package/example/src/constants.ts +0 -274
  146. package/example/src/utils.ts +0 -83
  147. package/example/yarn.lock +0 -7358
  148. package/exampleForExpo/.buckconfig +0 -6
  149. package/exampleForExpo/.expo/README.md +0 -8
  150. package/exampleForExpo/.expo/devices.json +0 -3
  151. package/exampleForExpo/.gitattributes +0 -1
  152. package/exampleForExpo/.gitignore +0 -125
  153. package/exampleForExpo/.idea/.gitignore +0 -3
  154. package/exampleForExpo/.idea/caches/deviceStreaming.xml +0 -549
  155. package/exampleForExpo/.idea/exampleForExpo.iml +0 -9
  156. package/exampleForExpo/.idea/misc.xml +0 -6
  157. package/exampleForExpo/.idea/modules.xml +0 -8
  158. package/exampleForExpo/.idea/vcs.xml +0 -6
  159. package/exampleForExpo/.idea/workspace.xml +0 -53
  160. package/exampleForExpo/README.md +0 -58
  161. package/exampleForExpo/__tests__/App.js +0 -10
  162. package/exampleForExpo/android/.gitignore +0 -21
  163. package/exampleForExpo/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  164. package/exampleForExpo/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  165. package/exampleForExpo/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  166. package/exampleForExpo/android/.gradle/7.5.1/gc.properties +0 -0
  167. package/exampleForExpo/android/.gradle/vcs-1/gc.properties +0 -0
  168. package/exampleForExpo/android/app/BUCK +0 -55
  169. package/exampleForExpo/android/app/build.gradle +0 -362
  170. package/exampleForExpo/android/app/build_defs.bzl +0 -19
  171. package/exampleForExpo/android/app/debug.keystore +0 -0
  172. package/exampleForExpo/android/app/proguard-rules.pro +0 -14
  173. package/exampleForExpo/android/app/src/debug/AndroidManifest.xml +0 -7
  174. package/exampleForExpo/android/app/src/debug/java/kr/iamport/exampleForExpo/ReactNativeFlipper.java +0 -69
  175. package/exampleForExpo/android/app/src/main/AndroidManifest.xml +0 -34
  176. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainActivity.java +0 -83
  177. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainApplication.java +0 -106
  178. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/MainApplicationReactNativeHost.java +0 -117
  179. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/components/MainComponentsRegistry.java +0 -36
  180. package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
  181. package/exampleForExpo/android/app/src/main/jni/CMakeLists.txt +0 -7
  182. package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
  183. package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
  184. package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
  185. package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
  186. package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
  187. package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
  188. package/exampleForExpo/android/app/src/main/jni/OnLoad.cpp +0 -11
  189. package/exampleForExpo/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  190. package/exampleForExpo/android/app/src/main/res/drawable/splashscreen.xml +0 -4
  191. package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  192. package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  193. package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  194. package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  195. package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  196. package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  197. package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  198. package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  199. package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  200. package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  201. package/exampleForExpo/android/app/src/main/res/values/colors.xml +0 -4
  202. package/exampleForExpo/android/app/src/main/res/values/strings.xml +0 -3
  203. package/exampleForExpo/android/app/src/main/res/values/styles.xml +0 -17
  204. package/exampleForExpo/android/app/src/main/res/values-night/colors.xml +0 -1
  205. package/exampleForExpo/android/build.gradle +0 -65
  206. package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  207. package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  208. package/exampleForExpo/android/gradle.properties +0 -53
  209. package/exampleForExpo/android/gradlew +0 -240
  210. package/exampleForExpo/android/gradlew.bat +0 -91
  211. package/exampleForExpo/android/settings.gradle +0 -17
  212. package/exampleForExpo/app.json +0 -16
  213. package/exampleForExpo/babel.config.js +0 -11
  214. package/exampleForExpo/index.js +0 -9
  215. package/exampleForExpo/ios/.gitignore +0 -30
  216. package/exampleForExpo/ios/.xcode.env +0 -11
  217. package/exampleForExpo/ios/Podfile +0 -61
  218. package/exampleForExpo/ios/Podfile.lock +0 -734
  219. package/exampleForExpo/ios/Podfile.properties.json +0 -3
  220. package/exampleForExpo/ios/exampleForExpo/AppDelegate.h +0 -9
  221. package/exampleForExpo/ios/exampleForExpo/AppDelegate.mm +0 -166
  222. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
  223. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/Contents.json +0 -6
  224. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/Contents.json +0 -21
  225. package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
  226. package/exampleForExpo/ios/exampleForExpo/Info.plist +0 -118
  227. package/exampleForExpo/ios/exampleForExpo/SplashScreen.storyboard +0 -43
  228. package/exampleForExpo/ios/exampleForExpo/Supporting/Expo.plist +0 -16
  229. package/exampleForExpo/ios/exampleForExpo/exampleForExpo.entitlements +0 -8
  230. package/exampleForExpo/ios/exampleForExpo/main.m +0 -10
  231. package/exampleForExpo/ios/exampleForExpo/noop-file.swift +0 -4
  232. package/exampleForExpo/ios/exampleForExpo.xcodeproj/project.pbxproj +0 -544
  233. package/exampleForExpo/ios/exampleForExpo.xcodeproj/xcshareddata/xcschemes/exampleForExpo.xcscheme +0 -88
  234. package/exampleForExpo/ios/exampleForExpo.xcworkspace/contents.xcworkspacedata +0 -10
  235. package/exampleForExpo/ios/exampleForExpo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  236. package/exampleForExpo/metro.config.js +0 -62
  237. package/exampleForExpo/package.json +0 -40
  238. package/exampleForExpo/src/App.js +0 -14
  239. package/exampleForExpo/src/Certification/index.js +0 -25
  240. package/exampleForExpo/src/CertificationResult/index.js +0 -61
  241. package/exampleForExpo/src/CertificationTest/index.js +0 -151
  242. package/exampleForExpo/src/Home/index.js +0 -80
  243. package/exampleForExpo/src/Loading/index.js +0 -10
  244. package/exampleForExpo/src/NavigationService.js +0 -102
  245. package/exampleForExpo/src/Payment/index.js +0 -23
  246. package/exampleForExpo/src/PaymentResult/index.js +0 -82
  247. package/exampleForExpo/src/PaymentTest/index.js +0 -313
  248. package/exampleForExpo/src/Picker/index.js +0 -19
  249. package/exampleForExpo/src/constants.js +0 -322
  250. package/exampleForExpo/src/utils.js +0 -116
  251. package/exampleForExpo/yarn.lock +0 -9498
  252. package/exampleForManagedExpo/.expo-shared/assets.json +0 -4
  253. package/exampleForManagedExpo/.gitignore +0 -22
  254. package/exampleForManagedExpo/App.js +0 -11
  255. package/exampleForManagedExpo/README.md +0 -33
  256. package/exampleForManagedExpo/app.json +0 -90
  257. package/exampleForManagedExpo/assets/adaptive-icon.png +0 -0
  258. package/exampleForManagedExpo/assets/favicon.png +0 -0
  259. package/exampleForManagedExpo/assets/icon.png +0 -0
  260. package/exampleForManagedExpo/assets/splash.png +0 -0
  261. package/exampleForManagedExpo/babel.config.js +0 -11
  262. package/exampleForManagedExpo/metro.config.js +0 -62
  263. package/exampleForManagedExpo/package.json +0 -36
  264. package/exampleForManagedExpo/src/Certification/index.js +0 -25
  265. package/exampleForManagedExpo/src/CertificationResult/index.js +0 -61
  266. package/exampleForManagedExpo/src/CertificationTest/index.js +0 -151
  267. package/exampleForManagedExpo/src/Home/index.js +0 -80
  268. package/exampleForManagedExpo/src/Loading/index.js +0 -10
  269. package/exampleForManagedExpo/src/NavigationService.js +0 -102
  270. package/exampleForManagedExpo/src/Payment/index.js +0 -23
  271. package/exampleForManagedExpo/src/PaymentResult/index.js +0 -82
  272. package/exampleForManagedExpo/src/PaymentTest/index.js +0 -313
  273. package/exampleForManagedExpo/src/Picker/index.js +0 -19
  274. package/exampleForManagedExpo/src/constants.js +0 -322
  275. package/exampleForManagedExpo/src/utils.js +0 -116
  276. package/exampleForManagedExpo/yarn.lock +0 -9411
  277. package/exampleForWebView/.buckconfig +0 -6
  278. package/exampleForWebView/.eslintrc.js +0 -4
  279. package/exampleForWebView/.gitattributes +0 -3
  280. package/exampleForWebView/.gitignore +0 -68
  281. package/exampleForWebView/.prettierrc.js +0 -7
  282. package/exampleForWebView/.watchmanconfig +0 -1
  283. package/exampleForWebView/README.md +0 -77
  284. package/exampleForWebView/__tests__/App-test.tsx +0 -14
  285. package/exampleForWebView/_editorconfig +0 -3
  286. package/exampleForWebView/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  287. package/exampleForWebView/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  288. package/exampleForWebView/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  289. package/exampleForWebView/android/.gradle/7.5.1/gc.properties +0 -0
  290. package/exampleForWebView/android/.gradle/vcs-1/gc.properties +0 -0
  291. package/exampleForWebView/android/app/BUCK +0 -55
  292. package/exampleForWebView/android/app/build.gradle +0 -313
  293. package/exampleForWebView/android/app/build_defs.bzl +0 -19
  294. package/exampleForWebView/android/app/debug.keystore +0 -0
  295. package/exampleForWebView/android/app/proguard-rules.pro +0 -10
  296. package/exampleForWebView/android/app/src/debug/AndroidManifest.xml +0 -13
  297. package/exampleForWebView/android/app/src/debug/java/com/exampleforwebview/ReactNativeFlipper.java +0 -73
  298. package/exampleForWebView/android/app/src/main/AndroidManifest.xml +0 -26
  299. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainActivity.java +0 -48
  300. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainApplication.java +0 -91
  301. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/MainApplicationReactNativeHost.java +0 -116
  302. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/components/MainComponentsRegistry.java +0 -36
  303. package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
  304. package/exampleForWebView/android/app/src/main/jni/CMakeLists.txt +0 -7
  305. package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
  306. package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
  307. package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
  308. package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
  309. package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
  310. package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
  311. package/exampleForWebView/android/app/src/main/jni/OnLoad.cpp +0 -11
  312. package/exampleForWebView/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  313. package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  314. package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  315. package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  316. package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  317. package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  318. package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  319. package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  320. package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  321. package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  322. package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  323. package/exampleForWebView/android/app/src/main/res/values/strings.xml +0 -3
  324. package/exampleForWebView/android/app/src/main/res/values/styles.xml +0 -9
  325. package/exampleForWebView/android/build.gradle +0 -51
  326. package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  327. package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  328. package/exampleForWebView/android/gradle.properties +0 -40
  329. package/exampleForWebView/android/gradlew +0 -234
  330. package/exampleForWebView/android/gradlew.bat +0 -89
  331. package/exampleForWebView/android/settings.gradle +0 -11
  332. package/exampleForWebView/app.json +0 -4
  333. package/exampleForWebView/babel.config.js +0 -11
  334. package/exampleForWebView/index.js +0 -9
  335. package/exampleForWebView/ios/.xcode.env +0 -11
  336. package/exampleForWebView/ios/Podfile +0 -43
  337. package/exampleForWebView/ios/Podfile.lock +0 -748
  338. package/exampleForWebView/ios/exampleForWebView/AppDelegate.h +0 -8
  339. package/exampleForWebView/ios/exampleForWebView/AppDelegate.mm +0 -133
  340. package/exampleForWebView/ios/exampleForWebView/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  341. package/exampleForWebView/ios/exampleForWebView/Images.xcassets/Contents.json +0 -6
  342. package/exampleForWebView/ios/exampleForWebView/Info.plist +0 -96
  343. package/exampleForWebView/ios/exampleForWebView/LaunchScreen.storyboard +0 -47
  344. package/exampleForWebView/ios/exampleForWebView/main.m +0 -10
  345. package/exampleForWebView/ios/exampleForWebView.xcodeproj/project.pbxproj +0 -723
  346. package/exampleForWebView/ios/exampleForWebView.xcodeproj/xcshareddata/xcschemes/exampleForWebView.xcscheme +0 -88
  347. package/exampleForWebView/ios/exampleForWebView.xcworkspace/contents.xcworkspacedata +0 -10
  348. package/exampleForWebView/ios/exampleForWebView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  349. package/exampleForWebView/ios/exampleForWebViewTests/Info.plist +0 -24
  350. package/exampleForWebView/ios/exampleForWebViewTests/exampleForWebViewTests.m +0 -66
  351. package/exampleForWebView/manuals/CERTIFICATION.md +0 -223
  352. package/exampleForWebView/manuals/PAYMENT.md +0 -232
  353. package/exampleForWebView/metro.config.js +0 -61
  354. package/exampleForWebView/package.json +0 -54
  355. package/exampleForWebView/src/App.tsx +0 -50
  356. package/exampleForWebView/src/Certification.tsx +0 -54
  357. package/exampleForWebView/src/Home.tsx +0 -49
  358. package/exampleForWebView/src/Loading.tsx +0 -23
  359. package/exampleForWebView/src/Payment.tsx +0 -65
  360. package/exampleForWebView/yarn.lock +0 -7362
  361. package/iamport-react-native.podspec +0 -19
  362. package/ios/IamportReactNative-Bridging-Header.h +0 -1
  363. package/ios/IamportReactNative.xcodeproj/project.pbxproj +0 -293
  364. package/ios/IamportReactNativeViewManager.m +0 -12
  365. package/ios/IamportReactNativeViewManager.swift +0 -32
  366. package/lib/commonjs/components/Certification/index.js +0 -121
  367. package/lib/commonjs/components/Certification/index.js.map +0 -1
  368. package/lib/commonjs/components/ErrorOnParams/index.js +0 -50
  369. package/lib/commonjs/components/ErrorOnParams/index.js.map +0 -1
  370. package/lib/commonjs/components/Loading/index.js +0 -34
  371. package/lib/commonjs/components/Loading/index.js.map +0 -1
  372. package/lib/commonjs/components/Payment/index.js +0 -225
  373. package/lib/commonjs/components/Payment/index.js.map +0 -1
  374. package/lib/commonjs/constants/index.js +0 -114
  375. package/lib/commonjs/constants/index.js.map +0 -1
  376. package/lib/commonjs/img/iamport-logo.png +0 -0
  377. package/lib/commonjs/index.js +0 -29
  378. package/lib/commonjs/index.js.map +0 -1
  379. package/lib/commonjs/styles.js +0 -27
  380. package/lib/commonjs/styles.js.map +0 -1
  381. package/lib/commonjs/utils/IamportUrl.js +0 -289
  382. package/lib/commonjs/utils/IamportUrl.js.map +0 -1
  383. package/lib/commonjs/utils/Validation.js +0 -109
  384. package/lib/commonjs/utils/Validation.js.map +0 -1
  385. package/lib/commonjs/utils/ValidationForPayment.js +0 -112
  386. package/lib/commonjs/utils/ValidationForPayment.js.map +0 -1
  387. package/lib/typescript/components/Certification/index.d.ts.map +0 -1
  388. package/lib/typescript/components/ErrorOnParams/index.d.ts +0 -7
  389. package/lib/typescript/components/ErrorOnParams/index.d.ts.map +0 -1
  390. package/lib/typescript/components/Loading/index.d.ts +0 -4
  391. package/lib/typescript/components/Loading/index.d.ts.map +0 -1
  392. package/lib/typescript/components/Payment/index.d.ts.map +0 -1
  393. package/lib/typescript/constants/index.d.ts.map +0 -1
  394. package/lib/typescript/index.d.ts.map +0 -1
  395. package/lib/typescript/styles.d.ts.map +0 -1
  396. package/lib/typescript/utils/IamportUrl.d.ts.map +0 -1
  397. package/lib/typescript/utils/Validation.d.ts.map +0 -1
  398. package/lib/typescript/utils/ValidationForPayment.d.ts.map +0 -1
  399. package/manuals/CALLBACK.md +0 -72
  400. package/manuals/EXAMPLE.md +0 -168
  401. package/manuals/EXPO.md +0 -246
  402. package/manuals/INSTALL.md +0 -31
  403. package/manuals/SETTING.md +0 -140
  404. package/manuals/SUPPORT.md +0 -35
  405. package/manuals/TRANS.md +0 -77
  406. package/manuals/VERSION.md +0 -187
  407. package/manuals/assets/after-linking-iamport.png +0 -0
  408. package/manuals/assets/after-linking-webview.png +0 -0
  409. package/manuals/assets/allow-arbitrary.gif +0 -0
  410. package/manuals/assets/android-studio-avd-manager.png +0 -0
  411. package/manuals/assets/android-studio-build.png +0 -0
  412. package/manuals/assets/app-scheme-registry.gif +0 -0
  413. package/manuals/assets/expo-eject.png +0 -0
  414. package/manuals/assets/ios-emulator-certification.png +0 -0
  415. package/manuals/assets/ios-emulator-home.png +0 -0
  416. package/manuals/assets/ios-emulator-payment.png +0 -0
  417. package/manuals/assets/ios-trans-create-header-file-1.png +0 -0
  418. package/manuals/assets/ios-trans-create-header-file-2.png +0 -0
  419. package/manuals/assets/ios-trans-create-objectivec-file-1.png +0 -0
  420. package/manuals/assets/ios-trans-create-objectivec-file-2.png +0 -0
  421. package/manuals/assets/ios-trans-result.png +0 -0
  422. package/manuals/assets/webview-peer-dependency.png +0 -0
  423. package/scripts/bootstrap.js +0 -24
  424. package/tsconfig.build.json +0 -9
  425. package/tsconfig.json +0 -26
  426. package/yarn.lock +0 -6174
  427. /package/lib/typescript/{constants → src/constants}/index.d.ts +0 -0
  428. /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
  429. /package/lib/typescript/{utils → src/utils}/Validation.d.ts +0 -0
  430. /package/lib/typescript/{utils → src/utils}/ValidationForPayment.d.ts +0 -0
@@ -1,62 +0,0 @@
1
- const path = require('path');
2
- const blacklist = require('metro-config/src/defaults/exclusionList');
3
- const escape = require('escape-string-regexp');
4
- const pak = require('../package.json');
5
-
6
- const root = path.resolve(__dirname, '..');
7
-
8
- const modules = Object.keys({
9
- ...pak.peerDependencies,
10
- });
11
-
12
- module.exports = {
13
- projectRoot: __dirname,
14
- watchFolders: [root],
15
-
16
- // We need to make sure that only one version is loaded for peerDependencies
17
- // So we blacklist them at the root, and alias them to the versions in example's node_modules
18
- resolver: {
19
- blacklistRE: blacklist(
20
- modules.map(
21
- (m) =>
22
- new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
23
- ),
24
- modules.map(
25
- (m) =>
26
- new RegExp(
27
- `^${escape(path.join(root, 'example/node_modules', m))}\\/.*$`
28
- )
29
- ),
30
- modules.map(
31
- (m) =>
32
- new RegExp(
33
- `^${escape(
34
- path.join(root, 'exampleForWebView/node_modules', m)
35
- )}\\/.*$`
36
- )
37
- ),
38
- modules.map(
39
- (m) =>
40
- new RegExp(
41
- `^${escape(
42
- path.join(root, 'exampleForManagedExpo/node_modules', m)
43
- )}\\/.*$`
44
- )
45
- )
46
- ),
47
-
48
- extraNodeModules: modules.reduce((acc, name) => {
49
- acc[name] = path.join(__dirname, 'node_modules', name);
50
- return acc;
51
- }, {}),
52
- },
53
-
54
- transformer: {
55
- getTransformOptions: async () => ({
56
- transform: {
57
- experimentalImportSupport: false,
58
- inlineRequires: true,
59
- },
60
- }),
61
- },
62
- };
@@ -1,40 +0,0 @@
1
- {
2
- "name": "iamport-react-native-expo-example",
3
- "main": "index.js",
4
- "version": "0.0.1",
5
- "private": true,
6
- "scripts": {
7
- "android": "react-native run-android",
8
- "ios": "react-native run-ios",
9
- "web": "expo start --web",
10
- "start": "expo start --dev-client"
11
- },
12
- "dependencies": {
13
- "@expo/vector-icons": "^13.0.0",
14
- "@react-native-community/masked-view": "0.1.11",
15
- "@react-navigation/native": "^6.1.1",
16
- "@react-navigation/stack": "^6.3.10",
17
- "expo": "~49.0.13",
18
- "expo-modules-core": "~1.5.10",
19
- "expo-splash-screen": "~0.20.5",
20
- "expo-status-bar": "~1.6.0",
21
- "expo-updates": "~0.18.16",
22
- "native-base": "^3.4.25",
23
- "react": "18.2.0",
24
- "react-dom": "18.2.0",
25
- "react-native": "0.72.5",
26
- "react-native-gesture-handler": "~2.12.0",
27
- "react-native-reanimated": "~3.3.0",
28
- "react-native-safe-area-context": "4.6.3",
29
- "react-native-screens": "~3.22.0",
30
- "react-native-svg": "13.9.0",
31
- "react-native-webview": "13.2.2",
32
- "styled-components": "^5.3.6",
33
- "styled-system": "^5.1.5"
34
- },
35
- "devDependencies": {
36
- "@babel/core": "~7.20.5",
37
- "@babel/runtime": "^7.20.6",
38
- "babel-plugin-module-resolver": "^4.1.0"
39
- }
40
- }
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { NativeBaseProvider } from 'native-base';
3
- import { SafeAreaProvider } from 'react-native-safe-area-context';
4
- import IamportNavigation from './NavigationService';
5
-
6
- export default function App() {
7
- return (
8
- <NativeBaseProvider>
9
- <SafeAreaProvider>
10
- <IamportNavigation />
11
- </SafeAreaProvider>
12
- </NativeBaseProvider>
13
- );
14
- }
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { SafeAreaView } from 'react-native-safe-area-context';
3
- import IMP from 'iamport-react-native';
4
- import { getUserCode } from '../utils';
5
- import Loading from '../Loading';
6
-
7
- export default function Certification({ route, navigation }) {
8
- const params = route.params.params;
9
- const tierCode = route.params.tierCode;
10
- const userCode = getUserCode('danal', tierCode, 'certification');
11
-
12
- return (
13
- <SafeAreaView style={{ flex: 1, justifyContent: 'center' }}>
14
- <IMP.Certification
15
- userCode={userCode}
16
- tierCode={tierCode}
17
- data={params}
18
- loading={<Loading />}
19
- callback={(response) =>
20
- navigation.replace('CertificationResult', response)
21
- }
22
- />
23
- </SafeAreaView>
24
- );
25
- }
@@ -1,61 +0,0 @@
1
- import React from 'react';
2
- import { Icon, IconButton, List, Text } from 'native-base';
3
- import { FontAwesome } from '@expo/vector-icons';
4
- import { SafeAreaView } from 'react-native-safe-area-context';
5
-
6
- export default function CertificationResult({ route, navigation }) {
7
- const success = route.params.success;
8
- const imp_uid = route.params.imp_uid;
9
- const merchant_uid = route.params.merchant_uid;
10
- const error_msg = route.params.error_msg;
11
-
12
- return (
13
- <SafeAreaView
14
- style={{
15
- flex: 1,
16
- justifyContent: 'center',
17
- margin: 10,
18
- backgroundColor: '#fff',
19
- alignItems: 'center',
20
- }}
21
- >
22
- {success ? (
23
- <Icon
24
- as={FontAwesome}
25
- name={'check-circle'}
26
- size={20}
27
- color={'#52c41a'}
28
- />
29
- ) : (
30
- <Icon as={FontAwesome} name={'warning'} size={20} color={'#f5222d'} />
31
- )}
32
- <Text fontSize={25} fontWeight={'bold'} mb={20}>{`본인인증에 ${
33
- success ? '성공' : '실패'
34
- }하였습니다`}</Text>
35
- <List width={'90%'} mb={50} borderRadius={3}>
36
- <List.Item>
37
- <Text w={'40%'}>아임포트 번호</Text>
38
- <Text w={'60%'}>{imp_uid}</Text>
39
- </List.Item>
40
- {success ? (
41
- <List.Item>
42
- <Text w={'40%'}>주문번호</Text>
43
- <Text w={'60%'}>{merchant_uid}</Text>
44
- </List.Item>
45
- ) : (
46
- <List.Item>
47
- <Text w={'40%'}>에러메시지</Text>
48
- <Text w={'60%'}>{error_msg}</Text>
49
- </List.Item>
50
- )}
51
- </List>
52
- <IconButton
53
- icon={<Icon as={FontAwesome} name={'arrow-left'} size={20} />}
54
- /* @ts-ignore */
55
- onPress={() => navigation.navigate('Home')}
56
- >
57
- <Text>돌아가기</Text>
58
- </IconButton>
59
- </SafeAreaView>
60
- );
61
- }
@@ -1,151 +0,0 @@
1
- import React, { useState } from 'react';
2
- import {
3
- Button,
4
- FormControl,
5
- Input,
6
- ScrollView,
7
- Select,
8
- Stack,
9
- Text,
10
- } from 'native-base';
11
- import Picker from '../Picker';
12
- import { CARRIERS, TIER_CODES } from '../constants';
13
- import {
14
- SafeAreaView,
15
- useSafeAreaInsets,
16
- } from 'react-native-safe-area-context';
17
-
18
- export default function CertificationTest({ navigation }) {
19
- const [merchantUid, setMerchantUid] = useState(`mid_${new Date().getTime()}`);
20
- const [company, setCompany] = useState('아임포트');
21
- const [carrier, setCarrier] = useState('SKT');
22
- const [name, setName] = useState('');
23
- const [phone, setPhone] = useState('');
24
- const [minAge, setMinAge] = useState('');
25
- const [tierCode, setTierCode] = useState('');
26
-
27
- const insets = useSafeAreaInsets();
28
-
29
- return (
30
- <SafeAreaView
31
- style={{
32
- flex: 1,
33
- justifyContent: 'center',
34
- backgroundColor: '#f5f5f5',
35
- paddingTop: -insets.top,
36
- }}
37
- >
38
- <ScrollView m={2} backgroundColor={'#fff'}>
39
- <FormControl p={'5%'} borderRadius={3}>
40
- <Stack direction={'row'}>
41
- <FormControl.Label alignItems={'center'} mb={2} w={'18%'}>
42
- 주문번호
43
- </FormControl.Label>
44
- <Input
45
- mb={2}
46
- flex={1}
47
- value={merchantUid}
48
- onChangeText={(value) => setMerchantUid(value)}
49
- />
50
- </Stack>
51
- <Stack direction={'row'}>
52
- <FormControl.Label alignItems={'center'} mb={2} w={'18%'}>
53
- 회사명
54
- </FormControl.Label>
55
- <Input
56
- mb={2}
57
- flex={1}
58
- value={company}
59
- onChangeText={(value) => setCompany(value)}
60
- />
61
- </Stack>
62
- <Stack direction={'row'}>
63
- <FormControl.Label alignItems={'center'} mb={2} w={'18%'}>
64
- 통신사
65
- </FormControl.Label>
66
- <Select
67
- mb={2}
68
- flex={1}
69
- borderColor={'transparent'}
70
- selectedValue={carrier}
71
- onValueChange={(value) => setCarrier(value)}
72
- >
73
- {CARRIERS.map(({ label, value }, index) => {
74
- return <Select.Item label={label} value={value} key={index} />;
75
- })}
76
- </Select>
77
- </Stack>
78
- <Stack direction={'row'}>
79
- <FormControl.Label alignItems={'center'} mb={2} w={'18%'}>
80
- 이름
81
- </FormControl.Label>
82
- <Input
83
- mb={2}
84
- flex={1}
85
- value={name}
86
- onChangeText={(value) => setName(value)}
87
- />
88
- </Stack>
89
- <Stack direction={'row'}>
90
- <FormControl.Label alignItems={'center'} mb={2} w={'18%'}>
91
- 전화번호
92
- </FormControl.Label>
93
- <Input
94
- mb={2}
95
- flex={1}
96
- value={phone}
97
- keyboardType="number-pad"
98
- returnKeyType={'done'}
99
- onChangeText={(value) => setPhone(value)}
100
- />
101
- </Stack>
102
- <Stack direction={'row'}>
103
- <FormControl.Label alignItems={'center'} mb={2} w={'18%'}>
104
- 최소연령
105
- </FormControl.Label>
106
- <Input
107
- mb={2}
108
- flex={1}
109
- value={minAge}
110
- keyboardType="number-pad"
111
- returnKeyType={'done'}
112
- onChangeText={(value) => setMinAge(value)}
113
- />
114
- </Stack>
115
- <Stack direction={'row'}>
116
- <FormControl.Label alignItems={'center'} mb={2} w={'18%'}>
117
- 티어 코드
118
- </FormControl.Label>
119
- <Picker
120
- data={TIER_CODES}
121
- selectedValue={tierCode}
122
- onValueChange={(value) => setTierCode(value)}
123
- />
124
- </Stack>
125
- <Button
126
- bgColor={'#344e81'}
127
- /* @ts-ignore */
128
- onPress={() => {
129
- const data = {
130
- params: {
131
- merchant_uid: merchantUid,
132
- company,
133
- carrier,
134
- name,
135
- phone,
136
- min_age: minAge,
137
- },
138
- tierCode,
139
- };
140
- navigation.navigate('Certification', data);
141
- }}
142
- >
143
- <Text fontWeight={'bold'} color={'#fff'}>
144
- 본인인증 하기
145
- </Text>
146
- </Button>
147
- </FormControl>
148
- </ScrollView>
149
- </SafeAreaView>
150
- );
151
- }
@@ -1,80 +0,0 @@
1
- import React from 'react';
2
- import { Button, Icon, Text, View } from 'native-base';
3
- import { FontAwesome } from '@expo/vector-icons';
4
-
5
- export default function Home({ navigation }) {
6
- return (
7
- <View flex={1}>
8
- <View
9
- flex={1}
10
- pos={'relative'}
11
- alignItems={'center'}
12
- bgColor={'#344e81'}
13
- justifyContent={'center'}
14
- >
15
- <Text
16
- color={'#fff'}
17
- fontSize={20}
18
- mb={10}
19
- fontWeight={'bold'}
20
- textAlign={'center'}
21
- >
22
- 아임포트 테스트
23
- </Text>
24
- <Text color={'#fff'} fontSize={15} textAlign={'center'}>
25
- 아임포트 리액트 네이티브 모듈 테스트 화면입니다.
26
- </Text>
27
- <Text color={'#fff'} fontSize={15} textAlign={'center'}>
28
- 아래 버튼을 눌러 결제 또는 본인인증 테스트를 진행해주세요.
29
- </Text>
30
- </View>
31
- <View
32
- flex={1}
33
- pos={'relative'}
34
- bottom={'0%'}
35
- w={'90%'}
36
- flexDir={'row'}
37
- alignSelf={'center'}
38
- >
39
- <Button.Group bottom={'16.5%'} width={'100%'} alignSelf={'center'}>
40
- <Button
41
- m={'4%'}
42
- bgColor={'#fff'}
43
- borderRadius={3}
44
- flex={1}
45
- shadow={1}
46
- /* @ts-ignore */
47
- onPress={() => navigation.push('PaymentTest')}
48
- >
49
- <Icon
50
- as={FontAwesome}
51
- name={'credit-card'}
52
- textAlign={'center'}
53
- w={'100%'}
54
- mb={'6%'}
55
- />
56
- <Text>결제 테스트</Text>
57
- </Button>
58
- <Button
59
- m={'4%'}
60
- bgColor={'#fff'}
61
- borderRadius={3}
62
- flex={1}
63
- shadow={1}
64
- /* @ts-ignore */
65
- onPress={() => navigation.push('CertificationTest')}
66
- >
67
- <Icon
68
- as={FontAwesome}
69
- name={'user'}
70
- textAlign={'center'}
71
- w={'100%'}
72
- mb={'6%'}
73
- />
74
- <Text>본인인증 테스트</Text>
75
- </Button>
76
- </Button.Group>
77
- </View>
78
- </View>
79
- );
80
- }
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { Text, View } from 'native-base';
3
-
4
- export default function Loading() {
5
- return (
6
- <View flex={1} alignItems={'center'} justifyContent={'center'}>
7
- <Text fontSize={20}>잠시만 기다려주세요...</Text>
8
- </View>
9
- );
10
- }
@@ -1,102 +0,0 @@
1
- import React from 'react';
2
- import { NavigationContainer } from '@react-navigation/native';
3
- import { createStackNavigator } from '@react-navigation/stack';
4
- import Home from './Home';
5
- import Certification from './Certification';
6
- import CertificationTest from './CertificationTest';
7
- import CertificationResult from './CertificationResult';
8
- import Payment from './Payment';
9
- import PaymentTest from './PaymentTest';
10
- import PaymentResult from './PaymentResult';
11
-
12
- const RootStack = createStackNavigator();
13
-
14
- export default function IamportNavigation() {
15
- return (
16
- <NavigationContainer>
17
- <RootStack.Navigator
18
- initialRouteName="Home"
19
- // screenOptions={{ headerShown: false }}
20
- >
21
- <RootStack.Screen
22
- options={{ headerShown: false }}
23
- name="Home"
24
- component={Home}
25
- />
26
- <RootStack.Screen
27
- options={{ headerShown: false }}
28
- name="Certification"
29
- component={Certification}
30
- />
31
- <RootStack.Screen
32
- options={{
33
- headerTitle: '아임포트 본인인증 테스트',
34
- headerTitleAlign: 'center',
35
- headerStyle: {
36
- backgroundColor: '#344e81',
37
- },
38
- headerTitleStyle: {
39
- color: '#fff',
40
- },
41
- headerTintColor: '#fff',
42
- headerBackTitle: ' ',
43
- }}
44
- name="CertificationTest"
45
- component={CertificationTest}
46
- />
47
- <RootStack.Screen
48
- options={{
49
- headerTitle: '아임포트 본인인증 결과',
50
- headerTitleAlign: 'center',
51
- headerStyle: {
52
- backgroundColor: '#344e81',
53
- },
54
- headerTitleStyle: {
55
- color: '#fff',
56
- },
57
- headerLeft: () => null,
58
- }}
59
- name="CertificationResult"
60
- component={CertificationResult}
61
- />
62
- <RootStack.Screen
63
- options={{ headerShown: false }}
64
- name="Payment"
65
- component={Payment}
66
- />
67
- <RootStack.Screen
68
- options={{
69
- headerTitle: '아임포트 결제 테스트',
70
- headerTitleAlign: 'center',
71
- headerStyle: {
72
- backgroundColor: '#344e81',
73
- },
74
- headerTitleStyle: {
75
- color: '#fff',
76
- },
77
- headerTintColor: '#fff',
78
- headerBackTitle: ' ',
79
- }}
80
- name="PaymentTest"
81
- component={PaymentTest}
82
- />
83
- <RootStack.Screen
84
- options={{
85
- headerTitle: '아임포트 결제 결과',
86
- headerTitleAlign: 'center',
87
- headerStyle: {
88
- backgroundColor: '#344e81',
89
- },
90
- headerTitleStyle: {
91
- color: '#fff',
92
- },
93
- headerTintColor: '#fff',
94
- headerLeft: () => null,
95
- }}
96
- name="PaymentResult"
97
- component={PaymentResult}
98
- />
99
- </RootStack.Navigator>
100
- </NavigationContainer>
101
- );
102
- }
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import IMP from 'iamport-react-native';
3
- import { SafeAreaView } from 'react-native-safe-area-context';
4
- import { getUserCode } from '../utils';
5
- import Loading from '../Loading';
6
-
7
- export default function Payment({ route, navigation }) {
8
- const params = route.params.params;
9
- const tierCode = route.params.tierCode;
10
- const userCode = getUserCode(params.pg, tierCode);
11
-
12
- return (
13
- <SafeAreaView style={{ flex: 1, justifyContent: 'center' }}>
14
- <IMP.Payment
15
- userCode={userCode}
16
- tierCode={tierCode}
17
- loading={<Loading />}
18
- data={params}
19
- callback={(response) => navigation.replace('PaymentResult', response)}
20
- />
21
- </SafeAreaView>
22
- );
23
- }
@@ -1,82 +0,0 @@
1
- import React from 'react';
2
- import { Icon, IconButton, List, Text } from 'native-base';
3
- import { SafeAreaView } from 'react-native-safe-area-context';
4
- import { FontAwesome } from '@expo/vector-icons';
5
-
6
- function getBoolean(value) {
7
- if (typeof value === 'boolean') return value;
8
- if (typeof value === 'string') return value === 'true';
9
- return undefined;
10
- }
11
-
12
- export default function PaymentResult({ route, navigation }) {
13
- const imp_success = route.params?.imp_success;
14
- const success = route.params?.success;
15
- const imp_uid = route.params?.imp_uid;
16
- const tx_id = route.params?.txId;
17
- const merchant_uid = route.params?.merchant_uid;
18
- const payment_id = route.params?.paymentId;
19
- const error_code = route.params?.error_code;
20
- const code = route.params?.code;
21
- const message = route.params?.message;
22
- const error_msg = route.params?.error_msg;
23
-
24
- // [WARNING: 이해를 돕기 위한 것일 뿐, imp_success 또는 success 파라미터로 결제 성공 여부를 장담할 수 없습니다.]
25
- // 아임포트 서버로 결제내역 조회(GET /payments/${imp_uid})를 통해 그 응답(status)에 따라 결제 성공 여부를 판단하세요.
26
- const isSuccess =
27
- getBoolean(imp_success) ??
28
- getBoolean(success) ??
29
- (error_code == null && code == null);
30
-
31
- return (
32
- <SafeAreaView
33
- style={{
34
- flex: 1,
35
- justifyContent: 'center',
36
- margin: 10,
37
- backgroundColor: '#fff',
38
- alignItems: 'center',
39
- }}
40
- >
41
- {isSuccess ? (
42
- <Icon
43
- as={FontAwesome}
44
- name={'check-circle'}
45
- size={20}
46
- color={'#52c41a'}
47
- />
48
- ) : (
49
- <Icon as={FontAwesome} name={'warning'} size={20} color={'#f5222d'} />
50
- )}
51
- <Text fontSize={25} fontWeight={'bold'} mb={20}>{`결제에 ${
52
- isSuccess ? '성공' : '실패'
53
- }하였습니다`}</Text>
54
- <List width={'90%'} mb={50} borderRadius={3}>
55
- <List.Item>
56
- <Text w={'40%'}>아임포트 번호</Text>
57
- <Text w={'60%'}>{imp_uid ?? tx_id}</Text>
58
- </List.Item>
59
- {isSuccess ? (
60
- <List.Item>
61
- <Text w={'40%'}>주문번호</Text>
62
- <Text w={'60%'}>{merchant_uid ?? payment_id}</Text>
63
- </List.Item>
64
- ) : (
65
- <List.Item>
66
- <Text w={'40%'}>에러코드</Text>
67
- <Text w={'60%'}>{error_code ?? code}</Text>
68
- <Text w={'40%'}>에러메시지</Text>
69
- <Text w={'60%'}>{error_msg ?? message}</Text>
70
- </List.Item>
71
- )}
72
- </List>
73
- <IconButton
74
- icon={<Icon as={FontAwesome} name={'arrow-left'} size={20} />}
75
- /* @ts-ignore */
76
- onPress={() => navigation.navigate('Home')}
77
- >
78
- <Text>돌아가기</Text>
79
- </IconButton>
80
- </SafeAreaView>
81
- );
82
- }