@stripe/stripe-react-native 0.6.0 → 0.7.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 +43 -0
- package/README.md +1 -1
- package/android/build/.transforms/{31ceac6fb5d33b3621129bf6bacef38e → 391dacf2d8747d5d964db20fd2dd8815}/results.bin +0 -0
- package/android/build/.transforms/391dacf2d8747d5d964db20fd2dd8815/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/{48791259e8e16eb93ec0e1ee5c2320d3 → 465a3f28c318295b6d1e745a1358f0e6}/results.bin +0 -0
- package/android/build/.transforms/465a3f28c318295b6d1e745a1358f0e6/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/{74570cf3214a596c51ea9185f02b2c7f → 538f1369a832b015f982db8e9f3e63d4}/results.bin +0 -0
- package/android/build/.transforms/538f1369a832b015f982db8e9f3e63d4/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/{82928fc3901d2ce5cedef114e23b9dd5 → 5821b0d6d2e0908c8ed0cd6c2f4e6587}/results.bin +0 -0
- package/android/build/.transforms/5821b0d6d2e0908c8ed0cd6c2f4e6587/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/{9338bfb74c726e5746db5e10b980917a → 60446a8b59a82b3ae8bcd81aa8d01afc}/results.bin +0 -0
- package/android/build/.transforms/60446a8b59a82b3ae8bcd81aa8d01afc/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/{c731e6bf5b480f659bf1c341f3f0657c → 87295b99343bf0db705fbc154493ffa4}/results.bin +0 -0
- package/android/build/.transforms/87295b99343bf0db705fbc154493ffa4/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/{d436978a4beecbc35d07543a01fe4a5c → ae18a466edb55818daf7c30291ff4843}/results.bin +0 -0
- package/android/build/.transforms/ae18a466edb55818daf7c30291ff4843/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/d42db6dbe74ca8dbcb5922d32e8646c4/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/e9a96dae20bdea4f5ebd602fc83f5f77/results.bin +1 -0
- package/android/build/.transforms/e9a96dae20bdea4f5ebd602fc83f5f77/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/f183966fd9230baa4d89c2c4e2fcb664/results.bin +1 -0
- package/android/build/.transforms/f183966fd9230baa4d89c2c4e2fcb664/transformed/classes/classes.dex +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_library_classes_jar/release/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/release/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/R.txt +108 -20
- package/android/build/intermediates/compile_symbol_list/release/R.txt +108 -20
- package/android/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +1 -1
- package/android/build/intermediates/incremental/packageReleaseResources/compile-file-map.properties +1 -1
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/release/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +78 -20
- package/android/build/intermediates/symbol_list_with_package_name/release/package-aware-r.txt +78 -20
- package/android/build/kotlin/compileDebugKotlin/build-history.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/counters.tab +2 -2
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.s +1 -1
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/last-build.bin +0 -0
- package/android/build/kotlin/compileReleaseKotlin/build-history.bin +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/counters.tab +1 -1
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.values +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.values.s +1 -1
- package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileReleaseKotlin/last-build.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/AuBECSDebitFormViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldView$setListeners$10.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldView$setListeners$6.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/{CardFieldView$setListeners$3.class → CardFieldView$setListeners$7.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/{CardFieldView$setListeners$4.class → CardFieldView$setListeners$8.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/{CardFieldView$setListeners$5.class → CardFieldView$setListeners$9.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFormViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CollectBankAccountLauncherFragment$createBankAccountLauncher$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CollectBankAccountLauncherFragment.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ConfirmPaymentErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ConfirmSetupIntentErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ConstantsKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CreateTokenErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ErrorsKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayButtonManager$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayButtonManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayFragment.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/MappersKt$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/MappersKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment$retrievePaymentIntent$1$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment$retrievePaymentIntent$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment$retrieveSetupIntent$1$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment$retrieveSetupIntent$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentMethodCreateParamsException.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentMethodCreateParamsFactory$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeContainerManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$createPaymentMethod$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$createTokenForCVCUpdate$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$createTokenFromBankAccount$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$createTokenFromCard$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$googlePayReceiver$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$mPaymentSheetReceiver$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$retrievePaymentIntent$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$retrieveSetupIntent$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$verifyMicrodeposits$paymentCallback$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$verifyMicrodeposits$setupCallback$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/AuBECSDebitFormViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldView$setListeners$10.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldView$setListeners$6.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/{CardFieldView$setListeners$3.class → CardFieldView$setListeners$7.class} +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/{CardFieldView$setListeners$4.class → CardFieldView$setListeners$8.class} +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/{CardFieldView$setListeners$5.class → CardFieldView$setListeners$9.class} +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldView.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFormViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CollectBankAccountLauncherFragment$createBankAccountLauncher$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CollectBankAccountLauncherFragment.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ConfirmPaymentErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ConfirmSetupIntentErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ConstantsKt.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CreateTokenErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ErrorsKt.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/GooglePayButtonManager$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/GooglePayButtonManager.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/GooglePayFragment.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/MappersKt$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/MappersKt.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$retrievePaymentIntent$1$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$retrievePaymentIntent$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$retrieveSetupIntent$1$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$retrieveSetupIntent$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentMethodCreateParamsException.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentMethodCreateParamsFactory$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeContainerManager.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$createPaymentMethod$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$createTokenForCVCUpdate$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$createTokenFromBankAccount$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$createTokenFromCard$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$googlePayReceiver$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$mPaymentSheetReceiver$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$retrievePaymentIntent$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$retrieveSetupIntent$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$verifyMicrodeposits$paymentCallback$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$verifyMicrodeposits$setupCallback$1.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule.class +0 -0
- package/android/build.gradle +4 -2
- package/android/gradle.properties +1 -0
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +0 -2
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +48 -34
- package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +0 -5
- package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +0 -4
- package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +84 -0
- package/android/src/main/java/com/reactnativestripesdk/Constants.kt +0 -1
- package/android/src/main/java/com/reactnativestripesdk/Errors.kt +16 -6
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +0 -1
- package/android/src/main/java/com/reactnativestripesdk/GooglePayFragment.kt +0 -3
- package/android/src/main/java/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.kt +3 -2
- package/android/src/main/java/com/reactnativestripesdk/Mappers.kt +77 -40
- package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +77 -22
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +81 -5
- package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +0 -1
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +199 -113
- package/ios/.DS_Store +0 -0
- package/ios/Mappers.swift +23 -18
- package/ios/StripeSdk.m +2 -2
- package/ios/StripeSdk.swift +16 -26
- package/lib/commonjs/NativeStripeSdk.js.map +1 -1
- package/lib/commonjs/components/ApplePayButton.js.map +1 -1
- package/lib/commonjs/components/CardField.js.map +1 -1
- package/lib/commonjs/components/CardForm.js.map +1 -1
- package/lib/commonjs/components/StripeProvider.js +1 -1
- package/lib/commonjs/components/StripeProvider.js.map +1 -1
- package/lib/commonjs/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/helpers.js.map +1 -1
- package/lib/commonjs/hooks/useConfirmPayment.js.map +1 -1
- package/lib/commonjs/hooks/useConfirmSetupIntent.js.map +1 -1
- package/lib/commonjs/hooks/useGooglePay.js.map +1 -1
- package/lib/commonjs/hooks/useStripe.js +1 -1
- package/lib/commonjs/hooks/useStripe.js.map +1 -1
- package/lib/commonjs/types/ApplePay.js +1 -1
- package/lib/commonjs/types/ApplePay.js.map +1 -1
- package/lib/commonjs/types/Common.js +2 -0
- package/lib/commonjs/types/Common.js.map +1 -0
- package/lib/commonjs/types/Errors.js +1 -1
- package/lib/commonjs/types/Errors.js.map +1 -1
- package/lib/commonjs/types/GooglePay.js +1 -1
- package/lib/commonjs/types/GooglePay.js.map +1 -1
- package/lib/commonjs/types/PaymentIntent.js +2 -0
- package/lib/commonjs/types/PaymentIntent.js.map +1 -0
- package/lib/commonjs/types/PaymentMethod.js +2 -0
- package/lib/commonjs/types/PaymentMethod.js.map +1 -0
- package/lib/commonjs/types/PaymentSheet.js +1 -1
- package/lib/commonjs/types/SetupIntent.js +1 -1
- package/lib/commonjs/types/SetupIntent.js.map +1 -1
- package/lib/commonjs/types/ThreeDSecure.js +1 -1
- package/lib/commonjs/types/ThreeDSecure.js.map +1 -1
- package/lib/commonjs/types/Token.js +2 -0
- package/lib/commonjs/types/Token.js.map +1 -0
- package/lib/commonjs/types/components/ApplePayButtonComponent.js +1 -1
- package/lib/commonjs/types/components/ApplePayButtonComponent.js.map +1 -1
- package/lib/commonjs/types/components/AuBECSDebitFormComponent.js +2 -0
- package/lib/commonjs/types/components/AuBECSDebitFormComponent.js.map +1 -0
- package/lib/commonjs/types/components/CardFieldInput.js +1 -1
- package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
- package/lib/commonjs/types/components/CardFormView.js +1 -1
- package/lib/commonjs/types/components/CardFormView.js.map +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/NativeStripeSdk.js.map +1 -1
- package/lib/module/components/ApplePayButton.js.map +1 -1
- package/lib/module/components/CardField.js.map +1 -1
- package/lib/module/components/CardForm.js.map +1 -1
- package/lib/module/components/StripeProvider.js +1 -1
- package/lib/module/components/StripeProvider.js.map +1 -1
- package/lib/module/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/helpers.js.map +1 -1
- package/lib/module/hooks/useConfirmPayment.js.map +1 -1
- package/lib/module/hooks/useConfirmSetupIntent.js.map +1 -1
- package/lib/module/hooks/useGooglePay.js.map +1 -1
- package/lib/module/hooks/useStripe.js +1 -1
- package/lib/module/hooks/useStripe.js.map +1 -1
- package/lib/module/types/ApplePay.js +1 -1
- package/lib/module/types/ApplePay.js.map +1 -1
- package/lib/module/types/Common.js +2 -0
- package/lib/module/types/Common.js.map +1 -0
- package/lib/module/types/Errors.js +1 -1
- package/lib/module/types/Errors.js.map +1 -1
- package/lib/module/types/GooglePay.js +1 -1
- package/lib/module/types/GooglePay.js.map +1 -1
- package/lib/module/types/PaymentIntent.js +2 -0
- package/lib/module/types/PaymentIntent.js.map +1 -0
- package/lib/module/types/PaymentMethod.js +2 -0
- package/lib/module/types/PaymentMethod.js.map +1 -0
- package/lib/module/types/PaymentSheet.js +1 -1
- package/lib/module/types/SetupIntent.js +1 -1
- package/lib/module/types/SetupIntent.js.map +1 -1
- package/lib/module/types/ThreeDSecure.js +1 -1
- package/lib/module/types/ThreeDSecure.js.map +1 -1
- package/lib/module/types/Token.js +2 -0
- package/lib/module/types/Token.js.map +1 -0
- package/lib/module/types/components/ApplePayButtonComponent.js +1 -1
- package/lib/module/types/components/ApplePayButtonComponent.js.map +1 -1
- package/lib/module/types/components/AuBECSDebitFormComponent.js +2 -0
- package/lib/module/types/components/AuBECSDebitFormComponent.js.map +1 -0
- package/lib/module/types/components/CardFieldInput.js +1 -1
- package/lib/module/types/components/CardFieldInput.js.map +1 -1
- package/lib/module/types/components/CardFormView.js +1 -1
- package/lib/module/types/components/CardFormView.js.map +1 -1
- package/lib/module/types/index.js +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/typescript/src/NativeStripeSdk.d.ts +9 -9
- package/lib/typescript/src/components/ApplePayButton.d.ts +2 -2
- package/lib/typescript/src/components/CardField.d.ts +2 -2
- package/lib/typescript/src/components/StripeProvider.d.ts +1 -1
- package/lib/typescript/src/functions.d.ts +11 -15
- package/lib/typescript/src/helpers.d.ts +2 -1
- package/lib/typescript/src/hooks/useConfirmPayment.d.ts +2 -2
- package/lib/typescript/src/hooks/useConfirmSetupIntent.d.ts +2 -2
- package/lib/typescript/src/hooks/useGooglePay.d.ts +2 -2
- package/lib/typescript/src/hooks/useStripe.d.ts +11 -12
- package/lib/typescript/src/types/ApplePay.d.ts +48 -50
- package/lib/typescript/src/types/Common.d.ts +14 -0
- package/lib/typescript/src/types/Errors.d.ts +10 -0
- package/lib/typescript/src/types/GooglePay.d.ts +45 -50
- package/lib/typescript/src/types/PaymentIntent.d.ts +46 -0
- package/lib/typescript/src/types/PaymentMethod.d.ts +167 -0
- package/lib/typescript/src/types/PaymentSheet.d.ts +41 -55
- package/lib/typescript/src/types/SetupIntent.d.ts +22 -56
- package/lib/typescript/src/types/ThreeDSecure.d.ts +62 -68
- package/lib/typescript/src/types/Token.d.ts +50 -0
- package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts +8 -10
- package/{src/types/components/AuBECSDebitForm.ts → lib/typescript/src/types/components/AuBECSDebitFormComponent.d.ts} +8 -13
- package/lib/typescript/src/types/components/CardFieldInput.d.ts +62 -65
- package/lib/typescript/src/types/components/CardFormView.d.ts +41 -44
- package/lib/typescript/src/types/index.d.ts +53 -61
- package/package.json +7 -3
- package/src/NativeStripeSdk.tsx +15 -18
- package/src/components/ApplePayButton.tsx +4 -4
- package/src/components/CardField.tsx +2 -2
- package/src/components/CardForm.tsx +1 -1
- package/src/components/StripeProvider.tsx +1 -4
- package/src/functions.ts +75 -136
- package/src/helpers.ts +3 -2
- package/src/hooks/useConfirmPayment.tsx +3 -3
- package/src/hooks/useConfirmSetupIntent.tsx +3 -3
- package/src/hooks/useGooglePay.tsx +2 -2
- package/src/hooks/useStripe.tsx +22 -20
- package/src/types/ApplePay.ts +60 -62
- package/src/types/Common.ts +15 -0
- package/src/types/Errors.ts +12 -0
- package/src/types/GooglePay.ts +67 -73
- package/src/types/PaymentIntent.ts +53 -0
- package/src/types/PaymentMethod.ts +242 -0
- package/src/types/PaymentSheet.ts +49 -63
- package/src/types/SetupIntent.ts +30 -82
- package/src/types/ThreeDSecure.ts +63 -69
- package/src/types/Token.ts +74 -0
- package/src/types/components/ApplePayButtonComponent.ts +25 -27
- package/src/types/components/AuBECSDebitFormComponent.ts +29 -0
- package/src/types/components/CardFieldInput.ts +65 -67
- package/src/types/components/CardFormView.ts +48 -51
- package/src/types/index.ts +78 -71
- package/android/build/.transforms/06225d218c14d1720edd690e5aad3666/results.bin +0 -0
- package/android/build/.transforms/31ceac6fb5d33b3621129bf6bacef38e/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/48791259e8e16eb93ec0e1ee5c2320d3/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/74570cf3214a596c51ea9185f02b2c7f/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/82928fc3901d2ce5cedef114e23b9dd5/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/9338bfb74c726e5746db5e10b980917a/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/c731e6bf5b480f659bf1c341f3f0657c/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/d436978a4beecbc35d07543a01fe4a5c/transformed/classes/classes.dex +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.s +0 -1
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.s +0 -1
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldView$setListeners$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/NextPaymentActionErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$2$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$2.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldView$setListeners$2.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/NextPaymentActionErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$2$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$2.class +0 -0
- package/lib/commonjs/types/Card.js +0 -2
- package/lib/commonjs/types/Card.js.map +0 -1
- package/lib/commonjs/types/PaymentIntents.js +0 -2
- package/lib/commonjs/types/PaymentIntents.js.map +0 -1
- package/lib/commonjs/types/PaymentMethods.js +0 -2
- package/lib/commonjs/types/PaymentMethods.js.map +0 -1
- package/lib/commonjs/types/components/AuBECSDebitForm.js +0 -2
- package/lib/commonjs/types/components/AuBECSDebitForm.js.map +0 -1
- package/lib/module/types/Card.js +0 -2
- package/lib/module/types/Card.js.map +0 -1
- package/lib/module/types/PaymentIntents.js +0 -2
- package/lib/module/types/PaymentIntents.js.map +0 -1
- package/lib/module/types/PaymentMethods.js +0 -2
- package/lib/module/types/PaymentMethods.js.map +0 -1
- package/lib/module/types/components/AuBECSDebitForm.js +0 -2
- package/lib/module/types/components/AuBECSDebitForm.js.map +0 -1
- package/lib/typescript/src/types/Card.d.ts +0 -42
- package/lib/typescript/src/types/PaymentIntents.d.ts +0 -52
- package/lib/typescript/src/types/PaymentMethods.d.ts +0 -193
- package/lib/typescript/src/types/components/AuBECSDebitForm.d.ts +0 -28
- package/src/types/Card.ts +0 -61
- package/src/types/PaymentIntents.ts +0 -58
- package/src/types/PaymentMethods.ts +0 -264
package/ios/Mappers.swift
CHANGED
|
@@ -495,16 +495,18 @@ class Mappers {
|
|
|
495
495
|
billing.phone = RCTConvert.nsString(billingDetails["phone"])
|
|
496
496
|
billing.name = RCTConvert.nsString(billingDetails["name"])
|
|
497
497
|
|
|
498
|
-
let
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
498
|
+
let address = STPPaymentMethodAddress()
|
|
499
|
+
|
|
500
|
+
if let addressMap = billingDetails["address"] as? NSDictionary {
|
|
501
|
+
address.city = RCTConvert.nsString(addressMap["city"])
|
|
502
|
+
address.postalCode = RCTConvert.nsString(addressMap["postalCode"])
|
|
503
|
+
address.country = RCTConvert.nsString(addressMap["country"])
|
|
504
|
+
address.line1 = RCTConvert.nsString(addressMap["line1"])
|
|
505
|
+
address.line2 = RCTConvert.nsString(addressMap["line2"])
|
|
506
|
+
address.state = RCTConvert.nsString(addressMap["state"])
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
billing.address = address
|
|
508
510
|
|
|
509
511
|
return billing
|
|
510
512
|
}
|
|
@@ -513,15 +515,18 @@ class Mappers {
|
|
|
513
515
|
guard let shippingDetails = shippingDetails else {
|
|
514
516
|
return nil
|
|
515
517
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
shippingAddress.city = shippingDetails["addressCity"] as? String
|
|
519
|
-
shippingAddress.postalCode = shippingDetails["addressPostalCode"] as? String
|
|
520
|
-
shippingAddress.country = shippingDetails["addressCountry"] as? String
|
|
521
|
-
shippingAddress.line1 = shippingDetails["addressLine1"] as? String ?? ""
|
|
522
|
-
shippingAddress.line2 = shippingDetails["addressLine2"] as? String
|
|
523
|
-
shippingAddress.state = shippingDetails["addressState"] as? String
|
|
518
|
+
|
|
519
|
+
let shippingAddress = STPPaymentIntentShippingDetailsAddressParams(line1: "")
|
|
524
520
|
|
|
521
|
+
if let addressMap = shippingDetails["address"] as? NSDictionary {
|
|
522
|
+
shippingAddress.city = addressMap["city"] as? String
|
|
523
|
+
shippingAddress.postalCode = addressMap["postalCode"] as? String
|
|
524
|
+
shippingAddress.country = addressMap["country"] as? String
|
|
525
|
+
shippingAddress.line1 = addressMap["line1"] as? String ?? ""
|
|
526
|
+
shippingAddress.line2 = addressMap["line2"] as? String
|
|
527
|
+
shippingAddress.state = addressMap["state"] as? String
|
|
528
|
+
}
|
|
529
|
+
|
|
525
530
|
let shipping = STPPaymentIntentShippingDetailsParams(address: shippingAddress, name: shippingDetails["name"] as? String ?? "")
|
|
526
531
|
|
|
527
532
|
return shipping
|
package/ios/StripeSdk.m
CHANGED
|
@@ -108,14 +108,14 @@ RCT_EXTERN_METHOD(
|
|
|
108
108
|
)
|
|
109
109
|
|
|
110
110
|
RCT_EXTERN_METHOD(
|
|
111
|
-
verifyMicrodeposits:(
|
|
111
|
+
verifyMicrodeposits:(BOOL)isPaymentIntent
|
|
112
112
|
clientSecret:(NSString *)clientSecret
|
|
113
113
|
params:(NSDictionary *)params
|
|
114
114
|
resolver: (RCTPromiseResolveBlock)resolve
|
|
115
115
|
rejecter: (RCTPromiseRejectBlock)reject
|
|
116
116
|
)
|
|
117
117
|
RCT_EXTERN_METHOD(
|
|
118
|
-
collectBankAccount:(
|
|
118
|
+
collectBankAccount:(BOOL)isPaymentIntent
|
|
119
119
|
clientSecret:(NSString *)clientSecret
|
|
120
120
|
params:(NSDictionary *)params
|
|
121
121
|
resolver: (RCTPromiseResolveBlock)resolve
|
package/ios/StripeSdk.swift
CHANGED
|
@@ -677,25 +677,25 @@ class StripeSdk: RCTEventEmitter, STPApplePayContextDelegate, STPBankSelectionVi
|
|
|
677
677
|
|
|
678
678
|
@objc(collectBankAccount:clientSecret:params:resolver:rejecter:)
|
|
679
679
|
func collectBankAccount(
|
|
680
|
-
|
|
680
|
+
isPaymentIntent: Bool,
|
|
681
681
|
clientSecret: NSString,
|
|
682
682
|
params: NSDictionary,
|
|
683
683
|
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
684
684
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
685
685
|
) -> Void {
|
|
686
686
|
let type = Mappers.mapToPaymentMethodType(type: params["type"] as? String)
|
|
687
|
-
if (type
|
|
687
|
+
if (type != STPPaymentMethodType.USBankAccount) {
|
|
688
688
|
resolve(Errors.createError(ErrorType.Failed, "collectBankAccount currently only accepts the USBankAccount payment method type."))
|
|
689
689
|
return
|
|
690
690
|
}
|
|
691
691
|
|
|
692
692
|
guard let billingDetails = params["billingDetails"] as? [String: Any?], let name = billingDetails["name"] as? String else {
|
|
693
|
-
resolve(Errors.createError(ErrorType.
|
|
693
|
+
resolve(Errors.createError(ErrorType.Failed, "You must provide a name when collecting US bank account details."))
|
|
694
694
|
return
|
|
695
695
|
}
|
|
696
696
|
|
|
697
697
|
if (name.isEmpty) {
|
|
698
|
-
resolve(Errors.createError(ErrorType.
|
|
698
|
+
resolve(Errors.createError(ErrorType.Failed, "You must provide a name when collecting US bank account details."))
|
|
699
699
|
return
|
|
700
700
|
}
|
|
701
701
|
|
|
@@ -704,8 +704,7 @@ class StripeSdk: RCTEventEmitter, STPApplePayContextDelegate, STPBankSelectionVi
|
|
|
704
704
|
email: billingDetails["email"] as? String
|
|
705
705
|
)
|
|
706
706
|
|
|
707
|
-
|
|
708
|
-
case "payment":
|
|
707
|
+
if (isPaymentIntent) {
|
|
709
708
|
DispatchQueue.main.async {
|
|
710
709
|
STPBankAccountCollector().collectBankAccountForPayment(
|
|
711
710
|
clientSecret: clientSecret as String,
|
|
@@ -729,7 +728,7 @@ class StripeSdk: RCTEventEmitter, STPApplePayContextDelegate, STPBankSelectionVi
|
|
|
729
728
|
}
|
|
730
729
|
}
|
|
731
730
|
}
|
|
732
|
-
|
|
731
|
+
} else {
|
|
733
732
|
DispatchQueue.main.async {
|
|
734
733
|
STPBankAccountCollector().collectBankAccountForSetup(
|
|
735
734
|
clientSecret: clientSecret as String,
|
|
@@ -753,10 +752,7 @@ class StripeSdk: RCTEventEmitter, STPApplePayContextDelegate, STPBankSelectionVi
|
|
|
753
752
|
}
|
|
754
753
|
}
|
|
755
754
|
}
|
|
756
|
-
default:
|
|
757
|
-
resolve(Errors.createError(ErrorType.Failed, "Received unexpected intent type: " + intentType))
|
|
758
755
|
}
|
|
759
|
-
|
|
760
756
|
}
|
|
761
757
|
|
|
762
758
|
@objc(confirmPayment:data:options:resolver:rejecter:)
|
|
@@ -888,8 +884,8 @@ class StripeSdk: RCTEventEmitter, STPApplePayContextDelegate, STPBankSelectionVi
|
|
|
888
884
|
|
|
889
885
|
@objc(verifyMicrodeposits:clientSecret:params:resolver:rejecter:)
|
|
890
886
|
func verifyMicrodeposits(
|
|
891
|
-
|
|
892
|
-
clientSecret:
|
|
887
|
+
isPaymentIntent: Bool,
|
|
888
|
+
clientSecret: NSString,
|
|
893
889
|
params: NSDictionary,
|
|
894
890
|
resolver resolve: @escaping RCTPromiseResolveBlock,
|
|
895
891
|
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
@@ -907,40 +903,34 @@ class StripeSdk: RCTEventEmitter, STPApplePayContextDelegate, STPBankSelectionVi
|
|
|
907
903
|
resolve(Errors.createError(ErrorType.Failed, "Expected 2 integers in the amounts array, but received " + String(amounts.count)))
|
|
908
904
|
return
|
|
909
905
|
}
|
|
910
|
-
|
|
911
|
-
case "payment":
|
|
906
|
+
if (isPaymentIntent) {
|
|
912
907
|
STPAPIClient.shared.verifyPaymentIntentWithMicrodeposits(
|
|
913
|
-
clientSecret: clientSecret,
|
|
908
|
+
clientSecret: clientSecret as String,
|
|
914
909
|
firstAmount: amounts[0] as! Int,
|
|
915
910
|
secondAmount: amounts[1] as! Int,
|
|
916
911
|
completion: onCompletePaymentVerification
|
|
917
912
|
)
|
|
918
|
-
|
|
913
|
+
} else {
|
|
919
914
|
STPAPIClient.shared.verifySetupIntentWithMicrodeposits(
|
|
920
|
-
clientSecret: clientSecret,
|
|
915
|
+
clientSecret: clientSecret as String,
|
|
921
916
|
firstAmount: amounts[0] as! Int,
|
|
922
917
|
secondAmount: amounts[1] as! Int,
|
|
923
918
|
completion: onCompleteSetupVerification
|
|
924
919
|
)
|
|
925
|
-
default:
|
|
926
|
-
resolve(Errors.createError(ErrorType.Failed, "Received unexpected intent type: " + intentType))
|
|
927
920
|
}
|
|
928
921
|
} else if let descriptorCode = descriptorCode {
|
|
929
|
-
|
|
930
|
-
case "payment":
|
|
922
|
+
if (isPaymentIntent) {
|
|
931
923
|
STPAPIClient.shared.verifyPaymentIntentWithMicrodeposits(
|
|
932
|
-
clientSecret: clientSecret,
|
|
924
|
+
clientSecret: clientSecret as String,
|
|
933
925
|
descriptorCode: descriptorCode,
|
|
934
926
|
completion: onCompletePaymentVerification
|
|
935
927
|
)
|
|
936
|
-
|
|
928
|
+
} else {
|
|
937
929
|
STPAPIClient.shared.verifySetupIntentWithMicrodeposits(
|
|
938
|
-
clientSecret: clientSecret,
|
|
930
|
+
clientSecret: clientSecret as String,
|
|
939
931
|
descriptorCode: descriptorCode,
|
|
940
932
|
completion: onCompleteSetupVerification
|
|
941
933
|
)
|
|
942
|
-
default:
|
|
943
|
-
resolve(Errors.createError(ErrorType.Failed, "Received unexpected intent type: " + intentType))
|
|
944
934
|
}
|
|
945
935
|
}
|
|
946
936
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["NativeStripeSdk.tsx"],"names":["StripeSdk","NativeModules"],"mappings":"gFAAA,
|
|
1
|
+
{"version":3,"sources":["NativeStripeSdk.tsx"],"names":["StripeSdk","NativeModules"],"mappings":"gFAAA,yCA0FA,GAAQA,CAAAA,SAAR,CAAsBC,0BAAtB,CAAQD,SAAR,C,aAEeA,S","sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n ApplePay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n ApplePayResult,\n CreateTokenResult,\n GooglePayInitResult,\n PayWithGooglePayResult,\n CreateGooglePayPaymentMethodResult,\n GooglePay,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string\n ): Promise<HandleNextActionResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params: PaymentMethod.ConfirmParams,\n options: PaymentMethod.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n isApplePaySupported(): Promise<boolean>;\n presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;\n confirmApplePayPayment(clientSecret: string): Promise<void>;\n updateApplePaySummaryItems(\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ): Promise<void>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n presentPaymentSheet(): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n isGooglePaySupported(params: GooglePay.IsSupportedParams): Promise<boolean>;\n initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;\n presentGooglePay(\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult>;\n createGooglePayPaymentMethod(\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ApplePayButton.tsx"],"names":["ApplePayButtonNative","ApplePayButton","onPress","buttonStyle","type","borderRadius","props","buttonType","mapButtonType","style","mapButtonStyle"],"mappings":"kXACA,qDACA,yC,6pCAOA,GAAMA,CAAAA,oBAAoB,CACxB,wCAA4D,gBAA5D,CADF,CAgCO,QAASC,CAAAA,cAAT,MAMG,IALRC,CAAAA,OAKQ,MALRA,OAKQ,uBAJRC,WAIQ,CAJRA,WAIQ,2BAJM,OAIN,iCAHRC,IAGQ,CAHRA,IAGQ,oBAHD,OAGC,kCAFRC,YAEQ,CAFRA,YAEQ,4BAFO,CAEP,mBADLC,KACK,uDACR,GAAMC,CAAAA,UAAU,CAAG,mBAAQ,iBAAMC,CAAAA,aAAa,CAACJ,IAAD,CAAnB,EAAR,CAAmC,CAACA,IAAD,CAAnC,CAAnB,CACA,GAAMK,CAAAA,KAAK,CAAG,mBAAQ,iBAAMC,CAAAA,cAAc,CAACP,WAAD,CAApB,EAAR,CAA2C,CAACA,WAAD,CAA3C,CAAd,CAEA,MACE,8BAAC,oBAAD,wBACE,IAAI,CAAEI,UADR,CAEE,WAAW,CAAEE,KAFf,CAGE,YAAY,CAAEJ,YAHhB,CAIE,aAAa,CAAEH,OAJjB,EAKMI,KALN,8EADF,CASD,CAED,QAASE,CAAAA,aAAT,CAAuBJ,IAAvB,
|
|
1
|
+
{"version":3,"sources":["ApplePayButton.tsx"],"names":["ApplePayButtonNative","ApplePayButton","onPress","buttonStyle","type","borderRadius","props","buttonType","mapButtonType","style","mapButtonStyle"],"mappings":"kXACA,qDACA,yC,6pCAOA,GAAMA,CAAAA,oBAAoB,CACxB,wCAA4D,gBAA5D,CADF,CAgCO,QAASC,CAAAA,cAAT,MAMG,IALRC,CAAAA,OAKQ,MALRA,OAKQ,uBAJRC,WAIQ,CAJRA,WAIQ,2BAJM,OAIN,iCAHRC,IAGQ,CAHRA,IAGQ,oBAHD,OAGC,kCAFRC,YAEQ,CAFRA,YAEQ,4BAFO,CAEP,mBADLC,KACK,uDACR,GAAMC,CAAAA,UAAU,CAAG,mBAAQ,iBAAMC,CAAAA,aAAa,CAACJ,IAAD,CAAnB,EAAR,CAAmC,CAACA,IAAD,CAAnC,CAAnB,CACA,GAAMK,CAAAA,KAAK,CAAG,mBAAQ,iBAAMC,CAAAA,cAAc,CAACP,WAAD,CAApB,EAAR,CAA2C,CAACA,WAAD,CAA3C,CAAd,CAEA,MACE,8BAAC,oBAAD,wBACE,IAAI,CAAEI,UADR,CAEE,WAAW,CAAEE,KAFf,CAGE,YAAY,CAAEJ,YAHhB,CAIE,aAAa,CAAEH,OAJjB,EAKMI,KALN,8EADF,CASD,CAED,QAASE,CAAAA,aAAT,CAAuBJ,IAAvB,CAA2D,CACzD,OAAQA,IAAR,EACE,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,KAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,SAAL,CACE,MAAO,EAAP,CACF,IAAK,QAAL,CACE,MAAO,EAAP,CACF,IAAK,UAAL,CACE,MAAO,EAAP,CACF,IAAK,MAAL,CACE,MAAO,EAAP,CACF,IAAK,WAAL,CACE,MAAO,EAAP,CACF,IAAK,QAAL,CACE,MAAO,EAAP,CACF,IAAK,UAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,GAAP,CACF,IAAK,OAAL,CACE,MAAO,GAAP,CACF,IAAK,MAAL,CACE,MAAO,GAAP,CACF,IAAK,SAAL,CACE,MAAO,GAAP,CACF,IAAK,YAAL,CACE,MAAO,GAAP,CACF,IAAK,KAAL,CACE,MAAO,GAAP,CACF,QACE,MAAO,EAAP,CAlCJ,CAoCD,CAED,QAASM,CAAAA,cAAT,CAAwBN,IAAxB,CAA6D,CAC3D,OAAQA,IAAR,EACE,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,cAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,WAAL,CACE,MAAO,EAAP,CACF,QACE,MAAO,EAAP,CAVJ,CAYD","sourcesContent":["import type { ApplePayButtonComponent } from '../types';\nimport React, { useMemo } from 'react';\nimport {\n AccessibilityProps,\n requireNativeComponent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nconst ApplePayButtonNative =\n requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');\n\n/**\n * Apple Pay Button Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n type?: ApplePayButtonComponent.Type;\n buttonStyle?: ApplePayButtonComponent.Style;\n borderRadius?: number;\n onPress(): void;\n testID?: string;\n}\n\n/**\n * Apple Pay Button Component\n *\n * @example\n * ```ts\n * <ApplePayButton\n * onPress={pay}\n * type=\"plain\"\n * buttonStyle=\"black\"\n * borderRadius={4}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function ApplePayButton({\n onPress,\n buttonStyle = 'black',\n type = 'plain',\n borderRadius = 4,\n ...props\n}: Props) {\n const buttonType = useMemo(() => mapButtonType(type), [type]);\n const style = useMemo(() => mapButtonStyle(buttonStyle), [buttonStyle]);\n\n return (\n <ApplePayButtonNative\n type={buttonType}\n buttonStyle={style}\n borderRadius={borderRadius}\n onPressAction={onPress}\n {...props}\n />\n );\n}\n\nfunction mapButtonType(type: ApplePayButtonComponent.Type) {\n switch (type) {\n case 'plain':\n return 0;\n case 'buy':\n return 1;\n case 'setUp':\n return 2;\n case 'inStore':\n return 3;\n case 'donate':\n return 4;\n case 'checkout':\n return 5;\n case 'book':\n return 6;\n case 'subscribe':\n return 7;\n case 'reload':\n return 8;\n case 'addMoney':\n return 9;\n case 'topUp':\n return 10;\n case 'order':\n return 11;\n case 'rent':\n return 12;\n case 'support':\n return 13;\n case 'contribute':\n return 14;\n case 'tip':\n return 15;\n default:\n return 0;\n }\n}\n\nfunction mapButtonStyle(type: ApplePayButtonComponent.Style) {\n switch (type) {\n case 'white':\n return 0;\n case 'whiteOutline':\n return 1;\n case 'black':\n return 2;\n case 'automatic':\n return 3;\n default:\n return 2;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardField.tsx"],"names":["CardFieldNative","CardField","ref","onCardChange","onFocus","onBlur","cardStyle","placeholder","postalCodeEnabled","props","inputRef","onCardChangeHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","hasOwnProperty","postalCode","number","__DEV__","console","warn","onFocusHandler","focusedField","current","focus","UIManager","dispatchViewManagerCommand","blur","clear","inputRefValue","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","cvc"],"mappings":"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","sourcesContent":["import type { CardFieldInput
|
|
1
|
+
{"version":3,"sources":["CardField.tsx"],"names":["CardFieldNative","CardField","ref","onCardChange","onFocus","onBlur","cardStyle","placeholder","postalCodeEnabled","props","inputRef","onCardChangeHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","hasOwnProperty","postalCode","number","__DEV__","console","warn","onFocusHandler","focusedField","current","focus","UIManager","dispatchViewManagerCommand","blur","clear","inputRefValue","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","cvc"],"mappings":"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","sourcesContent":["import type { CardFieldInput } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFieldNative =\n requireNativeComponent<CardFieldInput.NativeProps>('CardField');\n\n/**\n * Card Field Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n postalCodeEnabled?: boolean;\n cardStyle?: CardFieldInput.Styles;\n placeholder?: CardFieldInput.Placeholders;\n autofocus?: boolean;\n onCardChange?(card: CardFieldInput.Details): void;\n onBlur?(): void;\n onFocus?(focusedField: CardFieldInput.FieldName | null): void;\n testID?: string;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onCardChange` handler.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Field Component\n *\n * @example\n * ```ts\n * <CardField\n * postalCodeEnabled={false}\n * onCardChange={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 50}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardField = forwardRef<CardFieldInput.Methods, Props>(\n (\n {\n onCardChange,\n onFocus,\n onBlur,\n cardStyle,\n placeholder,\n postalCodeEnabled,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onCardChangeHandler = useCallback(\n (event: NativeSyntheticEvent<CardFieldInput.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFieldInput.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n validExpiryDate: card.validExpiryDate,\n validNumber: card.validNumber,\n validCVC: card.validCVC,\n };\n\n if (card.hasOwnProperty('postalCode')) {\n data.postalCode = card.postalCode || '';\n }\n if (card.hasOwnProperty('number')) {\n data.number = card.number || '';\n if (__DEV__ && onCardChange && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onCardChange?.(data);\n },\n [onCardChange]\n );\n\n const onFocusHandler = useCallback(\n (event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n onFocus?.(focusedField);\n } else {\n onBlur?.();\n }\n },\n [onFocus, onBlur]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n const clear = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'clear' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n clear,\n }));\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFieldNative\n ref={inputRef}\n onCardChange={onCardChangeHandler}\n onFocusChange={onFocusHandler}\n postalCodeEnabled={postalCodeEnabled ?? true}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n borderColor: cardStyle?.borderColor,\n borderWidth: cardStyle?.borderWidth,\n borderRadius: cardStyle?.borderRadius,\n cursorColor: cardStyle?.cursorColor,\n fontSize: cardStyle?.fontSize,\n placeholderColor: cardStyle?.placeholderColor,\n textColor: cardStyle?.textColor,\n textErrorColor: cardStyle?.textErrorColor,\n fontFamily: cardStyle?.fontFamily,\n }}\n placeholder={{\n number: placeholder?.number,\n expiration: placeholder?.expiration,\n cvc: placeholder?.cvc,\n postalCode: placeholder?.postalCode,\n }}\n {...props}\n />\n );\n }\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardForm.tsx"],"names":["CardFormNative","CardForm","ref","onFormComplete","cardStyle","props","inputRef","onFormCompleteHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","hasOwnProperty","number","__DEV__","console","warn","focus","UIManager","dispatchViewManagerCommand","current","blur","onFocusHandler","focusedField","inputRefValue","backgroundColor"],"mappings":"oWACA,qDAOA,yCASA,mC,ipCAOA,GAAMA,CAAAA,cAAc,CAClB,wCAAiD,UAAjD,CADF,CAiDO,GAAMC,CAAAA,QAAQ,CAAG,sBACtB,cAWEC,GAXF,CAYK,IAVDC,CAAAA,cAUC,MAVDA,cAUC,CATDC,SASC,MATDA,SASC,CAHEC,KAGF,uDACH,GAAMC,CAAAA,QAAQ,CAAG,kBAAY,IAAZ,CAAjB,CAEA,GAAMC,CAAAA,qBAAqB,CAAG,uBAC5B,SAACC,KAAD,CAAuD,CACrD,GAAMC,CAAAA,IAAI,CAAGD,KAAK,CAACE,WAAnB,CAEA,GAAMC,CAAAA,IAA0B,CAAG,CACjCC,KAAK,CAAEH,IAAI,CAACG,KADqB,CAEjCC,WAAW,CAAEJ,IAAI,CAACI,WAFe,CAGjCC,UAAU,CAAEL,IAAI,CAACK,UAHgB,CAIjCC,QAAQ,CAAEN,IAAI,CAACM,QAJkB,CAKjCC,KAAK,CAAEP,IAAI,CAACO,KALqB,CAMjCC,OAAO,CAAER,IAAI,CAACQ,OANmB,CAOjCC,UAAU,CAAET,IAAI,CAACS,UAPgB,CAAnC,CAUA,GAAIT,IAAI,CAACU,cAAL,CAAoB,QAApB,CAAJ,CAAmC,CACjCR,IAAI,CAACS,MAAL,CAAcX,IAAI,CAACW,MAAL,EAAe,EAA7B,CACA,GAAIC,OAAO,EAAIlB,cAAX,EAA6BM,IAAI,CAACM,QAAtC,CAAgD,CAC9CO,OAAO,CAACC,IAAR,+YAGD,CACF,CACDpB,cAAc,MAAd,QAAAA,cAAc,CAAGQ,IAAH,CAAd,CACD,CAvB2B,CAwB5B,CAACR,cAAD,CAxB4B,CAA9B,CA2BA,GAAMqB,CAAAA,KAAK,CAAG,QAARA,CAAAA,KAAQ,EAAM,CAClBC,uBAAUC,0BAAV,CACE,gCAAepB,QAAQ,CAACqB,OAAxB,CADF,CAEE,OAFF,CAGE,EAHF,EAKD,CAND,CAQA,GAAMC,CAAAA,IAAI,CAAG,QAAPA,CAAAA,IAAO,EAAM,CACjBH,uBAAUC,0BAAV,CACE,gCAAepB,QAAQ,CAACqB,OAAxB,CADF,CAEE,MAFF,CAGE,EAHF,EAKD,CAND,CAQA,+BAAoBzB,GAApB,CAAyB,iBAAO,CAC9BsB,KAAK,CAALA,KAD8B,CAE9BI,IAAI,CAAJA,IAF8B,CAAP,EAAzB,EAKA,GAAMC,CAAAA,cAAc,CAAG,uBAAY,SAACrB,KAAD,CAAW,CAC5C,GAAQsB,CAAAA,YAAR,CAAyBtB,KAAK,CAACE,WAA/B,CAAQoB,YAAR,CACA,GAAIA,YAAJ,CAAkB,CAChB,wBAAWxB,QAAQ,CAACqB,OAApB,EAED,CAHD,IAGO,CAEN,CACF,CARsB,CAQpB,EARoB,CAAvB,CAUA,2BAAgB,UAAM,CACpB,GAAMI,CAAAA,aAAa,CAAGzB,QAAQ,CAACqB,OAA/B,CACA,GAAII,aAAa,GAAK,IAAtB,CAA4B,CAC1B,2BAAcA,aAAd,EACA,MAAO,WAAM,CACX,6BAAgBA,aAAhB,EACA,GAAI,uCAA4BA,aAAhC,CAA+C,CAC7CA,aAAa,CAACH,IAAd,GACD,CACF,CALD,CAMD,CACD,MAAO,WAAM,CAAE,CAAf,CACD,CAZD,CAYG,CAACtB,QAAD,CAZH,EAcA,MACE,8BAAC,cAAD,wBACE,GAAG,CAAEA,QADP,CAEE,cAAc,CAAEC,qBAFlB,CAGE,SAAS,CAAE,CACTyB,eAAe,CAAE5B,SAAF,cAAEA,SAAS,CAAE4B,eADnB,CAHb,CAeE,aAAa,CAAEH,cAfjB,EAiBMxB,KAjBN,gFADF,CAqBD,CA7GqB,CAAjB,C","sourcesContent":["import type { CardFormView } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFormNative =\n requireNativeComponent<CardFormView.NativeProps>('CardForm');\n\n/**\n * Card Form Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n autofocus?: boolean;\n testID?: string;\n\n // props iOS only\n cardStyle?: CardFormView.Styles;\n // isUserInteractionEnabled?: boolean;\n\n // TODO: will make it public when android-sdk allows for this\n // postalCodeEnabled?: boolean;\n\n // TODO: will make it public when ios-sdk allows for this\n // placeholder: CardFormView.Placeholders;\n // onBlur?(): void;\n // onFocus?(focusedField:
|
|
1
|
+
{"version":3,"sources":["CardForm.tsx"],"names":["CardFormNative","CardForm","ref","onFormComplete","cardStyle","props","inputRef","onFormCompleteHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","hasOwnProperty","number","__DEV__","console","warn","focus","UIManager","dispatchViewManagerCommand","current","blur","onFocusHandler","focusedField","inputRefValue","backgroundColor"],"mappings":"oWACA,qDAOA,yCASA,mC,ipCAOA,GAAMA,CAAAA,cAAc,CAClB,wCAAiD,UAAjD,CADF,CAiDO,GAAMC,CAAAA,QAAQ,CAAG,sBACtB,cAWEC,GAXF,CAYK,IAVDC,CAAAA,cAUC,MAVDA,cAUC,CATDC,SASC,MATDA,SASC,CAHEC,KAGF,uDACH,GAAMC,CAAAA,QAAQ,CAAG,kBAAY,IAAZ,CAAjB,CAEA,GAAMC,CAAAA,qBAAqB,CAAG,uBAC5B,SAACC,KAAD,CAAuD,CACrD,GAAMC,CAAAA,IAAI,CAAGD,KAAK,CAACE,WAAnB,CAEA,GAAMC,CAAAA,IAA0B,CAAG,CACjCC,KAAK,CAAEH,IAAI,CAACG,KADqB,CAEjCC,WAAW,CAAEJ,IAAI,CAACI,WAFe,CAGjCC,UAAU,CAAEL,IAAI,CAACK,UAHgB,CAIjCC,QAAQ,CAAEN,IAAI,CAACM,QAJkB,CAKjCC,KAAK,CAAEP,IAAI,CAACO,KALqB,CAMjCC,OAAO,CAAER,IAAI,CAACQ,OANmB,CAOjCC,UAAU,CAAET,IAAI,CAACS,UAPgB,CAAnC,CAUA,GAAIT,IAAI,CAACU,cAAL,CAAoB,QAApB,CAAJ,CAAmC,CACjCR,IAAI,CAACS,MAAL,CAAcX,IAAI,CAACW,MAAL,EAAe,EAA7B,CACA,GAAIC,OAAO,EAAIlB,cAAX,EAA6BM,IAAI,CAACM,QAAtC,CAAgD,CAC9CO,OAAO,CAACC,IAAR,+YAGD,CACF,CACDpB,cAAc,MAAd,QAAAA,cAAc,CAAGQ,IAAH,CAAd,CACD,CAvB2B,CAwB5B,CAACR,cAAD,CAxB4B,CAA9B,CA2BA,GAAMqB,CAAAA,KAAK,CAAG,QAARA,CAAAA,KAAQ,EAAM,CAClBC,uBAAUC,0BAAV,CACE,gCAAepB,QAAQ,CAACqB,OAAxB,CADF,CAEE,OAFF,CAGE,EAHF,EAKD,CAND,CAQA,GAAMC,CAAAA,IAAI,CAAG,QAAPA,CAAAA,IAAO,EAAM,CACjBH,uBAAUC,0BAAV,CACE,gCAAepB,QAAQ,CAACqB,OAAxB,CADF,CAEE,MAFF,CAGE,EAHF,EAKD,CAND,CAQA,+BAAoBzB,GAApB,CAAyB,iBAAO,CAC9BsB,KAAK,CAALA,KAD8B,CAE9BI,IAAI,CAAJA,IAF8B,CAAP,EAAzB,EAKA,GAAMC,CAAAA,cAAc,CAAG,uBAAY,SAACrB,KAAD,CAAW,CAC5C,GAAQsB,CAAAA,YAAR,CAAyBtB,KAAK,CAACE,WAA/B,CAAQoB,YAAR,CACA,GAAIA,YAAJ,CAAkB,CAChB,wBAAWxB,QAAQ,CAACqB,OAApB,EAED,CAHD,IAGO,CAEN,CACF,CARsB,CAQpB,EARoB,CAAvB,CAUA,2BAAgB,UAAM,CACpB,GAAMI,CAAAA,aAAa,CAAGzB,QAAQ,CAACqB,OAA/B,CACA,GAAII,aAAa,GAAK,IAAtB,CAA4B,CAC1B,2BAAcA,aAAd,EACA,MAAO,WAAM,CACX,6BAAgBA,aAAhB,EACA,GAAI,uCAA4BA,aAAhC,CAA+C,CAC7CA,aAAa,CAACH,IAAd,GACD,CACF,CALD,CAMD,CACD,MAAO,WAAM,CAAE,CAAf,CACD,CAZD,CAYG,CAACtB,QAAD,CAZH,EAcA,MACE,8BAAC,cAAD,wBACE,GAAG,CAAEA,QADP,CAEE,cAAc,CAAEC,qBAFlB,CAGE,SAAS,CAAE,CACTyB,eAAe,CAAE5B,SAAF,cAAEA,SAAS,CAAE4B,eADnB,CAHb,CAeE,aAAa,CAAEH,cAfjB,EAiBMxB,KAjBN,gFADF,CAqBD,CA7GqB,CAAjB,C","sourcesContent":["import type { CardFormView } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFormNative =\n requireNativeComponent<CardFormView.NativeProps>('CardForm');\n\n/**\n * Card Form Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n autofocus?: boolean;\n testID?: string;\n\n // props iOS only\n cardStyle?: CardFormView.Styles;\n // isUserInteractionEnabled?: boolean;\n\n // TODO: will make it public when android-sdk allows for this\n // postalCodeEnabled?: boolean;\n\n // TODO: will make it public when ios-sdk allows for this\n // placeholder: CardFormView.Placeholders;\n // onBlur?(): void;\n // onFocus?(focusedField: CardFormView.FieldNames | null): void;\n onFormComplete?(card: CardFormView.Details): void;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onFormComplete` handler.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Form Component\n *\n * @example\n * ```ts\n * <CardForm\n * onFormComplete={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 200}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardForm = forwardRef<CardFormView.Methods, Props>(\n (\n {\n onFormComplete,\n cardStyle,\n // isUserInteractionEnabled = true,\n // postalCodeEnabled = true,\n // onFocus,\n // onBlur,\n // placeholder,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onFormCompleteHandler = useCallback(\n (event: NativeSyntheticEvent<CardFormView.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFormView.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n country: card.country,\n postalCode: card.postalCode,\n };\n\n if (card.hasOwnProperty('number')) {\n data.number = card.number || '';\n if (__DEV__ && onFormComplete && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onFormComplete?.(data);\n },\n [onFormComplete]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n }));\n\n const onFocusHandler = useCallback((event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n // onFocus?.(focusedField);\n } else {\n // onBlur?.();\n }\n }, []);\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFormNative\n ref={inputRef}\n onFormComplete={onFormCompleteHandler}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n // disabledBackgroundColor: cardStyle?.disabledBackgroundColor,\n // type: cardStyle?.type,\n }}\n // isUserInteractionEnabledValue={isUserInteractionEnabled}\n // placeholder={{\n // number: placeholder?.number,\n // expiration: placeholder?.expiration,\n // cvc: placeholder?.cvc,\n // postalCode: placeholder?.postalCode,\n // }}\n onFocusChange={onFocusHandler}\n // postalCodeEnabled={postalCodeEnabled}\n {...props}\n />\n );\n }\n);\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeProvider=StripeProvider;exports.initStripe=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _react=_interopRequireWildcard(require("react"));var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../package.json"));function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var EXPO_PARTNER_ID='pp_partner_JBN7LkABco2yUu';var repository=_package.default.repository;var appInfo={name:(0,_helpers.shouldAttributeExpo)()?_package.default.name+"/expo":_package.default.name,url:repository.url||repository,version:_package.default.version,partnerId:(0,_helpers.shouldAttributeExpo)()?EXPO_PARTNER_ID:undefined};var initStripe=function _callee(params){var extendedParams;return _regenerator.default.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:extendedParams=(0,_extends2.default)({},params,{appInfo:appInfo});_NativeStripeSdk.default.initialise(extendedParams);case 2:case"end":return _context.stop();}}},null,null,null,Promise);};exports.initStripe=initStripe;function StripeProvider(_ref){var children=_ref.children,publishableKey=_ref.publishableKey,merchantIdentifier=_ref.merchantIdentifier,threeDSecureParams=_ref.threeDSecureParams,stripeAccountId=_ref.stripeAccountId,urlScheme=_ref.urlScheme,setReturnUrlSchemeOnAndroid=_ref.setReturnUrlSchemeOnAndroid
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeProvider=StripeProvider;exports.initStripe=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _react=_interopRequireWildcard(require("react"));var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../package.json"));function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var EXPO_PARTNER_ID='pp_partner_JBN7LkABco2yUu';var repository=_package.default.repository;var appInfo={name:(0,_helpers.shouldAttributeExpo)()?_package.default.name+"/expo":_package.default.name,url:repository.url||repository,version:_package.default.version,partnerId:(0,_helpers.shouldAttributeExpo)()?EXPO_PARTNER_ID:undefined};var initStripe=function _callee(params){var extendedParams;return _regenerator.default.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:extendedParams=(0,_extends2.default)({},params,{appInfo:appInfo});_NativeStripeSdk.default.initialise(extendedParams);case 2:case"end":return _context.stop();}}},null,null,null,Promise);};exports.initStripe=initStripe;function StripeProvider(_ref){var children=_ref.children,publishableKey=_ref.publishableKey,merchantIdentifier=_ref.merchantIdentifier,threeDSecureParams=_ref.threeDSecureParams,stripeAccountId=_ref.stripeAccountId,urlScheme=_ref.urlScheme,setReturnUrlSchemeOnAndroid=_ref.setReturnUrlSchemeOnAndroid;(0,_react.useEffect)(function(){if(!publishableKey){return;}if(_helpers.isAndroid){_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,urlScheme:urlScheme,setReturnUrlSchemeOnAndroid:setReturnUrlSchemeOnAndroid});}else{_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,merchantIdentifier:merchantIdentifier,urlScheme:urlScheme});}},[publishableKey,merchantIdentifier,stripeAccountId,threeDSecureParams,urlScheme,setReturnUrlSchemeOnAndroid]);return _react.default.createElement(_react.default.Fragment,null,children);}
|
|
2
2
|
//# sourceMappingURL=StripeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["StripeProvider.tsx"],"names":["EXPO_PARTNER_ID","repository","pjson","appInfo","name","url","version","partnerId","undefined","initStripe","params","extendedParams","NativeStripeSdk","initialise","StripeProvider","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","
|
|
1
|
+
{"version":3,"sources":["StripeProvider.tsx"],"names":["EXPO_PARTNER_ID","repository","pjson","appInfo","name","url","version","partnerId","undefined","initStripe","params","extendedParams","NativeStripeSdk","initialise","StripeProvider","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","isAndroid"],"mappings":"2WAAA,qDAEA,2EACA,mCAEA,mE,0/BAEA,GAAMA,CAAAA,eAAe,CAAG,2BAAxB,CASA,GAAMC,CAAAA,UAAe,CAAGC,iBAAMD,UAA9B,CAEA,GAAME,CAAAA,OAAgB,CAAG,CACvBC,IAAI,CAAE,mCAA2BF,iBAAME,IAAjC,SAA+CF,iBAAME,IADpC,CAKvBC,GAAG,CAAEJ,UAAU,CAACI,GAAX,EAAkBJ,UALA,CAMvBK,OAAO,CAAEJ,iBAAMI,OANQ,CAOvBC,SAAS,CAAE,mCAAwBP,eAAxB,CAA0CQ,SAP9B,CAAzB,CAUO,GAAMC,CAAAA,UAAU,CAAG,iBAAOC,MAAP,uIAClBC,cADkB,0BACsBD,MADtB,EAC8BP,OAAO,CAAPA,OAD9B,GAExBS,yBAAgBC,UAAhB,CAA2BF,cAA3B,EAFwB,qEAAnB,C,8BAyBA,QAASG,CAAAA,cAAT,MAQG,IAPRC,CAAAA,QAOQ,MAPRA,QAOQ,CANRC,cAMQ,MANRA,cAMQ,CALRC,kBAKQ,MALRA,kBAKQ,CAJRC,kBAIQ,MAJRA,kBAIQ,CAHRC,eAGQ,MAHRA,eAGQ,CAFRC,SAEQ,MAFRA,SAEQ,CADRC,2BACQ,MADRA,2BACQ,CACR,qBAAU,UAAM,CACd,GAAI,CAACL,cAAL,CAAqB,CACnB,OACD,CACD,GAAIM,kBAAJ,CAAe,CACbV,yBAAgBC,UAAhB,CAA2B,CACzBG,cAAc,CAAdA,cADyB,CAEzBb,OAAO,CAAPA,OAFyB,CAGzBgB,eAAe,CAAfA,eAHyB,CAIzBD,kBAAkB,CAAlBA,kBAJyB,CAKzBE,SAAS,CAATA,SALyB,CAMzBC,2BAA2B,CAA3BA,2BANyB,CAA3B,EAQD,CATD,IASO,CACLT,yBAAgBC,UAAhB,CAA2B,CACzBG,cAAc,CAAdA,cADyB,CAEzBb,OAAO,CAAPA,OAFyB,CAGzBgB,eAAe,CAAfA,eAHyB,CAIzBD,kBAAkB,CAAlBA,kBAJyB,CAKzBD,kBAAkB,CAAlBA,kBALyB,CAMzBG,SAAS,CAATA,SANyB,CAA3B,EAQD,CACF,CAvBD,CAuBG,CACDJ,cADC,CAEDC,kBAFC,CAGDE,eAHC,CAIDD,kBAJC,CAKDE,SALC,CAMDC,2BANC,CAvBH,EAgCA,MAAO,2DAAGN,QAAH,CAAP,CACD","sourcesContent":["import React, { useEffect } from 'react';\n\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport { isAndroid, shouldAttributeExpo } from '../helpers';\nimport type { AppInfo, InitStripeParams, InitialiseParams } from '../types';\nimport pjson from '../../package.json';\n\nconst EXPO_PARTNER_ID = 'pp_partner_JBN7LkABco2yUu';\n\n/**\n * Stripe Provider Component Props\n */\nexport type Props = InitStripeParams & {\n children: React.ReactElement | React.ReactElement[];\n};\n\nconst repository: any = pjson.repository;\n\nconst appInfo: AppInfo = {\n name: shouldAttributeExpo() ? `${pjson.name}/expo` : pjson.name,\n // package.json output installed via npm is a bit different than from yarn\n // the repository field can be an object or string\n // for more context: https://github.com/stripe/stripe-react-native/issues/200\n url: repository.url || repository,\n version: pjson.version,\n partnerId: shouldAttributeExpo() ? EXPO_PARTNER_ID : undefined,\n};\n\nexport const initStripe = async (params: InitStripeParams): Promise<void> => {\n const extendedParams: InitialiseParams = { ...params, appInfo };\n NativeStripeSdk.initialise(extendedParams);\n};\n\n/**\n * StripeProvider Component\n *\n * @example\n * ```ts\n * <StripeProvider\n * publishableKey=\"_publishableKey\"\n * merchantIdentifier=\"merchant.com.stripe.react.native\"\n * threeDSecureParams={{\n * backgroundColor: \"#FFF\",\n * timeout: 5,\n * }}\n * >\n * <App />\n * </StripeProvider>\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeProvider({\n children,\n publishableKey,\n merchantIdentifier,\n threeDSecureParams,\n stripeAccountId,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n}: Props) {\n useEffect(() => {\n if (!publishableKey) {\n return;\n }\n if (isAndroid) {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n });\n } else {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n merchantIdentifier,\n urlScheme,\n });\n }\n }, [\n publishableKey,\n merchantIdentifier,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n ]);\n\n return <>{children}</>;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updateApplePaySummaryItems=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.presentPaymentSheet=exports.presentGooglePay=exports.presentApplePay=exports.openApplePaySetup=exports.isGooglePaySupported=exports.isApplePaySupported=exports.initPaymentSheet=exports.initGooglePay=exports.handleURLCallback=exports.handleNextAction=exports.handleCardAction=exports.createTokenForCVCUpdate=exports.createToken=exports.createPaymentMethod=exports.createGooglePayPaymentMethod=exports.confirmSetupIntent=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.confirmApplePayPayment=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _types=require("./types");var APPLE_PAY_NOT_SUPPORTED_MESSAGE='Apple pay is not supported on this device';var PAYMENT_INTENT='payment';var SETUP_INTENT='setup';var createPaymentMethod=function _callee(data){var options,_await$NativeStripeSd,paymentMethod,error,_args=arguments;return _regenerator.default.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:options=_args.length>1&&_args[1]!==undefined?_args[1]:{};_context.prev=1;_context.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.createPaymentMethod(data,options));case 4:_await$NativeStripeSd=_context.sent;paymentMethod=_await$NativeStripeSd.paymentMethod;error=_await$NativeStripeSd.error;if(!error){_context.next=9;break;}return _context.abrupt("return",{error:error});case 9:return _context.abrupt("return",{paymentMethod:paymentMethod});case 12:_context.prev=12;_context.t0=_context["catch"](1);return _context.abrupt("return",{error:_context.t0});case 15:case"end":return _context.stop();}}},null,null,[[1,12]],Promise);};exports.createPaymentMethod=createPaymentMethod;var createToken=function _callee2(params){var _params$country;var _await$NativeStripeSd2,token,error;return _regenerator.default.async(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:if(!(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber)){_context2.next=2;break;}return _context2.abrupt("return",{error:_Errors.MissingRoutingNumber});case 2:_context2.prev=2;_context2.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.createToken(params));case 5:_await$NativeStripeSd2=_context2.sent;token=_await$NativeStripeSd2.token;error=_await$NativeStripeSd2.error;if(!error){_context2.next=10;break;}return _context2.abrupt("return",{error:error});case 10:return _context2.abrupt("return",{token:token});case 13:_context2.prev=13;_context2.t0=_context2["catch"](2);return _context2.abrupt("return",{error:(0,_helpers.createError)(_context2.t0)});case 16:case"end":return _context2.stop();}}},null,null,[[2,13]],Promise);};exports.createToken=createToken;var retrievePaymentIntent=function _callee3(clientSecret){var _await$NativeStripeSd3,paymentIntent,error;return _regenerator.default.async(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.retrievePaymentIntent(clientSecret));case 3:_await$NativeStripeSd3=_context3.sent;paymentIntent=_await$NativeStripeSd3.paymentIntent;error=_await$NativeStripeSd3.error;if(!error){_context3.next=8;break;}return _context3.abrupt("return",{error:error});case 8:return _context3.abrupt("return",{paymentIntent:paymentIntent});case 11:_context3.prev=11;_context3.t0=_context3["catch"](0);return _context3.abrupt("return",{error:_context3.t0});case 14:case"end":return _context3.stop();}}},null,null,[[0,11]],Promise);};exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function _callee4(clientSecret){var _await$NativeStripeSd4,setupIntent,error;return _regenerator.default.async(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.prev=0;_context4.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.retrieveSetupIntent(clientSecret));case 3:_await$NativeStripeSd4=_context4.sent;setupIntent=_await$NativeStripeSd4.setupIntent;error=_await$NativeStripeSd4.error;if(!error){_context4.next=8;break;}return _context4.abrupt("return",{error:error});case 8:return _context4.abrupt("return",{setupIntent:setupIntent});case 11:_context4.prev=11;_context4.t0=_context4["catch"](0);return _context4.abrupt("return",{error:_context4.t0});case 14:case"end":return _context4.stop();}}},null,null,[[0,11]],Promise);};exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function _callee5(paymentIntentClientSecret,data){var options,_await$NativeStripeSd5,paymentIntent,error,_args5=arguments;return _regenerator.default.async(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:options=_args5.length>2&&_args5[2]!==undefined?_args5[2]:{};_context5.prev=1;_context5.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,data,options));case 4:_await$NativeStripeSd5=_context5.sent;paymentIntent=_await$NativeStripeSd5.paymentIntent;error=_await$NativeStripeSd5.error;if(!error){_context5.next=9;break;}return _context5.abrupt("return",{error:error});case 9:return _context5.abrupt("return",{paymentIntent:paymentIntent});case 12:_context5.prev=12;_context5.t0=_context5["catch"](1);return _context5.abrupt("return",{error:_context5.t0});case 15:case"end":return _context5.stop();}}},null,null,[[1,12]],Promise);};exports.confirmPayment=confirmPayment;var isApplePaySupported=function _callee6(){return _regenerator.default.async(function _callee6$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:_context6.t0=_helpers.isiOS;if(!_context6.t0){_context6.next=5;break;}_context6.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 4:_context6.t0=_context6.sent;case 5:return _context6.abrupt("return",_context6.t0);case 6:case"end":return _context6.stop();}}},null,null,null,Promise);};exports.isApplePaySupported=isApplePaySupported;var presentApplePay=function _callee7(params){var _await$NativeStripeSd6,paymentMethod,error;return _regenerator.default.async(function _callee7$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:_context7.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 2:if(_context7.sent){_context7.next=4;break;}return _context7.abrupt("return",{error:(0,_helpers.createError)({code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE})});case 4:_context7.prev=4;_context7.next=7;return _regenerator.default.awrap(_NativeStripeSdk.default.presentApplePay(params));case 7:_await$NativeStripeSd6=_context7.sent;paymentMethod=_await$NativeStripeSd6.paymentMethod;error=_await$NativeStripeSd6.error;if(!error){_context7.next=12;break;}return _context7.abrupt("return",{error:error});case 12:return _context7.abrupt("return",{paymentMethod:paymentMethod});case 15:_context7.prev=15;_context7.t0=_context7["catch"](4);return _context7.abrupt("return",{error:_context7.t0});case 18:case"end":return _context7.stop();}}},null,null,[[4,15]],Promise);};exports.presentApplePay=presentApplePay;var updateApplePaySummaryItems=function _callee8(summaryItems){var errorAddressFields,_args8=arguments;return _regenerator.default.async(function _callee8$(_context8){while(1){switch(_context8.prev=_context8.next){case 0:errorAddressFields=_args8.length>1&&_args8[1]!==undefined?_args8[1]:[];_context8.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 3:if(_context8.sent){_context8.next=5;break;}return _context8.abrupt("return",{error:(0,_helpers.createError)({code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE})});case 5:_context8.prev=5;_context8.next=8;return _regenerator.default.awrap(_NativeStripeSdk.default.updateApplePaySummaryItems(summaryItems,errorAddressFields));case 8:return _context8.abrupt("return",{});case 11:_context8.prev=11;_context8.t0=_context8["catch"](5);return _context8.abrupt("return",{error:(0,_helpers.createError)(_context8.t0)});case 14:case"end":return _context8.stop();}}},null,null,[[5,11]],Promise);};exports.updateApplePaySummaryItems=updateApplePaySummaryItems;var confirmApplePayPayment=function _callee9(clientSecret){return _regenerator.default.async(function _callee9$(_context9){while(1){switch(_context9.prev=_context9.next){case 0:_context9.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 2:if(_context9.sent){_context9.next=4;break;}return _context9.abrupt("return",{error:(0,_helpers.createError)({code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE})});case 4:_context9.prev=4;_context9.next=7;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmApplePayPayment(clientSecret));case 7:return _context9.abrupt("return",{});case 10:_context9.prev=10;_context9.t0=_context9["catch"](4);return _context9.abrupt("return",{error:(0,_helpers.createError)(_context9.t0)});case 13:case"end":return _context9.stop();}}},null,null,[[4,10]],Promise);};exports.confirmApplePayPayment=confirmApplePayPayment;var handleNextAction=function _callee10(paymentIntentClientSecret){var _await$NativeStripeSd7,paymentIntent,error;return _regenerator.default.async(function _callee10$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:_context10.prev=0;_context10.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret));case 3:_await$NativeStripeSd7=_context10.sent;paymentIntent=_await$NativeStripeSd7.paymentIntent;error=_await$NativeStripeSd7.error;if(!error){_context10.next=8;break;}return _context10.abrupt("return",{error:error});case 8:return _context10.abrupt("return",{paymentIntent:paymentIntent});case 11:_context10.prev=11;_context10.t0=_context10["catch"](0);return _context10.abrupt("return",{error:(0,_helpers.createError)(_context10.t0)});case 14:case"end":return _context10.stop();}}},null,null,[[0,11]],Promise);};exports.handleNextAction=handleNextAction;var handleCardAction=function _callee11(paymentIntentClientSecret){var _await$NativeStripeSd8,paymentIntent,error;return _regenerator.default.async(function _callee11$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:_context11.prev=0;_context11.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret));case 3:_await$NativeStripeSd8=_context11.sent;paymentIntent=_await$NativeStripeSd8.paymentIntent;error=_await$NativeStripeSd8.error;if(!error){_context11.next=8;break;}return _context11.abrupt("return",{error:error});case 8:return _context11.abrupt("return",{paymentIntent:paymentIntent});case 11:_context11.prev=11;_context11.t0=_context11["catch"](0);return _context11.abrupt("return",{error:(0,_helpers.createError)(_context11.t0)});case 14:case"end":return _context11.stop();}}},null,null,[[0,11]],Promise);};exports.handleCardAction=handleCardAction;var confirmSetupIntent=function _callee12(paymentIntentClientSecret,data){var options,_await$NativeStripeSd9,setupIntent,error,_args12=arguments;return _regenerator.default.async(function _callee12$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:options=_args12.length>2&&_args12[2]!==undefined?_args12[2]:{};_context12.prev=1;_context12.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,data,options));case 4:_await$NativeStripeSd9=_context12.sent;setupIntent=_await$NativeStripeSd9.setupIntent;error=_await$NativeStripeSd9.error;if(!error){_context12.next=9;break;}return _context12.abrupt("return",{error:error});case 9:return _context12.abrupt("return",{setupIntent:setupIntent});case 12:_context12.prev=12;_context12.t0=_context12["catch"](1);return _context12.abrupt("return",{error:(0,_helpers.createError)(_context12.t0)});case 15:case"end":return _context12.stop();}}},null,null,[[1,12]],Promise);};exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function _callee13(cvc){var _await$NativeStripeSd10,tokenId,error;return _regenerator.default.async(function _callee13$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:_context13.prev=0;_context13.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.createTokenForCVCUpdate(cvc));case 3:_await$NativeStripeSd10=_context13.sent;tokenId=_await$NativeStripeSd10.tokenId;error=_await$NativeStripeSd10.error;if(!error){_context13.next=8;break;}return _context13.abrupt("return",{error:error});case 8:return _context13.abrupt("return",{tokenId:tokenId});case 11:_context13.prev=11;_context13.t0=_context13["catch"](0);return _context13.abrupt("return",{error:(0,_helpers.createError)(_context13.t0)});case 14:case"end":return _context13.stop();}}},null,null,[[0,11]],Promise);};exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function _callee14(url){var stripeHandled;return _regenerator.default.async(function _callee14$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:_context14.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.handleURLCallback(url));case 2:stripeHandled=_context14.sent;return _context14.abrupt("return",stripeHandled);case 4:case"end":return _context14.stop();}}},null,null,null,Promise);};exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function _callee15(clientSecret,params){var _ref,paymentIntent,error;return _regenerator.default.async(function _callee15$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:if(!_helpers.isAndroid){_context15.next=2;break;}return _context15.abrupt("return",{error:(0,_helpers.createError)({code:_types.ConfirmPaymentError.Failed,message:'verifyMicrodepositsForPayment is only supported on iOS on this version of @stripe/stripe-react-native. Please verify with paymentIntent.nextAction.redirectUrl'})});case 2:_context15.prev=2;_context15.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.verifyMicrodeposits(PAYMENT_INTENT,clientSecret,params));case 5:_ref=_context15.sent;paymentIntent=_ref.paymentIntent;error=_ref.error;if(!error){_context15.next=10;break;}return _context15.abrupt("return",{error:error});case 10:return _context15.abrupt("return",{paymentIntent:paymentIntent});case 13:_context15.prev=13;_context15.t0=_context15["catch"](2);return _context15.abrupt("return",{error:(0,_helpers.createError)(_context15.t0)});case 16:case"end":return _context15.stop();}}},null,null,[[2,13]],Promise);};exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function _callee16(clientSecret,params){var _ref2,setupIntent,error;return _regenerator.default.async(function _callee16$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:if(!_helpers.isAndroid){_context16.next=2;break;}return _context16.abrupt("return",{error:(0,_helpers.createError)({code:_types.ConfirmSetupIntentError.Failed,message:'verifyMicrodepositsForSetup is only supported on iOS on this version of @stripe/stripe-react-native. Please verify with setupIntent.nextAction.redirectUrl'})});case 2:_context16.prev=2;_context16.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.verifyMicrodeposits(SETUP_INTENT,clientSecret,params));case 5:_ref2=_context16.sent;setupIntent=_ref2.setupIntent;error=_ref2.error;if(!error){_context16.next=10;break;}return _context16.abrupt("return",{error:error});case 10:return _context16.abrupt("return",{setupIntent:setupIntent});case 13:_context16.prev=13;_context16.t0=_context16["catch"](2);return _context16.abrupt("return",{error:(0,_helpers.createError)(_context16.t0)});case 16:case"end":return _context16.stop();}}},null,null,[[2,13]],Promise);};exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var initPaymentSheet=function _callee17(params){var _await$NativeStripeSd11,paymentOption,error;return _regenerator.default.async(function _callee17$(_context17){while(1){switch(_context17.prev=_context17.next){case 0:_context17.prev=0;_context17.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.initPaymentSheet(params));case 3:_await$NativeStripeSd11=_context17.sent;paymentOption=_await$NativeStripeSd11.paymentOption;error=_await$NativeStripeSd11.error;if(!error){_context17.next=8;break;}return _context17.abrupt("return",{error:error});case 8:return _context17.abrupt("return",{paymentOption:paymentOption});case 11:_context17.prev=11;_context17.t0=_context17["catch"](0);return _context17.abrupt("return",{error:(0,_helpers.createError)(_context17.t0)});case 14:case"end":return _context17.stop();}}},null,null,[[0,11]],Promise);};exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function _callee18(){var _await$NativeStripeSd12,paymentOption,error;return _regenerator.default.async(function _callee18$(_context18){while(1){switch(_context18.prev=_context18.next){case 0:_context18.prev=0;_context18.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.presentPaymentSheet());case 3:_await$NativeStripeSd12=_context18.sent;paymentOption=_await$NativeStripeSd12.paymentOption;error=_await$NativeStripeSd12.error;if(!error){_context18.next=8;break;}return _context18.abrupt("return",{error:error});case 8:return _context18.abrupt("return",{paymentOption:paymentOption});case 11:_context18.prev=11;_context18.t0=_context18["catch"](0);return _context18.abrupt("return",{error:(0,_helpers.createError)(_context18.t0)});case 14:case"end":return _context18.stop();}}},null,null,[[0,11]],Promise);};exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function _callee19(){var _await$NativeStripeSd13,error;return _regenerator.default.async(function _callee19$(_context19){while(1){switch(_context19.prev=_context19.next){case 0:_context19.prev=0;_context19.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmPaymentSheetPayment());case 3:_await$NativeStripeSd13=_context19.sent;error=_await$NativeStripeSd13.error;if(!error){_context19.next=7;break;}return _context19.abrupt("return",{error:error});case 7:return _context19.abrupt("return",{});case 10:_context19.prev=10;_context19.t0=_context19["catch"](0);return _context19.abrupt("return",{error:(0,_helpers.createError)(_context19.t0)});case 13:case"end":return _context19.stop();}}},null,null,[[0,10]],Promise);};exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var isGooglePaySupported=function _callee20(params){return _regenerator.default.async(function _callee20$(_context20){while(1){switch(_context20.prev=_context20.next){case 0:_context20.t0=_helpers.isAndroid;if(!_context20.t0){_context20.next=5;break;}_context20.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isGooglePaySupported(params!=null?params:{}));case 4:_context20.t0=_context20.sent;case 5:return _context20.abrupt("return",_context20.t0);case 6:case"end":return _context20.stop();}}},null,null,null,Promise);};exports.isGooglePaySupported=isGooglePaySupported;var initGooglePay=function _callee21(params){var _await$NativeStripeSd14,error;return _regenerator.default.async(function _callee21$(_context21){while(1){switch(_context21.prev=_context21.next){case 0:_context21.prev=0;_context21.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.initGooglePay(params));case 3:_await$NativeStripeSd14=_context21.sent;error=_await$NativeStripeSd14.error;if(!error){_context21.next=7;break;}return _context21.abrupt("return",{error:error});case 7:return _context21.abrupt("return",{});case 10:_context21.prev=10;_context21.t0=_context21["catch"](0);return _context21.abrupt("return",{error:(0,_helpers.createError)(_context21.t0)});case 13:case"end":return _context21.stop();}}},null,null,[[0,10]],Promise);};exports.initGooglePay=initGooglePay;var presentGooglePay=function _callee22(params){var _await$NativeStripeSd15,error;return _regenerator.default.async(function _callee22$(_context22){while(1){switch(_context22.prev=_context22.next){case 0:_context22.prev=0;_context22.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.presentGooglePay(params));case 3:_await$NativeStripeSd15=_context22.sent;error=_await$NativeStripeSd15.error;if(!error){_context22.next=7;break;}return _context22.abrupt("return",{error:error});case 7:return _context22.abrupt("return",{});case 10:_context22.prev=10;_context22.t0=_context22["catch"](0);return _context22.abrupt("return",{error:(0,_helpers.createError)(_context22.t0)});case 13:case"end":return _context22.stop();}}},null,null,[[0,10]],Promise);};exports.presentGooglePay=presentGooglePay;var createGooglePayPaymentMethod=function _callee23(params){var _await$NativeStripeSd16,error,paymentMethod;return _regenerator.default.async(function _callee23$(_context23){while(1){switch(_context23.prev=_context23.next){case 0:_context23.prev=0;_context23.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.createGooglePayPaymentMethod(params));case 3:_await$NativeStripeSd16=_context23.sent;error=_await$NativeStripeSd16.error;paymentMethod=_await$NativeStripeSd16.paymentMethod;if(!error){_context23.next=8;break;}return _context23.abrupt("return",{error:error});case 8:return _context23.abrupt("return",{paymentMethod:paymentMethod});case 11:_context23.prev=11;_context23.t0=_context23["catch"](0);return _context23.abrupt("return",{error:(0,_helpers.createError)(_context23.t0)});case 14:case"end":return _context23.stop();}}},null,null,[[0,11]],Promise);};exports.createGooglePayPaymentMethod=createGooglePayPaymentMethod;var openApplePaySetup=function _callee24(){var _await$NativeStripeSd17,error;return _regenerator.default.async(function _callee24$(_context24){while(1){switch(_context24.prev=_context24.next){case 0:_context24.prev=0;_context24.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.openApplePaySetup());case 3:_await$NativeStripeSd17=_context24.sent;error=_await$NativeStripeSd17.error;if(!error){_context24.next=7;break;}return _context24.abrupt("return",{error:error});case 7:return _context24.abrupt("return",{});case 10:_context24.prev=10;_context24.t0=_context24["catch"](0);return _context24.abrupt("return",{error:(0,_helpers.createError)(_context24.t0)});case 13:case"end":return _context24.stop();}}},null,null,[[0,10]],Promise);};exports.openApplePaySetup=openApplePaySetup;var collectBankAccountForPayment=function _callee25(clientSecret,params){var _ref3,paymentIntent,error;return _regenerator.default.async(function _callee25$(_context25){while(1){switch(_context25.prev=_context25.next){case 0:if(!_helpers.isAndroid){_context25.next=2;break;}return _context25.abrupt("return",{error:(0,_helpers.createError)({code:_types.ConfirmPaymentError.Failed,message:'collectBankAccountForPayment is only supported on iOS on this version of @stripe/stripe-react-native.'})});case 2:_context25.prev=2;_context25.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.collectBankAccount(PAYMENT_INTENT,clientSecret,params));case 5:_ref3=_context25.sent;paymentIntent=_ref3.paymentIntent;error=_ref3.error;if(!error){_context25.next=10;break;}return _context25.abrupt("return",{error:error});case 10:return _context25.abrupt("return",{paymentIntent:paymentIntent});case 13:_context25.prev=13;_context25.t0=_context25["catch"](2);return _context25.abrupt("return",{error:(0,_helpers.createError)(_context25.t0)});case 16:case"end":return _context25.stop();}}},null,null,[[2,13]],Promise);};exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function _callee26(clientSecret,params){var _ref4,setupIntent,error;return _regenerator.default.async(function _callee26$(_context26){while(1){switch(_context26.prev=_context26.next){case 0:if(!_helpers.isAndroid){_context26.next=2;break;}return _context26.abrupt("return",{error:(0,_helpers.createError)({code:_types.ConfirmSetupIntentError.Failed,message:'collectBankAccountForSetup is only supported on iOS on this version of @stripe/stripe-react-native.'})});case 2:_context26.prev=2;_context26.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.collectBankAccount(SETUP_INTENT,clientSecret,params));case 5:_ref4=_context26.sent;setupIntent=_ref4.setupIntent;error=_ref4.error;if(!error){_context26.next=10;break;}return _context26.abrupt("return",{error:error});case 10:return _context26.abrupt("return",{setupIntent:setupIntent});case 13:_context26.prev=13;_context26.t0=_context26["catch"](2);return _context26.abrupt("return",{error:(0,_helpers.createError)(_context26.t0)});case 16:case"end":return _context26.stop();}}},null,null,[[2,13]],Promise);};exports.collectBankAccountForSetup=collectBankAccountForSetup;
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updateApplePaySummaryItems=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.presentPaymentSheet=exports.presentGooglePay=exports.presentApplePay=exports.openApplePaySetup=exports.isGooglePaySupported=exports.isApplePaySupported=exports.initPaymentSheet=exports.initGooglePay=exports.handleURLCallback=exports.handleNextAction=exports.createTokenForCVCUpdate=exports.createToken=exports.createPaymentMethod=exports.createGooglePayPaymentMethod=exports.confirmSetupIntent=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.confirmApplePayPayment=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _types=require("./types");var APPLE_PAY_NOT_SUPPORTED_MESSAGE='Apple pay is not supported on this device';var createPaymentMethod=function _callee(params){var options,_await$NativeStripeSd,paymentMethod,error,_args=arguments;return _regenerator.default.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:options=_args.length>1&&_args[1]!==undefined?_args[1]:{};_context.prev=1;_context.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.createPaymentMethod(params,options));case 4:_await$NativeStripeSd=_context.sent;paymentMethod=_await$NativeStripeSd.paymentMethod;error=_await$NativeStripeSd.error;if(!error){_context.next=9;break;}return _context.abrupt("return",{error:error});case 9:return _context.abrupt("return",{paymentMethod:paymentMethod});case 12:_context.prev=12;_context.t0=_context["catch"](1);return _context.abrupt("return",{error:_context.t0});case 15:case"end":return _context.stop();}}},null,null,[[1,12]],Promise);};exports.createPaymentMethod=createPaymentMethod;var createToken=function _callee2(params){var _params$country;var _await$NativeStripeSd2,token,error;return _regenerator.default.async(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:if(!(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber)){_context2.next=2;break;}return _context2.abrupt("return",{error:_Errors.MissingRoutingNumber});case 2:_context2.prev=2;_context2.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.createToken(params));case 5:_await$NativeStripeSd2=_context2.sent;token=_await$NativeStripeSd2.token;error=_await$NativeStripeSd2.error;if(!error){_context2.next=10;break;}return _context2.abrupt("return",{error:error});case 10:return _context2.abrupt("return",{token:token});case 13:_context2.prev=13;_context2.t0=_context2["catch"](2);return _context2.abrupt("return",{error:_context2.t0});case 16:case"end":return _context2.stop();}}},null,null,[[2,13]],Promise);};exports.createToken=createToken;var retrievePaymentIntent=function _callee3(clientSecret){var _await$NativeStripeSd3,paymentIntent,error;return _regenerator.default.async(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.retrievePaymentIntent(clientSecret));case 3:_await$NativeStripeSd3=_context3.sent;paymentIntent=_await$NativeStripeSd3.paymentIntent;error=_await$NativeStripeSd3.error;if(!error){_context3.next=8;break;}return _context3.abrupt("return",{error:error});case 8:return _context3.abrupt("return",{paymentIntent:paymentIntent});case 11:_context3.prev=11;_context3.t0=_context3["catch"](0);return _context3.abrupt("return",{error:_context3.t0});case 14:case"end":return _context3.stop();}}},null,null,[[0,11]],Promise);};exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function _callee4(clientSecret){var _await$NativeStripeSd4,setupIntent,error;return _regenerator.default.async(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.prev=0;_context4.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.retrieveSetupIntent(clientSecret));case 3:_await$NativeStripeSd4=_context4.sent;setupIntent=_await$NativeStripeSd4.setupIntent;error=_await$NativeStripeSd4.error;if(!error){_context4.next=8;break;}return _context4.abrupt("return",{error:error});case 8:return _context4.abrupt("return",{setupIntent:setupIntent});case 11:_context4.prev=11;_context4.t0=_context4["catch"](0);return _context4.abrupt("return",{error:_context4.t0});case 14:case"end":return _context4.stop();}}},null,null,[[0,11]],Promise);};exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function _callee5(paymentIntentClientSecret,params){var options,_await$NativeStripeSd5,paymentIntent,error,_args5=arguments;return _regenerator.default.async(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:options=_args5.length>2&&_args5[2]!==undefined?_args5[2]:{};_context5.prev=1;_context5.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,params,options));case 4:_await$NativeStripeSd5=_context5.sent;paymentIntent=_await$NativeStripeSd5.paymentIntent;error=_await$NativeStripeSd5.error;if(!error){_context5.next=9;break;}return _context5.abrupt("return",{error:error});case 9:return _context5.abrupt("return",{paymentIntent:paymentIntent});case 12:_context5.prev=12;_context5.t0=_context5["catch"](1);return _context5.abrupt("return",{error:_context5.t0});case 15:case"end":return _context5.stop();}}},null,null,[[1,12]],Promise);};exports.confirmPayment=confirmPayment;var isApplePaySupported=function _callee6(){return _regenerator.default.async(function _callee6$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:_context6.t0=_helpers.isiOS;if(!_context6.t0){_context6.next=5;break;}_context6.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 4:_context6.t0=_context6.sent;case 5:return _context6.abrupt("return",_context6.t0);case 6:case"end":return _context6.stop();}}},null,null,null,Promise);};exports.isApplePaySupported=isApplePaySupported;var presentApplePay=function _callee7(params){var _await$NativeStripeSd6,paymentMethod,error;return _regenerator.default.async(function _callee7$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:_context7.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 2:if(_context7.sent){_context7.next=4;break;}return _context7.abrupt("return",{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}});case 4:_context7.prev=4;_context7.next=7;return _regenerator.default.awrap(_NativeStripeSdk.default.presentApplePay(params));case 7:_await$NativeStripeSd6=_context7.sent;paymentMethod=_await$NativeStripeSd6.paymentMethod;error=_await$NativeStripeSd6.error;if(!error){_context7.next=12;break;}return _context7.abrupt("return",{error:error});case 12:return _context7.abrupt("return",{paymentMethod:paymentMethod});case 15:_context7.prev=15;_context7.t0=_context7["catch"](4);return _context7.abrupt("return",{error:_context7.t0});case 18:case"end":return _context7.stop();}}},null,null,[[4,15]],Promise);};exports.presentApplePay=presentApplePay;var updateApplePaySummaryItems=function _callee8(summaryItems){var errorAddressFields,_args8=arguments;return _regenerator.default.async(function _callee8$(_context8){while(1){switch(_context8.prev=_context8.next){case 0:errorAddressFields=_args8.length>1&&_args8[1]!==undefined?_args8[1]:[];_context8.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 3:if(_context8.sent){_context8.next=5;break;}return _context8.abrupt("return",{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}});case 5:_context8.prev=5;_context8.next=8;return _regenerator.default.awrap(_NativeStripeSdk.default.updateApplePaySummaryItems(summaryItems,errorAddressFields));case 8:return _context8.abrupt("return",{});case 11:_context8.prev=11;_context8.t0=_context8["catch"](5);return _context8.abrupt("return",{error:_context8.t0});case 14:case"end":return _context8.stop();}}},null,null,[[5,11]],Promise);};exports.updateApplePaySummaryItems=updateApplePaySummaryItems;var confirmApplePayPayment=function _callee9(clientSecret){return _regenerator.default.async(function _callee9$(_context9){while(1){switch(_context9.prev=_context9.next){case 0:_context9.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 2:if(_context9.sent){_context9.next=4;break;}return _context9.abrupt("return",{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}});case 4:_context9.prev=4;_context9.next=7;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmApplePayPayment(clientSecret));case 7:return _context9.abrupt("return",{});case 10:_context9.prev=10;_context9.t0=_context9["catch"](4);return _context9.abrupt("return",{error:_context9.t0});case 13:case"end":return _context9.stop();}}},null,null,[[4,10]],Promise);};exports.confirmApplePayPayment=confirmApplePayPayment;var handleNextAction=function _callee10(paymentIntentClientSecret){var _await$NativeStripeSd7,paymentIntent,error;return _regenerator.default.async(function _callee10$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:_context10.prev=0;_context10.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret));case 3:_await$NativeStripeSd7=_context10.sent;paymentIntent=_await$NativeStripeSd7.paymentIntent;error=_await$NativeStripeSd7.error;if(!error){_context10.next=8;break;}return _context10.abrupt("return",{error:error});case 8:return _context10.abrupt("return",{paymentIntent:paymentIntent});case 11:_context10.prev=11;_context10.t0=_context10["catch"](0);return _context10.abrupt("return",{error:(0,_helpers.createError)(_context10.t0)});case 14:case"end":return _context10.stop();}}},null,null,[[0,11]],Promise);};exports.handleNextAction=handleNextAction;var confirmSetupIntent=function _callee11(paymentIntentClientSecret,params){var options,_await$NativeStripeSd8,setupIntent,error,_args11=arguments;return _regenerator.default.async(function _callee11$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:options=_args11.length>2&&_args11[2]!==undefined?_args11[2]:{};_context11.prev=1;_context11.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,params,options));case 4:_await$NativeStripeSd8=_context11.sent;setupIntent=_await$NativeStripeSd8.setupIntent;error=_await$NativeStripeSd8.error;if(!error){_context11.next=9;break;}return _context11.abrupt("return",{error:error});case 9:return _context11.abrupt("return",{setupIntent:setupIntent});case 12:_context11.prev=12;_context11.t0=_context11["catch"](1);return _context11.abrupt("return",{error:_context11.t0});case 15:case"end":return _context11.stop();}}},null,null,[[1,12]],Promise);};exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function _callee12(cvc){var _await$NativeStripeSd9,tokenId,error;return _regenerator.default.async(function _callee12$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:_context12.prev=0;_context12.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.createTokenForCVCUpdate(cvc));case 3:_await$NativeStripeSd9=_context12.sent;tokenId=_await$NativeStripeSd9.tokenId;error=_await$NativeStripeSd9.error;if(!error){_context12.next=8;break;}return _context12.abrupt("return",{error:error});case 8:return _context12.abrupt("return",{tokenId:tokenId});case 11:_context12.prev=11;_context12.t0=_context12["catch"](0);return _context12.abrupt("return",{error:_context12.t0});case 14:case"end":return _context12.stop();}}},null,null,[[0,11]],Promise);};exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function _callee13(url){var stripeHandled;return _regenerator.default.async(function _callee13$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:_context13.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.handleURLCallback(url));case 2:stripeHandled=_context13.sent;return _context13.abrupt("return",stripeHandled);case 4:case"end":return _context13.stop();}}},null,null,null,Promise);};exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function _callee14(clientSecret,params){var _ref,paymentIntent,error;return _regenerator.default.async(function _callee14$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:_context14.prev=0;_context14.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.verifyMicrodeposits(true,clientSecret,params));case 3:_ref=_context14.sent;paymentIntent=_ref.paymentIntent;error=_ref.error;if(!error){_context14.next=8;break;}return _context14.abrupt("return",{error:error});case 8:return _context14.abrupt("return",{paymentIntent:paymentIntent});case 11:_context14.prev=11;_context14.t0=_context14["catch"](0);return _context14.abrupt("return",{error:(0,_helpers.createError)(_context14.t0)});case 14:case"end":return _context14.stop();}}},null,null,[[0,11]],Promise);};exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function _callee15(clientSecret,params){var _ref2,setupIntent,error;return _regenerator.default.async(function _callee15$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:_context15.prev=0;_context15.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.verifyMicrodeposits(false,clientSecret,params));case 3:_ref2=_context15.sent;setupIntent=_ref2.setupIntent;error=_ref2.error;if(!error){_context15.next=8;break;}return _context15.abrupt("return",{error:error});case 8:return _context15.abrupt("return",{setupIntent:setupIntent});case 11:_context15.prev=11;_context15.t0=_context15["catch"](0);return _context15.abrupt("return",{error:(0,_helpers.createError)(_context15.t0)});case 14:case"end":return _context15.stop();}}},null,null,[[0,11]],Promise);};exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var initPaymentSheet=function _callee16(params){var _await$NativeStripeSd10,paymentOption,error;return _regenerator.default.async(function _callee16$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:_context16.prev=0;_context16.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.initPaymentSheet(params));case 3:_await$NativeStripeSd10=_context16.sent;paymentOption=_await$NativeStripeSd10.paymentOption;error=_await$NativeStripeSd10.error;if(!error){_context16.next=8;break;}return _context16.abrupt("return",{error:error});case 8:return _context16.abrupt("return",{paymentOption:paymentOption});case 11:_context16.prev=11;_context16.t0=_context16["catch"](0);return _context16.abrupt("return",{error:_context16.t0});case 14:case"end":return _context16.stop();}}},null,null,[[0,11]],Promise);};exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function _callee17(){var _await$NativeStripeSd11,paymentOption,error;return _regenerator.default.async(function _callee17$(_context17){while(1){switch(_context17.prev=_context17.next){case 0:_context17.prev=0;_context17.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.presentPaymentSheet());case 3:_await$NativeStripeSd11=_context17.sent;paymentOption=_await$NativeStripeSd11.paymentOption;error=_await$NativeStripeSd11.error;if(!error){_context17.next=8;break;}return _context17.abrupt("return",{error:error});case 8:return _context17.abrupt("return",{paymentOption:paymentOption});case 11:_context17.prev=11;_context17.t0=_context17["catch"](0);return _context17.abrupt("return",{error:_context17.t0});case 14:case"end":return _context17.stop();}}},null,null,[[0,11]],Promise);};exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function _callee18(){var _await$NativeStripeSd12,error;return _regenerator.default.async(function _callee18$(_context18){while(1){switch(_context18.prev=_context18.next){case 0:_context18.prev=0;_context18.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmPaymentSheetPayment());case 3:_await$NativeStripeSd12=_context18.sent;error=_await$NativeStripeSd12.error;if(!error){_context18.next=7;break;}return _context18.abrupt("return",{error:error});case 7:return _context18.abrupt("return",{});case 10:_context18.prev=10;_context18.t0=_context18["catch"](0);return _context18.abrupt("return",{error:_context18.t0});case 13:case"end":return _context18.stop();}}},null,null,[[0,10]],Promise);};exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var isGooglePaySupported=function _callee19(params){return _regenerator.default.async(function _callee19$(_context19){while(1){switch(_context19.prev=_context19.next){case 0:_context19.t0=_helpers.isAndroid;if(!_context19.t0){_context19.next=5;break;}_context19.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isGooglePaySupported(params!=null?params:{}));case 4:_context19.t0=_context19.sent;case 5:return _context19.abrupt("return",_context19.t0);case 6:case"end":return _context19.stop();}}},null,null,null,Promise);};exports.isGooglePaySupported=isGooglePaySupported;var initGooglePay=function _callee20(params){var _await$NativeStripeSd13,error;return _regenerator.default.async(function _callee20$(_context20){while(1){switch(_context20.prev=_context20.next){case 0:_context20.prev=0;_context20.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.initGooglePay(params));case 3:_await$NativeStripeSd13=_context20.sent;error=_await$NativeStripeSd13.error;if(!error){_context20.next=7;break;}return _context20.abrupt("return",{error:error});case 7:return _context20.abrupt("return",{});case 10:_context20.prev=10;_context20.t0=_context20["catch"](0);return _context20.abrupt("return",{error:_context20.t0});case 13:case"end":return _context20.stop();}}},null,null,[[0,10]],Promise);};exports.initGooglePay=initGooglePay;var presentGooglePay=function _callee21(params){var _await$NativeStripeSd14,error;return _regenerator.default.async(function _callee21$(_context21){while(1){switch(_context21.prev=_context21.next){case 0:_context21.prev=0;_context21.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.presentGooglePay(params));case 3:_await$NativeStripeSd14=_context21.sent;error=_await$NativeStripeSd14.error;if(!error){_context21.next=7;break;}return _context21.abrupt("return",{error:error});case 7:return _context21.abrupt("return",{});case 10:_context21.prev=10;_context21.t0=_context21["catch"](0);return _context21.abrupt("return",{error:_context21.t0});case 13:case"end":return _context21.stop();}}},null,null,[[0,10]],Promise);};exports.presentGooglePay=presentGooglePay;var createGooglePayPaymentMethod=function _callee22(params){var _await$NativeStripeSd15,error,paymentMethod;return _regenerator.default.async(function _callee22$(_context22){while(1){switch(_context22.prev=_context22.next){case 0:_context22.prev=0;_context22.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.createGooglePayPaymentMethod(params));case 3:_await$NativeStripeSd15=_context22.sent;error=_await$NativeStripeSd15.error;paymentMethod=_await$NativeStripeSd15.paymentMethod;if(!error){_context22.next=8;break;}return _context22.abrupt("return",{error:error});case 8:return _context22.abrupt("return",{paymentMethod:paymentMethod});case 11:_context22.prev=11;_context22.t0=_context22["catch"](0);return _context22.abrupt("return",{error:_context22.t0});case 14:case"end":return _context22.stop();}}},null,null,[[0,11]],Promise);};exports.createGooglePayPaymentMethod=createGooglePayPaymentMethod;var openApplePaySetup=function _callee23(){var _await$NativeStripeSd16,error;return _regenerator.default.async(function _callee23$(_context23){while(1){switch(_context23.prev=_context23.next){case 0:_context23.prev=0;_context23.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.openApplePaySetup());case 3:_await$NativeStripeSd16=_context23.sent;error=_await$NativeStripeSd16.error;if(!error){_context23.next=7;break;}return _context23.abrupt("return",{error:error});case 7:return _context23.abrupt("return",{});case 10:_context23.prev=10;_context23.t0=_context23["catch"](0);return _context23.abrupt("return",{error:_context23.t0});case 13:case"end":return _context23.stop();}}},null,null,[[0,10]],Promise);};exports.openApplePaySetup=openApplePaySetup;var collectBankAccountForPayment=function _callee24(clientSecret,params){var _ref3,paymentIntent,error;return _regenerator.default.async(function _callee24$(_context24){while(1){switch(_context24.prev=_context24.next){case 0:_context24.prev=0;_context24.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.collectBankAccount(true,clientSecret,params));case 3:_ref3=_context24.sent;paymentIntent=_ref3.paymentIntent;error=_ref3.error;if(!error){_context24.next=8;break;}return _context24.abrupt("return",{error:error});case 8:return _context24.abrupt("return",{paymentIntent:paymentIntent});case 11:_context24.prev=11;_context24.t0=_context24["catch"](0);return _context24.abrupt("return",{error:(0,_helpers.createError)(_context24.t0)});case 14:case"end":return _context24.stop();}}},null,null,[[0,11]],Promise);};exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function _callee25(clientSecret,params){var _ref4,setupIntent,error;return _regenerator.default.async(function _callee25$(_context25){while(1){switch(_context25.prev=_context25.next){case 0:_context25.prev=0;_context25.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.collectBankAccount(false,clientSecret,params));case 3:_ref4=_context25.sent;setupIntent=_ref4.setupIntent;error=_ref4.error;if(!error){_context25.next=8;break;}return _context25.abrupt("return",{error:error});case 8:return _context25.abrupt("return",{setupIntent:setupIntent});case 11:_context25.prev=11;_context25.t0=_context25["catch"](0);return _context25.abrupt("return",{error:(0,_helpers.createError)(_context25.t0)});case 14:case"end":return _context25.stop();}}},null,null,[[0,11]],Promise);};exports.collectBankAccountForSetup=collectBankAccountForSetup;
|
|
2
2
|
//# sourceMappingURL=functions.js.map
|