iamport-react-native 2.0.15 → 3.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +12 -2
- package/lib/module/components/Certification/index.js +75 -72
- package/lib/module/components/Certification/index.js.map +1 -1
- package/lib/module/components/ErrorOnParams/index.js +13 -9
- package/lib/module/components/ErrorOnParams/index.js.map +1 -1
- package/lib/module/components/Loading/index.js +13 -9
- package/lib/module/components/Loading/index.js.map +1 -1
- package/lib/module/components/Payment/index.js +111 -93
- package/lib/module/components/Payment/index.js.map +1 -1
- package/lib/module/constants/index.js +2 -0
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/index.js +6 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/styles.js +2 -0
- package/lib/module/styles.js.map +1 -1
- package/lib/module/utils/IamportUrl.js +51 -29
- package/lib/module/utils/IamportUrl.js.map +1 -1
- package/lib/module/utils/Validation.js +3 -2
- package/lib/module/utils/Validation.js.map +1 -1
- package/lib/module/utils/ValidationForPayment.js +4 -2
- package/lib/module/utils/ValidationForPayment.js.map +1 -1
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/{components → src/components}/Certification/index.d.ts +1 -2
- package/lib/typescript/src/components/Certification/index.d.ts.map +1 -0
- package/lib/typescript/src/components/ErrorOnParams/index.d.ts +6 -0
- package/lib/typescript/src/components/ErrorOnParams/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Loading/index.d.ts +3 -0
- package/lib/typescript/src/components/Loading/index.d.ts.map +1 -0
- package/lib/typescript/{components → src/components}/Payment/index.d.ts +1 -2
- package/lib/typescript/src/components/Payment/index.d.ts.map +1 -0
- package/lib/typescript/src/constants/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/{styles.d.ts → src/styles.d.ts} +2 -2
- package/lib/typescript/src/styles.d.ts.map +1 -0
- package/lib/typescript/{utils → src/utils}/IamportUrl.d.ts +8 -7
- package/lib/typescript/src/utils/IamportUrl.d.ts.map +1 -0
- package/lib/typescript/src/utils/Validation.d.ts.map +1 -0
- package/lib/typescript/src/utils/ValidationForPayment.d.ts.map +1 -0
- package/package.json +81 -74
- package/src/components/Certification/index.tsx +7 -7
- package/src/components/ErrorOnParams/index.tsx +1 -2
- package/src/components/Loading/index.tsx +1 -2
- package/src/components/Payment/index.tsx +31 -7
- package/src/utils/IamportUrl.ts +54 -26
- package/.circleci/config.yml +0 -98
- package/.editorconfig +0 -15
- package/.gitattributes +0 -3
- package/.gitignore +0 -69
- package/.yarnrc +0 -3
- package/.yarnrc.yml +0 -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 +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +0 -128
- package/android/gradle.properties +0 -4
- package/android/src/main/AndroidManifest.xml +0 -4
- package/android/src/main/java/com/iamportreactnative/IamportReactNativePackage.kt +0 -17
- package/android/src/main/java/com/iamportreactnative/IamportReactNativeViewManager.kt +0 -20
- package/babel.config.js +0 -3
- package/example/.gitignore +0 -69
- package/example/README.md +0 -44
- 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 +0 -2
- package/example/android/.gradle/vcs-1/gc.properties +0 -0
- package/example/android/app/build.gradle +0 -183
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -10
- package/example/android/app/src/debug/AndroidManifest.xml +0 -8
- package/example/android/app/src/debug/java/com/example/iamportreactnative/ReactNativeFlipper.java +0 -69
- package/example/android/app/src/main/AndroidManifest.xml +0 -34
- package/example/android/app/src/main/java/com/example/iamportreactnative/MainActivity.java +0 -15
- package/example/android/app/src/main/java/com/example/iamportreactnative/MainApplication.java +0 -80
- 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 +0 -3
- package/example/android/app/src/main/res/values/styles.xml +0 -9
- package/example/android/build.gradle +0 -21
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/example/android/gradle.properties +0 -44
- package/example/android/gradlew +0 -183
- package/example/android/gradlew.bat +0 -103
- package/example/android/settings.gradle +0 -9
- package/example/app.json +0 -4
- package/example/babel.config.js +0 -11
- package/example/index.js +0 -5
- package/example/ios/File.swift +0 -8
- package/example/ios/Gemfile +0 -7
- package/example/ios/Gemfile.lock +0 -99
- package/example/ios/IamportReactNativeExample/AppDelegate.h +0 -15
- package/example/ios/IamportReactNativeExample/AppDelegate.mm +0 -138
- package/example/ios/IamportReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/example/ios/IamportReactNativeExample/Images.xcassets/Contents.json +0 -6
- package/example/ios/IamportReactNativeExample/Info.plist +0 -121
- package/example/ios/IamportReactNativeExample/LaunchScreen.storyboard +0 -58
- package/example/ios/IamportReactNativeExample/main.m +0 -16
- package/example/ios/IamportReactNativeExample-Bridging-Header.h +0 -3
- package/example/ios/IamportReactNativeExample.xcodeproj/project.pbxproj +0 -969
- package/example/ios/IamportReactNativeExample.xcodeproj/xcshareddata/xcschemes/IamportReactNativeExample.xcscheme +0 -99
- package/example/ios/IamportReactNativeExample.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/IamportReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/Podfile +0 -57
- package/example/ios/Podfile.lock +0 -756
- package/example/metro.config.js +0 -66
- package/example/package.json +0 -40
- package/example/src/App.tsx +0 -17
- package/example/src/Certification/index.tsx +0 -30
- package/example/src/CertificationResult/index.tsx +0 -79
- package/example/src/CertificationTest/index.tsx +0 -214
- package/example/src/Home/index.tsx +0 -87
- package/example/src/Loading/index.tsx +0 -12
- package/example/src/NavigationService.tsx +0 -127
- package/example/src/Payment/index.tsx +0 -28
- package/example/src/PaymentResult/index.tsx +0 -96
- package/example/src/PaymentTest/index.tsx +0 -383
- package/example/src/Picker/index.tsx +0 -60
- package/example/src/constants.ts +0 -274
- package/example/src/utils.ts +0 -83
- package/example/yarn.lock +0 -7358
- package/exampleForExpo/.buckconfig +0 -6
- package/exampleForExpo/.expo/README.md +0 -8
- package/exampleForExpo/.expo/devices.json +0 -3
- package/exampleForExpo/.gitattributes +0 -1
- package/exampleForExpo/.gitignore +0 -125
- package/exampleForExpo/.idea/.gitignore +0 -3
- package/exampleForExpo/.idea/caches/deviceStreaming.xml +0 -549
- package/exampleForExpo/.idea/exampleForExpo.iml +0 -9
- package/exampleForExpo/.idea/misc.xml +0 -6
- package/exampleForExpo/.idea/modules.xml +0 -8
- package/exampleForExpo/.idea/vcs.xml +0 -6
- package/exampleForExpo/.idea/workspace.xml +0 -53
- package/exampleForExpo/README.md +0 -58
- package/exampleForExpo/__tests__/App.js +0 -10
- package/exampleForExpo/android/.gitignore +0 -21
- 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 +0 -55
- package/exampleForExpo/android/app/build.gradle +0 -362
- package/exampleForExpo/android/app/build_defs.bzl +0 -19
- package/exampleForExpo/android/app/debug.keystore +0 -0
- package/exampleForExpo/android/app/proguard-rules.pro +0 -14
- package/exampleForExpo/android/app/src/debug/AndroidManifest.xml +0 -7
- package/exampleForExpo/android/app/src/debug/java/kr/iamport/exampleForExpo/ReactNativeFlipper.java +0 -69
- package/exampleForExpo/android/app/src/main/AndroidManifest.xml +0 -34
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainActivity.java +0 -83
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/MainApplication.java +0 -106
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/MainApplicationReactNativeHost.java +0 -117
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/components/MainComponentsRegistry.java +0 -36
- package/exampleForExpo/android/app/src/main/java/kr/iamport/exampleForExpo/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
- package/exampleForExpo/android/app/src/main/jni/CMakeLists.txt +0 -7
- package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
- package/exampleForExpo/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
- package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
- package/exampleForExpo/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
- package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
- package/exampleForExpo/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
- package/exampleForExpo/android/app/src/main/jni/OnLoad.cpp +0 -11
- package/exampleForExpo/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- package/exampleForExpo/android/app/src/main/res/drawable/splashscreen.xml +0 -4
- 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 +0 -4
- package/exampleForExpo/android/app/src/main/res/values/strings.xml +0 -3
- package/exampleForExpo/android/app/src/main/res/values/styles.xml +0 -17
- package/exampleForExpo/android/app/src/main/res/values-night/colors.xml +0 -1
- package/exampleForExpo/android/build.gradle +0 -65
- package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/exampleForExpo/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/exampleForExpo/android/gradle.properties +0 -53
- package/exampleForExpo/android/gradlew +0 -240
- package/exampleForExpo/android/gradlew.bat +0 -91
- package/exampleForExpo/android/settings.gradle +0 -17
- package/exampleForExpo/app.json +0 -16
- package/exampleForExpo/babel.config.js +0 -11
- package/exampleForExpo/index.js +0 -9
- package/exampleForExpo/ios/.gitignore +0 -30
- package/exampleForExpo/ios/.xcode.env +0 -11
- package/exampleForExpo/ios/Podfile +0 -61
- package/exampleForExpo/ios/Podfile.lock +0 -734
- package/exampleForExpo/ios/Podfile.properties.json +0 -3
- package/exampleForExpo/ios/exampleForExpo/AppDelegate.h +0 -9
- package/exampleForExpo/ios/exampleForExpo/AppDelegate.mm +0 -166
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/Contents.json +0 -6
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/Contents.json +0 -21
- package/exampleForExpo/ios/exampleForExpo/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
- package/exampleForExpo/ios/exampleForExpo/Info.plist +0 -118
- package/exampleForExpo/ios/exampleForExpo/SplashScreen.storyboard +0 -43
- package/exampleForExpo/ios/exampleForExpo/Supporting/Expo.plist +0 -16
- package/exampleForExpo/ios/exampleForExpo/exampleForExpo.entitlements +0 -8
- package/exampleForExpo/ios/exampleForExpo/main.m +0 -10
- package/exampleForExpo/ios/exampleForExpo/noop-file.swift +0 -4
- package/exampleForExpo/ios/exampleForExpo.xcodeproj/project.pbxproj +0 -544
- package/exampleForExpo/ios/exampleForExpo.xcodeproj/xcshareddata/xcschemes/exampleForExpo.xcscheme +0 -88
- package/exampleForExpo/ios/exampleForExpo.xcworkspace/contents.xcworkspacedata +0 -10
- package/exampleForExpo/ios/exampleForExpo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/exampleForExpo/metro.config.js +0 -62
- package/exampleForExpo/package.json +0 -40
- package/exampleForExpo/src/App.js +0 -14
- package/exampleForExpo/src/Certification/index.js +0 -25
- package/exampleForExpo/src/CertificationResult/index.js +0 -61
- package/exampleForExpo/src/CertificationTest/index.js +0 -151
- package/exampleForExpo/src/Home/index.js +0 -80
- package/exampleForExpo/src/Loading/index.js +0 -10
- package/exampleForExpo/src/NavigationService.js +0 -102
- package/exampleForExpo/src/Payment/index.js +0 -23
- package/exampleForExpo/src/PaymentResult/index.js +0 -82
- package/exampleForExpo/src/PaymentTest/index.js +0 -313
- package/exampleForExpo/src/Picker/index.js +0 -19
- package/exampleForExpo/src/constants.js +0 -322
- package/exampleForExpo/src/utils.js +0 -116
- package/exampleForExpo/yarn.lock +0 -9498
- package/exampleForManagedExpo/.expo-shared/assets.json +0 -4
- package/exampleForManagedExpo/.gitignore +0 -22
- package/exampleForManagedExpo/App.js +0 -11
- package/exampleForManagedExpo/README.md +0 -33
- package/exampleForManagedExpo/app.json +0 -90
- 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 +0 -11
- package/exampleForManagedExpo/metro.config.js +0 -62
- package/exampleForManagedExpo/package.json +0 -36
- package/exampleForManagedExpo/src/Certification/index.js +0 -25
- package/exampleForManagedExpo/src/CertificationResult/index.js +0 -61
- package/exampleForManagedExpo/src/CertificationTest/index.js +0 -151
- package/exampleForManagedExpo/src/Home/index.js +0 -80
- package/exampleForManagedExpo/src/Loading/index.js +0 -10
- package/exampleForManagedExpo/src/NavigationService.js +0 -102
- package/exampleForManagedExpo/src/Payment/index.js +0 -23
- package/exampleForManagedExpo/src/PaymentResult/index.js +0 -82
- package/exampleForManagedExpo/src/PaymentTest/index.js +0 -313
- package/exampleForManagedExpo/src/Picker/index.js +0 -19
- package/exampleForManagedExpo/src/constants.js +0 -322
- package/exampleForManagedExpo/src/utils.js +0 -116
- package/exampleForManagedExpo/yarn.lock +0 -9411
- package/exampleForWebView/.buckconfig +0 -6
- package/exampleForWebView/.eslintrc.js +0 -4
- package/exampleForWebView/.gitattributes +0 -3
- package/exampleForWebView/.gitignore +0 -68
- package/exampleForWebView/.prettierrc.js +0 -7
- package/exampleForWebView/.watchmanconfig +0 -1
- package/exampleForWebView/README.md +0 -77
- package/exampleForWebView/__tests__/App-test.tsx +0 -14
- package/exampleForWebView/_editorconfig +0 -3
- 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 +0 -55
- package/exampleForWebView/android/app/build.gradle +0 -313
- package/exampleForWebView/android/app/build_defs.bzl +0 -19
- package/exampleForWebView/android/app/debug.keystore +0 -0
- package/exampleForWebView/android/app/proguard-rules.pro +0 -10
- package/exampleForWebView/android/app/src/debug/AndroidManifest.xml +0 -13
- package/exampleForWebView/android/app/src/debug/java/com/exampleforwebview/ReactNativeFlipper.java +0 -73
- package/exampleForWebView/android/app/src/main/AndroidManifest.xml +0 -26
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainActivity.java +0 -48
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/MainApplication.java +0 -91
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/MainApplicationReactNativeHost.java +0 -116
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/components/MainComponentsRegistry.java +0 -36
- package/exampleForWebView/android/app/src/main/java/com/exampleforwebview/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +0 -48
- package/exampleForWebView/android/app/src/main/jni/CMakeLists.txt +0 -7
- package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.cpp +0 -32
- package/exampleForWebView/android/app/src/main/jni/MainApplicationModuleProvider.h +0 -16
- package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +0 -45
- package/exampleForWebView/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +0 -38
- package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.cpp +0 -65
- package/exampleForWebView/android/app/src/main/jni/MainComponentsRegistry.h +0 -32
- package/exampleForWebView/android/app/src/main/jni/OnLoad.cpp +0 -11
- package/exampleForWebView/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- 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 +0 -3
- package/exampleForWebView/android/app/src/main/res/values/styles.xml +0 -9
- package/exampleForWebView/android/build.gradle +0 -51
- package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/exampleForWebView/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/exampleForWebView/android/gradle.properties +0 -40
- package/exampleForWebView/android/gradlew +0 -234
- package/exampleForWebView/android/gradlew.bat +0 -89
- package/exampleForWebView/android/settings.gradle +0 -11
- package/exampleForWebView/app.json +0 -4
- package/exampleForWebView/babel.config.js +0 -11
- package/exampleForWebView/index.js +0 -9
- package/exampleForWebView/ios/.xcode.env +0 -11
- package/exampleForWebView/ios/Podfile +0 -43
- package/exampleForWebView/ios/Podfile.lock +0 -748
- package/exampleForWebView/ios/exampleForWebView/AppDelegate.h +0 -8
- package/exampleForWebView/ios/exampleForWebView/AppDelegate.mm +0 -133
- package/exampleForWebView/ios/exampleForWebView/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/exampleForWebView/ios/exampleForWebView/Images.xcassets/Contents.json +0 -6
- package/exampleForWebView/ios/exampleForWebView/Info.plist +0 -96
- package/exampleForWebView/ios/exampleForWebView/LaunchScreen.storyboard +0 -47
- package/exampleForWebView/ios/exampleForWebView/main.m +0 -10
- package/exampleForWebView/ios/exampleForWebView.xcodeproj/project.pbxproj +0 -723
- package/exampleForWebView/ios/exampleForWebView.xcodeproj/xcshareddata/xcschemes/exampleForWebView.xcscheme +0 -88
- package/exampleForWebView/ios/exampleForWebView.xcworkspace/contents.xcworkspacedata +0 -10
- package/exampleForWebView/ios/exampleForWebView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/exampleForWebView/ios/exampleForWebViewTests/Info.plist +0 -24
- package/exampleForWebView/ios/exampleForWebViewTests/exampleForWebViewTests.m +0 -66
- package/exampleForWebView/manuals/CERTIFICATION.md +0 -223
- package/exampleForWebView/manuals/PAYMENT.md +0 -232
- package/exampleForWebView/metro.config.js +0 -61
- package/exampleForWebView/package.json +0 -54
- package/exampleForWebView/src/App.tsx +0 -50
- package/exampleForWebView/src/Certification.tsx +0 -54
- package/exampleForWebView/src/Home.tsx +0 -49
- package/exampleForWebView/src/Loading.tsx +0 -23
- package/exampleForWebView/src/Payment.tsx +0 -65
- package/exampleForWebView/yarn.lock +0 -7362
- package/iamport-react-native.podspec +0 -19
- package/ios/IamportReactNative-Bridging-Header.h +0 -1
- package/ios/IamportReactNative.xcodeproj/project.pbxproj +0 -293
- package/ios/IamportReactNativeViewManager.m +0 -12
- package/ios/IamportReactNativeViewManager.swift +0 -32
- package/lib/commonjs/components/Certification/index.js +0 -121
- package/lib/commonjs/components/Certification/index.js.map +0 -1
- package/lib/commonjs/components/ErrorOnParams/index.js +0 -50
- package/lib/commonjs/components/ErrorOnParams/index.js.map +0 -1
- package/lib/commonjs/components/Loading/index.js +0 -34
- package/lib/commonjs/components/Loading/index.js.map +0 -1
- package/lib/commonjs/components/Payment/index.js +0 -225
- package/lib/commonjs/components/Payment/index.js.map +0 -1
- package/lib/commonjs/constants/index.js +0 -114
- package/lib/commonjs/constants/index.js.map +0 -1
- package/lib/commonjs/img/iamport-logo.png +0 -0
- package/lib/commonjs/index.js +0 -29
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/styles.js +0 -27
- package/lib/commonjs/styles.js.map +0 -1
- package/lib/commonjs/utils/IamportUrl.js +0 -289
- package/lib/commonjs/utils/IamportUrl.js.map +0 -1
- package/lib/commonjs/utils/Validation.js +0 -109
- package/lib/commonjs/utils/Validation.js.map +0 -1
- package/lib/commonjs/utils/ValidationForPayment.js +0 -112
- package/lib/commonjs/utils/ValidationForPayment.js.map +0 -1
- package/lib/typescript/components/Certification/index.d.ts.map +0 -1
- package/lib/typescript/components/ErrorOnParams/index.d.ts +0 -7
- package/lib/typescript/components/ErrorOnParams/index.d.ts.map +0 -1
- package/lib/typescript/components/Loading/index.d.ts +0 -4
- package/lib/typescript/components/Loading/index.d.ts.map +0 -1
- package/lib/typescript/components/Payment/index.d.ts.map +0 -1
- package/lib/typescript/constants/index.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/styles.d.ts.map +0 -1
- package/lib/typescript/utils/IamportUrl.d.ts.map +0 -1
- package/lib/typescript/utils/Validation.d.ts.map +0 -1
- package/lib/typescript/utils/ValidationForPayment.d.ts.map +0 -1
- package/manuals/CALLBACK.md +0 -72
- package/manuals/EXAMPLE.md +0 -168
- package/manuals/EXPO.md +0 -246
- package/manuals/INSTALL.md +0 -31
- package/manuals/SETTING.md +0 -140
- package/manuals/SUPPORT.md +0 -35
- package/manuals/TRANS.md +0 -77
- package/manuals/VERSION.md +0 -187
- 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/scripts/bootstrap.js +0 -24
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -26
- package/yarn.lock +0 -6174
- /package/lib/typescript/{constants → src/constants}/index.d.ts +0 -0
- /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
- /package/lib/typescript/{utils → src/utils}/Validation.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/ValidationForPayment.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,46 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iamport-react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1-alpha.0",
|
|
4
4
|
"description": "리액트 네이티브용 아임포트 결제/본인인증 연동 라이브러리",
|
|
5
|
-
"main": "lib/
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
10
15
|
"files": [
|
|
11
16
|
"src",
|
|
12
17
|
"lib",
|
|
13
|
-
"
|
|
14
|
-
"ios",
|
|
15
|
-
"iamport-react-native.podspec",
|
|
16
|
-
"!lib/typescript/example",
|
|
17
|
-
"!android/build",
|
|
18
|
-
"!ios/build",
|
|
19
|
-
"!**/__tests__",
|
|
20
|
-
"!**/__fixtures__",
|
|
21
|
-
"!**/__mocks__"
|
|
18
|
+
"CHANGELOG.md"
|
|
22
19
|
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
25
|
-
"typescript": "tsc --noEmit",
|
|
26
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
27
|
-
"prepare": "bob build",
|
|
28
|
-
"example": "yarn --cwd example",
|
|
29
|
-
"example-expo": "yarn --cwd exampleForExpo",
|
|
30
|
-
"example-managed-expo": "yarn --cwd exampleForManagedExpo",
|
|
31
|
-
"example-webview": "yarn --cwd exampleForWebView",
|
|
32
|
-
"pods-example": "cd example && pod-install --quiet",
|
|
33
|
-
"pods-example-webview": "cd exampleForWebView && pod-install --quiet",
|
|
34
|
-
"bootstrap": "yarn example && yarn example-expo && yarn example-managed-expo && yarn example-webview &&yarn && yarn pods-example && yarn pods-example-webview"
|
|
35
|
-
},
|
|
36
20
|
"keywords": [
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
21
|
+
"react-native",
|
|
22
|
+
"ios",
|
|
23
|
+
"android"
|
|
40
24
|
],
|
|
41
25
|
"repository": {
|
|
42
26
|
"type": "git",
|
|
43
|
-
"url": "https://github.com/iamport/iamport-react-native"
|
|
27
|
+
"url": "git+https://github.com/iamport/iamport-react-native.git"
|
|
44
28
|
},
|
|
45
29
|
"author": "Hyukgyu Kwon <me@kwon.hk>",
|
|
46
30
|
"license": "MIT",
|
|
@@ -48,54 +32,62 @@
|
|
|
48
32
|
"url": "https://github.com/iamport/iamport-react-native/issues"
|
|
49
33
|
},
|
|
50
34
|
"homepage": "https://github.com/iamport/iamport-react-native#readme",
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"registry": "https://registry.npmjs.org/"
|
|
37
|
+
},
|
|
51
38
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"eslint": "^
|
|
56
|
-
"
|
|
57
|
-
"eslint-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
39
|
+
"@changesets/cli": "^2.29.7",
|
|
40
|
+
"@eslint/compat": "^1.3.2",
|
|
41
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
42
|
+
"@eslint/js": "^9.35.0",
|
|
43
|
+
"@react-native/babel-preset": "0.81.5",
|
|
44
|
+
"@react-native/eslint-config": "0.81.5",
|
|
45
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
46
|
+
"@types/jest": "^29.5.14",
|
|
47
|
+
"@types/react": "^19.1.12",
|
|
48
|
+
"del-cli": "^6.0.0",
|
|
49
|
+
"eslint": "^9.35.0",
|
|
50
|
+
"eslint-config-prettier": "^10.1.8",
|
|
51
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
52
|
+
"jest": "^29.7.0",
|
|
53
|
+
"prettier": "^3.6.2",
|
|
54
|
+
"react": "19.1.0",
|
|
55
|
+
"react-native": "0.81.5",
|
|
56
|
+
"react-native-builder-bob": "^0.40.14",
|
|
57
|
+
"react-native-webview": "^13.16.0",
|
|
58
|
+
"release-it": "^19.0.4",
|
|
59
|
+
"typescript": "^5.9.3"
|
|
66
60
|
},
|
|
67
61
|
"peerDependencies": {
|
|
68
|
-
"query-string": "8.x || 9.x",
|
|
69
62
|
"react": "*",
|
|
70
63
|
"react-native": "*",
|
|
71
|
-
"react-native-webview": "
|
|
64
|
+
"react-native-webview": "*"
|
|
72
65
|
},
|
|
73
|
-
"
|
|
74
|
-
"
|
|
66
|
+
"jest": {
|
|
67
|
+
"preset": "react-native",
|
|
68
|
+
"modulePathIgnorePatterns": [
|
|
69
|
+
"<rootDir>/lib/"
|
|
70
|
+
]
|
|
75
71
|
},
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
72
|
+
"release-it": {
|
|
73
|
+
"git": {
|
|
74
|
+
"commitMessage": "chore: release ${version}",
|
|
75
|
+
"tagName": "v${version}"
|
|
76
|
+
},
|
|
77
|
+
"npm": {
|
|
78
|
+
"publish": true
|
|
79
|
+
},
|
|
80
|
+
"github": {
|
|
81
|
+
"release": true
|
|
82
|
+
},
|
|
83
|
+
"plugins": {
|
|
84
|
+
"@release-it/conventional-changelog": {
|
|
85
|
+
"preset": {
|
|
86
|
+
"name": "angular"
|
|
91
87
|
}
|
|
92
|
-
|
|
88
|
+
}
|
|
93
89
|
}
|
|
94
90
|
},
|
|
95
|
-
"eslintIgnore": [
|
|
96
|
-
"node_modules/",
|
|
97
|
-
"lib/"
|
|
98
|
-
],
|
|
99
91
|
"prettier": {
|
|
100
92
|
"quoteProps": "consistent",
|
|
101
93
|
"singleQuote": true,
|
|
@@ -107,8 +99,12 @@
|
|
|
107
99
|
"source": "src",
|
|
108
100
|
"output": "lib",
|
|
109
101
|
"targets": [
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
[
|
|
103
|
+
"module",
|
|
104
|
+
{
|
|
105
|
+
"esm": true
|
|
106
|
+
}
|
|
107
|
+
],
|
|
112
108
|
[
|
|
113
109
|
"typescript",
|
|
114
110
|
{
|
|
@@ -117,5 +113,16 @@
|
|
|
117
113
|
]
|
|
118
114
|
]
|
|
119
115
|
},
|
|
120
|
-
"
|
|
121
|
-
|
|
116
|
+
"create-react-native-library": {
|
|
117
|
+
"languages": "js",
|
|
118
|
+
"type": "library",
|
|
119
|
+
"version": "0.54.8"
|
|
120
|
+
},
|
|
121
|
+
"scripts": {
|
|
122
|
+
"test": "jest",
|
|
123
|
+
"typecheck": "tsc",
|
|
124
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
125
|
+
"clean": "del-cli lib",
|
|
126
|
+
"release": "release-it --only-version"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRef, useState } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import { WebView } from 'react-native-webview';
|
|
4
4
|
|
|
5
|
-
import Loading from '../Loading';
|
|
6
5
|
import ErrorOnParams from '../ErrorOnParams';
|
|
6
|
+
import Loading from '../Loading';
|
|
7
7
|
|
|
8
|
-
import { IMPData, Validation } from '../../utils/Validation';
|
|
9
8
|
import { IMPConst } from '../../constants';
|
|
9
|
+
import { IMPData, Validation } from '../../utils/Validation';
|
|
10
10
|
|
|
11
11
|
import viewStyles from '../../styles';
|
|
12
12
|
import IamportUrl from '../../utils/IamportUrl';
|
|
@@ -62,11 +62,11 @@ function Certification({ userCode, tierCode, data, loading, callback }: Props) {
|
|
|
62
62
|
}
|
|
63
63
|
}}
|
|
64
64
|
onMessage={(e) => {
|
|
65
|
-
let
|
|
66
|
-
if (decodeURIComponent(
|
|
67
|
-
|
|
65
|
+
let messageData = e.nativeEvent.data;
|
|
66
|
+
if (decodeURIComponent(messageData) !== messageData) {
|
|
67
|
+
messageData = decodeURIComponent(messageData);
|
|
68
68
|
}
|
|
69
|
-
let response = JSON.parse(
|
|
69
|
+
let response = JSON.parse(messageData);
|
|
70
70
|
|
|
71
71
|
if (typeof callback === 'function') {
|
|
72
72
|
callback(response);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React, { createRef, useEffect, useRef, useState } from 'react';
|
|
2
1
|
import type { IMPData } from 'iamport-react-native';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { Linking, Platform, View } from 'react-native';
|
|
6
|
-
import { IMPConst } from '../../constants';
|
|
7
|
-
import IamportUrl from '../../utils/IamportUrl';
|
|
2
|
+
import { createRef, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { Alert, Linking, Platform, View } from 'react-native';
|
|
8
4
|
import WebView from 'react-native-webview';
|
|
5
|
+
import type { WebViewSource } from 'react-native-webview/lib/WebViewTypes';
|
|
6
|
+
import { IMPConst } from '../../constants';
|
|
9
7
|
import viewStyles from '../../styles';
|
|
8
|
+
import IamportUrl from '../../utils/IamportUrl';
|
|
9
|
+
import ValidationForPayment from '../../utils/ValidationForPayment';
|
|
10
|
+
import ErrorOnParams from '../ErrorOnParams';
|
|
10
11
|
import Loading from '../Loading';
|
|
11
|
-
import type { WebViewSource } from 'react-native-webview/lib/WebViewTypes';
|
|
12
12
|
|
|
13
13
|
type Props = {
|
|
14
14
|
userCode: string;
|
|
@@ -129,6 +129,30 @@ function Payment({ userCode, tierCode, data, loading, callback }: Props) {
|
|
|
129
129
|
ref={webview}
|
|
130
130
|
source={webviewSource}
|
|
131
131
|
mixedContentMode={'always'}
|
|
132
|
+
onError={(event) => {
|
|
133
|
+
console.warn(
|
|
134
|
+
'Encountered an error loading page',
|
|
135
|
+
event.nativeEvent
|
|
136
|
+
);
|
|
137
|
+
// 탐색이 실패하면 react-native-webview는 바로 오류 화면을 표시하려 한다
|
|
138
|
+
// 한편 별도 설정 안 한 WKWebView는 오류를 무시하여 결제를 계속 진행할 수 있는 경우가 있다
|
|
139
|
+
// 오류 화면 표시를 막는다
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
// Domain=NSURLErrorDomain Code=-1005 Description="The network connection was lost."
|
|
142
|
+
// 지속적으로 폴링하는 카드사(현대카드)의 경우 카드사 앱에서 돌아올 때 HTTP 요청이 강제 중단되어 -1005 오류 발생
|
|
143
|
+
// 별도 설정 안 한 WKWebView에서 간헐적으로 자동 리다이렉트가 안 되고 버튼을 누르라고 하는 경우 이 경우이다
|
|
144
|
+
// 무시한다
|
|
145
|
+
if (
|
|
146
|
+
Platform.OS === 'ios' ||
|
|
147
|
+
(Platform.OS === 'macos' && event.nativeEvent.code === -1005)
|
|
148
|
+
) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
// 이외의 경우에는 어떻게 처리해야 할지 확실하지 않지만 우선 알림을 보여 주도록 구현
|
|
152
|
+
Alert.alert(
|
|
153
|
+
`탐색 오류가 발생했습니다\n도메인: ${event.nativeEvent.domain}\n오류 코드: ${event.nativeEvent.code}\n설명: ${event.nativeEvent.description}`
|
|
154
|
+
);
|
|
155
|
+
}}
|
|
132
156
|
onLoadEnd={() => {
|
|
133
157
|
if (!isWebViewLoaded) {
|
|
134
158
|
if (data.pg.startsWith('eximbay')) {
|
package/src/utils/IamportUrl.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IMPData } from 'iamport-react-native';
|
|
2
|
-
import queryString from 'query-string';
|
|
3
2
|
import { Linking, Platform } from 'react-native';
|
|
4
3
|
import { IMPConst } from '../constants';
|
|
5
4
|
|
|
@@ -11,32 +10,36 @@ class IamportUrl {
|
|
|
11
10
|
|
|
12
11
|
constructor(url: string) {
|
|
13
12
|
this.url = url;
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const [scheme, location] = splitFirst(url, '://');
|
|
14
|
+
this.scheme = scheme;
|
|
16
15
|
if (Platform.OS === 'ios') {
|
|
17
16
|
this.path = this.scheme.startsWith('itms')
|
|
18
|
-
? `https://${
|
|
17
|
+
? `https://${location}`
|
|
19
18
|
: this.url;
|
|
20
19
|
} else if (Platform.OS === 'android') {
|
|
21
20
|
if (this.isAppUrl()) {
|
|
22
21
|
if (this.scheme.includes('intent')) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let args = intentUrl[1].split(';');
|
|
26
|
-
|
|
22
|
+
const [host, argText] = splitFirst(location!!, '#Intent;');
|
|
23
|
+
const args = argText!!.split(';');
|
|
27
24
|
if (this.scheme !== 'intent') {
|
|
28
|
-
this.scheme = this.scheme.split(':')[1]
|
|
25
|
+
this.scheme = this.scheme.split(':')[1]!!;
|
|
29
26
|
this.path = this.scheme + '://' + host;
|
|
30
27
|
}
|
|
31
|
-
args
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
for (const arg of args) {
|
|
29
|
+
const [key, rawValue] = splitFirst(arg, '=');
|
|
30
|
+
const value =
|
|
31
|
+
rawValue === undefined ? undefined : decodeURIComponent(rawValue);
|
|
32
|
+
switch (key) {
|
|
33
|
+
case 'scheme':
|
|
34
|
+
if (value !== undefined) {
|
|
35
|
+
this.path = `${value}://${host}`;
|
|
36
|
+
this.scheme = value;
|
|
37
|
+
}
|
|
38
|
+
break;
|
|
39
|
+
case 'package':
|
|
40
|
+
this.package = value;
|
|
38
41
|
}
|
|
39
|
-
}
|
|
42
|
+
}
|
|
40
43
|
} else {
|
|
41
44
|
this.path = this.url;
|
|
42
45
|
}
|
|
@@ -50,14 +53,13 @@ class IamportUrl {
|
|
|
50
53
|
return this.url;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
isPaymentOver(redirectUrl: string, data?: IMPData.PaymentData) {
|
|
56
|
+
isPaymentOver(redirectUrl: string, data?: IMPData.PaymentData): boolean {
|
|
54
57
|
if (this.url.startsWith(redirectUrl)) {
|
|
55
58
|
return true;
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
if (data?.pay_method === 'trans') {
|
|
59
|
-
const
|
|
60
|
-
const parsedUrl = queryString.parse(decodeUrl);
|
|
62
|
+
const searchParams = new URLSearchParams(extractQuery(this.url));
|
|
61
63
|
const scheme = data?.app_scheme;
|
|
62
64
|
/**
|
|
63
65
|
* [IOS] 웹 표준 이니시스 - 실시간 계좌이체 대비
|
|
@@ -72,17 +74,17 @@ class IamportUrl {
|
|
|
72
74
|
* 이를 위한 isInicisTransPaid 플래그 추가
|
|
73
75
|
*/
|
|
74
76
|
if (data.pg.startsWith('html5_inicis') && Platform.OS === 'ios') {
|
|
75
|
-
const query = parsedUrl;
|
|
76
77
|
if (
|
|
77
|
-
|
|
78
|
+
searchParams.has('m_redirect_url') &&
|
|
78
79
|
scheme === data.app_scheme?.toLowerCase()
|
|
79
80
|
) {
|
|
80
|
-
if ((
|
|
81
|
+
if (searchParams.get('m_redirect_url')?.includes(redirectUrl)) {
|
|
81
82
|
return true;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
}
|
|
87
|
+
return false;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
isAppUrl() {
|
|
@@ -333,12 +335,15 @@ class IamportUrl {
|
|
|
333
335
|
}
|
|
334
336
|
|
|
335
337
|
getQuery() {
|
|
336
|
-
return
|
|
338
|
+
return Object.fromEntries(
|
|
339
|
+
new URLSearchParams(this.getStringifiedQuery()).entries()
|
|
340
|
+
);
|
|
337
341
|
}
|
|
338
342
|
|
|
339
343
|
getStringifiedQuery() {
|
|
340
|
-
const
|
|
341
|
-
|
|
344
|
+
const query = extractQuery(this.url);
|
|
345
|
+
if (query === undefined) return undefined;
|
|
346
|
+
return decodeQueryParam(query);
|
|
342
347
|
}
|
|
343
348
|
|
|
344
349
|
getInicisTransQuery(redirectUrl: string) {
|
|
@@ -368,4 +373,27 @@ class IamportUrl {
|
|
|
368
373
|
}
|
|
369
374
|
}
|
|
370
375
|
|
|
376
|
+
function splitFirst(
|
|
377
|
+
text: string,
|
|
378
|
+
delimiter: string
|
|
379
|
+
): [string] | [string, string] {
|
|
380
|
+
const index = text.indexOf(delimiter);
|
|
381
|
+
if (index === -1) return [text];
|
|
382
|
+
return [text.slice(0, index), text.slice(index + delimiter.length)];
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// PG사 URL은 표준적인 URL이 아닐 수 있다.
|
|
386
|
+
function extractQuery(url: string): string | undefined {
|
|
387
|
+
const hashIndex = url.indexOf('#');
|
|
388
|
+
const beforeHash = hashIndex === -1 ? url : url.slice(0, hashIndex);
|
|
389
|
+
const queryIndex = beforeHash.indexOf('?');
|
|
390
|
+
if (queryIndex === -1) return undefined;
|
|
391
|
+
return beforeHash.slice(queryIndex);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#decoding_query_parameters_from_a_url
|
|
395
|
+
function decodeQueryParam(query: string): string {
|
|
396
|
+
return decodeURIComponent(query.replaceAll('+', ' '));
|
|
397
|
+
}
|
|
398
|
+
|
|
371
399
|
export default IamportUrl;
|
package/.circleci/config.yml
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
version: 2.1
|
|
2
|
-
|
|
3
|
-
executors:
|
|
4
|
-
default:
|
|
5
|
-
docker:
|
|
6
|
-
- image: circleci/node:10
|
|
7
|
-
working_directory: ~/project
|
|
8
|
-
|
|
9
|
-
commands:
|
|
10
|
-
attach_project:
|
|
11
|
-
steps:
|
|
12
|
-
- attach_workspace:
|
|
13
|
-
at: ~/project
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
install-dependencies:
|
|
17
|
-
executor: default
|
|
18
|
-
steps:
|
|
19
|
-
- checkout
|
|
20
|
-
- attach_project
|
|
21
|
-
- restore_cache:
|
|
22
|
-
keys:
|
|
23
|
-
- dependencies-{{ checksum "package.json" }}
|
|
24
|
-
- dependencies-
|
|
25
|
-
- restore_cache:
|
|
26
|
-
keys:
|
|
27
|
-
- dependencies-example-{{ checksum "example/package.json" }}
|
|
28
|
-
- dependencies-example-
|
|
29
|
-
- run:
|
|
30
|
-
name: Install dependencies
|
|
31
|
-
command: |
|
|
32
|
-
yarn install --cwd example --frozen-lockfile
|
|
33
|
-
yarn install --frozen-lockfile
|
|
34
|
-
- save_cache:
|
|
35
|
-
key: dependencies-{{ checksum "package.json" }}
|
|
36
|
-
paths: node_modules
|
|
37
|
-
- save_cache:
|
|
38
|
-
key: dependencies-example-{{ checksum "example/package.json" }}
|
|
39
|
-
paths: example/node_modules
|
|
40
|
-
- persist_to_workspace:
|
|
41
|
-
root: .
|
|
42
|
-
paths: .
|
|
43
|
-
|
|
44
|
-
lint:
|
|
45
|
-
executor: default
|
|
46
|
-
steps:
|
|
47
|
-
- attach_project
|
|
48
|
-
- run:
|
|
49
|
-
name: Lint files
|
|
50
|
-
command: |
|
|
51
|
-
yarn lint
|
|
52
|
-
|
|
53
|
-
typescript:
|
|
54
|
-
executor: default
|
|
55
|
-
steps:
|
|
56
|
-
- attach_project
|
|
57
|
-
- run:
|
|
58
|
-
name: Typecheck files
|
|
59
|
-
command: |
|
|
60
|
-
yarn typescript
|
|
61
|
-
|
|
62
|
-
unit-tests:
|
|
63
|
-
executor: default
|
|
64
|
-
steps:
|
|
65
|
-
- attach_project
|
|
66
|
-
- run:
|
|
67
|
-
name: Run unit tests
|
|
68
|
-
command: |
|
|
69
|
-
yarn test --coverage
|
|
70
|
-
- store_artifacts:
|
|
71
|
-
path: coverage
|
|
72
|
-
destination: coverage
|
|
73
|
-
|
|
74
|
-
build-package:
|
|
75
|
-
executor: default
|
|
76
|
-
steps:
|
|
77
|
-
- attach_project
|
|
78
|
-
- run:
|
|
79
|
-
name: Build package
|
|
80
|
-
command: |
|
|
81
|
-
yarn prepare
|
|
82
|
-
|
|
83
|
-
workflows:
|
|
84
|
-
build-and-test:
|
|
85
|
-
jobs:
|
|
86
|
-
- install-dependencies
|
|
87
|
-
- lint:
|
|
88
|
-
requires:
|
|
89
|
-
- install-dependencies
|
|
90
|
-
- typescript:
|
|
91
|
-
requires:
|
|
92
|
-
- install-dependencies
|
|
93
|
-
- unit-tests:
|
|
94
|
-
requires:
|
|
95
|
-
- install-dependencies
|
|
96
|
-
- build-package:
|
|
97
|
-
requires:
|
|
98
|
-
- install-dependencies
|
package/.editorconfig
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
[*]
|
|
8
|
-
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
11
|
-
|
|
12
|
-
end_of_line = lf
|
|
13
|
-
charset = utf-8
|
|
14
|
-
trim_trailing_whitespace = true
|
|
15
|
-
insert_final_newline = true
|
package/.gitattributes
DELETED
package/.gitignore
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# OSX
|
|
2
|
-
#
|
|
3
|
-
.DS_Store
|
|
4
|
-
|
|
5
|
-
# XDE
|
|
6
|
-
.expo/
|
|
7
|
-
|
|
8
|
-
# VSCode
|
|
9
|
-
.vscode/
|
|
10
|
-
jsconfig.json
|
|
11
|
-
|
|
12
|
-
# Xcode
|
|
13
|
-
#
|
|
14
|
-
build/
|
|
15
|
-
*.pbxuser
|
|
16
|
-
!default.pbxuser
|
|
17
|
-
*.mode1v3
|
|
18
|
-
!default.mode1v3
|
|
19
|
-
*.mode2v3
|
|
20
|
-
!default.mode2v3
|
|
21
|
-
*.perspectivev3
|
|
22
|
-
!default.perspectivev3
|
|
23
|
-
xcuserdata
|
|
24
|
-
*.xccheckout
|
|
25
|
-
*.moved-aside
|
|
26
|
-
DerivedData
|
|
27
|
-
*.hmap
|
|
28
|
-
*.ipa
|
|
29
|
-
*.xcuserstate
|
|
30
|
-
project.xcworkspace
|
|
31
|
-
|
|
32
|
-
# Android/IJ
|
|
33
|
-
#
|
|
34
|
-
.idea
|
|
35
|
-
.gradle
|
|
36
|
-
local.properties
|
|
37
|
-
android.iml
|
|
38
|
-
|
|
39
|
-
# Cocoapods
|
|
40
|
-
#
|
|
41
|
-
example/ios/Pods
|
|
42
|
-
|
|
43
|
-
# node.js
|
|
44
|
-
#
|
|
45
|
-
node_modules/
|
|
46
|
-
npm-debug.log
|
|
47
|
-
yarn-debug.log
|
|
48
|
-
yarn-error.log
|
|
49
|
-
|
|
50
|
-
# BUCK
|
|
51
|
-
buck-out/
|
|
52
|
-
\.buckd/
|
|
53
|
-
android/app/libs
|
|
54
|
-
android/keystores/debug.keystore
|
|
55
|
-
|
|
56
|
-
# Expo
|
|
57
|
-
.expo/*
|
|
58
|
-
|
|
59
|
-
# generated by bob
|
|
60
|
-
lib/
|
|
61
|
-
|
|
62
|
-
# yarn
|
|
63
|
-
.yarn/*
|
|
64
|
-
!.yarn/cache
|
|
65
|
-
!.yarn/patches
|
|
66
|
-
!.yarn/plugins
|
|
67
|
-
!.yarn/releases
|
|
68
|
-
!.yarn/sdks
|
|
69
|
-
!.yarn/versions
|
package/.yarnrc
DELETED
package/.yarnrc.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodeLinker: node-modules
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|