@stripe/stripe-react-native 0.4.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +6 -1
- package/android/build/.transforms/{c731e6bf5b480f659bf1c341f3f0657c → 253af79d247c9f91c901f2038cdc6938}/results.bin +0 -0
- package/android/build/.transforms/253af79d247c9f91c901f2038cdc6938/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/{e9391f6bbf8da46ff748ca7feadbce73 → 3cbaee99352386a9df7b22dbbb69831e}/results.bin +0 -0
- package/android/build/.transforms/3cbaee99352386a9df7b22dbbb69831e/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/{f0b2868ed2d4a4bb73b1ace98fe4ccfa → 8d3571dbfd2a31ee669f64a85b02f3fc}/results.bin +0 -0
- package/android/build/.transforms/8d3571dbfd2a31ee669f64a85b02f3fc/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/bcac5194839639e17669a07fd0143335/results.bin +1 -0
- package/android/build/.transforms/bcac5194839639e17669a07fd0143335/transformed/classes/classes.dex +0 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +4 -2
- package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/R.txt +553 -29
- package/android/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +1 -1
- package/android/build/intermediates/javac/debug/classes/com/reactnativestripesdk/databinding/GooglepayButtonBinding.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativestripesdk/databinding/GooglepayButtonNoShadowBinding.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativestripesdk/databinding/PayWithGooglepayButtonBinding.class +0 -0
- package/android/build/intermediates/javac/debug/classes/com/reactnativestripesdk/databinding/PayWithGooglepayButtonNoShadowBinding.class +0 -0
- package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
- package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +4 -2
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +523 -29
- 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.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.len +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/constants.tab_i +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 +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.values.s +1 -1
- 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.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.len +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/subtypes.tab_i +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/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/reactnativestripesdk_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/AuBECSDebitFormView$setListeners$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/AuBECSDebitFormView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/AuBECSDebitFormViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardChangedEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardChangedEvent.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$7.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldView$setListeners$8.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/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/CardFocusEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFocusEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFormCompleteEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFormCompleteEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFormView.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/CreateTokenErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/DefaultPushProvisioningProxy.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/ExtensionsKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/FormCompleteEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/FormCompleteEvent.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/GooglePayButtonView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayFragment$onViewCreated$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayFragment$onViewCreated$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayFragment$onViewCreated$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayFragment$onViewCreated$4.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$WhenMappings.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/PaymentSheetErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentSheetFragment.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentSheetFragmentKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PushProvisioningProxy$createActivityEventListener$listener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PushProvisioningProxy.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/RetrievePaymentIntentErrorType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/RetrieveSetupIntentErrorType.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/StripeContainerView.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$mActivityEventListener$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/debug/com/reactnativestripesdk/StripeSdkPackage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView$onAfterUpdateTransaction$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/pushprovisioning/AddToWalletCompleteEvent$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/pushprovisioning/AddToWalletCompleteEvent.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/pushprovisioning/EphemeralKeyProvider$CREATOR.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/pushprovisioning/EphemeralKeyProvider.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/pushprovisioning/TapAndPayProxy.class +0 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormView.kt +1 -10
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +4 -2
- package/android/src/main/java/com/reactnativestripesdk/CardChangedEvent.kt +0 -4
- package/android/src/main/java/com/reactnativestripesdk/{StripeSdkCardView.kt → CardFieldView.kt} +6 -9
- package/android/src/main/java/com/reactnativestripesdk/{StripeSdkCardViewManager.kt → CardFieldViewManager.kt} +20 -16
- package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +23 -23
- package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +9 -6
- package/android/src/main/java/com/reactnativestripesdk/Errors.kt +3 -3
- package/android/src/main/java/com/reactnativestripesdk/FormCompleteEvent.kt +0 -1
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +1 -0
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +1 -1
- package/android/src/main/java/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.kt +1 -1
- package/android/src/main/java/com/reactnativestripesdk/Mappers.kt +51 -12
- package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +122 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +103 -98
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +51 -58
- package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +2 -1
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +84 -124
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +1 -1
- package/ios/.DS_Store +0 -0
- package/ios/AuBECSDebitFormView.swift +15 -0
- package/ios/Errors.swift +9 -35
- package/ios/Mappers.swift +110 -5
- package/ios/PaymentMethodFactory.swift +46 -1
- package/ios/StripeSdk.m +15 -1
- package/ios/StripeSdk.swift +287 -105
- package/jest/mock.js +1 -1
- package/lib/commonjs/NativeStripeSdk.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/hooks/useStripe.js +1 -1
- package/lib/commonjs/hooks/useStripe.js.map +1 -1
- package/lib/commonjs/types/Card.js.map +1 -1
- package/lib/commonjs/types/NextAction.js +2 -0
- package/lib/commonjs/types/NextAction.js.map +1 -0
- package/lib/commonjs/types/PaymentIntents.js.map +1 -1
- package/lib/commonjs/types/PaymentMethods.js.map +1 -1
- package/lib/commonjs/types/SetupIntent.js.map +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/NativeStripeSdk.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/hooks/useStripe.js +1 -1
- package/lib/module/hooks/useStripe.js.map +1 -1
- package/lib/module/types/Card.js.map +1 -1
- package/lib/module/types/NextAction.js +2 -0
- package/lib/module/types/NextAction.js.map +1 -0
- package/lib/module/types/PaymentIntents.js.map +1 -1
- package/lib/module/types/PaymentMethods.js.map +1 -1
- package/lib/module/types/SetupIntent.js.map +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/typescript/e2e/helpers.d.ts +1 -0
- package/lib/typescript/e2e/screenObject/BasicPaymentScreen.d.ts +1 -0
- package/lib/typescript/e2e/screenObject/HomeScreen.d.ts +1 -1
- package/lib/typescript/example/src/App.d.ts +2 -0
- package/lib/typescript/example/src/screens/ACHPaymentScreen.d.ts +1 -0
- package/lib/typescript/example/src/screens/ACHSetupScreen.d.ts +1 -0
- package/lib/typescript/src/NativeStripeSdk.d.ts +4 -2
- package/lib/typescript/src/components/StripeProvider.d.ts +4 -10
- package/lib/typescript/src/functions.d.ts +10 -2
- package/lib/typescript/src/hooks/useStripe.d.ts +7 -2
- package/lib/typescript/src/types/Card.d.ts +1 -0
- package/lib/typescript/src/types/NextAction.d.ts +32 -0
- package/lib/typescript/src/types/PaymentIntents.d.ts +2 -0
- package/lib/typescript/src/types/PaymentMethods.d.ts +28 -2
- package/lib/typescript/src/types/SetupIntent.d.ts +4 -2
- package/lib/typescript/src/types/index.d.ts +23 -4
- package/package.json +4 -4
- package/src/NativeStripeSdk.tsx +15 -3
- package/src/components/StripeProvider.tsx +7 -15
- package/src/functions.ts +174 -3
- package/src/hooks/useStripe.tsx +57 -6
- package/src/types/Card.ts +1 -0
- package/src/types/NextAction.ts +44 -0
- package/src/types/PaymentIntents.ts +2 -0
- package/src/types/PaymentMethods.ts +31 -2
- package/src/types/SetupIntent.ts +9 -2
- package/src/types/index.ts +32 -4
- package/stripe-react-native.podspec +3 -2
- package/android/build/.transforms/c731e6bf5b480f659bf1c341f3f0657c/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/e9391f6bbf8da46ff748ca7feadbce73/transformed/classes/classes.dex +0 -0
- package/android/build/.transforms/f0b2868ed2d4a4bb73b1ace98fe4ccfa/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/tmp/compileDebugJavaWithJavac/source-classes-mapping.txt +0 -10
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ConstantsKt.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/PaymentSheetFragment$configureFlowController$onFlowControllerConfigure$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentSheetFragment$onViewCreated$paymentOptionCallback$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentSheetFragment$onViewCreated$paymentResultCallback$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkCardView$setListeners$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkCardView$setListeners$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkCardView$setListeners$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkCardView$setListeners$5.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkCardView$setListeners$6.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkCardView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkCardViewManager.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$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/debug/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$3$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$3.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$payWithWeChatPay$1.class +0 -0
package/ios/Mappers.swift
CHANGED
|
@@ -65,6 +65,7 @@ class Mappers {
|
|
|
65
65
|
return nil
|
|
66
66
|
}
|
|
67
67
|
let result: NSDictionary = [
|
|
68
|
+
"id": bankAccount?.stripeID ?? NSNull(),
|
|
68
69
|
"bankName": bankAccount?.bankName ?? NSNull(),
|
|
69
70
|
"accountHolderName": bankAccount?.accountHolderName ?? NSNull(),
|
|
70
71
|
"accountHolderType": mapFromBankAccountHolderType(bankAccount?.accountHolderType) ?? NSNull(),
|
|
@@ -72,7 +73,6 @@ class Mappers {
|
|
|
72
73
|
"currency": bankAccount?.currency ?? NSNull(),
|
|
73
74
|
"routingNumber": bankAccount?.routingNumber ?? NSNull(),
|
|
74
75
|
"status": mapFromBankAccountStatus(bankAccount?.status) ?? NSNull(),
|
|
75
|
-
|
|
76
76
|
]
|
|
77
77
|
return result
|
|
78
78
|
}
|
|
@@ -90,7 +90,8 @@ class Mappers {
|
|
|
90
90
|
"last4": card?.last4 ?? NSNull(),
|
|
91
91
|
"funding": mapFromFunding(card?.funding) ?? NSNull(),
|
|
92
92
|
"name": card?.name ?? NSNull(),
|
|
93
|
-
"address": mapFromAddress(address: card?.address)
|
|
93
|
+
"address": mapFromAddress(address: card?.address),
|
|
94
|
+
"id": card?.stripeID ?? NSNull(),
|
|
94
95
|
]
|
|
95
96
|
return cardMap
|
|
96
97
|
}
|
|
@@ -156,6 +157,7 @@ class Mappers {
|
|
|
156
157
|
"card": mapFromCard(token.card) ?? NSNull(),
|
|
157
158
|
"livemode": token.livemode,
|
|
158
159
|
"type": mapFromTokenType(token.type) ?? NSNull(),
|
|
160
|
+
|
|
159
161
|
]
|
|
160
162
|
|
|
161
163
|
return tokenMap
|
|
@@ -280,6 +282,7 @@ class Mappers {
|
|
|
280
282
|
case STPPaymentMethodType.UPI: return "Upi"
|
|
281
283
|
case STPPaymentMethodType.afterpayClearpay: return "AfterpayClearpay"
|
|
282
284
|
case STPPaymentMethodType.klarna: return "Klarna"
|
|
285
|
+
case STPPaymentMethodType.USBankAccount: return "USBankAccount"
|
|
283
286
|
case STPPaymentMethodType.unknown: return "Unknown"
|
|
284
287
|
default: return "Unknown"
|
|
285
288
|
}
|
|
@@ -307,6 +310,7 @@ class Mappers {
|
|
|
307
310
|
case "AfterpayClearpay": return STPPaymentMethodType.afterpayClearpay
|
|
308
311
|
case "Klarna": return STPPaymentMethodType.klarna
|
|
309
312
|
case "WeChatPay": return STPPaymentMethodType.weChatPay
|
|
313
|
+
case "USBankAccount": return STPPaymentMethodType.USBankAccount
|
|
310
314
|
default: return STPPaymentMethodType.unknown
|
|
311
315
|
}
|
|
312
316
|
}
|
|
@@ -372,7 +376,8 @@ class Mappers {
|
|
|
372
376
|
"amount": paymentIntent.amount,
|
|
373
377
|
"lastPaymentError": NSNull(),
|
|
374
378
|
"shipping": NSNull(),
|
|
375
|
-
"canceledAt": NSNull()
|
|
379
|
+
"canceledAt": NSNull(),
|
|
380
|
+
"nextAction": mapNextAction(nextAction: paymentIntent.nextAction) ?? NSNull(),
|
|
376
381
|
]
|
|
377
382
|
|
|
378
383
|
if let lastPaymentError = paymentIntent.lastPaymentError {
|
|
@@ -398,6 +403,55 @@ class Mappers {
|
|
|
398
403
|
return intent;
|
|
399
404
|
}
|
|
400
405
|
|
|
406
|
+
class func mapNextAction(nextAction: STPIntentAction?) -> NSDictionary? {
|
|
407
|
+
if let it = nextAction {
|
|
408
|
+
switch it.type {
|
|
409
|
+
case .verifyWithMicrodeposits:
|
|
410
|
+
return [
|
|
411
|
+
"type": "verifyWithMicrodeposits",
|
|
412
|
+
"redirectUrl": it.verifyWithMicrodeposits?.hostedVerificationURL.absoluteString ?? NSNull(),
|
|
413
|
+
"microdepositType": it.verifyWithMicrodeposits?.microdepositType.description ?? NSNull(),
|
|
414
|
+
"arrivalDate": it.verifyWithMicrodeposits?.arrivalDate.timeIntervalSince1970.description ?? NSNull(),
|
|
415
|
+
]
|
|
416
|
+
case .redirectToURL:
|
|
417
|
+
return [
|
|
418
|
+
"type": "urlRedirect",
|
|
419
|
+
"redirectUrl": it.redirectToURL?.url.absoluteString ?? NSNull()
|
|
420
|
+
]
|
|
421
|
+
case .weChatPayRedirectToApp:
|
|
422
|
+
return [
|
|
423
|
+
"type": "weChatRedirect",
|
|
424
|
+
"redirectUrl": it.weChatPayRedirectToApp?.nativeURL?.absoluteString ?? NSNull()
|
|
425
|
+
]
|
|
426
|
+
case .alipayHandleRedirect:
|
|
427
|
+
return [
|
|
428
|
+
"type": "alipayRedirect",
|
|
429
|
+
"redirectUrl": it.alipayHandleRedirect?.url.absoluteString ?? NSNull(),
|
|
430
|
+
"nativeRedirectUrl": it.alipayHandleRedirect?.nativeURL?.absoluteString ?? NSNull(),
|
|
431
|
+
]
|
|
432
|
+
case .OXXODisplayDetails:
|
|
433
|
+
return [
|
|
434
|
+
"type": "oxxoVoucher",
|
|
435
|
+
"expiration": it.oxxoDisplayDetails?.expiresAfter.timeIntervalSince1970 ?? NSNull(),
|
|
436
|
+
"voucherURL": it.oxxoDisplayDetails?.hostedVoucherURL.absoluteString ?? NSNull(),
|
|
437
|
+
"voucherNumber": it.oxxoDisplayDetails?.number ?? NSNull(),
|
|
438
|
+
]
|
|
439
|
+
// TODO: Not supported on Android
|
|
440
|
+
// case .boletoDisplayDetails:
|
|
441
|
+
// return [
|
|
442
|
+
// "type": "boletoVoucher",
|
|
443
|
+
// "expiration": it.boletoDisplayDetails?.expiresAt.timeIntervalSince1970.description ?? NSNull(),
|
|
444
|
+
// "voucherURL": it.boletoDisplayDetails?.hostedVoucherURL.absoluteString ?? NSNull(),
|
|
445
|
+
// "voucherNumber": it.boletoDisplayDetails?.number ?? NSNull(),
|
|
446
|
+
// ]
|
|
447
|
+
default: // .useStripeSDK, .BLIKAuthorize, .unknown
|
|
448
|
+
return nil
|
|
449
|
+
}
|
|
450
|
+
} else {
|
|
451
|
+
return nil
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
401
455
|
class func mapFromPaymentIntentLastPaymentErrorType(_ errorType: STPPaymentIntentLastPaymentErrorType?) -> String? {
|
|
402
456
|
if let errorType = errorType {
|
|
403
457
|
switch errorType {
|
|
@@ -537,6 +591,17 @@ class Mappers {
|
|
|
537
591
|
"fingerprint": paymentMethod.auBECSDebit?.fingerprint ?? NSNull(),
|
|
538
592
|
"last4": paymentMethod.auBECSDebit?.last4 ?? NSNull()
|
|
539
593
|
]
|
|
594
|
+
let USBankAccount: NSDictionary = [
|
|
595
|
+
"routingNumber": paymentMethod.usBankAccount?.routingNumber ?? NSNull(),
|
|
596
|
+
"accountHolderType": mapFromUSBankAccountHolderType(type: paymentMethod.usBankAccount?.accountHolderType),
|
|
597
|
+
"accountType": mapFromUSBankAccountType(type: paymentMethod.usBankAccount?.accountType),
|
|
598
|
+
"last4": paymentMethod.usBankAccount?.last4 ?? NSNull(),
|
|
599
|
+
"bankName": paymentMethod.usBankAccount?.bankName ?? NSNull(),
|
|
600
|
+
"linkedAccount": paymentMethod.usBankAccount?.linkedAccount ?? NSNull(),
|
|
601
|
+
"fingerprint": paymentMethod.usBankAccount?.fingerprint ?? NSNull(),
|
|
602
|
+
"preferredNetworks": paymentMethod.usBankAccount?.networks?.preferred ?? NSNull(),
|
|
603
|
+
"supportedNetworks": paymentMethod.usBankAccount?.networks?.supported ?? NSNull(),
|
|
604
|
+
]
|
|
540
605
|
let method: NSDictionary = [
|
|
541
606
|
"id": paymentMethod.stripeId,
|
|
542
607
|
"type": Mappers.mapPaymentMethodType(type: paymentMethod.type),
|
|
@@ -560,6 +625,7 @@ class Mappers {
|
|
|
560
625
|
"Upi": [
|
|
561
626
|
"vpa": paymentMethod.upi?.vpa
|
|
562
627
|
],
|
|
628
|
+
"USBankAccount": USBankAccount
|
|
563
629
|
]
|
|
564
630
|
return method
|
|
565
631
|
}
|
|
@@ -617,7 +683,8 @@ class Mappers {
|
|
|
617
683
|
"usage": mapFromSetupIntentUsage(usage: setupIntent.usage),
|
|
618
684
|
"paymentMethodId": setupIntent.paymentMethodID ?? NSNull(),
|
|
619
685
|
"created": NSNull(),
|
|
620
|
-
"lastSetupError": NSNull()
|
|
686
|
+
"lastSetupError": NSNull(),
|
|
687
|
+
"nextAction": mapNextAction(nextAction: setupIntent.nextAction) ?? NSNull(),
|
|
621
688
|
]
|
|
622
689
|
|
|
623
690
|
|
|
@@ -839,7 +906,7 @@ class Mappers {
|
|
|
839
906
|
}
|
|
840
907
|
return nil
|
|
841
908
|
}
|
|
842
|
-
|
|
909
|
+
|
|
843
910
|
class func mapFromCardValidationState(state: STPCardValidationState?) -> String {
|
|
844
911
|
if let state = state {
|
|
845
912
|
switch state {
|
|
@@ -851,4 +918,42 @@ class Mappers {
|
|
|
851
918
|
}
|
|
852
919
|
return "Unknown"
|
|
853
920
|
}
|
|
921
|
+
|
|
922
|
+
class func mapFromUSBankAccountHolderType(type: STPPaymentMethodUSBankAccountHolderType?) -> String {
|
|
923
|
+
if let type = type {
|
|
924
|
+
switch type {
|
|
925
|
+
case STPPaymentMethodUSBankAccountHolderType.company: return "Company"
|
|
926
|
+
case STPPaymentMethodUSBankAccountHolderType.individual: return "Individual"
|
|
927
|
+
case STPPaymentMethodUSBankAccountHolderType.unknown: return "Unknown"
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
return "Unknown"
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
class func mapToUSBankAccountHolderType(type: String?) -> STPPaymentMethodUSBankAccountHolderType {
|
|
934
|
+
switch type {
|
|
935
|
+
case "Company": return STPPaymentMethodUSBankAccountHolderType.company
|
|
936
|
+
case "Individual": return STPPaymentMethodUSBankAccountHolderType.individual
|
|
937
|
+
default: return STPPaymentMethodUSBankAccountHolderType.individual
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
class func mapFromUSBankAccountType(type: STPPaymentMethodUSBankAccountType?) -> String {
|
|
942
|
+
if let type = type {
|
|
943
|
+
switch type {
|
|
944
|
+
case STPPaymentMethodUSBankAccountType.savings: return "Savings"
|
|
945
|
+
case STPPaymentMethodUSBankAccountType.checking: return "Checking"
|
|
946
|
+
case STPPaymentMethodUSBankAccountType.unknown: return "Unknown"
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
return "Unknown"
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
class func mapToUSBankAccountType(type: String?) -> STPPaymentMethodUSBankAccountType {
|
|
953
|
+
switch type {
|
|
954
|
+
case "Savings": return STPPaymentMethodUSBankAccountType.savings
|
|
955
|
+
case "Checking": return STPPaymentMethodUSBankAccountType.checking
|
|
956
|
+
default: return STPPaymentMethodUSBankAccountType.checking
|
|
957
|
+
}
|
|
958
|
+
}
|
|
854
959
|
}
|
|
@@ -47,6 +47,8 @@ class PaymentMethodFactory {
|
|
|
47
47
|
return try createAfterpayClearpayPaymentMethodParams()
|
|
48
48
|
case STPPaymentMethodType.klarna:
|
|
49
49
|
return try createKlarnaPaymentMethodParams()
|
|
50
|
+
case STPPaymentMethodType.USBankAccount:
|
|
51
|
+
return try createUSBankAccountPaymentMethodParams()
|
|
50
52
|
// case STPPaymentMethodType.weChatPay:
|
|
51
53
|
// return try createWeChatPayPaymentMethodParams()
|
|
52
54
|
default:
|
|
@@ -92,6 +94,8 @@ class PaymentMethodFactory {
|
|
|
92
94
|
return nil
|
|
93
95
|
case STPPaymentMethodType.weChatPay:
|
|
94
96
|
return try createWeChatPayPaymentMethodOptions()
|
|
97
|
+
case STPPaymentMethodType.USBankAccount:
|
|
98
|
+
return try createUSBankAccountPaymentMethodOptions()
|
|
95
99
|
default:
|
|
96
100
|
throw PaymentMethodError.paymentNotSupported
|
|
97
101
|
}
|
|
@@ -105,6 +109,16 @@ class PaymentMethodFactory {
|
|
|
105
109
|
// return STPPaymentMethodParams(weChatPay: params, billingDetails: billingDetailsParams, metadata: nil)
|
|
106
110
|
// }
|
|
107
111
|
//
|
|
112
|
+
|
|
113
|
+
private func createUSBankAccountPaymentMethodOptions() throws -> STPConfirmPaymentMethodOptions {
|
|
114
|
+
let paymentOptions = STPConfirmPaymentMethodOptions()
|
|
115
|
+
if let usage = self.params?["setupFutureUsage"] as? String {
|
|
116
|
+
paymentOptions.usBankAccountOptions = STPConfirmUSBankAccountOptions(setupFutureUsage: Mappers.mapToPaymentIntentFutureUsage(usage: usage))
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return paymentOptions
|
|
120
|
+
}
|
|
121
|
+
|
|
108
122
|
private func createWeChatPayPaymentMethodOptions() throws -> STPConfirmPaymentMethodOptions {
|
|
109
123
|
guard let appId = self.params?["appId"] as? String else {
|
|
110
124
|
throw PaymentMethodError.weChatPayPaymentMissingParams
|
|
@@ -307,13 +321,35 @@ class PaymentMethodFactory {
|
|
|
307
321
|
|
|
308
322
|
private func createKlarnaPaymentMethodParams() throws -> STPPaymentMethodParams {
|
|
309
323
|
let params = STPPaymentMethodKlarnaParams()
|
|
310
|
-
|
|
324
|
+
|
|
311
325
|
if let billingDetails = billingDetailsParams, billingDetails.address?.country != nil, billingDetails.email != nil {
|
|
312
326
|
return STPPaymentMethodParams(klarna: params, billingDetails: billingDetails, metadata: nil)
|
|
313
327
|
} else {
|
|
314
328
|
throw PaymentMethodError.klarnaPaymentMissingParams
|
|
315
329
|
}
|
|
316
330
|
}
|
|
331
|
+
|
|
332
|
+
private func createUSBankAccountPaymentMethodParams() throws -> STPPaymentMethodParams {
|
|
333
|
+
let params = STPPaymentMethodUSBankAccountParams()
|
|
334
|
+
|
|
335
|
+
guard let accountNumber = self.params?["accountNumber"] as? String else {
|
|
336
|
+
throw PaymentMethodError.usBankAccountPaymentMissingAccountNumber
|
|
337
|
+
}
|
|
338
|
+
guard let routingNumber = self.params?["routingNumber"] as? String else {
|
|
339
|
+
throw PaymentMethodError.usBankAccountPaymentMissingRoutingNumber
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
params.accountNumber = accountNumber
|
|
343
|
+
params.routingNumber = routingNumber
|
|
344
|
+
params.accountHolderType = Mappers.mapToUSBankAccountHolderType(type: self.params?["accountHolderType"] as? String)
|
|
345
|
+
params.accountType = Mappers.mapToUSBankAccountType(type: self.params?["accountType"] as? String)
|
|
346
|
+
|
|
347
|
+
if let billingDetails = billingDetailsParams, billingDetails.name != nil {
|
|
348
|
+
return STPPaymentMethodParams(usBankAccount: params, billingDetails: billingDetails, metadata: nil)
|
|
349
|
+
} else {
|
|
350
|
+
throw PaymentMethodError.usBankAccountPaymentMissingParams
|
|
351
|
+
}
|
|
352
|
+
}
|
|
317
353
|
}
|
|
318
354
|
|
|
319
355
|
enum PaymentMethodError: Error {
|
|
@@ -330,6 +366,9 @@ enum PaymentMethodError: Error {
|
|
|
330
366
|
case afterpayClearpayPaymentMissingParams
|
|
331
367
|
case klarnaPaymentMissingParams
|
|
332
368
|
case weChatPayPaymentMissingParams
|
|
369
|
+
case usBankAccountPaymentMissingParams
|
|
370
|
+
case usBankAccountPaymentMissingAccountNumber
|
|
371
|
+
case usBankAccountPaymentMissingRoutingNumber
|
|
333
372
|
}
|
|
334
373
|
|
|
335
374
|
extension PaymentMethodError: LocalizedError {
|
|
@@ -361,6 +400,12 @@ extension PaymentMethodError: LocalizedError {
|
|
|
361
400
|
return NSLocalizedString("You must provide appId", comment: "Create payment error")
|
|
362
401
|
case .klarnaPaymentMissingParams:
|
|
363
402
|
return NSLocalizedString("Klarna requires that you provide the following billing details: email, country", comment: "Create payment error")
|
|
403
|
+
case .usBankAccountPaymentMissingParams:
|
|
404
|
+
return NSLocalizedString("When creating a US bank account payment method, you must provide the following billing details: name", comment: "Create payment error")
|
|
405
|
+
case .usBankAccountPaymentMissingAccountNumber:
|
|
406
|
+
return NSLocalizedString("When creating a US bank account payment method, you must provide the bank account number", comment: "Create payment error")
|
|
407
|
+
case .usBankAccountPaymentMissingRoutingNumber:
|
|
408
|
+
return NSLocalizedString("When creating a US bank account payment method, you must provide the bank routing number", comment: "Create payment error")
|
|
364
409
|
}
|
|
365
410
|
}
|
|
366
411
|
}
|
package/ios/StripeSdk.m
CHANGED
|
@@ -70,7 +70,7 @@ RCT_EXTERN_METHOD(
|
|
|
70
70
|
)
|
|
71
71
|
|
|
72
72
|
RCT_EXTERN_METHOD(
|
|
73
|
-
|
|
73
|
+
handleNextAction:(NSString *)paymentIntentClientSecret
|
|
74
74
|
resolver: (RCTPromiseResolveBlock)resolve
|
|
75
75
|
rejecter: (RCTPromiseRejectBlock)reject
|
|
76
76
|
)
|
|
@@ -107,5 +107,19 @@ RCT_EXTERN_METHOD(
|
|
|
107
107
|
rejecter: (RCTPromiseRejectBlock)reject
|
|
108
108
|
)
|
|
109
109
|
|
|
110
|
+
RCT_EXTERN_METHOD(
|
|
111
|
+
verifyMicrodeposits:(NSString *)intentType
|
|
112
|
+
clientSecret:(NSString *)clientSecret
|
|
113
|
+
params:(NSDictionary *)params
|
|
114
|
+
resolver: (RCTPromiseResolveBlock)resolve
|
|
115
|
+
rejecter: (RCTPromiseRejectBlock)reject
|
|
116
|
+
)
|
|
117
|
+
RCT_EXTERN_METHOD(
|
|
118
|
+
collectBankAccount:(NSString *)intentType
|
|
119
|
+
clientSecret:(NSString *)clientSecret
|
|
120
|
+
params:(NSDictionary *)params
|
|
121
|
+
resolver: (RCTPromiseResolveBlock)resolve
|
|
122
|
+
rejecter: (RCTPromiseRejectBlock)reject
|
|
123
|
+
)
|
|
110
124
|
|
|
111
125
|
@end
|