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,61 @@
|
|
|
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 => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`),
|
|
22
|
+
),
|
|
23
|
+
modules.map(
|
|
24
|
+
m =>
|
|
25
|
+
new RegExp(
|
|
26
|
+
`^${escape(path.join(root, 'example/node_modules', m))}\\/.*$`,
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
modules.map(
|
|
30
|
+
m =>
|
|
31
|
+
new RegExp(
|
|
32
|
+
`^${escape(
|
|
33
|
+
path.join(root, 'exampleForExpo/node_modules', m),
|
|
34
|
+
)}\\/.*$`,
|
|
35
|
+
),
|
|
36
|
+
),
|
|
37
|
+
modules.map(
|
|
38
|
+
m =>
|
|
39
|
+
new RegExp(
|
|
40
|
+
`^${escape(
|
|
41
|
+
path.join(root, 'exampleForManagedExpo/node_modules', m),
|
|
42
|
+
)}\\/.*$`,
|
|
43
|
+
),
|
|
44
|
+
),
|
|
45
|
+
),
|
|
46
|
+
|
|
47
|
+
extraNodeModules: modules.reduce((acc, name) => {
|
|
48
|
+
acc[name] = path.join(__dirname, 'node_modules', name);
|
|
49
|
+
return acc;
|
|
50
|
+
}, {}),
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
transformer: {
|
|
54
|
+
getTransformOptions: async () => ({
|
|
55
|
+
transform: {
|
|
56
|
+
experimentalImportSupport: false,
|
|
57
|
+
inlineRequires: true,
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
},
|
|
61
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "iamport-react-native-example-for-webview",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"android": "react-native run-android",
|
|
7
|
+
"ios": "react-native run-ios",
|
|
8
|
+
"start": "react-native start",
|
|
9
|
+
"test": "jest",
|
|
10
|
+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@react-native-community/masked-view": "^0.1.11",
|
|
14
|
+
"@react-navigation/native": "^6.1.1",
|
|
15
|
+
"@react-navigation/stack": "^6.3.10",
|
|
16
|
+
"query-string": "^8.1.0",
|
|
17
|
+
"react": "18.2.0",
|
|
18
|
+
"react-native": "0.72.6",
|
|
19
|
+
"react-native-gesture-handler": "^2.9.0",
|
|
20
|
+
"react-native-safe-area-context": "^4.4.1",
|
|
21
|
+
"react-native-screens": "^3.18.2",
|
|
22
|
+
"react-native-webview": "^13.6.2"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@babel/core": "^7.20.5",
|
|
26
|
+
"@babel/runtime": "^7.20.6",
|
|
27
|
+
"@react-native-community/eslint-config": "^3.2.0",
|
|
28
|
+
"@types/jest": "^29.2.4",
|
|
29
|
+
"@types/react-native": "^0.70.8",
|
|
30
|
+
"@types/react-test-renderer": "^18.0.0",
|
|
31
|
+
"babel-jest": "^29.3.1",
|
|
32
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
33
|
+
"eslint": "^8.30.0",
|
|
34
|
+
"jest": "^29.3.1",
|
|
35
|
+
"metro-react-native-babel-preset": "^0.73.6",
|
|
36
|
+
"react-native-eject": "^0.2.0",
|
|
37
|
+
"react-test-renderer": "18.2.0",
|
|
38
|
+
"typescript": "^4.9.4"
|
|
39
|
+
},
|
|
40
|
+
"resolutions": {
|
|
41
|
+
"@types/react": "^18"
|
|
42
|
+
},
|
|
43
|
+
"jest": {
|
|
44
|
+
"preset": "react-native",
|
|
45
|
+
"moduleFileExtensions": [
|
|
46
|
+
"ts",
|
|
47
|
+
"tsx",
|
|
48
|
+
"js",
|
|
49
|
+
"jsx",
|
|
50
|
+
"json",
|
|
51
|
+
"node"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 Payment from './Payment';
|
|
7
|
+
|
|
8
|
+
interface HomeParams {
|
|
9
|
+
type: string;
|
|
10
|
+
response: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface MessageParams {
|
|
14
|
+
userCode: string;
|
|
15
|
+
data: any;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type RootStackParamList = {
|
|
19
|
+
Home: HomeParams | undefined;
|
|
20
|
+
Certification: MessageParams | undefined;
|
|
21
|
+
Payment: MessageParams | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const RootStack = createStackNavigator<RootStackParamList>();
|
|
25
|
+
|
|
26
|
+
function App() {
|
|
27
|
+
return (
|
|
28
|
+
<NavigationContainer>
|
|
29
|
+
<RootStack.Navigator initialRouteName="Home">
|
|
30
|
+
<RootStack.Screen
|
|
31
|
+
options={{headerShown: false}}
|
|
32
|
+
name="Home"
|
|
33
|
+
component={Home}
|
|
34
|
+
/>
|
|
35
|
+
<RootStack.Screen
|
|
36
|
+
options={{headerShown: false}}
|
|
37
|
+
name="Certification"
|
|
38
|
+
component={Certification}
|
|
39
|
+
/>
|
|
40
|
+
<RootStack.Screen
|
|
41
|
+
options={{headerShown: false}}
|
|
42
|
+
name="Payment"
|
|
43
|
+
component={Payment}
|
|
44
|
+
/>
|
|
45
|
+
</RootStack.Navigator>
|
|
46
|
+
</NavigationContainer>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default App;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type {StackScreenProps} from '@react-navigation/stack';
|
|
3
|
+
import type {RootStackParamList} from './App';
|
|
4
|
+
import IMP from 'iamport-react-native';
|
|
5
|
+
import Loading from './Loading';
|
|
6
|
+
import {SafeAreaView} from 'react-native-safe-area-context';
|
|
7
|
+
|
|
8
|
+
type Props = StackScreenProps<RootStackParamList, 'Certification'>;
|
|
9
|
+
|
|
10
|
+
function Certification({navigation, route}: Props) {
|
|
11
|
+
/* 가맹점 식별코드, 본인인증 데이터 추출 */
|
|
12
|
+
const userCode = route.params?.userCode;
|
|
13
|
+
const data = route.params?.data;
|
|
14
|
+
|
|
15
|
+
/* [필수입력] 본인인증 후 실행될 콜백 함수 입력 */
|
|
16
|
+
function callback(response: any) {
|
|
17
|
+
const isSuccessed = getIsSuccessed(response);
|
|
18
|
+
if (isSuccessed) {
|
|
19
|
+
// 본인인증 성공한 경우, 리디렉션 위해 홈으로 이동한다
|
|
20
|
+
const params = {
|
|
21
|
+
response,
|
|
22
|
+
type: 'certification',
|
|
23
|
+
};
|
|
24
|
+
navigation.replace('Home', params);
|
|
25
|
+
} else {
|
|
26
|
+
// 본인인증 실패한 경우, 본래 페이지로 돌아간다
|
|
27
|
+
navigation.goBack();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function getIsSuccessed(response: any) {
|
|
32
|
+
const {success} = response;
|
|
33
|
+
|
|
34
|
+
if (typeof success === 'string') {
|
|
35
|
+
return success === 'true';
|
|
36
|
+
}
|
|
37
|
+
if (typeof success === 'boolean') {
|
|
38
|
+
return success === true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<SafeAreaView style={{flex: 1, justifyContent: 'center'}}>
|
|
44
|
+
<IMP.Certification
|
|
45
|
+
userCode={userCode as string}
|
|
46
|
+
loading={<Loading />}
|
|
47
|
+
data={data}
|
|
48
|
+
callback={callback}
|
|
49
|
+
/>
|
|
50
|
+
</SafeAreaView>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default Certification;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, {useEffect, useState} from 'react';
|
|
2
|
+
import type {StackScreenProps} from '@react-navigation/stack';
|
|
3
|
+
import type {RootStackParamList} from './App';
|
|
4
|
+
import queryString from 'query-string';
|
|
5
|
+
import WebView from 'react-native-webview';
|
|
6
|
+
|
|
7
|
+
type Props = StackScreenProps<RootStackParamList, 'Home'>;
|
|
8
|
+
|
|
9
|
+
function Home({navigation, route}: Props) {
|
|
10
|
+
const domain = 'http://10.160.43.111:3000';
|
|
11
|
+
const [uri, setUri] = useState(domain);
|
|
12
|
+
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const type = route.params?.type;
|
|
15
|
+
const response = route.params?.response;
|
|
16
|
+
if (response) {
|
|
17
|
+
const query = queryString.stringify(response);
|
|
18
|
+
if (type === 'payment') {
|
|
19
|
+
setUri(`${domain}/payment/result?${query}`);
|
|
20
|
+
} else {
|
|
21
|
+
setUri(`${domain}/certification/result?${query}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}, [route]);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<WebView
|
|
28
|
+
style={{flex: 1}}
|
|
29
|
+
source={{uri}}
|
|
30
|
+
onMessage={e => {
|
|
31
|
+
try {
|
|
32
|
+
const {userCode, data, type} = JSON.parse(e.nativeEvent.data);
|
|
33
|
+
const params = {userCode, data};
|
|
34
|
+
navigation.push(
|
|
35
|
+
type === 'payment' ? 'Payment' : 'Certification',
|
|
36
|
+
params,
|
|
37
|
+
);
|
|
38
|
+
} catch (e) {}
|
|
39
|
+
}}
|
|
40
|
+
injectedJavascript={`(function() {
|
|
41
|
+
window.postMessage = function(data) {
|
|
42
|
+
window.ReactNativeWebView.postMessage(data);
|
|
43
|
+
};
|
|
44
|
+
})()`}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default Home;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {StyleSheet, Text, View} from 'react-native';
|
|
3
|
+
|
|
4
|
+
function Loading() {
|
|
5
|
+
return (
|
|
6
|
+
<View style={styles.container}>
|
|
7
|
+
<Text style={styles.text}>잠시만 기다려주세요...</Text>
|
|
8
|
+
</View>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const styles = StyleSheet.create({
|
|
13
|
+
container: {
|
|
14
|
+
flex: 1,
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
},
|
|
18
|
+
text: {
|
|
19
|
+
fontSize: 20,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export default Loading;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type {StackScreenProps} from '@react-navigation/stack';
|
|
3
|
+
import type {RootStackParamList} from './App';
|
|
4
|
+
import IMP from 'iamport-react-native';
|
|
5
|
+
import Loading from './Loading';
|
|
6
|
+
import {SafeAreaView} from 'react-native-safe-area-context';
|
|
7
|
+
|
|
8
|
+
function getBoolean(value: string | boolean | undefined) {
|
|
9
|
+
if (typeof value === 'boolean') {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
if (typeof value === 'string') {
|
|
13
|
+
return value === 'true';
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type Props = StackScreenProps<RootStackParamList, 'Payment'>;
|
|
19
|
+
|
|
20
|
+
function Payment({navigation, route}: Props) {
|
|
21
|
+
/* 가맹점 식별코드, 결제 데이터 추출 */
|
|
22
|
+
const userCode = route.params?.userCode;
|
|
23
|
+
const data = route.params?.data;
|
|
24
|
+
|
|
25
|
+
/* [필수입력] 결제 후 실행될 콜백 함수 입력 */
|
|
26
|
+
function callback(response: any) {
|
|
27
|
+
const isSuccessed = getIsSuccessed(response);
|
|
28
|
+
if (isSuccessed) {
|
|
29
|
+
// 결제 성공한 경우, 리디렉션 위해 홈으로 이동한다
|
|
30
|
+
const params = {
|
|
31
|
+
response,
|
|
32
|
+
type: 'payment',
|
|
33
|
+
};
|
|
34
|
+
navigation.replace('Home', params);
|
|
35
|
+
} else {
|
|
36
|
+
// 결제 실패한 경우, 본래 페이지로 돌아간다
|
|
37
|
+
navigation.goBack();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function getIsSuccessed(response: any) {
|
|
42
|
+
const {imp_success, success, error_code, code} = response;
|
|
43
|
+
return (
|
|
44
|
+
getBoolean(imp_success) ??
|
|
45
|
+
getBoolean(success) ??
|
|
46
|
+
(error_code == null && code == null)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<SafeAreaView style={{flex: 1, justifyContent: 'center'}}>
|
|
52
|
+
<IMP.Payment
|
|
53
|
+
userCode={userCode as string}
|
|
54
|
+
loading={<Loading />}
|
|
55
|
+
data={{
|
|
56
|
+
...data,
|
|
57
|
+
app_scheme: 'exampleforwebview',
|
|
58
|
+
}}
|
|
59
|
+
callback={callback}
|
|
60
|
+
/>
|
|
61
|
+
</SafeAreaView>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default Payment;
|