@stripe/stripe-react-native 0.44.0 → 0.45.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/.clang-format +90 -0
- package/.editorconfig +3 -0
- package/CHANGELOG.md +7 -1
- package/android/build.gradle +89 -18
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +15 -6
- package/android/src/main/java/com/reactnativestripesdk/CardChangeEvent.kt +56 -0
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +4 -4
- package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +55 -45
- package/android/src/main/java/com/reactnativestripesdk/{CardFocusEvent.kt → CardFocusChangeEvent.kt} +2 -2
- package/android/src/main/java/com/reactnativestripesdk/CardFormCompleteEvent.kt +17 -16
- package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +5 -5
- package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +39 -33
- package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +4 -2
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +182 -0
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +231 -0
- package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +8 -5
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +14 -6
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +3 -1
- package/android/src/main/java/com/reactnativestripesdk/PaymentOptionDisplayDataMapper.kt +17 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +266 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +8 -13
- package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +11 -3
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +106 -59
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +34 -4
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +33 -27
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +49 -24
- package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +16 -3
- package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +11 -29
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +36 -12
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +5 -3
- package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +4 -0
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +21 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddToWalletButtonManagerDelegate.java +49 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddToWalletButtonManagerInterface.java +25 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddressSheetViewManagerDelegate.java +64 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddressSheetViewManagerInterface.java +30 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerDelegate.java +41 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerInterface.java +20 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AuBECSDebitFormManagerDelegate.java +36 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AuBECSDebitFormManagerInterface.java +20 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFieldManagerDelegate.java +73 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFieldManagerInterface.java +31 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFormManagerDelegate.java +67 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFormManagerInterface.java +29 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerDelegate.java +49 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerInterface.java +21 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/GooglePayButtonManagerDelegate.java +38 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/GooglePayButtonManagerInterface.java +19 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeContainerManagerDelegate.java +32 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeContainerManagerInterface.java +17 -0
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +311 -0
- package/ios/AddressSheet/AddressSheetUtils.swift +21 -19
- package/ios/AddressSheet/AddressSheetView.swift +23 -17
- package/ios/ApplePayButtonManager.m +0 -1
- package/ios/ApplePayButtonManager.swift +1 -3
- package/ios/ApplePayButtonView.swift +25 -20
- package/ios/ApplePayViewController.swift +22 -22
- package/ios/AuBECSDebitFormView.swift +14 -8
- package/ios/CardFieldManager.swift +1 -4
- package/ios/CardFieldView.swift +28 -25
- package/ios/CardFormManager.swift +1 -4
- package/ios/CardFormView.swift +25 -16
- package/ios/CustomerSheet/CustomerSheetUtils.swift +12 -16
- package/ios/CustomerSheet/ReactNativeCustomerAdapter.swift +8 -8
- package/ios/EmbeddedPaymentElementManager.m +6 -0
- package/ios/EmbeddedPaymentElementView.swift +48 -0
- package/ios/NewArch/AddToWalletButtonComponentView.h +10 -0
- package/ios/NewArch/AddToWalletButtonComponentView.mm +93 -0
- package/ios/NewArch/AddressSheetViewComponentView.h +10 -0
- package/ios/NewArch/AddressSheetViewComponentView.mm +109 -0
- package/ios/NewArch/ApplePayButtonComponentView.h +10 -0
- package/ios/NewArch/ApplePayButtonComponentView.mm +124 -0
- package/ios/NewArch/AuBECSDebitFormComponentView.h +10 -0
- package/ios/NewArch/AuBECSDebitFormComponentView.mm +95 -0
- package/ios/NewArch/CardFieldComponentView.h +10 -0
- package/ios/NewArch/CardFieldComponentView.mm +125 -0
- package/ios/NewArch/CardFormComponentView.h +10 -0
- package/ios/NewArch/CardFormComponentView.mm +108 -0
- package/ios/NewArch/StripeContainerComponentView.h +10 -0
- package/ios/NewArch/StripeContainerComponentView.mm +74 -0
- package/ios/NewArch/StripeNewArchConversions.h +20 -0
- package/ios/NewArch/StripeNewArchConversions.mm +47 -0
- package/ios/OldArch/StripeSdkEventEmitterCompat.h +27 -0
- package/ios/OldArch/StripeSdkEventEmitterCompat.m +105 -0
- package/ios/PaymentOptionDisplayData+ReactNative.swift +55 -0
- package/ios/PaymentSheetAppearance.swift +194 -1
- package/ios/PushProvisioning/AddToWalletButtonView.swift +19 -13
- package/ios/StripeContainerView.swift +5 -3
- package/ios/StripeSdk.h +21 -0
- package/ios/StripeSdk.mm +415 -0
- package/ios/StripeSdkEmitter.swift +19 -0
- package/ios/{StripeSdk+CustomerSheet.swift → StripeSdkImpl+CustomerSheet.swift} +24 -25
- package/ios/StripeSdkImpl+Embedded.swift +327 -0
- package/ios/{StripeSdk+PaymentSheet.swift → StripeSdkImpl+PaymentSheet.swift} +18 -29
- package/ios/{StripeSdk.swift → StripeSdkImpl.swift} +50 -72
- package/ios/StripeSwiftInterop.h +25 -0
- package/ios/stripe_react_native.h +2 -0
- package/lib/commonjs/components/AddToWalletButton.js +1 -1
- package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
- package/lib/commonjs/components/AddressSheet.js +1 -1
- package/lib/commonjs/components/AddressSheet.js.map +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
- package/lib/commonjs/components/CardField.js +1 -1
- package/lib/commonjs/components/CardField.js.map +1 -1
- package/lib/commonjs/components/CardForm.js +1 -1
- package/lib/commonjs/components/CardForm.js.map +1 -1
- package/lib/commonjs/components/CustomerSheet.js +1 -1
- package/lib/commonjs/components/CustomerSheet.js.map +1 -1
- package/lib/commonjs/components/PlatformPayButton.js +1 -1
- package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
- package/lib/commonjs/components/StripeContainer.js +1 -1
- package/lib/commonjs/components/StripeContainer.js.map +1 -1
- package/lib/commonjs/components/StripeProvider.js +1 -1
- package/lib/commonjs/components/StripeProvider.js.map +1 -1
- package/lib/commonjs/events.js +2 -0
- package/lib/commonjs/events.js.map +1 -0
- package/lib/commonjs/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeAddToWalletButton.js +2 -0
- package/lib/commonjs/specs/NativeAddToWalletButton.js.map +1 -0
- package/lib/commonjs/specs/NativeAddressSheet.js +2 -0
- package/lib/commonjs/specs/NativeAddressSheet.js.map +1 -0
- package/lib/commonjs/specs/NativeApplePayButton.js +2 -0
- package/lib/commonjs/specs/NativeApplePayButton.js.map +1 -0
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js +2 -0
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js.map +1 -0
- package/lib/commonjs/specs/NativeCardField.js +2 -0
- package/lib/commonjs/specs/NativeCardField.js.map +1 -0
- package/lib/commonjs/specs/NativeCardForm.js +2 -0
- package/lib/commonjs/specs/NativeCardForm.js.map +1 -0
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +2 -0
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -0
- package/lib/commonjs/specs/NativeGooglePayButton.js +2 -0
- package/lib/commonjs/specs/NativeGooglePayButton.js.map +1 -0
- package/lib/commonjs/specs/NativeStripeContainer.js +2 -0
- package/lib/commonjs/specs/NativeStripeContainer.js.map +1 -0
- package/lib/commonjs/specs/NativeStripeSdkModule.js +2 -0
- package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -0
- package/lib/commonjs/specs/utils.js +2 -0
- package/lib/commonjs/specs/utils.js.map +1 -0
- package/lib/commonjs/types/EmbeddedPaymentElement.js +2 -0
- package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -0
- package/lib/commonjs/types/PaymentSheet.js +1 -1
- package/lib/commonjs/types/PaymentSheet.js.map +1 -1
- package/lib/module/components/AddToWalletButton.js +1 -1
- package/lib/module/components/AddToWalletButton.js.map +1 -1
- package/lib/module/components/AddressSheet.js +1 -1
- package/lib/module/components/AddressSheet.js.map +1 -1
- package/lib/module/components/AuBECSDebitForm.js +1 -1
- package/lib/module/components/AuBECSDebitForm.js.map +1 -1
- package/lib/module/components/CardField.js +1 -1
- package/lib/module/components/CardField.js.map +1 -1
- package/lib/module/components/CardForm.js +1 -1
- package/lib/module/components/CardForm.js.map +1 -1
- package/lib/module/components/CustomerSheet.js +1 -1
- package/lib/module/components/CustomerSheet.js.map +1 -1
- package/lib/module/components/PlatformPayButton.js +1 -1
- package/lib/module/components/PlatformPayButton.js.map +1 -1
- package/lib/module/components/StripeContainer.js +1 -1
- package/lib/module/components/StripeContainer.js.map +1 -1
- package/lib/module/components/StripeProvider.js +1 -1
- package/lib/module/components/StripeProvider.js.map +1 -1
- package/lib/module/events.js +2 -0
- package/lib/module/events.js.map +1 -0
- package/lib/module/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeAddToWalletButton.js +2 -0
- package/lib/module/specs/NativeAddToWalletButton.js.map +1 -0
- package/lib/module/specs/NativeAddressSheet.js +2 -0
- package/lib/module/specs/NativeAddressSheet.js.map +1 -0
- package/lib/module/specs/NativeApplePayButton.js +2 -0
- package/lib/module/specs/NativeApplePayButton.js.map +1 -0
- package/lib/module/specs/NativeAuBECSDebitForm.js +2 -0
- package/lib/module/specs/NativeAuBECSDebitForm.js.map +1 -0
- package/lib/module/specs/NativeCardField.js +2 -0
- package/lib/module/specs/NativeCardField.js.map +1 -0
- package/lib/module/specs/NativeCardForm.js +2 -0
- package/lib/module/specs/NativeCardForm.js.map +1 -0
- package/lib/module/specs/NativeEmbeddedPaymentElement.js +2 -0
- package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -0
- package/lib/module/specs/NativeGooglePayButton.js +2 -0
- package/lib/module/specs/NativeGooglePayButton.js.map +1 -0
- package/lib/module/specs/NativeStripeContainer.js +2 -0
- package/lib/module/specs/NativeStripeContainer.js.map +1 -0
- package/lib/module/specs/NativeStripeSdkModule.js +2 -0
- package/lib/module/specs/NativeStripeSdkModule.js.map +1 -0
- package/lib/module/specs/utils.js +2 -0
- package/lib/module/specs/utils.js.map +1 -0
- package/lib/module/types/EmbeddedPaymentElement.js +2 -0
- package/lib/module/types/EmbeddedPaymentElement.js.map +1 -0
- package/lib/module/types/PaymentSheet.js +1 -1
- package/lib/module/types/PaymentSheet.js.map +1 -1
- package/lib/typescript/src/components/AddToWalletButton.d.ts.map +1 -1
- package/lib/typescript/src/components/AddressSheet.d.ts.map +1 -1
- package/lib/typescript/src/components/AuBECSDebitForm.d.ts.map +1 -1
- package/lib/typescript/src/components/CardField.d.ts +1 -1
- package/lib/typescript/src/components/CardField.d.ts.map +1 -1
- package/lib/typescript/src/components/CardForm.d.ts +1 -1
- package/lib/typescript/src/components/CardForm.d.ts.map +1 -1
- package/lib/typescript/src/components/CustomerSheet.d.ts +1 -1
- package/lib/typescript/src/components/CustomerSheet.d.ts.map +1 -1
- package/lib/typescript/src/components/StripeContainer.d.ts.map +1 -1
- package/lib/typescript/src/events.d.ts +13 -0
- package/lib/typescript/src/events.d.ts.map +1 -0
- package/lib/typescript/src/functions.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts +4 -4
- package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useStripe.d.ts +2 -2
- package/lib/typescript/src/hooks/useStripe.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeAddToWalletButton.d.ts +27 -0
- package/lib/typescript/src/specs/NativeAddToWalletButton.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeAddressSheet.d.ts +34 -0
- package/lib/typescript/src/specs/NativeAddressSheet.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeApplePayButton.d.ts +28 -0
- package/lib/typescript/src/specs/NativeApplePayButton.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeAuBECSDebitForm.d.ts +19 -0
- package/lib/typescript/src/specs/NativeAuBECSDebitForm.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeCardField.d.ts +33 -0
- package/lib/typescript/src/specs/NativeCardField.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeCardForm.d.ts +31 -0
- package/lib/typescript/src/specs/NativeCardForm.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts +22 -0
- package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeGooglePayButton.d.ts +11 -0
- package/lib/typescript/src/specs/NativeGooglePayButton.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeStripeContainer.d.ts +8 -0
- package/lib/typescript/src/specs/NativeStripeContainer.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +93 -0
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -0
- package/lib/typescript/src/specs/utils.d.ts +20 -0
- package/lib/typescript/src/specs/utils.d.ts.map +1 -0
- package/lib/typescript/src/types/CustomerSheet.d.ts +1 -5
- package/lib/typescript/src/types/CustomerSheet.d.ts.map +1 -1
- package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts +161 -0
- package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentSheet.d.ts +97 -4
- package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
- package/lib/typescript/src/types/components/CardFieldInput.d.ts +3 -2
- package/lib/typescript/src/types/components/CardFieldInput.d.ts.map +1 -1
- package/lib/typescript/src/types/components/CardFormView.d.ts +3 -1
- package/lib/typescript/src/types/components/CardFormView.d.ts.map +1 -1
- package/package.json +20 -1
- package/src/components/AddToWalletButton.tsx +2 -5
- package/src/components/AddressSheet.tsx +5 -16
- package/src/components/AuBECSDebitForm.tsx +3 -12
- package/src/components/CardField.tsx +20 -30
- package/src/components/CardForm.tsx +14 -29
- package/src/components/CustomerSheet.tsx +23 -25
- package/src/components/PlatformPayButton.tsx +6 -6
- package/src/components/StripeContainer.tsx +5 -12
- package/src/components/StripeProvider.tsx +1 -1
- package/src/events.ts +49 -0
- package/src/functions.ts +13 -24
- package/src/hooks/useFinancialConnectionsSheet.tsx +2 -2
- package/src/hooks/useStripe.tsx +2 -2
- package/src/index.tsx +3 -0
- package/src/specs/NativeAddToWalletButton.ts +40 -0
- package/src/specs/NativeAddressSheet.ts +50 -0
- package/src/specs/NativeApplePayButton.ts +40 -0
- package/src/specs/NativeAuBECSDebitForm.ts +24 -0
- package/src/specs/NativeCardField.ts +51 -0
- package/src/specs/NativeCardForm.ts +43 -0
- package/src/specs/NativeEmbeddedPaymentElement.ts +37 -0
- package/src/specs/NativeGooglePayButton.ts +20 -0
- package/src/specs/NativeStripeContainer.ts +12 -0
- package/src/specs/NativeStripeSdkModule.ts +219 -0
- package/src/specs/utils.ts +22 -0
- package/src/types/CustomerSheet.ts +1 -5
- package/src/types/EmbeddedPaymentElement.tsx +467 -0
- package/src/types/PaymentSheet.ts +114 -4
- package/src/types/components/CardFieldInput.ts +1 -2
- package/src/types/components/CardFormView.ts +1 -1
- package/stripe-react-native.podspec +27 -2
- package/android/.gradle/8.11.1/checksums/checksums.lock +0 -0
- package/android/.gradle/8.11.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.11.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.11.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.11.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.11.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.11.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/src/main/java/com/reactnativestripesdk/CardChangedEvent.kt +0 -54
- package/ios/StripeSdk.m +0 -244
- package/lib/commonjs/NativeStripeSdk.js +0 -2
- package/lib/commonjs/NativeStripeSdk.js.map +0 -1
- package/lib/commonjs/components/ApplePayButtonNative.js +0 -2
- package/lib/commonjs/components/ApplePayButtonNative.js.map +0 -1
- package/lib/commonjs/components/GooglePayButtonNative.js +0 -2
- package/lib/commonjs/components/GooglePayButtonNative.js.map +0 -1
- package/lib/module/NativeStripeSdk.js +0 -2
- package/lib/module/NativeStripeSdk.js.map +0 -1
- package/lib/module/components/ApplePayButtonNative.js +0 -2
- package/lib/module/components/ApplePayButtonNative.js.map +0 -1
- package/lib/module/components/GooglePayButtonNative.js +0 -2
- package/lib/module/components/GooglePayButtonNative.js.map +0 -1
- package/lib/typescript/src/NativeStripeSdk.d.ts +0 -58
- package/lib/typescript/src/NativeStripeSdk.d.ts.map +0 -1
- package/lib/typescript/src/components/ApplePayButtonNative.d.ts +0 -4
- package/lib/typescript/src/components/ApplePayButtonNative.d.ts.map +0 -1
- package/lib/typescript/src/components/GooglePayButtonNative.d.ts +0 -4
- package/lib/typescript/src/components/GooglePayButtonNative.d.ts.map +0 -1
- package/src/NativeStripeSdk.tsx +0 -159
- package/src/components/ApplePayButtonNative.tsx +0 -5
- package/src/components/GooglePayButtonNative.tsx +0 -7
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type { BillingDetails, AddressDetails, UserInterfaceStyle, CardBrand } from './Common';
|
|
2
|
+
import * as PaymentSheetTypes from './PaymentSheet';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* The final result of a confirm call.
|
|
6
|
+
* Typically: payment succeeded (“completed”), canceled, or failed with error.
|
|
7
|
+
*/
|
|
8
|
+
export type EmbeddedPaymentElementResult = {
|
|
9
|
+
status: 'completed';
|
|
10
|
+
} | {
|
|
11
|
+
status: 'canceled';
|
|
12
|
+
} | {
|
|
13
|
+
status: 'failed';
|
|
14
|
+
error: Error;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Contains details about a payment method that can be displayed to the customer in the embedded payment element UI.
|
|
18
|
+
*/
|
|
19
|
+
export interface PaymentOptionDisplayData {
|
|
20
|
+
/**
|
|
21
|
+
* A user-facing label for the payment method, like "Apple Pay" or "•••• 4242" for a card.
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional billing details associated with the payment method, such as name, email, or address.
|
|
26
|
+
*/
|
|
27
|
+
billingDetails?: BillingDetails;
|
|
28
|
+
/**
|
|
29
|
+
* A string identifier for the type of payment method.
|
|
30
|
+
* Stripe values: https://stripe.com/docs/api/payment_methods/object#payment_method_object-type
|
|
31
|
+
* External methods: https://stripe.com/docs/payments/external-payment-methods?platform=ios#available-external-payment-methods
|
|
32
|
+
* Apple Pay: "apple_pay"
|
|
33
|
+
*/
|
|
34
|
+
paymentMethodType: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Describes the action performed when the bottom button in the embedded payment form sheet is tapped.
|
|
38
|
+
* The embedded view may show payment method options such as "Card". When selected, a form sheet appears
|
|
39
|
+
* for customers to input their payment details. At the bottom of that form sheet is a button.
|
|
40
|
+
* This type determines what tapping that button does:
|
|
41
|
+
* - In the `confirm` case, the button says “Pay” or “Set up” and triggers confirmation of the payment or setup intent inside the sheet.
|
|
42
|
+
* - In the `continue` case, the button says “Continue” and simply dismisses the sheet. The payment or setup is then confirmed outside the sheet, typically in your app.
|
|
43
|
+
*/
|
|
44
|
+
export type EmbeddedFormSheetAction = {
|
|
45
|
+
/**
|
|
46
|
+
* The button says “Pay” or “Set up”. When tapped, it confirms the payment or setup directly within the form sheet.
|
|
47
|
+
* @param result - Callback invoked with the result of the confirmation. You can use this to show a success message or handle errors.
|
|
48
|
+
*/
|
|
49
|
+
type: 'confirm';
|
|
50
|
+
onFormSheetConfirmComplete?: (result: EmbeddedPaymentElementResult) => void;
|
|
51
|
+
} | {
|
|
52
|
+
/**
|
|
53
|
+
* The button says “Continue”. When tapped, the form sheet closes without confirming anything.
|
|
54
|
+
* Use this when you want to handle confirmation elsewhere in your app after the customer has filled in their details.
|
|
55
|
+
*/
|
|
56
|
+
type: 'continue';
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Configuration object (subset of EmbeddedPaymentElement.Configuration).
|
|
60
|
+
*/
|
|
61
|
+
export interface EmbeddedPaymentElementConfiguration {
|
|
62
|
+
/** Your customer-facing business name. On Android, this is required and cannot be an empty string. */
|
|
63
|
+
merchantDisplayName: string;
|
|
64
|
+
/** The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id */
|
|
65
|
+
customerId?: string;
|
|
66
|
+
/** iOS only. Enable Apple Pay in the Payment Sheet by passing an ApplePayParams object. */
|
|
67
|
+
applePay?: PaymentSheetTypes.ApplePayParams;
|
|
68
|
+
/** Android only. Enable Google Pay in the Payment Sheet by passing a GooglePayParams object. */
|
|
69
|
+
googlePay?: PaymentSheetTypes.GooglePayParams;
|
|
70
|
+
/** Configuration for Link */
|
|
71
|
+
link?: PaymentSheetTypes.LinkParams;
|
|
72
|
+
/** The color styling to use for PaymentSheet UI. Defaults to 'automatic'. */
|
|
73
|
+
style?: UserInterfaceStyle;
|
|
74
|
+
/** A URL that redirects back to your app that EmbeddedPaymentElement can use to auto-dismiss web views used for additional authentication, e.g. 3DS2 */
|
|
75
|
+
returnURL?: string;
|
|
76
|
+
/** Configuration for how billing details are collected during checkout. */
|
|
77
|
+
billingDetailsCollectionConfiguration?: PaymentSheetTypes.BillingDetailsCollectionConfiguration;
|
|
78
|
+
/** PaymentSheet pre-populates the billing fields that are displayed in the Payment Sheet (only country and postal code, as of this version) with the values provided. */
|
|
79
|
+
defaultBillingDetails?: BillingDetails;
|
|
80
|
+
/**
|
|
81
|
+
* The shipping information for the customer. If set, EmbeddedPaymentElement will pre-populate the form fields with the values provided.
|
|
82
|
+
* This is used to display a "Billing address is same as shipping" checkbox if `defaultBillingDetails` is not provided.
|
|
83
|
+
* If `name` and `line1` are populated, it's also [attached to the PaymentIntent](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-shipping) during payment.
|
|
84
|
+
*/
|
|
85
|
+
defaultShippingDetails?: AddressDetails;
|
|
86
|
+
/** If true, allows payment methods that do not move money at the end of the checkout. Defaults to false.
|
|
87
|
+
*
|
|
88
|
+
* Some payment methods can’t guarantee you will receive funds from your customer at the end of the checkout
|
|
89
|
+
* because they take time to settle (eg. most bank debits, like SEPA or ACH) or require customer action to
|
|
90
|
+
* complete (e.g. OXXO, Konbini, Boleto). If this is set to true, make sure your integration listens to webhooks
|
|
91
|
+
* for notifications on whether a payment has succeeded or not.
|
|
92
|
+
*/
|
|
93
|
+
allowsDelayedPaymentMethods?: boolean;
|
|
94
|
+
/** Customizes the appearance of EmbeddedPaymentElement */
|
|
95
|
+
appearance?: PaymentSheetTypes.AppearanceParams;
|
|
96
|
+
/** The label to use for the primary button. If not set, Payment Sheet will display suitable default labels for payment and setup intents. */
|
|
97
|
+
primaryButtonLabel?: string;
|
|
98
|
+
/** Optional configuration to display a custom message when a saved payment method is removed. iOS only. */
|
|
99
|
+
removeSavedPaymentMethodMessage?: string;
|
|
100
|
+
/** The list of preferred networks that should be used to process payments made with a co-branded card.
|
|
101
|
+
* This value will only be used if your user hasn't selected a network themselves. */
|
|
102
|
+
preferredNetworks?: Array<CardBrand>;
|
|
103
|
+
/** By default, EmbeddedPaymentElement will use a dynamic ordering that optimizes payment method display for the customer.
|
|
104
|
+
* You can override the default order in which payment methods are displayed in EmbeddedPaymentElement with a list of payment method types.
|
|
105
|
+
* See https://stripe.com/docs/api/payment_methods/object#payment_method_object-type for the list of valid types. You may also pass external payment methods.
|
|
106
|
+
* - Example: ["card", "external_paypal", "klarna"]
|
|
107
|
+
* - Note: If you omit payment methods from this list, they’ll be automatically ordered by Stripe after the ones you provide. Invalid payment methods are ignored.
|
|
108
|
+
*/
|
|
109
|
+
paymentMethodOrder?: Array<String>;
|
|
110
|
+
/** This is an experimental feature that may be removed at any time.
|
|
111
|
+
* Defaults to true. If true, the customer can delete all saved payment methods.
|
|
112
|
+
* If false, the customer can't delete if they only have one saved payment method remaining.
|
|
113
|
+
*/
|
|
114
|
+
allowsRemovalOfLastSavedPaymentMethod?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* By default, EmbeddedPaymentElement will accept all supported cards by Stripe.
|
|
117
|
+
* You can specify card brands EmbeddedPaymentElement should block or allow payment for by providing an array of those card brands.
|
|
118
|
+
* Note: This is only a client-side solution.
|
|
119
|
+
* Note: Card brand filtering is not currently supported in Link.
|
|
120
|
+
*/
|
|
121
|
+
cardBrandAcceptance?: PaymentSheetTypes.CardBrandAcceptance;
|
|
122
|
+
/** The view can display payment methods like “Card” that, when tapped, open a sheet where customers enter their payment method details.
|
|
123
|
+
* The sheet has a button at the bottom. `formSheetAction` controls the action the button performs.
|
|
124
|
+
*/
|
|
125
|
+
formSheetAction?: EmbeddedFormSheetAction;
|
|
126
|
+
}
|
|
127
|
+
export interface UseEmbeddedPaymentElementResult {
|
|
128
|
+
embeddedPaymentElementView: ReactElement | null;
|
|
129
|
+
/**
|
|
130
|
+
* Contains information about the customer's selected payment option.
|
|
131
|
+
* Use this to display the payment option in your own UI
|
|
132
|
+
*/
|
|
133
|
+
paymentOption: PaymentOptionDisplayData | null;
|
|
134
|
+
/**
|
|
135
|
+
* Completes the payment or setup.
|
|
136
|
+
* @returns {Promise} The result of the payment after any presented view controllers are dismissed.
|
|
137
|
+
* @note This method requires that the last call to `update` succeeded. If the last `update` call failed, this call will fail. If this method is called while a call to `update` is in progress, it waits until the `update` call completes.
|
|
138
|
+
*/
|
|
139
|
+
confirm: () => Promise<EmbeddedPaymentElementResult>;
|
|
140
|
+
/**
|
|
141
|
+
* Call this method when the IntentConfiguration values you used to initialize `EmbeddedPaymentElement` (amount, currency, etc.) change.
|
|
142
|
+
* This ensures the appropriate payment methods are displayed, collect the right fields, etc.
|
|
143
|
+
* @param {Object} intentConfiguration - An updated IntentConfiguration.
|
|
144
|
+
* @throws {Error} Sets loadingError if the update fails.
|
|
145
|
+
* @note Upon completion, `paymentOption` may become null if it's no longer available.
|
|
146
|
+
* @note If you call `update` while a previous call to `update` is still in progress, the previous call is canceled.
|
|
147
|
+
*/
|
|
148
|
+
update: (intentConfig: PaymentSheetTypes.IntentConfiguration) => void;
|
|
149
|
+
clearPaymentOption: () => void;
|
|
150
|
+
loadingError: Error | null;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* An asynchronous failable initializer
|
|
154
|
+
* Loads the Customer's payment methods, their default payment method, etc.
|
|
155
|
+
* @param {Object} intentConfiguration - Information about the PaymentIntent or SetupIntent you will create later to complete the confirmation.
|
|
156
|
+
* @param {Object} configuration - Configuration for the PaymentSheet. e.g. your business name, customer details, etc.
|
|
157
|
+
* @returns {EmbeddedPaymentElement|null} A valid EmbeddedPaymentElement instance if successful, null otherwise.
|
|
158
|
+
* @description If loading fails, this function sets the loadingError state variable instead of throwing an error.
|
|
159
|
+
*/
|
|
160
|
+
export declare function useEmbeddedPaymentElement(intentConfig: PaymentSheetTypes.IntentConfiguration, configuration: EmbeddedPaymentElementConfiguration): UseEmbeddedPaymentElementResult;
|
|
161
|
+
//# sourceMappingURL=EmbeddedPaymentElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddedPaymentElement.d.ts","sourceRoot":"","sources":["../../../../src/types/EmbeddedPaymentElement.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,SAAS,EACV,MAAM,UAAU,CAA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|
|
73
73
|
* Note: Card brand filtering is not currently supported in Link.
|
|
74
74
|
*/
|
|
75
75
|
cardBrandAcceptance?: CardBrandAcceptance;
|
|
76
|
-
/** (Private Preview) This parameter is expected to be removed once we GA this feature
|
|
77
|
-
* When using customerSessions, allow users to update their saved cards
|
|
78
|
-
*/
|
|
79
|
-
updatePaymentMethodEnabled?: boolean;
|
|
80
76
|
};
|
|
81
77
|
export type SetupParams = (SetupParamsBase & {
|
|
82
78
|
/** A short-lived token that allows the SDK to access a Customer’s payment methods. */
|
|
@@ -174,6 +170,8 @@ export type AppearanceParams = RecursivePartial<{
|
|
|
174
170
|
};
|
|
175
171
|
/** Describes the appearance of the primary "Pay" button at the bottom of your Payment Sheet */
|
|
176
172
|
primaryButton: PrimaryButtonConfig;
|
|
173
|
+
/** Describes the appearance of the Embedded Mobile Payment Element */
|
|
174
|
+
embeddedPaymentElement: EmbeddedPaymentElementAppearance;
|
|
177
175
|
}>;
|
|
178
176
|
export type FontConfig = {
|
|
179
177
|
/**
|
|
@@ -297,6 +295,101 @@ export type PrimaryButtonColorConfig = {
|
|
|
297
295
|
*/
|
|
298
296
|
border: string;
|
|
299
297
|
};
|
|
298
|
+
/** A color that’s either a single hex or a light/dark pair */
|
|
299
|
+
export type ThemedColor = string | {
|
|
300
|
+
light: string;
|
|
301
|
+
dark: string;
|
|
302
|
+
};
|
|
303
|
+
/** Represents edge insets */
|
|
304
|
+
export interface EdgeInsetsConfig {
|
|
305
|
+
top?: number;
|
|
306
|
+
left?: number;
|
|
307
|
+
bottom?: number;
|
|
308
|
+
right?: number;
|
|
309
|
+
}
|
|
310
|
+
/** Display styles for rows in the Embedded Mobile Payment Element */
|
|
311
|
+
export declare enum RowStyle {
|
|
312
|
+
/** A flat style with radio buttons */
|
|
313
|
+
FlatWithRadio = "flatWithRadio",
|
|
314
|
+
/** A floating button style */
|
|
315
|
+
FloatingButton = "floatingButton",
|
|
316
|
+
/** A flat style with a checkmark */
|
|
317
|
+
FlatWithCheckmark = "flatWithCheckmark"
|
|
318
|
+
}
|
|
319
|
+
/** Describes the appearance of the radio button */
|
|
320
|
+
export interface RadioConfig {
|
|
321
|
+
/** The color of the radio button when selected, represented as a hex string #AARRGGBB or #RRGGBB.
|
|
322
|
+
* @default The root appearance.colors.primary
|
|
323
|
+
*/
|
|
324
|
+
selectedColor?: ThemedColor;
|
|
325
|
+
/** The color of the radio button when unselected, represented as a hex string #AARRGGBB or #RRGGBB.
|
|
326
|
+
* @default The root appearance.colors.componentBorder
|
|
327
|
+
*/
|
|
328
|
+
unselectedColor?: ThemedColor;
|
|
329
|
+
}
|
|
330
|
+
/** Describes the appearance of the checkmark */
|
|
331
|
+
export interface CheckmarkConfig {
|
|
332
|
+
/** The color of the checkmark when selected, represented as a hex string #AARRGGBB or #RRGGBB.
|
|
333
|
+
* @default The root appearance.colors.primary
|
|
334
|
+
*/
|
|
335
|
+
color?: ThemedColor;
|
|
336
|
+
}
|
|
337
|
+
/** Describes the appearance of the flat style row */
|
|
338
|
+
export interface FlatConfig {
|
|
339
|
+
/** The thickness of the separator line between rows.
|
|
340
|
+
* @default 1.0
|
|
341
|
+
*/
|
|
342
|
+
separatorThickness?: number;
|
|
343
|
+
/** The color of the separator line between rows, represented as a hex string #AARRGGBB or #RRGGBB.
|
|
344
|
+
* @default The root appearance.colors.componentBorder
|
|
345
|
+
*/
|
|
346
|
+
separatorColor?: ThemedColor;
|
|
347
|
+
/** The insets of the separator line between rows.
|
|
348
|
+
* @default { top: 0, left: 30, bottom: 0, right: 0 } for RowStyle.FlatWithRadio
|
|
349
|
+
* @default { top: 0, left: 0, bottom: 0, right: 0 } for RowStyle.FlatWithCheckmark and RowStyle.FloatingButton
|
|
350
|
+
*/
|
|
351
|
+
separatorInsets?: EdgeInsetsConfig;
|
|
352
|
+
/** Determines if the top separator is visible at the top of the Element.
|
|
353
|
+
* @default true
|
|
354
|
+
*/
|
|
355
|
+
topSeparatorEnabled?: boolean;
|
|
356
|
+
/** Determines if the bottom separator is visible at the bottom of the Element.
|
|
357
|
+
* @default true
|
|
358
|
+
*/
|
|
359
|
+
bottomSeparatorEnabled?: boolean;
|
|
360
|
+
/** Appearance settings for the radio button (used when RowStyle is FlatWithRadio) */
|
|
361
|
+
radio?: RadioConfig;
|
|
362
|
+
/** Appearance settings for the checkmark (used when RowStyle is FlatWithCheckmark) */
|
|
363
|
+
checkmark?: CheckmarkConfig;
|
|
364
|
+
}
|
|
365
|
+
/** Describes the appearance of the floating button style payment method row */
|
|
366
|
+
export interface FloatingConfig {
|
|
367
|
+
/** The spacing between payment method rows.
|
|
368
|
+
* @default 12.0
|
|
369
|
+
*/
|
|
370
|
+
spacing?: number;
|
|
371
|
+
}
|
|
372
|
+
/** Describes the appearance of the row in the Embedded Mobile Payment Element */
|
|
373
|
+
export interface RowConfig {
|
|
374
|
+
/** The display style of the row.
|
|
375
|
+
* @default RowStyle.FlatWithRadio
|
|
376
|
+
*/
|
|
377
|
+
style?: RowStyle;
|
|
378
|
+
/** Additional vertical insets applied to a payment method row.
|
|
379
|
+
* Increasing this value increases the height of each row.
|
|
380
|
+
* @default 6.0
|
|
381
|
+
*/
|
|
382
|
+
additionalInsets?: number;
|
|
383
|
+
/** Appearance settings for the flat style row */
|
|
384
|
+
flat?: FlatConfig;
|
|
385
|
+
/** Appearance settings for the floating button style row */
|
|
386
|
+
floating?: FloatingConfig;
|
|
387
|
+
}
|
|
388
|
+
/** Describes the appearance of the Embedded Mobile Payment Element */
|
|
389
|
+
export interface EmbeddedPaymentElementAppearance {
|
|
390
|
+
/** Describes the appearance of the row in the Embedded Mobile Payment Element */
|
|
391
|
+
row?: RowConfig;
|
|
392
|
+
}
|
|
300
393
|
type RecursivePartial<T> = {
|
|
301
394
|
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
|
|
302
395
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentSheet.d.ts","sourceRoot":"","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;IACjD,MAAM,EAAE,yBAAyB,CAAC,GAAG,CAAC;CACvC,GACD;IACE,4CAA4C;IAC5C,MAAM,EAAE,yBAAyB,CAAC,OAAO,CAAC;IAC1C;;OAEG;IACH,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B,GACD;IACE,uDAAuD;IACvD,MAAM,EAAE,yBAAyB,CAAC,UAAU,CAAC;IAC7C;;OAEG;IACH,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B,CAAC"}
|
|
@@ -48,13 +48,14 @@ export interface Placeholders {
|
|
|
48
48
|
export type OnFocusChangeEvent = NativeSyntheticEvent<{
|
|
49
49
|
focusedField: FieldName | null;
|
|
50
50
|
}>;
|
|
51
|
-
export type OnCardChangeEvent = NativeSyntheticEvent<
|
|
51
|
+
export type OnCardChangeEvent = NativeSyntheticEvent<{
|
|
52
|
+
card: Details;
|
|
53
|
+
}>;
|
|
52
54
|
/**
|
|
53
55
|
* @ignore
|
|
54
56
|
*/
|
|
55
57
|
export interface NativeProps {
|
|
56
58
|
style?: StyleProp<ViewStyle>;
|
|
57
|
-
value?: Partial<Details>;
|
|
58
59
|
postalCodeEnabled?: boolean;
|
|
59
60
|
autofocus?: boolean;
|
|
60
61
|
countryCode: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardFieldInput.d.ts","sourceRoot":"","sources":["../../../../../src/types/components/CardFieldInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,KAAK,GAAG,YAAY,GAAG,YAAY,CAAC;AAE3E,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,eAAe,CAAC;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,MAAM;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;IACpD,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"CardFieldInput.d.ts","sourceRoot":"","sources":["../../../../../src/types/components/CardFieldInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBA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MAAM,CAAC;CACrB;AAED,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;IACpD,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC7C,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf"}
|
|
@@ -44,7 +44,9 @@ export type DefaultValues = {
|
|
|
44
44
|
export type OnFocusChangeEvent = NativeSyntheticEvent<{
|
|
45
45
|
focusedField: FieldName | null;
|
|
46
46
|
}>;
|
|
47
|
-
export type OnFormCompleteEvent = NativeSyntheticEvent<
|
|
47
|
+
export type OnFormCompleteEvent = NativeSyntheticEvent<{
|
|
48
|
+
card: Details;
|
|
49
|
+
}>;
|
|
48
50
|
/**
|
|
49
51
|
* @ignore
|
|
50
52
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardFormView.d.ts","sourceRoot":"","sources":["../../../../../src/types/components/CardFormView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB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,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,kKAAkK;IAClK,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;IACpD,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,mBAAmB;IACnB,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC/C,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,IAAI,IAAI,CAAC;CACd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stripe/stripe-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"author": "Stripe",
|
|
5
5
|
"description": "Stripe SDK for React Native",
|
|
6
6
|
"main": "lib/commonjs/index",
|
|
@@ -140,5 +140,24 @@
|
|
|
140
140
|
},
|
|
141
141
|
"resolutions": {
|
|
142
142
|
"simple-plist": "1.3.1"
|
|
143
|
+
},
|
|
144
|
+
"codegenConfig": {
|
|
145
|
+
"android": {
|
|
146
|
+
"javaPackageName": "com.reactnativestripesdk"
|
|
147
|
+
},
|
|
148
|
+
"ios": {
|
|
149
|
+
"componentProvider": {
|
|
150
|
+
"ApplePayButton": "ApplePayButtonComponentView",
|
|
151
|
+
"AddToWalletButton": "AddToWalletButtonComponentView",
|
|
152
|
+
"AddressSheetView": "AddressSheetViewComponentView",
|
|
153
|
+
"AuBECSDebitForm": "AuBECSDebitFormComponentView",
|
|
154
|
+
"CardField": "CardFieldComponentView",
|
|
155
|
+
"CardForm": "CardFormComponentView",
|
|
156
|
+
"StripeContainer": "StripeContainerComponentView"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"name": "rnstripe",
|
|
160
|
+
"type": "all",
|
|
161
|
+
"jsSrcsDir": "./src/specs"
|
|
143
162
|
}
|
|
144
163
|
}
|
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
AccessibilityProps,
|
|
4
4
|
StyleProp,
|
|
5
5
|
ViewStyle,
|
|
6
|
-
requireNativeComponent,
|
|
7
6
|
NativeSyntheticEvent,
|
|
8
7
|
ImageSourcePropType,
|
|
9
8
|
} from 'react-native';
|
|
@@ -13,9 +12,7 @@ import type {
|
|
|
13
12
|
StripeError,
|
|
14
13
|
GooglePayCardToken,
|
|
15
14
|
} from '../types';
|
|
16
|
-
|
|
17
|
-
const AddToWalletButtonNative =
|
|
18
|
-
requireNativeComponent<any>('AddToWalletButton');
|
|
15
|
+
import NativeAddToWalletButton from '../specs/NativeAddToWalletButton';
|
|
19
16
|
|
|
20
17
|
/**
|
|
21
18
|
* Add to wallet button component props
|
|
@@ -81,7 +78,7 @@ export interface Props extends AccessibilityProps {
|
|
|
81
78
|
*/
|
|
82
79
|
export function AddToWalletButton({ onComplete, ...props }: Props) {
|
|
83
80
|
return (
|
|
84
|
-
<
|
|
81
|
+
<NativeAddToWalletButton
|
|
85
82
|
{...props}
|
|
86
83
|
onCompleteAction={(
|
|
87
84
|
value: NativeSyntheticEvent<{
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
AccessibilityProps,
|
|
4
|
-
requireNativeComponent,
|
|
5
|
-
NativeSyntheticEvent,
|
|
6
|
-
} from 'react-native';
|
|
2
|
+
import { AccessibilityProps } from 'react-native';
|
|
7
3
|
import type {
|
|
8
4
|
PaymentSheet,
|
|
9
5
|
AddressDetails,
|
|
10
6
|
StripeError,
|
|
11
7
|
AddressSheetError,
|
|
12
8
|
} from '../types';
|
|
13
|
-
|
|
14
|
-
const AddressSheetNative = requireNativeComponent<any>('AddressSheetView');
|
|
9
|
+
import NativeAddressSheet from '../specs/NativeAddressSheet';
|
|
15
10
|
|
|
16
11
|
/**
|
|
17
12
|
* Props
|
|
@@ -73,16 +68,10 @@ export type CollectAddressResult = Required<AddressDetails>;
|
|
|
73
68
|
*/
|
|
74
69
|
export function AddressSheet({ onSubmit, onError, ...props }: Props) {
|
|
75
70
|
return (
|
|
76
|
-
<
|
|
71
|
+
<NativeAddressSheet
|
|
77
72
|
{...props}
|
|
78
|
-
onSubmitAction={(
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
onErrorAction={(
|
|
82
|
-
value: NativeSyntheticEvent<{
|
|
83
|
-
error: StripeError<AddressSheetError>;
|
|
84
|
-
}>
|
|
85
|
-
) => onError(value.nativeEvent.error)}
|
|
73
|
+
onSubmitAction={(event) => onSubmit(event.nativeEvent.result)}
|
|
74
|
+
onErrorAction={(event) => onError(event.nativeEvent.error)}
|
|
86
75
|
/>
|
|
87
76
|
);
|
|
88
77
|
}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
requireNativeComponent,
|
|
5
|
-
StyleProp,
|
|
6
|
-
ViewStyle,
|
|
7
|
-
} from 'react-native';
|
|
2
|
+
import { AccessibilityProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import NativeAuBECSDebitForm from '../specs/NativeAuBECSDebitForm';
|
|
8
4
|
import type { AuBECSDebitFormComponent } from '../types';
|
|
9
5
|
|
|
10
|
-
const AuBECSDebitFormNative =
|
|
11
|
-
requireNativeComponent<AuBECSDebitFormComponent.NativeProps>(
|
|
12
|
-
'AuBECSDebitForm'
|
|
13
|
-
);
|
|
14
|
-
|
|
15
6
|
/**
|
|
16
7
|
* BECS Debit Form Component Props
|
|
17
8
|
*/
|
|
@@ -45,7 +36,7 @@ export function AuBECSDebitForm({
|
|
|
45
36
|
...props
|
|
46
37
|
}: Props) {
|
|
47
38
|
return (
|
|
48
|
-
<
|
|
39
|
+
<NativeAuBECSDebitForm
|
|
49
40
|
onCompleteAction={(value) => onComplete(value.nativeEvent)}
|
|
50
41
|
companyName={companyName}
|
|
51
42
|
formStyle={{ ...formStyle }}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { CardFieldInput, CardBrand } from '../types';
|
|
2
1
|
import React, {
|
|
3
2
|
forwardRef,
|
|
4
3
|
useCallback,
|
|
@@ -9,10 +8,7 @@ import React, {
|
|
|
9
8
|
import {
|
|
10
9
|
AccessibilityProps,
|
|
11
10
|
NativeSyntheticEvent,
|
|
12
|
-
requireNativeComponent,
|
|
13
|
-
UIManager,
|
|
14
11
|
StyleProp,
|
|
15
|
-
findNodeHandle,
|
|
16
12
|
ViewStyle,
|
|
17
13
|
} from 'react-native';
|
|
18
14
|
import {
|
|
@@ -21,9 +17,11 @@ import {
|
|
|
21
17
|
registerInput,
|
|
22
18
|
unregisterInput,
|
|
23
19
|
} from '../helpers';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
import NativeCardField, {
|
|
21
|
+
Commands,
|
|
22
|
+
FocusChangeEvent,
|
|
23
|
+
} from '../specs/NativeCardField';
|
|
24
|
+
import type { CardBrand, CardFieldInput } from '../types';
|
|
27
25
|
|
|
28
26
|
/**
|
|
29
27
|
* Card Field Component Props
|
|
@@ -83,8 +81,10 @@ export const CardField = forwardRef<CardFieldInput.Methods, Props>(
|
|
|
83
81
|
onBlur,
|
|
84
82
|
cardStyle,
|
|
85
83
|
placeholders,
|
|
84
|
+
autofocus,
|
|
86
85
|
postalCodeEnabled,
|
|
87
|
-
|
|
86
|
+
disabled,
|
|
87
|
+
dangerouslyGetFullCardDetails,
|
|
88
88
|
...props
|
|
89
89
|
},
|
|
90
90
|
ref
|
|
@@ -92,8 +92,8 @@ export const CardField = forwardRef<CardFieldInput.Methods, Props>(
|
|
|
92
92
|
const inputRef = useRef<any>(null);
|
|
93
93
|
|
|
94
94
|
const onCardChangeHandler = useCallback(
|
|
95
|
-
(event: NativeSyntheticEvent<CardFieldInput.Details>) => {
|
|
96
|
-
const card = event.nativeEvent;
|
|
95
|
+
(event: NativeSyntheticEvent<{ card: CardFieldInput.Details }>) => {
|
|
96
|
+
const card = event.nativeEvent.card;
|
|
97
97
|
|
|
98
98
|
const data: CardFieldInput.Details = {
|
|
99
99
|
last4: card.last4,
|
|
@@ -124,11 +124,11 @@ export const CardField = forwardRef<CardFieldInput.Methods, Props>(
|
|
|
124
124
|
);
|
|
125
125
|
|
|
126
126
|
const onFocusHandler = useCallback(
|
|
127
|
-
(event:
|
|
127
|
+
(event: NativeSyntheticEvent<FocusChangeEvent>) => {
|
|
128
128
|
const { focusedField } = event.nativeEvent;
|
|
129
129
|
if (focusedField) {
|
|
130
130
|
focusInput(inputRef.current);
|
|
131
|
-
onFocus?.(focusedField);
|
|
131
|
+
onFocus?.(focusedField as CardFieldInput.FieldName);
|
|
132
132
|
} else {
|
|
133
133
|
onBlur?.();
|
|
134
134
|
}
|
|
@@ -137,27 +137,15 @@ export const CardField = forwardRef<CardFieldInput.Methods, Props>(
|
|
|
137
137
|
);
|
|
138
138
|
|
|
139
139
|
const focus = () => {
|
|
140
|
-
|
|
141
|
-
findNodeHandle(inputRef.current),
|
|
142
|
-
'focus' as any,
|
|
143
|
-
[]
|
|
144
|
-
);
|
|
140
|
+
Commands.focus(inputRef.current);
|
|
145
141
|
};
|
|
146
142
|
|
|
147
143
|
const blur = () => {
|
|
148
|
-
|
|
149
|
-
findNodeHandle(inputRef.current),
|
|
150
|
-
'blur' as any,
|
|
151
|
-
[]
|
|
152
|
-
);
|
|
144
|
+
Commands.blur(inputRef.current);
|
|
153
145
|
};
|
|
154
146
|
|
|
155
147
|
const clear = () => {
|
|
156
|
-
|
|
157
|
-
findNodeHandle(inputRef.current),
|
|
158
|
-
'clear' as any,
|
|
159
|
-
[]
|
|
160
|
-
);
|
|
148
|
+
Commands.clear(inputRef.current);
|
|
161
149
|
};
|
|
162
150
|
|
|
163
151
|
useImperativeHandle(ref, () => ({
|
|
@@ -181,12 +169,10 @@ export const CardField = forwardRef<CardFieldInput.Methods, Props>(
|
|
|
181
169
|
}, [inputRef]);
|
|
182
170
|
|
|
183
171
|
return (
|
|
184
|
-
<
|
|
172
|
+
<NativeCardField
|
|
185
173
|
ref={inputRef}
|
|
186
174
|
onCardChange={onCardChangeHandler}
|
|
187
175
|
onFocusChange={onFocusHandler}
|
|
188
|
-
postalCodeEnabled={postalCodeEnabled ?? true}
|
|
189
|
-
countryCode={countryCode ?? null}
|
|
190
176
|
cardStyle={{
|
|
191
177
|
backgroundColor: cardStyle?.backgroundColor,
|
|
192
178
|
borderColor: cardStyle?.borderColor,
|
|
@@ -205,6 +191,10 @@ export const CardField = forwardRef<CardFieldInput.Methods, Props>(
|
|
|
205
191
|
cvc: placeholders?.cvc,
|
|
206
192
|
postalCode: placeholders?.postalCode,
|
|
207
193
|
}}
|
|
194
|
+
autofocus={autofocus ?? false}
|
|
195
|
+
postalCodeEnabled={postalCodeEnabled ?? true}
|
|
196
|
+
disabled={disabled ?? false}
|
|
197
|
+
dangerouslyGetFullCardDetails={dangerouslyGetFullCardDetails ?? false}
|
|
208
198
|
{...props}
|
|
209
199
|
/>
|
|
210
200
|
);
|