iamport-react-native 2.0.13 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +98 -0
- package/.editorconfig +15 -0
- package/.gitattributes +3 -0
- package/.gitignore +69 -0
- package/.yarnrc +3 -0
- package/.yarnrc.yml +1 -0
- package/README.md +1 -1
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/babel.config.js +3 -0
- package/example/.gitignore +69 -0
- package/example/README.md +44 -0
- package/example/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/example/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/example/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/example/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/example/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
- package/example/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
- package/example/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/example/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
- package/example/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/example/android/.gradle/7.5.1/gc.properties +0 -0
- package/example/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/example/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/example/android/.gradle/vcs-1/gc.properties +0 -0
- package/example/android/app/build.gradle +183 -0
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +10 -0
- package/example/android/app/src/debug/AndroidManifest.xml +8 -0
- package/example/android/app/src/debug/java/com/example/iamportreactnative/ReactNativeFlipper.java +69 -0
- package/example/android/app/src/main/AndroidManifest.xml +34 -0
- package/example/android/app/src/main/java/com/example/iamportreactnative/MainActivity.java +15 -0
- package/example/android/app/src/main/java/com/example/iamportreactnative/MainApplication.java +80 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +3 -0
- package/example/android/app/src/main/res/values/styles.xml +9 -0
- package/example/android/build.gradle +21 -0
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/example/android/gradle.properties +44 -0
- package/example/android/gradlew +183 -0
- package/example/android/gradlew.bat +103 -0
- package/example/android/settings.gradle +9 -0
- package/example/app.json +4 -0
- package/example/babel.config.js +11 -0
- package/example/index.js +5 -0
- package/example/ios/File.swift +8 -0
- package/example/ios/Gemfile +7 -0
- package/example/ios/Gemfile.lock +99 -0
- package/example/ios/IamportReactNativeExample/AppDelegate.h +15 -0
- package/example/ios/IamportReactNativeExample/AppDelegate.mm +138 -0
- package/example/ios/IamportReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/example/ios/IamportReactNativeExample/Images.xcassets/Contents.json +6 -0
- package/example/ios/IamportReactNativeExample/Info.plist +121 -0
- package/example/ios/IamportReactNativeExample/LaunchScreen.storyboard +58 -0
- package/example/ios/IamportReactNativeExample/main.m +16 -0
- package/example/ios/IamportReactNativeExample-Bridging-Header.h +3 -0
- package/example/ios/IamportReactNativeExample.xcodeproj/project.pbxproj +969 -0
- package/example/ios/IamportReactNativeExample.xcodeproj/xcshareddata/xcschemes/IamportReactNativeExample.xcscheme +99 -0
- package/example/ios/IamportReactNativeExample.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/ios/IamportReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/example/ios/Podfile +57 -0
- package/example/ios/Podfile.lock +756 -0
- package/example/metro.config.js +66 -0
- package/example/package.json +40 -0
- package/example/src/App.tsx +17 -0
- package/example/src/Certification/index.tsx +30 -0
- package/example/src/CertificationResult/index.tsx +79 -0
- package/example/src/CertificationTest/index.tsx +214 -0
- package/example/src/Home/index.tsx +87 -0
- package/example/src/Loading/index.tsx +12 -0
- package/example/src/NavigationService.tsx +127 -0
- package/example/src/Payment/index.tsx +28 -0
- package/example/src/PaymentResult/index.tsx +96 -0
- package/example/src/PaymentTest/index.tsx +383 -0
- package/example/src/Picker/index.tsx +60 -0
- package/example/src/constants.ts +274 -0
- package/example/src/utils.ts +83 -0
- package/example/yarn.lock +7358 -0
- package/exampleForExpo/.buckconfig +6 -0
- package/exampleForExpo/.expo/README.md +8 -0
- package/exampleForExpo/.expo/devices.json +3 -0
- package/exampleForExpo/.gitattributes +1 -0
- package/exampleForExpo/.gitignore +125 -0
- package/exampleForExpo/.idea/.gitignore +3 -0
- package/exampleForExpo/.idea/caches/deviceStreaming.xml +549 -0
- package/exampleForExpo/.idea/exampleForExpo.iml +9 -0
- package/exampleForExpo/.idea/misc.xml +6 -0
- package/exampleForExpo/.idea/modules.xml +8 -0
- package/exampleForExpo/.idea/vcs.xml +6 -0
- package/exampleForExpo/.idea/workspace.xml +53 -0
- package/exampleForExpo/README.md +58 -0
- package/exampleForExpo/__tests__/App.js +10 -0
- package/exampleForExpo/android/.gitignore +21 -0
- package/exampleForExpo/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/exampleForExpo/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/exampleForExpo/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/exampleForExpo/android/.gradle/7.5.1/gc.properties +0 -0
- package/exampleForExpo/android/.gradle/vcs-1/gc.properties +0 -0
- package/exampleForExpo/android/app/BUCK +55 -0
- package/exampleForExpo/android/app/build.gradle +362 -0
- package/exampleForExpo/android/app/build_defs.bzl +19 -0
- package/exampleForExpo/android/app/debug.keystore +0 -0
- package/exampleForExpo/android/app/proguard-rules.pro +14 -0
- package/exampleForExpo/android/app/src/debug/AndroidManifest.xml +7 -0
- package/exampleForExpo/android/app/src/debug/java/kr/iamport/exampleForExpo/ReactNativeFlipper.java +69 -0
- package/exampleForExpo/android/app/src/main/AndroidManifest.xml +34 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainActivity.java +83 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainApplication.java +106 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/MainApplicationReactNativeHost.java +117 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/components/MainComponentsRegistry.java +36 -0
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -0
- package/exampleForExpo/android/app/src/main/jni/CMakeLists.txt +7 -0
- package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -0
- package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
- package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
- package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
- package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -0
- package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
- package/exampleForExpo/android/app/src/main/jni/OnLoad.cpp +11 -0
- package/exampleForExpo/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/exampleForExpo/android/app/src/main/res/drawable/splashscreen.xml +4 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/exampleForExpo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/exampleForExpo/android/app/src/main/res/values/colors.xml +4 -0
- package/exampleForExpo/android/app/src/main/res/values/strings.xml +3 -0
- package/exampleForExpo/android/app/src/main/res/values/styles.xml +17 -0
- package/exampleForExpo/android/app/src/main/res/values-night/colors.xml +1 -0
- package/exampleForExpo/android/build.gradle +65 -0
- package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/exampleForExpo/android/gradle.properties +53 -0
- package/exampleForExpo/android/gradlew +240 -0
- package/exampleForExpo/android/gradlew.bat +91 -0
- package/exampleForExpo/android/settings.gradle +17 -0
- package/exampleForExpo/app.json +16 -0
- package/exampleForExpo/babel.config.js +11 -0
- package/exampleForExpo/index.js +9 -0
- package/exampleForExpo/ios/.gitignore +30 -0
- package/exampleForExpo/ios/.xcode.env +11 -0
- package/exampleForExpo/ios/Podfile +61 -0
- package/exampleForExpo/ios/Podfile.lock +734 -0
- package/exampleForExpo/ios/Podfile.properties.json +3 -0
- package/exampleForExpo/ios/exampleForExpo/AppDelegate.h +9 -0
- package/exampleForExpo/ios/exampleForExpo/AppDelegate.mm +166 -0
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/Contents.json +6 -0
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/Contents.json +21 -0
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
- package/exampleForExpo/ios/exampleForExpo/Info.plist +118 -0
- package/exampleForExpo/ios/exampleForExpo/SplashScreen.storyboard +43 -0
- package/exampleForExpo/ios/exampleForExpo/Supporting/Expo.plist +16 -0
- package/exampleForExpo/ios/exampleForExpo/exampleForExpo.entitlements +8 -0
- package/exampleForExpo/ios/exampleForExpo/main.m +10 -0
- package/exampleForExpo/ios/exampleForExpo/noop-file.swift +4 -0
- package/exampleForExpo/ios/exampleForExpo.xcodeproj/project.pbxproj +544 -0
- package/exampleForExpo/ios/exampleForExpo.xcodeproj/xcshareddata/xcschemes/exampleForExpo.xcscheme +88 -0
- package/exampleForExpo/ios/exampleForExpo.xcworkspace/contents.xcworkspacedata +10 -0
- package/exampleForExpo/ios/exampleForExpo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/exampleForExpo/metro.config.js +62 -0
- package/exampleForExpo/package.json +40 -0
- package/exampleForExpo/src/App.js +14 -0
- package/exampleForExpo/src/Certification/index.js +25 -0
- package/exampleForExpo/src/CertificationResult/index.js +61 -0
- package/exampleForExpo/src/CertificationTest/index.js +151 -0
- package/exampleForExpo/src/Home/index.js +80 -0
- package/exampleForExpo/src/Loading/index.js +10 -0
- package/exampleForExpo/src/NavigationService.js +102 -0
- package/exampleForExpo/src/Payment/index.js +23 -0
- package/exampleForExpo/src/PaymentResult/index.js +82 -0
- package/exampleForExpo/src/PaymentTest/index.js +313 -0
- package/exampleForExpo/src/Picker/index.js +19 -0
- package/exampleForExpo/src/constants.js +322 -0
- package/exampleForExpo/src/utils.js +116 -0
- package/exampleForExpo/yarn.lock +9498 -0
- package/exampleForManagedExpo/.expo-shared/assets.json +4 -0
- package/exampleForManagedExpo/.gitignore +22 -0
- package/exampleForManagedExpo/App.js +11 -0
- package/exampleForManagedExpo/README.md +33 -0
- package/exampleForManagedExpo/app.json +90 -0
- package/exampleForManagedExpo/assets/adaptive-icon.png +0 -0
- package/exampleForManagedExpo/assets/favicon.png +0 -0
- package/exampleForManagedExpo/assets/icon.png +0 -0
- package/exampleForManagedExpo/assets/splash.png +0 -0
- package/exampleForManagedExpo/babel.config.js +11 -0
- package/exampleForManagedExpo/metro.config.js +62 -0
- package/exampleForManagedExpo/package.json +36 -0
- package/exampleForManagedExpo/src/Certification/index.js +25 -0
- package/exampleForManagedExpo/src/CertificationResult/index.js +61 -0
- package/exampleForManagedExpo/src/CertificationTest/index.js +151 -0
- package/exampleForManagedExpo/src/Home/index.js +80 -0
- package/exampleForManagedExpo/src/Loading/index.js +10 -0
- package/exampleForManagedExpo/src/NavigationService.js +102 -0
- package/exampleForManagedExpo/src/Payment/index.js +23 -0
- package/exampleForManagedExpo/src/PaymentResult/index.js +82 -0
- package/exampleForManagedExpo/src/PaymentTest/index.js +313 -0
- package/exampleForManagedExpo/src/Picker/index.js +19 -0
- package/exampleForManagedExpo/src/constants.js +322 -0
- package/exampleForManagedExpo/src/utils.js +116 -0
- package/exampleForManagedExpo/yarn.lock +9411 -0
- package/exampleForWebView/.buckconfig +6 -0
- package/exampleForWebView/.eslintrc.js +4 -0
- package/exampleForWebView/.gitattributes +3 -0
- package/exampleForWebView/.gitignore +68 -0
- package/exampleForWebView/.prettierrc.js +7 -0
- package/exampleForWebView/.watchmanconfig +1 -0
- package/exampleForWebView/README.md +77 -0
- package/exampleForWebView/__tests__/App-test.tsx +14 -0
- package/exampleForWebView/_editorconfig +3 -0
- package/exampleForWebView/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/exampleForWebView/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/exampleForWebView/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/exampleForWebView/android/.gradle/7.5.1/gc.properties +0 -0
- package/exampleForWebView/android/.gradle/vcs-1/gc.properties +0 -0
- package/exampleForWebView/android/app/BUCK +55 -0
- package/exampleForWebView/android/app/build.gradle +313 -0
- package/exampleForWebView/android/app/build_defs.bzl +19 -0
- package/exampleForWebView/android/app/debug.keystore +0 -0
- package/exampleForWebView/android/app/proguard-rules.pro +10 -0
- package/exampleForWebView/android/app/src/debug/AndroidManifest.xml +13 -0
- package/exampleForWebView/android/app/src/debug/java/com/exampleforwebview/ReactNativeFlipper.java +73 -0
- package/exampleForWebView/android/app/src/main/AndroidManifest.xml +26 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainActivity.java +48 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainApplication.java +91 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/MainApplicationReactNativeHost.java +116 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/components/MainComponentsRegistry.java +36 -0
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -0
- package/exampleForWebView/android/app/src/main/jni/CMakeLists.txt +7 -0
- package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -0
- package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
- package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
- package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
- package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -0
- package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
- package/exampleForWebView/android/app/src/main/jni/OnLoad.cpp +11 -0
- package/exampleForWebView/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/exampleForWebView/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/exampleForWebView/android/app/src/main/res/values/strings.xml +3 -0
- package/exampleForWebView/android/app/src/main/res/values/styles.xml +9 -0
- package/exampleForWebView/android/build.gradle +51 -0
- package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/exampleForWebView/android/gradle.properties +40 -0
- package/exampleForWebView/android/gradlew +234 -0
- package/exampleForWebView/android/gradlew.bat +89 -0
- package/exampleForWebView/android/settings.gradle +11 -0
- package/exampleForWebView/app.json +4 -0
- package/exampleForWebView/babel.config.js +11 -0
- package/exampleForWebView/index.js +9 -0
- package/exampleForWebView/ios/.xcode.env +11 -0
- package/exampleForWebView/ios/Podfile +43 -0
- package/exampleForWebView/ios/Podfile.lock +748 -0
- package/exampleForWebView/ios/exampleForWebView/AppDelegate.h +8 -0
- package/exampleForWebView/ios/exampleForWebView/AppDelegate.mm +133 -0
- package/exampleForWebView/ios/exampleForWebView/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/exampleForWebView/ios/exampleForWebView/Images.xcassets/Contents.json +6 -0
- package/exampleForWebView/ios/exampleForWebView/Info.plist +96 -0
- package/exampleForWebView/ios/exampleForWebView/LaunchScreen.storyboard +47 -0
- package/exampleForWebView/ios/exampleForWebView/main.m +10 -0
- package/exampleForWebView/ios/exampleForWebView.xcodeproj/project.pbxproj +723 -0
- package/exampleForWebView/ios/exampleForWebView.xcodeproj/xcshareddata/xcschemes/exampleForWebView.xcscheme +88 -0
- package/exampleForWebView/ios/exampleForWebView.xcworkspace/contents.xcworkspacedata +10 -0
- package/exampleForWebView/ios/exampleForWebView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/exampleForWebView/ios/exampleForWebViewTests/Info.plist +24 -0
- package/exampleForWebView/ios/exampleForWebViewTests/exampleForWebViewTests.m +66 -0
- package/exampleForWebView/manuals/CERTIFICATION.md +223 -0
- package/exampleForWebView/manuals/PAYMENT.md +232 -0
- package/exampleForWebView/metro.config.js +61 -0
- package/exampleForWebView/package.json +54 -0
- package/exampleForWebView/src/App.tsx +50 -0
- package/exampleForWebView/src/Certification.tsx +54 -0
- package/exampleForWebView/src/Home.tsx +49 -0
- package/exampleForWebView/src/Loading.tsx +23 -0
- package/exampleForWebView/src/Payment.tsx +65 -0
- package/exampleForWebView/yarn.lock +7362 -0
- package/lib/commonjs/components/Certification/index.js +10 -13
- package/lib/commonjs/components/Certification/index.js.map +1 -1
- package/lib/commonjs/components/ErrorOnParams/index.js +5 -7
- package/lib/commonjs/components/ErrorOnParams/index.js.map +1 -1
- package/lib/commonjs/components/Loading/index.js +2 -3
- package/lib/commonjs/components/Loading/index.js.map +1 -1
- package/lib/commonjs/components/Payment/index.js +10 -13
- package/lib/commonjs/components/Payment/index.js.map +1 -1
- package/lib/commonjs/constants/index.js +2 -4
- package/lib/commonjs/constants/index.js.map +1 -1
- package/lib/commonjs/index.js +2 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles.js +1 -2
- package/lib/commonjs/styles.js.map +1 -1
- package/lib/commonjs/utils/IamportUrl.js +2 -3
- package/lib/commonjs/utils/IamportUrl.js.map +1 -1
- package/lib/commonjs/utils/Validation.js +1 -2
- package/lib/commonjs/utils/Validation.js.map +1 -1
- package/lib/commonjs/utils/ValidationForPayment.js +1 -2
- package/lib/commonjs/utils/ValidationForPayment.js.map +1 -1
- package/lib/module/components/Certification/index.js +7 -8
- package/lib/module/components/Certification/index.js.map +1 -1
- package/lib/module/components/ErrorOnParams/index.js +3 -4
- package/lib/module/components/ErrorOnParams/index.js.map +1 -1
- package/lib/module/components/Loading/index.js.map +1 -1
- package/lib/module/components/Payment/index.js +7 -8
- package/lib/module/components/Payment/index.js.map +1 -1
- package/lib/module/constants/index.js +1 -2
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles.js.map +1 -1
- package/lib/module/utils/IamportUrl.js.map +1 -1
- package/lib/module/utils/Validation.js.map +1 -1
- package/lib/module/utils/ValidationForPayment.js.map +1 -1
- package/lib/typescript/constants/index.d.ts +1 -1
- package/lib/typescript/constants/index.d.ts.map +1 -1
- package/manuals/CALLBACK.md +72 -0
- package/manuals/EXAMPLE.md +168 -0
- package/manuals/EXPO.md +246 -0
- package/manuals/INSTALL.md +31 -0
- package/manuals/SETTING.md +140 -0
- package/manuals/SUPPORT.md +35 -0
- package/manuals/TRANS.md +77 -0
- package/manuals/VERSION.md +184 -0
- package/manuals/assets/after-linking-iamport.png +0 -0
- package/manuals/assets/after-linking-webview.png +0 -0
- package/manuals/assets/allow-arbitrary.gif +0 -0
- package/manuals/assets/android-studio-avd-manager.png +0 -0
- package/manuals/assets/android-studio-build.png +0 -0
- package/manuals/assets/app-scheme-registry.gif +0 -0
- package/manuals/assets/expo-eject.png +0 -0
- package/manuals/assets/ios-emulator-certification.png +0 -0
- package/manuals/assets/ios-emulator-home.png +0 -0
- package/manuals/assets/ios-emulator-payment.png +0 -0
- package/manuals/assets/ios-trans-create-header-file-1.png +0 -0
- package/manuals/assets/ios-trans-create-header-file-2.png +0 -0
- package/manuals/assets/ios-trans-create-objectivec-file-1.png +0 -0
- package/manuals/assets/ios-trans-create-objectivec-file-2.png +0 -0
- package/manuals/assets/ios-trans-result.png +0 -0
- package/manuals/assets/webview-peer-dependency.png +0 -0
- package/package.json +3 -2
- package/scripts/bootstrap.js +24 -0
- package/src/constants/index.ts +8 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.json +26 -0
- package/yarn.lock +6174 -0
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
}
|