framepayments-react-native 1.0.1 → 2.0.1
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/README.md +434 -71
- package/android/.gradle/8.9/checksums/checksums.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/android/.settings/org.eclipse.buildship.core.prefs +13 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/results.bin +1 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/BuildConfig.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameCheckoutActivity$Companion.dex +0 -0
- package/android/build/.transforms/{3db830673120be833016e77c88c53305/transformed/debug → 5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex}/com/framepayments/reactnativeframe/FrameCheckoutActivity$tryShowCheckout$1.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameCheckoutActivity.dex +0 -0
- package/android/build/.transforms/{3db830673120be833016e77c88c53305/transformed/debug → 5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex}/com/framepayments/reactnativeframe/FrameFlowActivity$CartItemDto.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameFlowActivity$Companion.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameFlowActivity$parseCartItems$type$1.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameFlowActivity.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameGooglePayActivity$Companion.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameGooglePayActivity.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameOnboardingActivity$Companion.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameOnboardingActivity$parseCapabilities$type$1.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameOnboardingActivity.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameSDKModule$Companion.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameSDKModule.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/FrameSDKPackage.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/framepayments/reactnativeframe/JsonConvertersKt.dex +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameCheckoutActivity$$InternalSyntheticLambda$2$28045340ca5b91151bb937065eeb5817c0f8f911bb460e6e7ed8bb228b67ee83$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameFlowActivity$$InternalSyntheticLambda$2$467cdf1dabffeaa07b76e313efb66791f50d3ff264e427e91d1358ac5865a7a9$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameFlowActivity$$InternalSyntheticLambda$2$d15cc37cc08a853958a9c0baad49f7fce1ef84e92db9baa5103646939a0fe3e5$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameFlowActivity$$InternalSyntheticLambda$2$ee6ef8e6758d1b8e67a54e3fecfb200ac5e867541a69809ec1db49f74ffcada1$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameGooglePayActivity$$InternalSyntheticLambda$2$46cecf303f126f7c9f20b615fc49b2714ec2eb4f046ae009cfdbce53a1759f18$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameGooglePayActivity$$InternalSyntheticLambda$2$46cecf303f126f7c9f20b615fc49b2714ec2eb4f046ae009cfdbce53a1759f18$1.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameGooglePayActivity$$InternalSyntheticLambda$2$46cecf303f126f7c9f20b615fc49b2714ec2eb4f046ae009cfdbce53a1759f18$2.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameGooglePayActivity$$InternalSyntheticLambda$2$cdad629ad452b3c7f7de1310d225629dafa75285ad515d55f056371066170154$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameOnboardingActivity$$InternalSyntheticLambda$2$5d91d018c63f48735ba5e2a00b14bd815f4ce248aa924e4a58bf6addce311837$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameOnboardingActivity$$InternalSyntheticLambda$2$c9ac604bc80e3afcbfad7417717ae97568874f4e33246863c0d688abb3e89865$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameSDKModule$$InternalSyntheticLambda$2$1f479ca48bf3a1c66ff65b38aaaef67a97119b29ddce703f8104188682007f0d$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameSDKModule$$InternalSyntheticLambda$2$984ab30558bc904ed37602fa6e3ebf28f1ed69df6712b31b00c4f26fc26d3b70$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameSDKModule$$InternalSyntheticLambda$2$f4a55b70e496f422e1e03998843d62c7208f0229c2d5d080706056e98810c892$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameSDKModule$$InternalSyntheticLambda$2$f8d46f7169c404d37a1d505f19439b83090fbed62b5bdaf1e86717fdddebf622$0.globals +0 -0
- package/android/build/.transforms/5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_global-synthetics/com/framepayments/reactnativeframe/FrameSDKModule$$InternalSyntheticLambda$2$f8d46f7169c404d37a1d505f19439b83090fbed62b5bdaf1e86717fdddebf622$1.globals +0 -0
- package/android/build/generated/source/buildConfig/debug/com/framepayments/reactnativeframe/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +26 -0
- package/android/build/intermediates/aar_metadata/debug/{aar-metadata.properties → writeDebugAarMetadata/aar-metadata.properties} +2 -1
- package/android/build/intermediates/android_res_source_set_path_map/debug/mapDebugSourceSetPaths/file-map.txt +10 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +2 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merged.dir/values/values.xml +10 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +6 -1
- package/android/build/intermediates/incremental/{packageDebugAssets → mergeDebugAssets}/merger.xml +1 -1
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/framepayments-react-native_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/framepayments/reactnativeframe/BuildConfig.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +4 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +45 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +26 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/values/values.xml +10 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/framepayments-react-native_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/framepayments/reactnativeframe/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/{com → bundleLibRuntimeToDirDebug/com}/framepayments/reactnativeframe/FrameCheckoutActivity$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/{com → bundleLibRuntimeToDirDebug/com}/framepayments/reactnativeframe/FrameCheckoutActivity$tryShowCheckout$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/{com → bundleLibRuntimeToDirDebug/com}/framepayments/reactnativeframe/FrameCheckoutActivity.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/{com → bundleLibRuntimeToDirDebug/com}/framepayments/reactnativeframe/FrameFlowActivity$CartItemDto.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/{com → bundleLibRuntimeToDirDebug/com}/framepayments/reactnativeframe/FrameFlowActivity$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/{com → bundleLibRuntimeToDirDebug/com}/framepayments/reactnativeframe/FrameFlowActivity$parseCartItems$type$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/{com → bundleLibRuntimeToDirDebug/com}/framepayments/reactnativeframe/FrameFlowActivity.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/framepayments/reactnativeframe/FrameGooglePayActivity$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/framepayments/reactnativeframe/FrameGooglePayActivity.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/framepayments/reactnativeframe/FrameOnboardingActivity$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/framepayments/reactnativeframe/FrameOnboardingActivity$parseCapabilities$type$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/framepayments/reactnativeframe/FrameOnboardingActivity.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/framepayments/reactnativeframe/FrameSDKModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/framepayments/reactnativeframe/FrameSDKModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/{com → bundleLibRuntimeToDirDebug/com}/framepayments/reactnativeframe/FrameSDKPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/framepayments/reactnativeframe/JsonConvertersKt.class +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +3 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +21 -5
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/framepayments-react-native_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity$tryShowCheckout$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameFlowActivity$CartItemDto.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameFlowActivity$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameFlowActivity$parseCartItems$type$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameFlowActivity.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameGooglePayActivity$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameGooglePayActivity.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameOnboardingActivity$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameOnboardingActivity$parseCapabilities$type$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameOnboardingActivity.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameSDKModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameSDKModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameSDKPackage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/JsonConvertersKt.class +0 -0
- package/android/build.gradle +22 -24
- package/android/src/main/AndroidManifest.xml +10 -2
- package/android/src/main/java/com/framepayments/reactnativeframe/FrameFlowActivity.kt +2 -2
- package/android/src/main/java/com/framepayments/reactnativeframe/FrameGooglePayActivity.kt +148 -0
- package/android/src/main/java/com/framepayments/reactnativeframe/FrameOnboardingActivity.kt +68 -0
- package/android/src/main/java/com/framepayments/reactnativeframe/FrameSDKModule.kt +115 -33
- package/android/src/main/java/com/framepayments/reactnativeframe/JsonConverters.kt +39 -0
- package/android/src/main/res/values/frame_styles.xml +15 -0
- package/ios/ApplePayPresenter.swift +155 -0
- package/ios/FrameReactNative.podspec +10 -4
- package/ios/FrameSDKBridge.m +33 -4
- package/ios/FrameSDKBridge.swift +160 -26
- package/lib/components/FrameApplePayButton.d.ts +30 -0
- package/lib/components/FrameApplePayButton.d.ts.map +1 -0
- package/lib/components/FrameApplePayButton.js +42 -0
- package/lib/components/FrameGooglePayButton.d.ts +28 -0
- package/lib/components/FrameGooglePayButton.d.ts.map +1 -0
- package/lib/components/FrameGooglePayButton.js +24 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +2 -0
- package/lib/index.d.ts +9 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +13 -4
- package/lib/native.d.ts +9 -2
- package/lib/native.d.ts.map +1 -1
- package/lib/native.js +28 -4
- package/lib/types.d.ts +102 -7
- package/lib/types.d.ts.map +1 -1
- package/package.json +10 -15
- package/src/__tests__/native.test.ts +51 -14
- package/src/index.ts +44 -5
- package/src/native.ts +71 -6
- package/src/types.ts +133 -7
- package/android/build/.transforms/3db830673120be833016e77c88c53305/results.bin +0 -1
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity$Companion.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameFlowActivity$Companion.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameFlowActivity$parseCartItems$type$1.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameFlowActivity.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameSDKModule.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameSDKPackage.dex +0 -0
- package/android/build/.transforms/e32bd1e24a69eac3ebaf0c3a5e659207/results.bin +0 -1
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -18
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/java_res/debug/out/META-INF/framepayments-react-native_debug.kotlin_module +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -2
- package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -27
- package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +0 -18
- package/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/framepayments-react-native_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameSDKModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -1
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- /package/android/{build/intermediates/compile_symbol_list/debug/R.txt → .gradle/8.9/dependencies-accessors/gc.properties} +0 -0
- /package/android/build/.transforms/{3db830673120be833016e77c88c53305/transformed/debug → 5a2061641b1fc5518a336681809507bc/transformed/bundleLibRuntimeToDirDebug}/desugar_graph.bin +0 -0
- /package/android/build/intermediates/aapt_friendly_merged_manifests/debug/{aapt → processDebugManifest/aapt}/output-metadata.json +0 -0
- /package/android/build/intermediates/annotation_processor_list/debug/{annotationProcessors.json → javaPreCompileDebug/annotationProcessors.json} +0 -0
- /package/android/build/intermediates/navigation_json/debug/{navigation.json → extractDeepLinksDebug/navigation.json} +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <FrameGooglePayButton /> — Android-only React Native view that wraps Frame Android SDK's
|
|
3
|
+
* native FrameGooglePayButton (Google Pay PaymentsClient + readiness check).
|
|
4
|
+
*
|
|
5
|
+
* On non-Android platforms this component renders nothing, so consumers can place it
|
|
6
|
+
* unconditionally in their JSX.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { Platform, StyleSheet, requireNativeComponent, } from 'react-native';
|
|
10
|
+
const NativeFrameGooglePayButton = Platform.OS === 'android'
|
|
11
|
+
? requireNativeComponent('FrameGooglePayButtonView')
|
|
12
|
+
: null;
|
|
13
|
+
export const FrameGooglePayButton = (props) => {
|
|
14
|
+
if (Platform.OS !== 'android' || NativeFrameGooglePayButton === null) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
const { style, ...rest } = props;
|
|
18
|
+
return (<NativeFrameGooglePayButton {...rest} style={[styles.button, style]}/>);
|
|
19
|
+
};
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
button: {
|
|
22
|
+
height: 48,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FrameApplePayButton } from './FrameApplePayButton';
|
|
2
|
+
export type { FrameApplePayButtonProps } from './FrameApplePayButton';
|
|
3
|
+
export { FrameGooglePayButton } from './FrameGooglePayButton';
|
|
4
|
+
export type { FrameGooglePayButtonProps } from './FrameGooglePayButton';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -3,18 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* React Native SDK for Frame Payments.
|
|
5
5
|
* - Initialize the SDK, then use presentCheckout / presentCart for payment UI.
|
|
6
|
+
* - Use presentOnboarding for KYC, identity verification, and payment method onboarding flows.
|
|
7
|
+
* - Use presentApplePay / presentGooglePay to launch the platform wallet sheet from your own button UI.
|
|
6
8
|
* - For API calls (customers, charge intents, refunds), use the framepayments (frame-node) package from JS.
|
|
7
9
|
*/
|
|
8
|
-
import { initialize, presentCheckout, presentCart } from './native';
|
|
9
|
-
export { initialize, presentCheckout, presentCart } from './native';
|
|
10
|
-
export type { FrameCartItem, ChargeIntent, FrameError } from './types';
|
|
10
|
+
import { initialize, presentCheckout, presentCart, presentOnboarding, presentApplePay, presentGooglePay } from './native';
|
|
11
|
+
export { initialize, presentCheckout, presentCart, presentOnboarding, presentApplePay, presentGooglePay, } from './native';
|
|
12
|
+
export type { FrameCartItem, ChargeIntent, ChargeIntentStatus, AuthorizationMode, FrameError, BillingAddress, PaymentCard, BankAccount, PaymentMethod, OnboardingCapability, OnboardingResult, OnboardingResultStatus, ApplePayOwner, PresentApplePayOptions, PresentGooglePayOptions, } from './types';
|
|
11
13
|
export { ErrorCodes } from './errors';
|
|
12
14
|
export type { FrameErrorShape, FrameErrorCode } from './errors';
|
|
13
|
-
/** Default export for Frame.initialize(), Frame.presentCheckout(),
|
|
15
|
+
/** Default export for Frame.initialize(), Frame.presentCheckout(), Frame.presentCart(), Frame.presentOnboarding(), Frame.presentApplePay(), Frame.presentGooglePay() */
|
|
14
16
|
declare const _default: {
|
|
15
17
|
initialize: typeof initialize;
|
|
16
18
|
presentCheckout: typeof presentCheckout;
|
|
17
19
|
presentCart: typeof presentCart;
|
|
20
|
+
presentOnboarding: typeof presentOnboarding;
|
|
21
|
+
presentApplePay: typeof presentApplePay;
|
|
22
|
+
presentGooglePay: typeof presentGooglePay;
|
|
18
23
|
};
|
|
19
24
|
export default _default;
|
|
20
25
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,UAAU,EACV,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,UAAU,EACV,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,WAAW,EACX,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEhE,wKAAwK;;;;;;;;;AACxK,wBAOE"}
|
package/lib/index.js
CHANGED
|
@@ -3,10 +3,19 @@
|
|
|
3
3
|
*
|
|
4
4
|
* React Native SDK for Frame Payments.
|
|
5
5
|
* - Initialize the SDK, then use presentCheckout / presentCart for payment UI.
|
|
6
|
+
* - Use presentOnboarding for KYC, identity verification, and payment method onboarding flows.
|
|
7
|
+
* - Use presentApplePay / presentGooglePay to launch the platform wallet sheet from your own button UI.
|
|
6
8
|
* - For API calls (customers, charge intents, refunds), use the framepayments (frame-node) package from JS.
|
|
7
9
|
*/
|
|
8
|
-
import { initialize, presentCheckout, presentCart } from './native';
|
|
9
|
-
export { initialize, presentCheckout, presentCart } from './native';
|
|
10
|
+
import { initialize, presentCheckout, presentCart, presentOnboarding, presentApplePay, presentGooglePay, } from './native';
|
|
11
|
+
export { initialize, presentCheckout, presentCart, presentOnboarding, presentApplePay, presentGooglePay, } from './native';
|
|
10
12
|
export { ErrorCodes } from './errors';
|
|
11
|
-
/** Default export for Frame.initialize(), Frame.presentCheckout(),
|
|
12
|
-
export default {
|
|
13
|
+
/** Default export for Frame.initialize(), Frame.presentCheckout(), Frame.presentCart(), Frame.presentOnboarding(), Frame.presentApplePay(), Frame.presentGooglePay() */
|
|
14
|
+
export default {
|
|
15
|
+
initialize,
|
|
16
|
+
presentCheckout,
|
|
17
|
+
presentCart,
|
|
18
|
+
presentOnboarding,
|
|
19
|
+
presentApplePay,
|
|
20
|
+
presentGooglePay,
|
|
21
|
+
};
|
package/lib/native.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Native module bridge. Uses NativeModules for classic React Native bridge.
|
|
3
3
|
*/
|
|
4
|
-
import type { ChargeIntent, FrameCartItem } from './types';
|
|
4
|
+
import type { ChargeIntent, FrameCartItem, OnboardingCapability, OnboardingResult, PresentApplePayOptions, PresentGooglePayOptions } from './types';
|
|
5
5
|
export declare function initialize(options: {
|
|
6
|
-
|
|
6
|
+
secretKey: string;
|
|
7
|
+
publishableKey: string;
|
|
7
8
|
debugMode?: boolean;
|
|
8
9
|
}): Promise<void>;
|
|
9
10
|
export declare function presentCheckout(options: {
|
|
@@ -15,4 +16,10 @@ export declare function presentCart(options: {
|
|
|
15
16
|
items: FrameCartItem[];
|
|
16
17
|
shippingAmountInCents: number;
|
|
17
18
|
}): Promise<ChargeIntent>;
|
|
19
|
+
export declare function presentOnboarding(options: {
|
|
20
|
+
accountId?: string | null;
|
|
21
|
+
capabilities?: OnboardingCapability[];
|
|
22
|
+
}): Promise<OnboardingResult>;
|
|
23
|
+
export declare function presentApplePay(options: PresentApplePayOptions): Promise<ChargeIntent>;
|
|
24
|
+
export declare function presentGooglePay(options: PresentGooglePayOptions): Promise<ChargeIntent>;
|
|
18
25
|
//# sourceMappingURL=native.d.ts.map
|
package/lib/native.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAmBjB,wBAAgB,UAAU,CAAC,OAAO,EAAE;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBhB;AAwBD,wBAAgB,eAAe,CAAC,OAAO,EAAE;IACvC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,YAAY,CAAC,CAKxB;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE;IACnC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;CAC/B,GAAG,OAAO,CAAC,YAAY,CAAC,CASxB;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACvC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAQ5B;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,CAAC,CAoBtF;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,CAAC,CAUxF"}
|
package/lib/native.js
CHANGED
|
@@ -13,16 +13,19 @@ const FrameSDK = NativeModules.FrameSDK
|
|
|
13
13
|
});
|
|
14
14
|
let isInitialized = false;
|
|
15
15
|
export function initialize(options) {
|
|
16
|
-
if (!options?.
|
|
17
|
-
throw new Error('Frame.initialize requires
|
|
16
|
+
if (!options?.secretKey) {
|
|
17
|
+
throw new Error('Frame.initialize requires secretKey');
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
if (!options?.publishableKey) {
|
|
20
|
+
throw new Error('Frame.initialize requires publishableKey');
|
|
21
|
+
}
|
|
22
|
+
return wrapPromise(FrameSDK.initialize(options.secretKey, options.publishableKey, options.debugMode ?? false)).then(() => {
|
|
20
23
|
isInitialized = true;
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
function guardInitialized() {
|
|
24
27
|
if (!isInitialized) {
|
|
25
|
-
const message = 'Frame SDK must be initialized before calling presentCheckout or
|
|
28
|
+
const message = 'Frame SDK must be initialized before calling presentCheckout, presentCart, or presentOnboarding. Call Frame.initialize({ apiKey }) first.';
|
|
26
29
|
const err = new Error(message);
|
|
27
30
|
err.code = ErrorCodes.NOT_INITIALIZED;
|
|
28
31
|
throw err;
|
|
@@ -48,3 +51,24 @@ export function presentCart(options) {
|
|
|
48
51
|
guardInitialized();
|
|
49
52
|
return wrapPromise(FrameSDK.presentCart(options.customerId ?? null, options.items, options.shippingAmountInCents));
|
|
50
53
|
}
|
|
54
|
+
export function presentOnboarding(options) {
|
|
55
|
+
guardInitialized();
|
|
56
|
+
return wrapPromise(FrameSDK.presentOnboarding(options.accountId ?? null, options.capabilities ?? []));
|
|
57
|
+
}
|
|
58
|
+
export function presentApplePay(options) {
|
|
59
|
+
guardInitialized();
|
|
60
|
+
if (!options?.owner || (options.owner.type !== 'customer' && options.owner.type !== 'account')) {
|
|
61
|
+
throw new Error('Frame.presentApplePay requires owner: { type: "customer" | "account", id: string }');
|
|
62
|
+
}
|
|
63
|
+
if (!options.owner.id) {
|
|
64
|
+
throw new Error('Frame.presentApplePay requires owner.id');
|
|
65
|
+
}
|
|
66
|
+
if (!options.merchantId) {
|
|
67
|
+
throw new Error('Frame.presentApplePay requires merchantId');
|
|
68
|
+
}
|
|
69
|
+
return wrapPromise(FrameSDK.presentApplePay(options.owner.type, options.owner.id, options.amount, options.currency ?? 'usd', options.merchantId));
|
|
70
|
+
}
|
|
71
|
+
export function presentGooglePay(options) {
|
|
72
|
+
guardInitialized();
|
|
73
|
+
return wrapPromise(FrameSDK.presentGooglePay(options.amountCents, options.customerId ?? null, options.currencyCode ?? 'USD', options.googlePayMerchantId ?? null));
|
|
74
|
+
}
|
package/lib/types.d.ts
CHANGED
|
@@ -9,23 +9,79 @@ export interface FrameCartItem {
|
|
|
9
9
|
amountInCents: number;
|
|
10
10
|
imageUrl: string;
|
|
11
11
|
}
|
|
12
|
+
export type ChargeIntentStatus = 'canceled' | 'disputed' | 'failed' | 'incomplete' | 'pending' | 'refunded' | 'reversed' | 'succeeded';
|
|
13
|
+
export type AuthorizationMode = 'automatic' | 'manual';
|
|
14
|
+
export interface BillingAddress {
|
|
15
|
+
city?: string;
|
|
16
|
+
country?: string;
|
|
17
|
+
state?: string;
|
|
18
|
+
postalCode: string;
|
|
19
|
+
addressLine1?: string;
|
|
20
|
+
addressLine2?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface PaymentCard {
|
|
23
|
+
brand: string;
|
|
24
|
+
expirationMonth: string;
|
|
25
|
+
expirationYear: string;
|
|
26
|
+
lastFourDigits: string;
|
|
27
|
+
issuer?: string;
|
|
28
|
+
currency?: string;
|
|
29
|
+
type?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface BankAccount {
|
|
32
|
+
bankName?: string;
|
|
33
|
+
lastFour?: string;
|
|
34
|
+
accountType?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface PaymentMethod {
|
|
37
|
+
id: string;
|
|
38
|
+
type: 'card' | 'ach';
|
|
39
|
+
status: string;
|
|
40
|
+
created: number;
|
|
41
|
+
updated: number;
|
|
42
|
+
livemode: boolean;
|
|
43
|
+
object: string;
|
|
44
|
+
customerId?: string;
|
|
45
|
+
card?: PaymentCard;
|
|
46
|
+
ach?: BankAccount;
|
|
47
|
+
billing?: BillingAddress;
|
|
48
|
+
}
|
|
49
|
+
export interface Customer {
|
|
50
|
+
id: string;
|
|
51
|
+
object: string;
|
|
52
|
+
created: number;
|
|
53
|
+
updated: number;
|
|
54
|
+
livemode: boolean;
|
|
55
|
+
name?: string;
|
|
56
|
+
email?: string;
|
|
57
|
+
phone?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface Charge {
|
|
60
|
+
id: string;
|
|
61
|
+
object: string;
|
|
62
|
+
amount: number;
|
|
63
|
+
currency: string;
|
|
64
|
+
status: string;
|
|
65
|
+
created: number;
|
|
66
|
+
livemode: boolean;
|
|
67
|
+
}
|
|
12
68
|
/** Charge intent returned from presentCheckout / presentCart */
|
|
13
69
|
export interface ChargeIntent {
|
|
14
70
|
id: string;
|
|
15
71
|
currency: string;
|
|
16
72
|
amount: number;
|
|
17
|
-
status:
|
|
73
|
+
status: ChargeIntentStatus;
|
|
18
74
|
created: number;
|
|
19
75
|
updated: number;
|
|
20
76
|
livemode: boolean;
|
|
21
77
|
object: string;
|
|
22
78
|
description?: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
shipping?:
|
|
79
|
+
authorizationMode?: AuthorizationMode;
|
|
80
|
+
failureDescription?: string;
|
|
81
|
+
customer?: Customer;
|
|
82
|
+
paymentMethod?: PaymentMethod;
|
|
83
|
+
latestCharge?: Charge;
|
|
84
|
+
shipping?: BillingAddress;
|
|
29
85
|
}
|
|
30
86
|
/** Error shape when native module rejects (same as FrameErrorShape from errors.ts) */
|
|
31
87
|
export interface FrameError {
|
|
@@ -33,4 +89,43 @@ export interface FrameError {
|
|
|
33
89
|
message: string;
|
|
34
90
|
nativeError?: string;
|
|
35
91
|
}
|
|
92
|
+
/** Capabilities that drive which onboarding steps are shown */
|
|
93
|
+
export type OnboardingCapability = 'kyc' | 'kyc_prefill' | 'phone_verification' | 'creator_shield' | 'card_verification' | 'card_send' | 'card_receive' | 'address_verification' | 'bank_account_verification' | 'bank_account_send' | 'bank_account_receive' | 'geo_compliance' | 'age_verification';
|
|
94
|
+
export type OnboardingResultStatus = 'completed' | 'cancelled';
|
|
95
|
+
/** Result returned from presentOnboarding */
|
|
96
|
+
export interface OnboardingResult {
|
|
97
|
+
status: OnboardingResultStatus;
|
|
98
|
+
/** Present when status === 'completed' and a payment method was created/verified */
|
|
99
|
+
paymentMethodId?: string;
|
|
100
|
+
}
|
|
101
|
+
/** Identifies who the Apple Pay payment method belongs to. */
|
|
102
|
+
export type ApplePayOwner = {
|
|
103
|
+
type: 'customer';
|
|
104
|
+
id: string;
|
|
105
|
+
} | {
|
|
106
|
+
type: 'account';
|
|
107
|
+
id: string;
|
|
108
|
+
};
|
|
109
|
+
/** Options for Frame.presentApplePay. */
|
|
110
|
+
export interface PresentApplePayOptions {
|
|
111
|
+
/** Payment amount in cents. */
|
|
112
|
+
amount: number;
|
|
113
|
+
/** ISO 4217 currency code. Defaults to 'usd'. */
|
|
114
|
+
currency?: string;
|
|
115
|
+
/** Customer or account that owns the resulting payment method. */
|
|
116
|
+
owner: ApplePayOwner;
|
|
117
|
+
/** Apple Pay merchant ID configured in your Apple Developer account. */
|
|
118
|
+
merchantId: string;
|
|
119
|
+
}
|
|
120
|
+
/** Options for Frame.presentGooglePay. */
|
|
121
|
+
export interface PresentGooglePayOptions {
|
|
122
|
+
/** Payment amount in cents. */
|
|
123
|
+
amountCents: number;
|
|
124
|
+
/** Optional Frame customer ID to associate the resulting payment method with. */
|
|
125
|
+
customerId?: string | null;
|
|
126
|
+
/** ISO 4217 currency code. Defaults to 'USD'. */
|
|
127
|
+
currencyCode?: string;
|
|
128
|
+
/** Optional override for the Google Pay merchant ID. */
|
|
129
|
+
googlePayMerchantId?: string;
|
|
130
|
+
}
|
|
36
131
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2CAA2C;AAC3C,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framepayments-react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "React Native SDK for Frame Payments - modal checkout and cart, with API usage via frame-node.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -28,25 +28,19 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/Frame-Payments/frame-react-native#readme",
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"framepayments": "*",
|
|
32
31
|
"react": "*",
|
|
33
|
-
"react-native": ">=0.
|
|
34
|
-
},
|
|
35
|
-
"peerDependenciesMeta": {
|
|
36
|
-
"framepayments": {
|
|
37
|
-
"optional": true
|
|
38
|
-
}
|
|
32
|
+
"react-native": ">=0.74.0"
|
|
39
33
|
},
|
|
40
34
|
"devDependencies": {
|
|
41
35
|
"@types/jest": "^29.5.0",
|
|
42
|
-
"@types/react": "^
|
|
43
|
-
"@types/react-native": "^0.
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
45
|
-
"@typescript-eslint/parser": "^
|
|
36
|
+
"@types/react": "^19.1.1",
|
|
37
|
+
"@types/react-native": "^0.73.0",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^8.59.1",
|
|
39
|
+
"@typescript-eslint/parser": "^8.59.1",
|
|
46
40
|
"eslint": "^8.57.0",
|
|
47
41
|
"jest": "^29.7.0",
|
|
48
|
-
"react": "
|
|
49
|
-
"react-native": "^0.
|
|
42
|
+
"react": "19.1.1",
|
|
43
|
+
"react-native": "^0.82.1",
|
|
50
44
|
"ts-jest": "^29.1.0",
|
|
51
45
|
"typescript": "^5.0.0"
|
|
52
46
|
},
|
|
@@ -62,6 +56,7 @@
|
|
|
62
56
|
"LICENSE"
|
|
63
57
|
],
|
|
64
58
|
"dependencies": {
|
|
65
|
-
"@babel/runtime": "^7.28.6"
|
|
59
|
+
"@babel/runtime": "^7.28.6",
|
|
60
|
+
"framepayments": "^2.0.0"
|
|
66
61
|
}
|
|
67
62
|
}
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* NativeModules.FrameSDK is mocked.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
const mockInitialize = jest.fn((
|
|
6
|
+
const mockInitialize = jest.fn((_secretKey: string, _publishableKey: string, _debugMode: boolean) => Promise.resolve());
|
|
7
7
|
const mockPresentCheckout = jest.fn((_customerId: unknown, _amount: number) => Promise.resolve({ id: 'ci_1', amount: 10000 }));
|
|
8
8
|
const mockPresentCart = jest.fn((_customerId: unknown, _items: unknown[], _shipping: number) => Promise.resolve({ id: 'ci_2', amount: 15000 }));
|
|
9
|
+
const mockPresentOnboarding = jest.fn((_accountId: unknown, _capabilities: unknown[]) => Promise.resolve({ status: 'completed', paymentMethodId: 'pm_1' }));
|
|
9
10
|
|
|
10
11
|
jest.mock('react-native', () => ({
|
|
11
12
|
NativeModules: {
|
|
@@ -13,45 +14,55 @@ jest.mock('react-native', () => ({
|
|
|
13
14
|
initialize: mockInitialize,
|
|
14
15
|
presentCheckout: mockPresentCheckout,
|
|
15
16
|
presentCart: mockPresentCart,
|
|
17
|
+
presentOnboarding: mockPresentOnboarding,
|
|
16
18
|
},
|
|
17
19
|
},
|
|
18
20
|
}));
|
|
19
21
|
|
|
20
22
|
// Re-import after mock so we get the mocked NativeModules
|
|
21
|
-
let initialize: (opts: {
|
|
23
|
+
let initialize: (opts: { secretKey: string; publishableKey: string; debugMode?: boolean }) => Promise<void>;
|
|
22
24
|
let presentCheckout: (opts: { customerId?: string | null; amount: number }) => Promise<unknown>;
|
|
23
25
|
let presentCart: (opts: {
|
|
24
26
|
customerId?: string | null;
|
|
25
27
|
items: Array<{ id: string; title: string; amountInCents: number; imageUrl: string }>;
|
|
26
28
|
shippingAmountInCents: number;
|
|
27
29
|
}) => Promise<unknown>;
|
|
30
|
+
let presentOnboarding: (opts: { accountId?: string | null; capabilities?: string[] }) => Promise<unknown>;
|
|
28
31
|
|
|
29
32
|
beforeEach(() => {
|
|
30
33
|
jest.resetModules();
|
|
31
34
|
mockInitialize.mockClear();
|
|
32
35
|
mockPresentCheckout.mockClear();
|
|
33
36
|
mockPresentCart.mockClear();
|
|
37
|
+
mockPresentOnboarding.mockClear();
|
|
34
38
|
const native = require('../native');
|
|
35
39
|
initialize = native.initialize;
|
|
36
40
|
presentCheckout = native.presentCheckout;
|
|
37
41
|
presentCart = native.presentCart;
|
|
42
|
+
presentOnboarding = native.presentOnboarding;
|
|
38
43
|
});
|
|
39
44
|
|
|
40
45
|
describe('initialize', () => {
|
|
41
|
-
it('calls native FrameSDK.initialize with
|
|
42
|
-
initialize({
|
|
46
|
+
it('calls native FrameSDK.initialize with secretKey, publishableKey, and debugMode', () => {
|
|
47
|
+
initialize({ secretKey: 'sk_test_xxx', publishableKey: 'pk_test_xxx', debugMode: true });
|
|
43
48
|
expect(mockInitialize).toHaveBeenCalledTimes(1);
|
|
44
|
-
expect(mockInitialize).toHaveBeenCalledWith('sk_test_xxx', true);
|
|
49
|
+
expect(mockInitialize).toHaveBeenCalledWith('sk_test_xxx', 'pk_test_xxx', true);
|
|
45
50
|
});
|
|
46
51
|
|
|
47
52
|
it('defaults debugMode to false', () => {
|
|
48
|
-
initialize({
|
|
49
|
-
expect(mockInitialize).toHaveBeenCalledWith('sk_test_yyy', false);
|
|
53
|
+
initialize({ secretKey: 'sk_test_yyy', publishableKey: 'pk_test_yyy' });
|
|
54
|
+
expect(mockInitialize).toHaveBeenCalledWith('sk_test_yyy', 'pk_test_yyy', false);
|
|
50
55
|
});
|
|
51
56
|
|
|
52
|
-
it('throws if
|
|
53
|
-
expect(() => initialize({
|
|
54
|
-
expect(() => (initialize as any)({})).toThrow();
|
|
57
|
+
it('throws if secretKey is missing', () => {
|
|
58
|
+
expect(() => initialize({ secretKey: '', publishableKey: 'pk_test' })).toThrow(/secretKey/);
|
|
59
|
+
expect(() => (initialize as any)({ publishableKey: 'pk_test' })).toThrow(/secretKey/);
|
|
60
|
+
expect(mockInitialize).not.toHaveBeenCalled();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('throws if publishableKey is missing', () => {
|
|
64
|
+
expect(() => initialize({ secretKey: 'sk_test', publishableKey: '' })).toThrow(/publishableKey/);
|
|
65
|
+
expect(() => (initialize as any)({ secretKey: 'sk_test' })).toThrow(/publishableKey/);
|
|
55
66
|
expect(mockInitialize).not.toHaveBeenCalled();
|
|
56
67
|
});
|
|
57
68
|
});
|
|
@@ -69,14 +80,14 @@ describe('presentCheckout', () => {
|
|
|
69
80
|
});
|
|
70
81
|
|
|
71
82
|
it('calls native presentCheckout with customerId and amount after initialize', async () => {
|
|
72
|
-
initialize({
|
|
83
|
+
await initialize({ secretKey: 'sk_xxx', publishableKey: 'pk_xxx' });
|
|
73
84
|
const result = await presentCheckout({ customerId: 'cus_1', amount: 10000 });
|
|
74
85
|
expect(mockPresentCheckout).toHaveBeenCalledWith('cus_1', 10000);
|
|
75
86
|
expect(result).toEqual({ id: 'ci_1', amount: 10000 });
|
|
76
87
|
});
|
|
77
88
|
|
|
78
89
|
it('passes null for customerId when not provided', async () => {
|
|
79
|
-
initialize({
|
|
90
|
+
await initialize({ secretKey: 'sk_xxx', publishableKey: 'pk_xxx' });
|
|
80
91
|
await presentCheckout({ amount: 5000 });
|
|
81
92
|
expect(mockPresentCheckout).toHaveBeenCalledWith(null, 5000);
|
|
82
93
|
});
|
|
@@ -98,7 +109,7 @@ describe('presentCart', () => {
|
|
|
98
109
|
});
|
|
99
110
|
|
|
100
111
|
it('calls native presentCart with customerId, items, shipping after initialize', async () => {
|
|
101
|
-
initialize({
|
|
112
|
+
await initialize({ secretKey: 'sk_xxx', publishableKey: 'pk_xxx' });
|
|
102
113
|
const result = await presentCart({
|
|
103
114
|
customerId: 'cus_2',
|
|
104
115
|
items,
|
|
@@ -109,8 +120,34 @@ describe('presentCart', () => {
|
|
|
109
120
|
});
|
|
110
121
|
|
|
111
122
|
it('passes null for customerId when not provided', async () => {
|
|
112
|
-
initialize({
|
|
123
|
+
await initialize({ secretKey: 'sk_xxx', publishableKey: 'pk_xxx' });
|
|
113
124
|
await presentCart({ items, shippingAmountInCents: 0 });
|
|
114
125
|
expect(mockPresentCart).toHaveBeenCalledWith(null, items, 0);
|
|
115
126
|
});
|
|
116
127
|
});
|
|
128
|
+
|
|
129
|
+
describe('presentOnboarding', () => {
|
|
130
|
+
it('throws NOT_INITIALIZED if initialize was not called', async () => {
|
|
131
|
+
try {
|
|
132
|
+
await presentOnboarding({});
|
|
133
|
+
expect(true).toBe(false);
|
|
134
|
+
} catch (e: any) {
|
|
135
|
+
expect(e.code).toBe('NOT_INITIALIZED');
|
|
136
|
+
expect(e.message).toContain('initialized');
|
|
137
|
+
}
|
|
138
|
+
expect(mockPresentOnboarding).not.toHaveBeenCalled();
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('calls native presentOnboarding with accountId and capabilities after initialize', async () => {
|
|
142
|
+
await initialize({ secretKey: 'sk_xxx', publishableKey: 'pk_xxx' });
|
|
143
|
+
const result = await presentOnboarding({ accountId: 'acct_1', capabilities: ['kyc', 'bank_account_verification'] });
|
|
144
|
+
expect(mockPresentOnboarding).toHaveBeenCalledWith('acct_1', ['kyc', 'bank_account_verification']);
|
|
145
|
+
expect(result).toEqual({ status: 'completed', paymentMethodId: 'pm_1' });
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
it('passes null for accountId and empty array for capabilities when not provided', async () => {
|
|
149
|
+
await initialize({ secretKey: 'sk_xxx', publishableKey: 'pk_xxx' });
|
|
150
|
+
await presentOnboarding({});
|
|
151
|
+
expect(mockPresentOnboarding).toHaveBeenCalledWith(null, []);
|
|
152
|
+
});
|
|
153
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -3,15 +3,54 @@
|
|
|
3
3
|
*
|
|
4
4
|
* React Native SDK for Frame Payments.
|
|
5
5
|
* - Initialize the SDK, then use presentCheckout / presentCart for payment UI.
|
|
6
|
+
* - Use presentOnboarding for KYC, identity verification, and payment method onboarding flows.
|
|
7
|
+
* - Use presentApplePay / presentGooglePay to launch the platform wallet sheet from your own button UI.
|
|
6
8
|
* - For API calls (customers, charge intents, refunds), use the framepayments (frame-node) package from JS.
|
|
7
9
|
*/
|
|
8
10
|
|
|
9
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
initialize,
|
|
13
|
+
presentCheckout,
|
|
14
|
+
presentCart,
|
|
15
|
+
presentOnboarding,
|
|
16
|
+
presentApplePay,
|
|
17
|
+
presentGooglePay,
|
|
18
|
+
} from './native';
|
|
10
19
|
|
|
11
|
-
export {
|
|
12
|
-
|
|
20
|
+
export {
|
|
21
|
+
initialize,
|
|
22
|
+
presentCheckout,
|
|
23
|
+
presentCart,
|
|
24
|
+
presentOnboarding,
|
|
25
|
+
presentApplePay,
|
|
26
|
+
presentGooglePay,
|
|
27
|
+
} from './native';
|
|
28
|
+
export type {
|
|
29
|
+
FrameCartItem,
|
|
30
|
+
ChargeIntent,
|
|
31
|
+
ChargeIntentStatus,
|
|
32
|
+
AuthorizationMode,
|
|
33
|
+
FrameError,
|
|
34
|
+
BillingAddress,
|
|
35
|
+
PaymentCard,
|
|
36
|
+
BankAccount,
|
|
37
|
+
PaymentMethod,
|
|
38
|
+
OnboardingCapability,
|
|
39
|
+
OnboardingResult,
|
|
40
|
+
OnboardingResultStatus,
|
|
41
|
+
ApplePayOwner,
|
|
42
|
+
PresentApplePayOptions,
|
|
43
|
+
PresentGooglePayOptions,
|
|
44
|
+
} from './types';
|
|
13
45
|
export { ErrorCodes } from './errors';
|
|
14
46
|
export type { FrameErrorShape, FrameErrorCode } from './errors';
|
|
15
47
|
|
|
16
|
-
/** Default export for Frame.initialize(), Frame.presentCheckout(),
|
|
17
|
-
export default {
|
|
48
|
+
/** Default export for Frame.initialize(), Frame.presentCheckout(), Frame.presentCart(), Frame.presentOnboarding(), Frame.presentApplePay(), Frame.presentGooglePay() */
|
|
49
|
+
export default {
|
|
50
|
+
initialize,
|
|
51
|
+
presentCheckout,
|
|
52
|
+
presentCart,
|
|
53
|
+
presentOnboarding,
|
|
54
|
+
presentApplePay,
|
|
55
|
+
presentGooglePay,
|
|
56
|
+
};
|