iamport-react-native 2.0.13 → 2.0.15
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 +187 -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 +4 -3
- 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,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import IMP from 'iamport-react-native';
|
|
3
|
+
import type { StackScreenProps } from '@react-navigation/stack';
|
|
4
|
+
import type { RootStackParamList } from '../NavigationService';
|
|
5
|
+
import Loading from '../Loading';
|
|
6
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
7
|
+
|
|
8
|
+
type Props = StackScreenProps<RootStackParamList, 'Payment'>;
|
|
9
|
+
|
|
10
|
+
function Payment({ route, navigation }: Props) {
|
|
11
|
+
const params = route.params?.params!;
|
|
12
|
+
const tierCode = route.params?.tierCode;
|
|
13
|
+
const userCode = route.params?.userCode!;
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<SafeAreaView style={{ flex: 1, justifyContent: 'center' }}>
|
|
17
|
+
<IMP.Payment
|
|
18
|
+
userCode={userCode}
|
|
19
|
+
tierCode={tierCode}
|
|
20
|
+
loading={<Loading />}
|
|
21
|
+
data={params}
|
|
22
|
+
callback={(response) => navigation.replace('PaymentResult', response)}
|
|
23
|
+
/>
|
|
24
|
+
</SafeAreaView>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default Payment;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StackScreenProps } from '@react-navigation/stack';
|
|
3
|
+
import type { RootStackParamList } from '../NavigationService';
|
|
4
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
5
|
+
import {
|
|
6
|
+
ArrowLeftIcon,
|
|
7
|
+
Box,
|
|
8
|
+
Button,
|
|
9
|
+
ButtonIcon,
|
|
10
|
+
ButtonText,
|
|
11
|
+
Heading,
|
|
12
|
+
HStack,
|
|
13
|
+
Text,
|
|
14
|
+
VStack,
|
|
15
|
+
} from '@gluestack-ui/themed';
|
|
16
|
+
import FontAwesome from 'react-native-vector-icons/FontAwesome';
|
|
17
|
+
|
|
18
|
+
type Props = StackScreenProps<RootStackParamList, 'PaymentResult'>;
|
|
19
|
+
|
|
20
|
+
function getBoolean(value: string | boolean | undefined) {
|
|
21
|
+
if (typeof value === 'boolean') return value;
|
|
22
|
+
if (typeof value === 'string') return value === 'true';
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function PaymentResult({ route, navigation }: Props) {
|
|
27
|
+
const imp_success = route.params?.imp_success;
|
|
28
|
+
const success = route.params?.success;
|
|
29
|
+
const imp_uid = route.params?.imp_uid;
|
|
30
|
+
const tx_id = route.params?.txId;
|
|
31
|
+
const merchant_uid = route.params?.merchant_uid;
|
|
32
|
+
const payment_id = route.params?.paymentId;
|
|
33
|
+
const error_code = route.params?.error_code;
|
|
34
|
+
const code = route.params?.code;
|
|
35
|
+
const message = route.params?.message;
|
|
36
|
+
const error_msg = route.params?.error_msg;
|
|
37
|
+
|
|
38
|
+
// [WARNING: 이해를 돕기 위한 것일 뿐, imp_success 또는 success 파라미터로 결제 성공 여부를 장담할 수 없습니다.]
|
|
39
|
+
// 아임포트 서버로 결제내역 조회(GET /payments/${imp_uid})를 통해 그 응답(status)에 따라 결제 성공 여부를 판단하세요.
|
|
40
|
+
const isSuccess =
|
|
41
|
+
getBoolean(imp_success) ??
|
|
42
|
+
getBoolean(success) ??
|
|
43
|
+
(error_code == null && code == null);
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<SafeAreaView
|
|
47
|
+
style={{
|
|
48
|
+
flex: 1,
|
|
49
|
+
justifyContent: 'center',
|
|
50
|
+
margin: 10,
|
|
51
|
+
backgroundColor: '#fff',
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
{isSuccess ? (
|
|
56
|
+
<FontAwesome name={'check-circle'} color={'#52c41a'} size={150} />
|
|
57
|
+
) : (
|
|
58
|
+
<FontAwesome name={'warning'} color={'#f5222d'} size={150} />
|
|
59
|
+
)}
|
|
60
|
+
<Heading size={'2xl'}>
|
|
61
|
+
{`결제에 ${isSuccess ? '성공' : '실패'}하였습니다`}
|
|
62
|
+
</Heading>
|
|
63
|
+
<Box>
|
|
64
|
+
<VStack my={10}>
|
|
65
|
+
<HStack mx={'15%'} my={10}>
|
|
66
|
+
<Text w={'40%'}>아임포트 번호</Text>
|
|
67
|
+
<Text w={'60%'}>{imp_uid ?? tx_id}</Text>
|
|
68
|
+
</HStack>
|
|
69
|
+
{isSuccess ? (
|
|
70
|
+
<HStack mx={'15%'} my={10}>
|
|
71
|
+
<Text w={'40%'}>주문번호</Text>
|
|
72
|
+
<Text w={'60%'}>{merchant_uid ?? payment_id}</Text>
|
|
73
|
+
</HStack>
|
|
74
|
+
) : (
|
|
75
|
+
<>
|
|
76
|
+
<HStack mx={'15%'} my={10}>
|
|
77
|
+
<Text w={'40%'}>에러코드</Text>
|
|
78
|
+
<Text w={'60%'}>{error_code ?? code}</Text>
|
|
79
|
+
</HStack>
|
|
80
|
+
<HStack mx={'15%'} my={10}>
|
|
81
|
+
<Text w={'40%'}>에러메시지</Text>
|
|
82
|
+
<Text w={'60%'}>{error_msg ?? message}</Text>
|
|
83
|
+
</HStack>
|
|
84
|
+
</>
|
|
85
|
+
)}
|
|
86
|
+
</VStack>
|
|
87
|
+
</Box>
|
|
88
|
+
<Button size={'md'} onPress={() => navigation.navigate('Home')}>
|
|
89
|
+
<ButtonIcon as={ArrowLeftIcon} />
|
|
90
|
+
<ButtonText>돌아가기</ButtonText>
|
|
91
|
+
</Button>
|
|
92
|
+
</SafeAreaView>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export default PaymentResult;
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { PGS } from '../constants';
|
|
3
|
+
import { getMethods, getQuotas } from '../utils';
|
|
4
|
+
import type { StackScreenProps } from '@react-navigation/stack';
|
|
5
|
+
import type { PaymentParams, RootStackParamList } from '../NavigationService';
|
|
6
|
+
import { IMPConst } from 'iamport-react-native';
|
|
7
|
+
import {
|
|
8
|
+
SafeAreaView,
|
|
9
|
+
useSafeAreaInsets,
|
|
10
|
+
} from 'react-native-safe-area-context';
|
|
11
|
+
import { Platform } from 'react-native';
|
|
12
|
+
import {
|
|
13
|
+
Button,
|
|
14
|
+
ButtonText,
|
|
15
|
+
FormControl,
|
|
16
|
+
Input,
|
|
17
|
+
InputField,
|
|
18
|
+
KeyboardAvoidingView,
|
|
19
|
+
ScrollView,
|
|
20
|
+
Switch,
|
|
21
|
+
Text,
|
|
22
|
+
VStack,
|
|
23
|
+
} from '@gluestack-ui/themed';
|
|
24
|
+
import Picker from '../Picker';
|
|
25
|
+
|
|
26
|
+
type Props = StackScreenProps<RootStackParamList, 'PaymentTest'>;
|
|
27
|
+
|
|
28
|
+
function PaymentTest({ navigation }: Props) {
|
|
29
|
+
const [userCode, setUserCode] = useState('');
|
|
30
|
+
const [pg, setPg] = useState('html5_inicis');
|
|
31
|
+
const [tierCode, setTierCode] = useState('');
|
|
32
|
+
const [method, setMethod] = useState('card');
|
|
33
|
+
const [cardQuota, setCardQuota] = useState(0);
|
|
34
|
+
const [merchantUid, setMerchantUid] = useState(`mid_${new Date().getTime()}`);
|
|
35
|
+
const [name, setName] = useState('아임포트 결제데이터분석');
|
|
36
|
+
const [amount, setAmount] = useState('1000');
|
|
37
|
+
const [buyerName, setBuyerName] = useState('홍길동');
|
|
38
|
+
const [buyerTel, setBuyerTel] = useState('01012341234');
|
|
39
|
+
const [buyerEmail, setBuyerEmail] = useState('example@example.com');
|
|
40
|
+
const [vbankDue, setVbankDue] = useState('');
|
|
41
|
+
const [bizNum, setBizNum] = useState('');
|
|
42
|
+
const [escrow, setEscrow] = useState(false);
|
|
43
|
+
const [digital, setDigital] = useState(false);
|
|
44
|
+
|
|
45
|
+
const insets = useSafeAreaInsets();
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<SafeAreaView
|
|
49
|
+
style={{
|
|
50
|
+
flex: 1,
|
|
51
|
+
justifyContent: 'center',
|
|
52
|
+
backgroundColor: '#f5f5f5',
|
|
53
|
+
paddingTop: -insets.top,
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
<KeyboardAvoidingView
|
|
57
|
+
flex={1}
|
|
58
|
+
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
|
|
59
|
+
keyboardVerticalOffset={Platform.OS === 'ios' ? 95 : undefined}
|
|
60
|
+
>
|
|
61
|
+
<ScrollView mx={1} backgroundColor={'#fff'}>
|
|
62
|
+
<FormControl p={2} borderRadius={3}>
|
|
63
|
+
<VStack>
|
|
64
|
+
<FormControl.Label my={1}>
|
|
65
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
66
|
+
가맹점 식별코드
|
|
67
|
+
</Text>
|
|
68
|
+
</FormControl.Label>
|
|
69
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
70
|
+
<InputField
|
|
71
|
+
value={userCode}
|
|
72
|
+
onChangeText={(value) => setUserCode(value)}
|
|
73
|
+
/>
|
|
74
|
+
</Input>
|
|
75
|
+
</VStack>
|
|
76
|
+
<VStack>
|
|
77
|
+
<FormControl.Label my={1}>
|
|
78
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
79
|
+
PG사
|
|
80
|
+
</Text>
|
|
81
|
+
</FormControl.Label>
|
|
82
|
+
<Picker
|
|
83
|
+
data={PGS}
|
|
84
|
+
selectedValue={pg}
|
|
85
|
+
onValueChange={(value) => {
|
|
86
|
+
setPg(value);
|
|
87
|
+
const methods = getMethods(value);
|
|
88
|
+
setMethod(methods[0].value);
|
|
89
|
+
}}
|
|
90
|
+
/>
|
|
91
|
+
</VStack>
|
|
92
|
+
<VStack>
|
|
93
|
+
<FormControl.Label my={1}>
|
|
94
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
95
|
+
티어 코드
|
|
96
|
+
</Text>
|
|
97
|
+
</FormControl.Label>
|
|
98
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
99
|
+
<InputField
|
|
100
|
+
value={tierCode}
|
|
101
|
+
onChangeText={(value) => setTierCode(value)}
|
|
102
|
+
/>
|
|
103
|
+
</Input>
|
|
104
|
+
</VStack>
|
|
105
|
+
<VStack>
|
|
106
|
+
<FormControl.Label my={1}>
|
|
107
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
108
|
+
결제수단
|
|
109
|
+
</Text>
|
|
110
|
+
</FormControl.Label>
|
|
111
|
+
<Picker
|
|
112
|
+
data={getMethods(pg)}
|
|
113
|
+
selectedValue={method}
|
|
114
|
+
onValueChange={(value) => setMethod(value)}
|
|
115
|
+
/>
|
|
116
|
+
</VStack>
|
|
117
|
+
{method === 'card' && (
|
|
118
|
+
<VStack>
|
|
119
|
+
<FormControl.Label my={1}>
|
|
120
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
121
|
+
할부개월수
|
|
122
|
+
</Text>
|
|
123
|
+
</FormControl.Label>
|
|
124
|
+
<Picker
|
|
125
|
+
data={getQuotas(pg)}
|
|
126
|
+
selectedValue={cardQuota}
|
|
127
|
+
onValueChange={(value) => setCardQuota(parseInt(value, 10))}
|
|
128
|
+
/>
|
|
129
|
+
</VStack>
|
|
130
|
+
)}
|
|
131
|
+
{method === 'vbank' && (
|
|
132
|
+
<VStack>
|
|
133
|
+
<FormControl.Label my={1}>
|
|
134
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
135
|
+
입금기한
|
|
136
|
+
</Text>
|
|
137
|
+
</FormControl.Label>
|
|
138
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
139
|
+
<InputField
|
|
140
|
+
value={vbankDue}
|
|
141
|
+
onChangeText={(value) => setVbankDue(value)}
|
|
142
|
+
/>
|
|
143
|
+
</Input>
|
|
144
|
+
</VStack>
|
|
145
|
+
)}
|
|
146
|
+
{method === 'vbank' && pg === 'danal_tpay' && (
|
|
147
|
+
<VStack>
|
|
148
|
+
<FormControl.Label my={1}>
|
|
149
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
150
|
+
사업자번호
|
|
151
|
+
</Text>
|
|
152
|
+
</FormControl.Label>
|
|
153
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
154
|
+
<InputField
|
|
155
|
+
keyboardType="number-pad"
|
|
156
|
+
returnKeyType={'done'}
|
|
157
|
+
value={bizNum}
|
|
158
|
+
onChangeText={(value) => setBizNum(value)}
|
|
159
|
+
/>
|
|
160
|
+
</Input>
|
|
161
|
+
</VStack>
|
|
162
|
+
)}
|
|
163
|
+
{method === 'phone' && (
|
|
164
|
+
<VStack>
|
|
165
|
+
<FormControl.Label my={1}>
|
|
166
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
167
|
+
실물컨텐츠
|
|
168
|
+
</Text>
|
|
169
|
+
</FormControl.Label>
|
|
170
|
+
<Switch
|
|
171
|
+
mx={2}
|
|
172
|
+
mb={1}
|
|
173
|
+
p={1}
|
|
174
|
+
value={digital}
|
|
175
|
+
alignSelf={'flex-start'}
|
|
176
|
+
onValueChange={(value) => setDigital(value)}
|
|
177
|
+
/>
|
|
178
|
+
</VStack>
|
|
179
|
+
)}
|
|
180
|
+
<VStack>
|
|
181
|
+
<FormControl.Label my={1}>
|
|
182
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
183
|
+
에스크로
|
|
184
|
+
</Text>
|
|
185
|
+
</FormControl.Label>
|
|
186
|
+
<Switch
|
|
187
|
+
mx={2}
|
|
188
|
+
mb={1}
|
|
189
|
+
p={1}
|
|
190
|
+
value={escrow}
|
|
191
|
+
alignSelf={'flex-start'}
|
|
192
|
+
onValueChange={(value) => setEscrow(value)}
|
|
193
|
+
/>
|
|
194
|
+
</VStack>
|
|
195
|
+
<VStack>
|
|
196
|
+
<FormControl.Label my={1}>
|
|
197
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
198
|
+
주문명
|
|
199
|
+
</Text>
|
|
200
|
+
</FormControl.Label>
|
|
201
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
202
|
+
<InputField
|
|
203
|
+
value={name}
|
|
204
|
+
onChangeText={(value) => setName(value)}
|
|
205
|
+
/>
|
|
206
|
+
</Input>
|
|
207
|
+
</VStack>
|
|
208
|
+
<VStack>
|
|
209
|
+
<FormControl.Label my={1}>
|
|
210
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
211
|
+
결제금액
|
|
212
|
+
</Text>
|
|
213
|
+
</FormControl.Label>
|
|
214
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
215
|
+
<InputField
|
|
216
|
+
keyboardType="number-pad"
|
|
217
|
+
returnKeyType={'done'}
|
|
218
|
+
value={amount}
|
|
219
|
+
onChangeText={(value) => setAmount(value)}
|
|
220
|
+
/>
|
|
221
|
+
</Input>
|
|
222
|
+
</VStack>
|
|
223
|
+
<VStack>
|
|
224
|
+
<FormControl.Label my={1}>
|
|
225
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
226
|
+
주문번호
|
|
227
|
+
</Text>
|
|
228
|
+
</FormControl.Label>
|
|
229
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
230
|
+
<InputField
|
|
231
|
+
value={merchantUid}
|
|
232
|
+
onChangeText={(value) => setMerchantUid(value)}
|
|
233
|
+
/>
|
|
234
|
+
</Input>
|
|
235
|
+
</VStack>
|
|
236
|
+
<VStack>
|
|
237
|
+
<FormControl.Label my={1}>
|
|
238
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
239
|
+
이름
|
|
240
|
+
</Text>
|
|
241
|
+
</FormControl.Label>
|
|
242
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
243
|
+
<InputField
|
|
244
|
+
value={buyerName}
|
|
245
|
+
onChangeText={(value) => setBuyerName(value)}
|
|
246
|
+
/>
|
|
247
|
+
</Input>
|
|
248
|
+
</VStack>
|
|
249
|
+
<VStack>
|
|
250
|
+
<FormControl.Label my={1}>
|
|
251
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
252
|
+
전화번호
|
|
253
|
+
</Text>
|
|
254
|
+
</FormControl.Label>
|
|
255
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
256
|
+
<InputField
|
|
257
|
+
keyboardType="number-pad"
|
|
258
|
+
returnKeyType={'done'}
|
|
259
|
+
value={buyerTel}
|
|
260
|
+
onChangeText={(value) => setBuyerTel(value)}
|
|
261
|
+
/>
|
|
262
|
+
</Input>
|
|
263
|
+
</VStack>
|
|
264
|
+
<VStack>
|
|
265
|
+
<FormControl.Label my={1}>
|
|
266
|
+
<Text color={'#9e9e9e'} fontSize={15}>
|
|
267
|
+
이메일
|
|
268
|
+
</Text>
|
|
269
|
+
</FormControl.Label>
|
|
270
|
+
<Input mx={2} mb={1} flex={1} p={1} variant={'underlined'}>
|
|
271
|
+
<InputField
|
|
272
|
+
value={buyerEmail}
|
|
273
|
+
onChangeText={(value) => setBuyerEmail(value)}
|
|
274
|
+
/>
|
|
275
|
+
</Input>
|
|
276
|
+
</VStack>
|
|
277
|
+
<Button
|
|
278
|
+
bgColor={'#344e81'}
|
|
279
|
+
mt={4}
|
|
280
|
+
/* @ts-ignore */
|
|
281
|
+
onPress={() => {
|
|
282
|
+
const data: PaymentParams = {
|
|
283
|
+
params: {
|
|
284
|
+
pg,
|
|
285
|
+
pay_method: method,
|
|
286
|
+
currency: undefined,
|
|
287
|
+
notice_url: undefined,
|
|
288
|
+
display: undefined,
|
|
289
|
+
merchant_uid: merchantUid,
|
|
290
|
+
name,
|
|
291
|
+
amount,
|
|
292
|
+
app_scheme: 'exampleforrn',
|
|
293
|
+
tax_free: undefined,
|
|
294
|
+
buyer_name: buyerName,
|
|
295
|
+
buyer_tel: buyerTel,
|
|
296
|
+
buyer_email: buyerEmail,
|
|
297
|
+
buyer_addr: undefined,
|
|
298
|
+
buyer_postcode: undefined,
|
|
299
|
+
custom_data: undefined,
|
|
300
|
+
vbank_due: undefined,
|
|
301
|
+
digital: undefined,
|
|
302
|
+
language: undefined,
|
|
303
|
+
biz_num: undefined,
|
|
304
|
+
customer_uid: undefined,
|
|
305
|
+
naverPopupMode: undefined,
|
|
306
|
+
naverUseCfm: undefined,
|
|
307
|
+
naverProducts: undefined,
|
|
308
|
+
m_redirect_url: IMPConst.M_REDIRECT_URL,
|
|
309
|
+
niceMobileV2: true,
|
|
310
|
+
escrow,
|
|
311
|
+
},
|
|
312
|
+
userCode,
|
|
313
|
+
tierCode,
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// 신용카드의 경우, 할부기한 추가
|
|
317
|
+
if (method === 'card' && cardQuota !== 0) {
|
|
318
|
+
data.params.display = {
|
|
319
|
+
card_quota: cardQuota === 1 ? [] : [cardQuota],
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// 가상계좌의 경우, 입금기한 추가
|
|
324
|
+
if (method === 'vbank' && vbankDue) {
|
|
325
|
+
data.params.vbank_due = vbankDue;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// 다날 && 가상계좌의 경우, 사업자 등록번호 10자리 추가
|
|
329
|
+
if (method === 'vbank' && pg === 'danal_tpay') {
|
|
330
|
+
data.params.biz_num = bizNum;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// 휴대폰 소액결제의 경우, 실물 컨텐츠 여부 추가
|
|
334
|
+
if (method === 'phone') {
|
|
335
|
+
data.params.digital = digital;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// 정기결제의 경우, customer_uid 추가
|
|
339
|
+
if (pg === 'kcp_billing') {
|
|
340
|
+
data.params.customer_uid = `cuid_${new Date().getTime()}`;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
if (pg === 'naverpay') {
|
|
344
|
+
const today = new Date();
|
|
345
|
+
const oneMonthLater = new Date(
|
|
346
|
+
today.setMonth(today.getMonth() + 1)
|
|
347
|
+
);
|
|
348
|
+
const dd = String(oneMonthLater.getDate()).padStart(2, '0');
|
|
349
|
+
const mm = String(oneMonthLater.getMonth() + 1).padStart(
|
|
350
|
+
2,
|
|
351
|
+
'0'
|
|
352
|
+
); // January is 0!
|
|
353
|
+
const yyyy = oneMonthLater.getFullYear();
|
|
354
|
+
|
|
355
|
+
data.params.naverPopupMode = false;
|
|
356
|
+
data.params.naverUseCfm = `${yyyy}${mm}${dd}`;
|
|
357
|
+
data.params.naverProducts = [
|
|
358
|
+
{
|
|
359
|
+
categoryType: 'BOOK',
|
|
360
|
+
categoryId: 'GENERAL',
|
|
361
|
+
uid: '107922211',
|
|
362
|
+
name: '한국사',
|
|
363
|
+
payReferrer: 'NAVER_BOOK',
|
|
364
|
+
count: 10,
|
|
365
|
+
},
|
|
366
|
+
];
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
navigation.navigate('Payment', data);
|
|
370
|
+
}}
|
|
371
|
+
>
|
|
372
|
+
<ButtonText fontWeight={'bold'} color={'#fff'}>
|
|
373
|
+
결제하기
|
|
374
|
+
</ButtonText>
|
|
375
|
+
</Button>
|
|
376
|
+
</FormControl>
|
|
377
|
+
</ScrollView>
|
|
378
|
+
</KeyboardAvoidingView>
|
|
379
|
+
</SafeAreaView>
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export default PaymentTest;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
ChevronDownIcon,
|
|
4
|
+
Icon,
|
|
5
|
+
Select,
|
|
6
|
+
SelectBackdrop,
|
|
7
|
+
SelectContent,
|
|
8
|
+
SelectDragIndicator,
|
|
9
|
+
SelectDragIndicatorWrapper,
|
|
10
|
+
SelectIcon,
|
|
11
|
+
SelectInput,
|
|
12
|
+
SelectItem,
|
|
13
|
+
SelectPortal,
|
|
14
|
+
SelectTrigger,
|
|
15
|
+
} from '@gluestack-ui/themed';
|
|
16
|
+
|
|
17
|
+
type PickerProps = {
|
|
18
|
+
data: any[];
|
|
19
|
+
selectedValue: string | number | undefined;
|
|
20
|
+
onValueChange?: ((value: any) => void) | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function Picker(props: PickerProps) {
|
|
24
|
+
return (
|
|
25
|
+
<Select
|
|
26
|
+
mx={2}
|
|
27
|
+
mb={1}
|
|
28
|
+
flex={1}
|
|
29
|
+
p={1}
|
|
30
|
+
selectedValue={
|
|
31
|
+
props.data.find(({ value }) => value === props.selectedValue)?.value
|
|
32
|
+
}
|
|
33
|
+
selectedLabel={
|
|
34
|
+
props.data.find(({ value }) => value === props.selectedValue)?.label
|
|
35
|
+
}
|
|
36
|
+
onValueChange={props.onValueChange}
|
|
37
|
+
>
|
|
38
|
+
<SelectTrigger variant={'underlined'}>
|
|
39
|
+
<SelectInput />
|
|
40
|
+
<SelectIcon>
|
|
41
|
+
<Icon as={ChevronDownIcon} />
|
|
42
|
+
</SelectIcon>
|
|
43
|
+
</SelectTrigger>
|
|
44
|
+
<SelectPortal>
|
|
45
|
+
<SelectBackdrop />
|
|
46
|
+
<SelectContent>
|
|
47
|
+
<SelectDragIndicatorWrapper>
|
|
48
|
+
<SelectDragIndicator />
|
|
49
|
+
</SelectDragIndicatorWrapper>
|
|
50
|
+
{props.data.map((e, index) => {
|
|
51
|
+
const { label, value } = e;
|
|
52
|
+
return <SelectItem label={label} value={value} key={index} />;
|
|
53
|
+
})}
|
|
54
|
+
</SelectContent>
|
|
55
|
+
</SelectPortal>
|
|
56
|
+
</Select>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default Picker;
|