@stripe/stripe-react-native 0.41.0 → 0.43.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/.husky/pre-commit +0 -3
- package/CHANGELOG.md +27 -0
- package/README.md +3 -0
- 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 +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +7 -1
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/android/gradle.properties +4 -1
- package/android/gradlew +249 -0
- package/android/gradlew.bat +92 -0
- package/android/spotless.gradle +19 -0
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormView.kt +30 -34
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +20 -10
- package/android/src/main/java/com/reactnativestripesdk/CardChangedEvent.kt +12 -13
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +242 -105
- package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +58 -20
- package/android/src/main/java/com/reactnativestripesdk/CardFocusEvent.kt +8 -11
- package/android/src/main/java/com/reactnativestripesdk/CardFormCompleteEvent.kt +10 -12
- package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +135 -87
- package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +57 -22
- package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +53 -23
- package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +125 -83
- package/android/src/main/java/com/reactnativestripesdk/FormCompleteEvent.kt +9 -11
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +16 -9
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +36 -28
- package/android/src/main/java/com/reactnativestripesdk/GooglePayLauncherFragment.kt +67 -43
- package/android/src/main/java/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.kt +21 -16
- package/android/src/main/java/com/reactnativestripesdk/GooglePayRequestHelper.kt +101 -56
- package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +244 -166
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +183 -123
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +181 -57
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +402 -258
- package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +11 -4
- package/android/src/main/java/com/reactnativestripesdk/StripeContainerView.kt +5 -1
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +654 -299
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +12 -14
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressLauncherFragment.kt +42 -37
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetEvent.kt +12 -11
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +29 -29
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +50 -18
- package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +227 -147
- package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +15 -18
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +33 -15
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +63 -37
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletCompleteEvent.kt +9 -13
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/EphemeralKeyProvider.kt +15 -17
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/PushProvisioningProxy.kt +76 -60
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/TapAndPayProxy.kt +71 -47
- package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +117 -51
- package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +4 -3
- package/android/src/main/java/com/reactnativestripesdk/utils/KeepJsAwakeTask.kt +39 -0
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +337 -250
- package/android/src/main/java/com/reactnativestripesdk/utils/PostalCodeUtilities.kt +2 -11
- package/ios/CustomerSheet/CustomerSheetUtils.swift +3 -1
- package/ios/FinancialConnections.swift +18 -2
- package/ios/Mappers.swift +23 -0
- package/ios/PaymentMethodFactory.swift +31 -29
- package/ios/StripeSdk+CustomerSheet.swift +2 -1
- package/ios/StripeSdk+PaymentSheet.swift +42 -0
- package/ios/StripeSdk.m +2 -0
- package/ios/StripeSdk.swift +116 -24
- package/lib/commonjs/NativeStripeSdk.js +1 -1
- package/lib/commonjs/NativeStripeSdk.js.map +1 -1
- 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/ApplePayButtonNative.js +1 -1
- package/lib/commonjs/components/ApplePayButtonNative.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/GooglePayButtonNative.js +1 -1
- package/lib/commonjs/components/GooglePayButtonNative.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/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/helpers.js +1 -1
- package/lib/commonjs/helpers.js.map +1 -1
- package/lib/commonjs/hooks/useConfirmPayment.js.map +1 -1
- package/lib/commonjs/hooks/useConfirmSetupIntent.js.map +1 -1
- package/lib/commonjs/hooks/useFinancialConnectionsSheet.js +1 -1
- package/lib/commonjs/hooks/useFinancialConnectionsSheet.js.map +1 -1
- package/lib/commonjs/hooks/usePaymentSheet.js.map +1 -1
- package/lib/commonjs/hooks/usePlatformPay.js.map +1 -1
- package/lib/commonjs/hooks/useStripe.js +1 -1
- package/lib/commonjs/hooks/useStripe.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/plugin/withStripe.js +1 -1
- package/lib/commonjs/plugin/withStripe.js.map +1 -1
- package/lib/commonjs/types/ApplePay.js.map +1 -1
- package/lib/commonjs/types/Common.js +1 -1
- package/lib/commonjs/types/Common.js.map +1 -1
- package/lib/commonjs/types/CustomerSheet.js.map +1 -1
- package/lib/commonjs/types/Errors.js +1 -1
- package/lib/commonjs/types/Errors.js.map +1 -1
- package/lib/commonjs/types/FinancialConnections.js +1 -1
- package/lib/commonjs/types/FinancialConnections.js.map +1 -1
- package/lib/commonjs/types/NextAction.js.map +1 -1
- package/lib/commonjs/types/PaymentIntent.js +1 -1
- package/lib/commonjs/types/PaymentIntent.js.map +1 -1
- package/lib/commonjs/types/PaymentMethod.js.map +1 -1
- package/lib/commonjs/types/PaymentSheet.js +1 -1
- package/lib/commonjs/types/PaymentSheet.js.map +1 -1
- package/lib/commonjs/types/PlatformPay.js +1 -1
- package/lib/commonjs/types/PlatformPay.js.map +1 -1
- package/lib/commonjs/types/PushProvisioning.js +1 -1
- package/lib/commonjs/types/PushProvisioning.js.map +1 -1
- package/lib/commonjs/types/SetupIntent.js +1 -1
- package/lib/commonjs/types/SetupIntent.js.map +1 -1
- package/lib/commonjs/types/ThreeDSecure.js +1 -1
- package/lib/commonjs/types/ThreeDSecure.js.map +1 -1
- package/lib/commonjs/types/Token.js.map +1 -1
- package/lib/commonjs/types/components/ApplePayButtonComponent.js.map +1 -1
- package/lib/commonjs/types/components/AuBECSDebitFormComponent.js.map +1 -1
- package/lib/commonjs/types/components/CardFieldInput.js +1 -1
- package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
- package/lib/commonjs/types/components/CardFormView.js.map +1 -1
- package/lib/commonjs/types/components/GooglePayButtonComponent.js.map +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/NativeStripeSdk.js +1 -1
- package/lib/module/NativeStripeSdk.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/ApplePayButtonNative.js +1 -1
- package/lib/module/components/ApplePayButtonNative.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/GooglePayButtonNative.js +1 -1
- package/lib/module/components/GooglePayButtonNative.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/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/helpers.js +1 -1
- package/lib/module/helpers.js.map +1 -1
- package/lib/module/hooks/useConfirmPayment.js.map +1 -1
- package/lib/module/hooks/useConfirmSetupIntent.js.map +1 -1
- package/lib/module/hooks/useFinancialConnectionsSheet.js +1 -1
- package/lib/module/hooks/useFinancialConnectionsSheet.js.map +1 -1
- package/lib/module/hooks/usePaymentSheet.js.map +1 -1
- package/lib/module/hooks/usePlatformPay.js.map +1 -1
- package/lib/module/hooks/useStripe.js +1 -1
- package/lib/module/hooks/useStripe.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/plugin/withStripe.js +1 -1
- package/lib/module/plugin/withStripe.js.map +1 -1
- package/lib/module/types/ApplePay.js.map +1 -1
- package/lib/module/types/Common.js +1 -1
- package/lib/module/types/Common.js.map +1 -1
- package/lib/module/types/CustomerSheet.js.map +1 -1
- package/lib/module/types/Errors.js +1 -1
- package/lib/module/types/Errors.js.map +1 -1
- package/lib/module/types/FinancialConnections.js +1 -1
- package/lib/module/types/FinancialConnections.js.map +1 -1
- package/lib/module/types/NextAction.js.map +1 -1
- package/lib/module/types/PaymentIntent.js +1 -1
- package/lib/module/types/PaymentIntent.js.map +1 -1
- package/lib/module/types/PaymentMethod.js.map +1 -1
- package/lib/module/types/PaymentSheet.js +1 -1
- package/lib/module/types/PaymentSheet.js.map +1 -1
- package/lib/module/types/PlatformPay.js +1 -1
- package/lib/module/types/PlatformPay.js.map +1 -1
- package/lib/module/types/PushProvisioning.js +1 -1
- package/lib/module/types/PushProvisioning.js.map +1 -1
- package/lib/module/types/SetupIntent.js +1 -1
- package/lib/module/types/SetupIntent.js.map +1 -1
- package/lib/module/types/ThreeDSecure.js +1 -1
- package/lib/module/types/ThreeDSecure.js.map +1 -1
- package/lib/module/types/Token.js.map +1 -1
- package/lib/module/types/components/ApplePayButtonComponent.js.map +1 -1
- package/lib/module/types/components/AuBECSDebitFormComponent.js.map +1 -1
- package/lib/module/types/components/CardFieldInput.js +1 -1
- package/lib/module/types/components/CardFieldInput.js.map +1 -1
- package/lib/module/types/components/CardFormView.js.map +1 -1
- package/lib/module/types/components/GooglePayButtonComponent.js.map +1 -1
- package/lib/module/types/index.js +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/typescript/src/NativeStripeSdk.d.ts +5 -4
- package/lib/typescript/src/NativeStripeSdk.d.ts.map +1 -0
- package/lib/typescript/src/components/AddToWalletButton.d.ts +3 -1
- package/lib/typescript/src/components/AddToWalletButton.d.ts.map +1 -0
- package/lib/typescript/src/components/AddressSheet.d.ts +4 -2
- package/lib/typescript/src/components/AddressSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/ApplePayButtonNative.d.ts +1 -0
- package/lib/typescript/src/components/ApplePayButtonNative.d.ts.map +1 -0
- package/lib/typescript/src/components/AuBECSDebitForm.d.ts +3 -1
- package/lib/typescript/src/components/AuBECSDebitForm.d.ts.map +1 -0
- package/lib/typescript/src/components/CardField.d.ts +1 -0
- package/lib/typescript/src/components/CardField.d.ts.map +1 -0
- package/lib/typescript/src/components/CardForm.d.ts +1 -0
- package/lib/typescript/src/components/CardForm.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomerSheet.d.ts +2 -1
- package/lib/typescript/src/components/CustomerSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/GooglePayButtonNative.d.ts +1 -0
- package/lib/typescript/src/components/GooglePayButtonNative.d.ts.map +1 -0
- package/lib/typescript/src/components/PlatformPayButton.d.ts +3 -1
- package/lib/typescript/src/components/PlatformPayButton.d.ts.map +1 -0
- package/lib/typescript/src/components/StripeContainer.d.ts +2 -1
- package/lib/typescript/src/components/StripeContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/StripeProvider.d.ts +3 -2
- package/lib/typescript/src/components/StripeProvider.d.ts.map +1 -0
- package/lib/typescript/src/functions.d.ts +12 -7
- package/lib/typescript/src/functions.d.ts.map +1 -0
- package/lib/typescript/src/helpers.d.ts +1 -0
- package/lib/typescript/src/helpers.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useConfirmPayment.d.ts +2 -1
- package/lib/typescript/src/hooks/useConfirmPayment.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useConfirmSetupIntent.d.ts +1 -0
- package/lib/typescript/src/hooks/useConfirmSetupIntent.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts +5 -2
- package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePaymentSheet.d.ts +2 -1
- package/lib/typescript/src/hooks/usePaymentSheet.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePlatformPay.d.ts +4 -3
- package/lib/typescript/src/hooks/usePlatformPay.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useStripe.d.ts +11 -8
- package/lib/typescript/src/hooks/useStripe.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/plugin/withStripe.d.ts +2 -1
- package/lib/typescript/src/plugin/withStripe.d.ts.map +1 -0
- package/lib/typescript/src/types/ApplePay.d.ts +6 -5
- package/lib/typescript/src/types/ApplePay.d.ts.map +1 -0
- package/lib/typescript/src/types/Common.d.ts +4 -1
- package/lib/typescript/src/types/Common.d.ts.map +1 -0
- package/lib/typescript/src/types/CustomerSheet.d.ts +12 -4
- package/lib/typescript/src/types/CustomerSheet.d.ts.map +1 -0
- package/lib/typescript/src/types/Errors.d.ts +2 -1
- package/lib/typescript/src/types/Errors.d.ts.map +1 -0
- package/lib/typescript/src/types/FinancialConnections.d.ts +82 -14
- package/lib/typescript/src/types/FinancialConnections.d.ts.map +1 -0
- package/lib/typescript/src/types/NextAction.d.ts +9 -8
- package/lib/typescript/src/types/NextAction.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentIntent.d.ts +41 -14
- package/lib/typescript/src/types/PaymentIntent.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentMethod.d.ts +27 -15
- package/lib/typescript/src/types/PaymentMethod.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentSheet.d.ts +72 -22
- package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -0
- package/lib/typescript/src/types/PlatformPay.d.ts +22 -21
- package/lib/typescript/src/types/PlatformPay.d.ts.map +1 -0
- package/lib/typescript/src/types/PushProvisioning.d.ts +5 -4
- package/lib/typescript/src/types/PushProvisioning.d.ts.map +1 -0
- package/lib/typescript/src/types/SetupIntent.d.ts +4 -3
- package/lib/typescript/src/types/SetupIntent.d.ts.map +1 -0
- package/lib/typescript/src/types/ThreeDSecure.d.ts +1 -0
- package/lib/typescript/src/types/ThreeDSecure.d.ts.map +1 -0
- package/lib/typescript/src/types/Token.d.ts +10 -9
- package/lib/typescript/src/types/Token.d.ts.map +1 -0
- package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts +3 -2
- package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts.map +1 -0
- package/lib/typescript/src/types/components/AuBECSDebitFormComponent.d.ts +1 -0
- package/lib/typescript/src/types/components/AuBECSDebitFormComponent.d.ts.map +1 -0
- package/lib/typescript/src/types/components/CardFieldInput.d.ts +8 -5
- package/lib/typescript/src/types/components/CardFieldInput.d.ts.map +1 -0
- package/lib/typescript/src/types/components/CardFormView.d.ts +9 -6
- package/lib/typescript/src/types/components/CardFormView.d.ts.map +1 -0
- package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts +1 -0
- package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +24 -23
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/package.json +33 -42
- package/src/NativeStripeSdk.tsx +5 -3
- package/src/components/CardField.tsx +1 -1
- package/src/components/CardForm.tsx +12 -9
- package/src/components/CustomerSheet.tsx +4 -6
- package/src/components/StripeProvider.tsx +17 -0
- package/src/functions.ts +70 -16
- package/src/hooks/useFinancialConnectionsSheet.tsx +12 -4
- package/src/hooks/useStripe.tsx +10 -4
- package/src/types/Common.ts +3 -0
- package/src/types/CustomerSheet.ts +7 -0
- package/src/types/FinancialConnections.ts +72 -0
- package/src/types/PaymentIntent.ts +30 -1
- package/src/types/PaymentMethod.ts +13 -1
- package/src/types/PaymentSheet.ts +65 -5
- package/src/types/components/CardFieldInput.ts +8 -4
- package/src/types/components/CardFormView.ts +8 -4
- package/stripe-react-native.podspec +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":["ApplePay","_interopRequireWildcard","require","exports","PaymentIntent","PaymentMethod","PaymentSheet","SetupIntent","ThreeDSecure","AuBECSDebitFormComponent","CardFieldInput","CardFormView","Token","FinancialConnections","PlatformPay","_PushProvisioning","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","defineProperty","enumerable","get","_Errors","_CustomerSheet","_Common","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"k2BAeA,IAAAA,QAAA,CAAAC,uBAAA,CAAAC,OAAA,gBAAuCC,OAAA,CAAAH,QAAA,CAAAA,QAAA,CACvC,IAAAI,aAAA,CAAAH,uBAAA,CAAAC,OAAA,qBAAiDC,OAAA,CAAAC,aAAA,CAAAA,aAAA,CACjD,IAAAC,aAAA,CAAAJ,uBAAA,CAAAC,OAAA,qBAAiDC,OAAA,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AAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAAA,EAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,SAAAG,CAAA,CAAAR,GAAA,CAAAK,CAAA,MAAAO,CAAA,EAAAC,SAAA,OAAAC,CAAA,CAAAxB,MAAA,CAAAQ,cAAA,EAAAR,MAAA,CAAAyB,wBAAA,SAAAC,CAAA,IAAAX,CAAA,gBAAAW,CAAA,KAAArB,cAAA,CAAAC,IAAA,CAAAS,CAAA,CAAAW,CAAA,OAAAC,CAAA,CAAAH,CAAA,CAAAxB,MAAA,CAAAyB,wBAAA,CAAAV,CAAA,CAAAW,CAAA,OAAAC,CAAA,GAAAA,CAAA,CAAAjB,GAAA,EAAAiB,CAAA,CAAAC,GAAA,EAAA5B,MAAA,CAAAQ,cAAA,CAAAc,CAAA,CAAAI,CAAA,CAAAC,CAAA,EAAAL,CAAA,CAAAI,CAAA,EAAAX,CAAA,CAAAW,CAAA,UAAAJ,CAAA,CAAAF,OAAA,CAAAL,CAAA,CAAAG,CAAA,EAAAA,CAAA,CAAAU,GAAA,CAAAb,CAAA,CAAAO,CAAA,EAAAA,CAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var StripeSdk=_reactNative.NativeModules.StripeSdk;var _default=
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var StripeSdk=_reactNative.NativeModules.StripeSdk;var _default=exports.default=StripeSdk;
|
|
2
2
|
//# sourceMappingURL=NativeStripeSdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StripeSdk","NativeModules"],"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","StripeSdk","NativeModules","_default","exports","default"],"sourceRoot":"../../src","sources":["NativeStripeSdk.tsx"],"mappings":"gFAAA,IAAAA,YAAA,CAAAC,OAAA,iBA4JA,GAAQ,CAAAC,SAAS,CAAKC,0BAAa,CAA3BD,SAAS,CAAmB,IAAAE,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAErBJ,SAAS","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AddToWalletButton.tsx";var _excluded=["onComplete"];var AddToWalletButtonNative=(0,_reactNative.requireNativeComponent)('AddToWalletButton');function AddToWalletButton(_ref){var onComplete=_ref.onComplete,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(AddToWalletButtonNative,Object.assign({},props,{onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);}}));}
|
|
2
2
|
//# sourceMappingURL=AddToWalletButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButtonNative","requireNativeComponent","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAOsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,4FAAAC,SAAA,gBAQtB,GAAM,CAAAC,uBAAuB,CAC3B,GAAAC,mCAAsB,EAAM,mBAAmB,CAAC,CAgE3C,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAAkC,IAA/B,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAJ,IAAA,CAAAJ,SAAA,EACtD,MACE,GAAAF,WAAA,CAAAW,GAAA,EAACR,uBAAuB,CAAAS,MAAA,CAAAC,MAAA,IAClBL,KAAK,EACTM,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CACdC,KAEE,QACC,CAAAR,UAAU,CAACQ,KAAK,CAACC,WAAW,CAAC,EAAC,EACpC,CAAC,CAEN","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AddressSheet.tsx";var _excluded=["onSubmit","onError"];var AddressSheetNative=(0,_reactNative.requireNativeComponent)('AddressSheetView');function AddressSheet(_ref){var onSubmit=_ref.onSubmit,onError=_ref.onError,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(AddressSheetNative,Object.assign({},props,{onSubmitAction:function onSubmitAction(value){return onSubmit(value.nativeEvent);},onErrorAction:function onErrorAction(value){return onError(value.nativeEvent.error);}}));}
|
|
2
2
|
//# sourceMappingURL=AddressSheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AddressSheetNative","requireNativeComponent","AddressSheet","onSubmit","onError","props","value","nativeEvent","error"],"sources":["AddressSheet.tsx"],"
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","_excluded","AddressSheetNative","requireNativeComponent","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","value","nativeEvent","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAIsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,uFAAAC,SAAA,wBAQtB,GAAM,CAAAC,kBAAkB,CAAG,GAAAC,mCAAsB,EAAM,kBAAkB,CAAC,CA4DnE,QAAS,CAAAC,YAAYA,CAAAC,IAAA,CAAyC,IAAtC,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAL,IAAA,CAAAJ,SAAA,EACxD,MACE,GAAAF,WAAA,CAAAY,GAAA,EAACT,kBAAkB,CAAAU,MAAA,CAAAC,MAAA,IACbL,KAAK,EACTM,cAAc,CAAE,QAAhB,CAAAA,cAAcA,CAAGC,KAAiD,QAChE,CAAAT,QAAQ,CAACS,KAAK,CAACC,WAAW,CAAC,EAC5B,CACDC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CACXF,KAEE,QACC,CAAAR,OAAO,CAACQ,KAAK,CAACC,WAAW,CAACE,KAAK,CAAC,EAAC,EACvC,CAAC,CAEN","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var ApplePayButtonNative=(0,_reactNative.requireNativeComponent)('ApplePayButton');var _default=
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var ApplePayButtonNative=(0,_reactNative.requireNativeComponent)('ApplePayButton');var _default=exports.default=ApplePayButtonNative;
|
|
2
2
|
//# sourceMappingURL=ApplePayButtonNative.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ApplePayButtonNative","requireNativeComponent"],"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","ApplePayButtonNative","requireNativeComponent","_default","exports","default"],"sourceRoot":"../../../src","sources":["components/ApplePayButtonNative.tsx"],"mappings":"gFAAA,IAAAA,YAAA,CAAAC,OAAA,iBAEA,GAAM,CAAAC,oBAAoB,CACxB,GAAAC,mCAAsB,EAAsC,gBAAgB,CAAC,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAAC,OAAA,CACjEJ,oBAAoB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AuBECSDebitForm.tsx";var _excluded=["onComplete","companyName","formStyle"];var AuBECSDebitFormNative=(0,_reactNative.requireNativeComponent)('AuBECSDebitForm');function AuBECSDebitForm(_ref){var onComplete=_ref.onComplete,companyName=_ref.companyName,formStyle=_ref.formStyle,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(AuBECSDebitFormNative,Object.assign({onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);},companyName:companyName,formStyle:Object.assign({},formStyle)},props));}
|
|
2
2
|
//# sourceMappingURL=AuBECSDebitForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AuBECSDebitFormNative","requireNativeComponent","AuBECSDebitForm","onComplete","companyName","formStyle","props","value","nativeEvent"],"
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitFormNative","requireNativeComponent","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAKsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,0FAAAC,SAAA,0CAGtB,GAAM,CAAAC,qBAAqB,CACzB,GAAAC,mCAAsB,EACpB,iBACF,CAAC,CA4BI,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAKrB,IAJR,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACNC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAN,IAAA,CAAAJ,SAAA,EAER,MACE,GAAAF,WAAA,CAAAa,GAAA,EAACV,qBAAqB,CAAAW,MAAA,CAAAC,MAAA,EACpBC,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CAAGC,KAAK,QAAK,CAAAV,UAAU,CAACU,KAAK,CAACC,WAAW,CAAC,EAAC,CAC3DV,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAAK,MAAA,CAAAC,MAAA,IAAON,SAAS,CAAG,EACxBC,KAAK,CACV,CAAC,CAEN","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode"];var _this=this,_jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/CardField.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardFieldNative=(0,_reactNative.requireNativeComponent)('CardField');var CardField=exports.CardField=(0,_react.forwardRef)(function(_ref,ref){var onCardChange=_ref.onCardChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,postalCodeEnabled=_ref.postalCodeEnabled,countryCode=_ref.countryCode,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onCardChangeHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,validExpiryDate:card.validExpiryDate,validNumber:card.validNumber,validCVC:card.validCVC};if(card.hasOwnProperty('postalCode')){data.postalCode=card.postalCode||'';}if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onCardChange&&card.complete){console.warn(`[stripe-react-native] ⚠️ WARNING: You've enabled \`dangerouslyGetFullCardDetails\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`);}}onCardChange==null||onCardChange(data);},[onCardChange]);var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);onFocus==null||onFocus(focusedField);}else{onBlur==null||onBlur();}},[onFocus,onBlur]);var focus=function focus(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'focus',[]);};var blur=function blur(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'blur',[]);};var clear=function clear(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'clear',[]);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur,clear:clear};});(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(CardFieldNative,Object.assign({ref:inputRef,onCardChange:onCardChangeHandler,onFocusChange:onFocusHandler,postalCodeEnabled:postalCodeEnabled!=null?postalCodeEnabled:true,countryCode:countryCode!=null?countryCode:null,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode}},props));});
|
|
2
2
|
//# sourceMappingURL=CardField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CardFieldNative","requireNativeComponent","CardField","forwardRef","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode","props","inputRef","useRef","onCardChangeHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","hasOwnProperty","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","focusInput","current","focus","UIManager","dispatchViewManagerCommand","findNodeHandle","blur","clear","useImperativeHandle","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sources":["CardField.tsx"],"sourcesContent":["import type { CardFieldInput, CardBrand } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFieldNative =\n requireNativeComponent<CardFieldInput.NativeProps>('CardField');\n\n/**\n * Card Field Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n /** Controls if a postal code entry field can be displayed to the user. If true, the type of code entry shown is controlled by the set countryCode prop. Some country codes may result in no postal code entry being shown if those countries do not commonly use postal codes. If false, no postal code entry will ever be displayed. Defaults to true.*/\n postalCodeEnabled?: boolean;\n /** Controls the postal code entry shown (if the postalCodeEnabled prop is set to true). Defaults to the device's default locale. */\n countryCode?: string;\n /** Applies a disabled state such that user input is not accepted. Defaults to false. */\n disabled?: boolean;\n cardStyle?: CardFieldInput.Styles;\n placeholders?: CardFieldInput.Placeholders;\n autofocus?: boolean;\n onCardChange?(card: CardFieldInput.Details): void;\n onBlur?(): void;\n onFocus?(focusedField: CardFieldInput.FieldName | null): void;\n testID?: string;\n /** The list of preferred networks that should be used to process payments made with a co-branded card.\n * This value will only be used if your user hasn't selected a network themselves. */\n preferredNetworks?: Array<CardBrand>;\n /** The account (if any) for which the funds of the intent are intended. */\n onBehalfOf?: string;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onCardChange` handler.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Field Component\n *\n * @example\n * ```ts\n * <CardField\n * postalCodeEnabled={false}\n * onCardChange={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 50}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardField = forwardRef<CardFieldInput.Methods, Props>(\n (\n {\n onCardChange,\n onFocus,\n onBlur,\n cardStyle,\n placeholders,\n postalCodeEnabled,\n countryCode,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onCardChangeHandler = useCallback(\n (event: NativeSyntheticEvent<CardFieldInput.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFieldInput.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n validExpiryDate: card.validExpiryDate,\n validNumber: card.validNumber,\n validCVC: card.validCVC,\n };\n\n if (card.hasOwnProperty('postalCode')) {\n data.postalCode = card.postalCode || '';\n }\n if (card.hasOwnProperty('number') || card.hasOwnProperty('cvc')) {\n data.number = card.number || '';\n data.cvc = card.cvc || '';\n if (__DEV__ && onCardChange && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onCardChange?.(data);\n },\n [onCardChange]\n );\n\n const onFocusHandler = useCallback(\n (event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n onFocus?.(focusedField);\n } else {\n onBlur?.();\n }\n },\n [onFocus, onBlur]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n const clear = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'clear' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n clear,\n }));\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFieldNative\n ref={inputRef}\n onCardChange={onCardChangeHandler}\n onFocusChange={onFocusHandler}\n postalCodeEnabled={postalCodeEnabled ?? true}\n countryCode={countryCode ?? null}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n borderColor: cardStyle?.borderColor,\n borderWidth: cardStyle?.borderWidth,\n borderRadius: cardStyle?.borderRadius,\n cursorColor: cardStyle?.cursorColor,\n fontSize: cardStyle?.fontSize,\n placeholderColor: cardStyle?.placeholderColor,\n textColor: cardStyle?.textColor,\n textErrorColor: cardStyle?.textErrorColor,\n fontFamily: cardStyle?.fontFamily,\n }}\n placeholders={{\n number: placeholders?.number,\n expiration: placeholders?.expiration,\n cvc: placeholders?.cvc,\n postalCode: placeholders?.postalCode,\n }}\n {...props}\n />\n );\n }\n);\n"],"mappings":"qWACA,qDAOA,yCASA,mCAKoB,itCAEpB,GAAMA,gBAAe,CACnB,GAAAC,mCAAsB,EAA6B,WAAW,CAAC,CAoD1D,GAAMC,UAAS,CAAG,GAAAC,iBAAU,EACjC,cAWEC,GAAG,CACA,IAVDC,aAAY,MAAZA,YAAY,CACZC,OAAO,MAAPA,OAAO,CACPC,MAAM,MAANA,MAAM,CACNC,SAAS,MAATA,SAAS,CACTC,YAAY,MAAZA,YAAY,CACZC,iBAAiB,MAAjBA,iBAAiB,CACjBC,WAAW,MAAXA,WAAW,CACRC,KAAK,uDAIV,GAAMC,SAAQ,CAAG,GAAAC,aAAM,EAAM,IAAI,CAAC,CAElC,GAAMC,oBAAmB,CAAG,GAAAC,kBAAW,EACrC,SAACC,KAAmD,CAAK,CACvD,GAAMC,KAAI,CAAGD,KAAK,CAACE,WAAW,CAE9B,GAAMC,KAA4B,CAAG,CACnCC,KAAK,CAAEH,IAAI,CAACG,KAAK,CACjBC,WAAW,CAAEJ,IAAI,CAACI,WAAW,CAC7BC,UAAU,CAAEL,IAAI,CA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AW,CAAE7C,SAAS,cAATA,SAAS,CAAE6C,WAAW,CACnCC,WAAW,CAAE9C,SAAS,cAATA,SAAS,CAAE8C,WAAW,CACnCC,YAAY,CAAE/C,SAAS,cAATA,SAAS,CAAE+C,YAAY,CACrCC,WAAW,CAAEhD,SAAS,cAATA,SAAS,CAAEgD,WAAW,CACnCC,QAAQ,CAAEjD,SAAS,cAATA,SAAS,CAAEiD,QAAQ,CAC7BC,gBAAgB,CAAElD,SAAS,cAATA,SAAS,CAAEkD,gBAAgB,CAC7CC,SAAS,CAAEnD,SAAS,cAATA,SAAS,CAAEmD,SAAS,CAC/BC,cAAc,CAAEpD,SAAS,cAATA,SAAS,CAAEoD,cAAc,CACzCC,UAAU,CAAErD,SAAS,cAATA,SAAS,CAAEqD,UACzB,CAAE,CACF,YAAY,CAAE,CACZ9B,MAAM,CAAEtB,YAAY,cAAZA,YAAY,CAAEsB,MAAM,CAC5B+B,UAAU,CAAErD,YAAY,cAAZA,YAAY,CAAEqD,UAAU,CACpC9B,GAAG,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,GAAG,CACtBF,UAAU,CAAErB,YAAY,cAAZA,YAAY,CAAEqB,UAC5B,CAAE,EACElB,KAAK,gFACT,CAEN,CAAC,CACF,CAAC"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardFieldNative","requireNativeComponent","CardField","exports","forwardRef","_ref","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode","props","_objectWithoutProperties2","inputRef","useRef","onCardChangeHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","focusInput","current","focus","UIManager","dispatchViewManagerCommand","findNodeHandle","blur","clear","useImperativeHandle","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","onFocusChange","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sourceRoot":"../../../src","sources":["components/CardField.tsx"],"mappings":"qRACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,QAAA,CAAAF,OAAA,eAKoB,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,sGAAAC,KAAA,MAAAC,YAAA,yFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAT,wBAAAS,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAAA,EAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,SAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,MAAAQ,CAAA,EAAAC,SAAA,OAAAC,CAAA,CAAAC,MAAA,CAAAC,cAAA,EAAAD,MAAA,CAAAE,wBAAA,SAAAC,CAAA,IAAAd,CAAA,gBAAAc,CAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,CAAA,OAAAG,CAAA,CAAAP,CAAA,CAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,CAAAc,CAAA,OAAAG,CAAA,GAAAA,CAAA,CAAAV,GAAA,EAAAU,CAAA,CAAA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C,eAAe,CAAE/C,SAAS,cAATA,SAAS,CAAE+C,eAAe,CAC3CC,WAAW,CAAEhD,SAAS,cAATA,SAAS,CAAEgD,WAAW,CACnCC,WAAW,CAAEjD,SAAS,cAATA,SAAS,CAAEiD,WAAW,CACnCC,YAAY,CAAElD,SAAS,cAATA,SAAS,CAAEkD,YAAY,CACrCC,WAAW,CAAEnD,SAAS,cAATA,SAAS,CAAEmD,WAAW,CACnCC,QAAQ,CAAEpD,SAAS,cAATA,SAAS,CAAEoD,QAAQ,CAC7BC,gBAAgB,CAAErD,SAAS,cAATA,SAAS,CAAEqD,gBAAgB,CAC7CC,SAAS,CAAEtD,SAAS,cAATA,SAAS,CAAEsD,SAAS,CAC/BC,cAAc,CAAEvD,SAAS,cAATA,SAAS,CAAEuD,cAAc,CACzCC,UAAU,CAAExD,SAAS,cAATA,SAAS,CAAEwD,UACzB,CAAE,CACFvD,YAAY,CAAE,CACZsB,MAAM,CAAEtB,YAAY,cAAZA,YAAY,CAAEsB,MAAM,CAC5BkC,UAAU,CAAExD,YAAY,cAAZA,YAAY,CAAEwD,UAAU,CACpCjC,GAAG,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,GAAG,CACtBF,UAAU,CAAErB,YAAY,cAAZA,YAAY,CAAEqB,UAC5B,CAAE,EACElB,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardForm=void 0;var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardForm=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onFormComplete","cardStyle","placeholders","defaultValues"];var _this=this,_jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/CardForm.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardFormNative=(0,_reactNative.requireNativeComponent)('CardForm');var CardForm=exports.CardForm=(0,_react.forwardRef)(function(_ref,ref){var onFormComplete=_ref.onFormComplete,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,defaultValues=_ref.defaultValues,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onFormCompleteHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,country:card.country,postalCode:card.postalCode};if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onFormComplete&&card.complete){console.warn(`[stripe-react-native] ⚠️ WARNING: You've enabled \`dangerouslyGetFullCardDetails\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`);}}onFormComplete==null||onFormComplete(data);},[onFormComplete]);var focus=function focus(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'focus',[]);};var blur=function blur(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'blur',[]);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur};});var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);}else{}},[]);(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(CardFormNative,Object.assign({ref:inputRef,onFormComplete:onFormCompleteHandler,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode},defaultValues:Object.assign({},defaultValues!=null?defaultValues:{}),onFocusChange:onFocusHandler},props));});
|
|
2
2
|
//# sourceMappingURL=CardForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CardFormNative","requireNativeComponent","CardForm","forwardRef","ref","onFormComplete","cardStyle","placeholders","defaultValues","props","inputRef","useRef","onFormCompleteHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardFormNative","requireNativeComponent","CardForm","exports","forwardRef","_ref","ref","onFormComplete","cardStyle","placeholders","defaultValues","props","_objectWithoutProperties2","inputRef","useRef","onFormCompleteHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","number","cvc","__DEV__","console","warn","focus","UIManager","dispatchViewManagerCommand","findNodeHandle","current","blur","useImperativeHandle","onFocusHandler","focusedField","focusInput","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","onFocusChange"],"sourceRoot":"../../../src","sources":["components/CardForm.tsx"],"mappings":"oRACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,QAAA,CAAAF,OAAA,eAKoB,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,mEAAAC,KAAA,MAAAC,YAAA,wFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAT,wBAAAS,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBA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,CAC7BC,gBAAgB,CAAEhD,SAAS,cAATA,SAAS,CAAEgD,gBAAgB,CAC7CC,SAAS,CAAEjD,SAAS,cAATA,SAAS,CAAEiD,SAAS,CAC/BC,cAAc,CAAElD,SAAS,cAATA,SAAS,CAAEkD,cAAc,CACzCC,UAAU,CAAEnD,SAAS,cAATA,SAAS,CAAEmD,UAGzB,CAAE,CACFlD,YAAY,CAAE,CACZmB,MAAM,CAAEnB,YAAY,cAAZA,YAAY,CAAEmB,MAAM,CAC5BgC,UAAU,CAAEnD,YAAY,cAAZA,YAAY,CAAEmD,UAAU,CACpC/B,GAAG,CAAEpB,YAAY,cAAZA,YAAY,CAAEoB,GAAG,CACtBF,UAAU,CAAElB,YAAY,cAAZA,YAAY,CAAEkB,UAC5B,CAAE,CACFjB,aAAa,CAAAlB,MAAA,CAAAyD,MAAA,IACPvC,aAAa,OAAbA,aAAa,CAAI,CAAC,CAAC,CACvB,CACFmD,aAAa,CAAErB,cAAe,EAE1B7B,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CustomerSheet=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var eventEmitter=new _reactNative.NativeEventEmitter(_reactNative.NativeModules.StripeSdk);var fetchPaymentMethodsCallback=null;var attachPaymentMethodCallback=null;var detachPaymentMethodCallback=null;var setSelectedPaymentOptionCallback=null;var fetchSelectedPaymentOptionCallback=null;var setupIntentClientSecretForCustomerAttachCallback=null;var initialize=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var customerAdapterOverrides={};if(params.customerAdapter){customerAdapterOverrides=configureCustomerAdapterEventListeners(params.customerAdapter);}try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.initCustomerSheet(params,customerAdapterOverrides),error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initialize(_x){return _ref.apply(this,arguments);};}();var configureCustomerAdapterEventListeners=function configureCustomerAdapterEventListeners(customerAdapter){if(customerAdapter.fetchPaymentMethods){var _fetchPaymentMethodsC;(_fetchPaymentMethodsC=fetchPaymentMethodsCallback)==null
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CustomerSheet=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var eventEmitter=new _reactNative.NativeEventEmitter(_reactNative.NativeModules.StripeSdk);var fetchPaymentMethodsCallback=null;var attachPaymentMethodCallback=null;var detachPaymentMethodCallback=null;var setSelectedPaymentOptionCallback=null;var fetchSelectedPaymentOptionCallback=null;var setupIntentClientSecretForCustomerAttachCallback=null;var initialize=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var customerAdapterOverrides={};if(params.customerAdapter){customerAdapterOverrides=configureCustomerAdapterEventListeners(params.customerAdapter);}try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.initCustomerSheet(params,customerAdapterOverrides),error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initialize(_x){return _ref.apply(this,arguments);};}();var configureCustomerAdapterEventListeners=function configureCustomerAdapterEventListeners(customerAdapter){if(customerAdapter.fetchPaymentMethods){var _fetchPaymentMethodsC;(_fetchPaymentMethodsC=fetchPaymentMethodsCallback)==null||_fetchPaymentMethodsC.remove();fetchPaymentMethodsCallback=eventEmitter.addListener('onCustomerAdapterFetchPaymentMethodsCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchPaymentMethods){var paymentMethods=yield customerAdapter.fetchPaymentMethods();yield _NativeStripeSdk.default.customerAdapterFetchPaymentMethodsCallback(paymentMethods);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchPaymentMethods` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.attachPaymentMethod){var _attachPaymentMethodC;(_attachPaymentMethodC=attachPaymentMethodCallback)==null||_attachPaymentMethodC.remove();attachPaymentMethodCallback=eventEmitter.addListener('onCustomerAdapterAttachPaymentMethodCallback',function(){var _ref4=(0,_asyncToGenerator2.default)(function*(_ref3){var paymentMethodId=_ref3.paymentMethodId;if(customerAdapter.attachPaymentMethod){var paymentMethod=yield customerAdapter.attachPaymentMethod(paymentMethodId);yield _NativeStripeSdk.default.customerAdapterAttachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `attachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x2){return _ref4.apply(this,arguments);};}());}if(customerAdapter.detachPaymentMethod){var _detachPaymentMethodC;(_detachPaymentMethodC=detachPaymentMethodCallback)==null||_detachPaymentMethodC.remove();detachPaymentMethodCallback=eventEmitter.addListener('onCustomerAdapterDetachPaymentMethodCallback',function(){var _ref6=(0,_asyncToGenerator2.default)(function*(_ref5){var paymentMethodId=_ref5.paymentMethodId;if(customerAdapter.detachPaymentMethod){var paymentMethod=yield customerAdapter.detachPaymentMethod(paymentMethodId);yield _NativeStripeSdk.default.customerAdapterDetachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `detachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x3){return _ref6.apply(this,arguments);};}());}if(customerAdapter.setSelectedPaymentOption){var _setSelectedPaymentOp;(_setSelectedPaymentOp=setSelectedPaymentOptionCallback)==null||_setSelectedPaymentOp.remove();setSelectedPaymentOptionCallback=eventEmitter.addListener('onCustomerAdapterSetSelectedPaymentOptionCallback',function(){var _ref8=(0,_asyncToGenerator2.default)(function*(_ref7){var paymentOption=_ref7.paymentOption;if(customerAdapter.setSelectedPaymentOption){yield customerAdapter.setSelectedPaymentOption(paymentOption);yield _NativeStripeSdk.default.customerAdapterSetSelectedPaymentOptionCallback();}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}});return function(_x4){return _ref8.apply(this,arguments);};}());}if(customerAdapter.fetchSelectedPaymentOption){var _fetchSelectedPayment;(_fetchSelectedPayment=fetchSelectedPaymentOptionCallback)==null||_fetchSelectedPayment.remove();fetchSelectedPaymentOptionCallback=eventEmitter.addListener('onCustomerAdapterFetchSelectedPaymentOptionCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchSelectedPaymentOption){var paymentOption=yield customerAdapter.fetchSelectedPaymentOption();yield _NativeStripeSdk.default.customerAdapterFetchSelectedPaymentOptionCallback(paymentOption);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.setupIntentClientSecretForCustomerAttach){var _setupIntentClientSec;(_setupIntentClientSec=setupIntentClientSecretForCustomerAttachCallback)==null||_setupIntentClientSec.remove();setupIntentClientSecretForCustomerAttachCallback=eventEmitter.addListener('onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.setupIntentClientSecretForCustomerAttach){var clientSecret=yield customerAdapter.setupIntentClientSecretForCustomerAttach();yield _NativeStripeSdk.default.customerAdapterSetupIntentClientSecretForCustomerAttachCallback(clientSecret);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setupIntentClientSecretForCustomerAttach` on your CustomerAdapter, but no matching method was found.');}}));}return{fetchPaymentMethods:!!customerAdapter.fetchPaymentMethods,attachPaymentMethod:!!customerAdapter.attachPaymentMethod,detachPaymentMethod:!!customerAdapter.detachPaymentMethod,setSelectedPaymentOption:!!customerAdapter.setSelectedPaymentOption,fetchSelectedPaymentOption:!!customerAdapter.fetchSelectedPaymentOption,setupIntentClientSecretForCustomerAttach:!!customerAdapter.setupIntentClientSecretForCustomerAttach};};var present=function(){var _ref11=(0,_asyncToGenerator2.default)(function*(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{return yield _NativeStripeSdk.default.presentCustomerSheet(params);}catch(error){return{error:error};}});return function present(){return _ref11.apply(this,arguments);};}();var retrievePaymentOptionSelection=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(){try{return yield _NativeStripeSdk.default.retrieveCustomerSheetPaymentOptionSelection();}catch(error){return{error:error};}});return function retrievePaymentOptionSelection(){return _ref12.apply(this,arguments);};}();function Component(_ref13){var visible=_ref13.visible,presentationStyle=_ref13.presentationStyle,animationStyle=_ref13.animationStyle,style=_ref13.style,appearance=_ref13.appearance,setupIntentClientSecret=_ref13.setupIntentClientSecret,customerId=_ref13.customerId,customerEphemeralKeySecret=_ref13.customerEphemeralKeySecret,merchantDisplayName=_ref13.merchantDisplayName,headerTextForSelectionScreen=_ref13.headerTextForSelectionScreen,defaultBillingDetails=_ref13.defaultBillingDetails,billingDetailsCollectionConfiguration=_ref13.billingDetailsCollectionConfiguration,returnURL=_ref13.returnURL,removeSavedPaymentMethodMessage=_ref13.removeSavedPaymentMethodMessage,applePayEnabled=_ref13.applePayEnabled,googlePayEnabled=_ref13.googlePayEnabled,timeout=_ref13.timeout,onResult=_ref13.onResult,customerAdapter=_ref13.customerAdapter;_react.default.useEffect(function(){if(visible){initialize({style:style,appearance:appearance,setupIntentClientSecret:setupIntentClientSecret,customerId:customerId,customerEphemeralKeySecret:customerEphemeralKeySecret,merchantDisplayName:merchantDisplayName,headerTextForSelectionScreen:headerTextForSelectionScreen,defaultBillingDetails:defaultBillingDetails,billingDetailsCollectionConfiguration:billingDetailsCollectionConfiguration,returnURL:returnURL,removeSavedPaymentMethodMessage:removeSavedPaymentMethodMessage,applePayEnabled:applePayEnabled,googlePayEnabled:googlePayEnabled,customerAdapter:customerAdapter}).then(function(initResult){if(initResult.error){onResult(initResult);}else{present({timeout:timeout,presentationStyle:presentationStyle,animationStyle:animationStyle}).then(function(presentResult){onResult(presentResult);});}});}},[visible]);return null;}var CustomerSheet=exports.CustomerSheet={Component:Component,initialize:initialize,present:present,retrievePaymentOptionSelection:retrievePaymentOptionSelection};
|
|
2
2
|
//# sourceMappingURL=CustomerSheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","fetchPaymentMethodsCallback","attachPaymentMethodCallback","detachPaymentMethodCallback","setSelectedPaymentOptionCallback","fetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttachCallback","initialize","params","customerAdapterOverrides","customerAdapter","configureCustomerAdapterEventListeners","NativeStripeSdk","initCustomerSheet","error","fetchPaymentMethods","remove","addListener","paymentMethods","customerAdapterFetchPaymentMethodsCallback","Error","attachPaymentMethod","paymentMethodId","paymentMethod","customerAdapterAttachPaymentMethodCallback","detachPaymentMethod","customerAdapterDetachPaymentMethodCallback","setSelectedPaymentOption","paymentOption","customerAdapterSetSelectedPaymentOptionCallback","fetchSelectedPaymentOption","customerAdapterFetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttach","clientSecret","customerAdapterSetupIntentClientSecretForCustomerAttachCallback","present","presentCustomerSheet","retrievePaymentOptionSelection","retrieveCustomerSheetPaymentOptionSelection","Component","visible","presentationStyle","animationStyle","style","appearance","setupIntentClientSecret","customerId","customerEphemeralKeySecret","merchantDisplayName","headerTextForSelectionScreen","defaultBillingDetails","billingDetailsCollectionConfiguration","returnURL","removeSavedPaymentMethodMessage","applePayEnabled","googlePayEnabled","timeout","onResult","React","useEffect","then","initResult","presentResult","CustomerSheet"],"sources":["CustomerSheet.tsx"],"sourcesContent":["import React from 'react';\nimport {\n NativeEventEmitter,\n NativeModules,\n EmitterSubscription,\n} from 'react-native';\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport type {\n CustomerSheetInitParams,\n CustomerSheetPresentParams,\n CustomerSheetResult,\n CustomerSheetError,\n StripeError,\n CustomerAdapter,\n} from '../types';\n\nconst eventEmitter = new NativeEventEmitter(NativeModules.StripeSdk);\nlet fetchPaymentMethodsCallback: EmitterSubscription | null = null;\nlet attachPaymentMethodCallback: EmitterSubscription | null = null;\nlet detachPaymentMethodCallback: EmitterSubscription | null = null;\nlet setSelectedPaymentOptionCallback: EmitterSubscription | null = null;\nlet fetchSelectedPaymentOptionCallback: EmitterSubscription | null = null;\nlet setupIntentClientSecretForCustomerAttachCallback: EmitterSubscription | null =\n null;\n\n/** Initialize an instance of Customer Sheet with your desired configuration. */\nconst initialize = async (\n params: CustomerSheetInitParams\n): Promise<{ error?: StripeError<CustomerSheetError> }> => {\n let customerAdapterOverrides = {};\n if (params.customerAdapter) {\n customerAdapterOverrides = configureCustomerAdapterEventListeners(\n params.customerAdapter\n );\n }\n\n try {\n const { error } = await NativeStripeSdk.initCustomerSheet(\n params,\n customerAdapterOverrides\n );\n if (error) {\n return { error };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nconst configureCustomerAdapterEventListeners = (\n customerAdapter: CustomerAdapter\n): { [Property in keyof CustomerAdapter]: boolean } => {\n if (customerAdapter.fetchPaymentMethods) {\n fetchPaymentMethodsCallback?.remove();\n fetchPaymentMethodsCallback = eventEmitter.addListener(\n 'onCustomerAdapterFetchPaymentMethodsCallback',\n async () => {\n if (customerAdapter.fetchPaymentMethods) {\n const paymentMethods = await customerAdapter.fetchPaymentMethods();\n await NativeStripeSdk.customerAdapterFetchPaymentMethodsCallback(\n paymentMethods\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `fetchPaymentMethods` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.attachPaymentMethod) {\n attachPaymentMethodCallback?.remove();\n attachPaymentMethodCallback = eventEmitter.addListener(\n 'onCustomerAdapterAttachPaymentMethodCallback',\n async ({ paymentMethodId }: { paymentMethodId: string }) => {\n if (customerAdapter.attachPaymentMethod) {\n const paymentMethod = await customerAdapter.attachPaymentMethod(\n paymentMethodId\n );\n await NativeStripeSdk.customerAdapterAttachPaymentMethodCallback(\n paymentMethod\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `attachPaymentMethod` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.detachPaymentMethod) {\n detachPaymentMethodCallback?.remove();\n detachPaymentMethodCallback = eventEmitter.addListener(\n 'onCustomerAdapterDetachPaymentMethodCallback',\n async ({ paymentMethodId }: { paymentMethodId: string }) => {\n if (customerAdapter.detachPaymentMethod) {\n const paymentMethod = await customerAdapter.detachPaymentMethod(\n paymentMethodId\n );\n await NativeStripeSdk.customerAdapterDetachPaymentMethodCallback(\n paymentMethod\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `detachPaymentMethod` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.setSelectedPaymentOption) {\n setSelectedPaymentOptionCallback?.remove();\n setSelectedPaymentOptionCallback = eventEmitter.addListener(\n 'onCustomerAdapterSetSelectedPaymentOptionCallback',\n async ({ paymentOption }: { paymentOption: string }) => {\n if (customerAdapter.setSelectedPaymentOption) {\n await customerAdapter.setSelectedPaymentOption(paymentOption);\n await NativeStripeSdk.customerAdapterSetSelectedPaymentOptionCallback();\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `setSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.fetchSelectedPaymentOption) {\n fetchSelectedPaymentOptionCallback?.remove();\n fetchSelectedPaymentOptionCallback = eventEmitter.addListener(\n 'onCustomerAdapterFetchSelectedPaymentOptionCallback',\n async () => {\n if (customerAdapter.fetchSelectedPaymentOption) {\n const paymentOption =\n await customerAdapter.fetchSelectedPaymentOption();\n await NativeStripeSdk.customerAdapterFetchSelectedPaymentOptionCallback(\n paymentOption\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `fetchSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n if (customerAdapter.setupIntentClientSecretForCustomerAttach) {\n setupIntentClientSecretForCustomerAttachCallback?.remove();\n setupIntentClientSecretForCustomerAttachCallback = eventEmitter.addListener(\n 'onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback',\n async () => {\n if (customerAdapter.setupIntentClientSecretForCustomerAttach) {\n const clientSecret =\n await customerAdapter.setupIntentClientSecretForCustomerAttach();\n await NativeStripeSdk.customerAdapterSetupIntentClientSecretForCustomerAttachCallback(\n clientSecret\n );\n } else {\n throw new Error(\n '[@stripe/stripe-react-native] Tried to call `setupIntentClientSecretForCustomerAttach` on your CustomerAdapter, but no matching method was found.'\n );\n }\n }\n );\n }\n\n return {\n fetchPaymentMethods: !!customerAdapter.fetchPaymentMethods,\n attachPaymentMethod: !!customerAdapter.attachPaymentMethod,\n detachPaymentMethod: !!customerAdapter.detachPaymentMethod,\n setSelectedPaymentOption: !!customerAdapter.setSelectedPaymentOption,\n fetchSelectedPaymentOption: !!customerAdapter.fetchSelectedPaymentOption,\n setupIntentClientSecretForCustomerAttach:\n !!customerAdapter.setupIntentClientSecretForCustomerAttach,\n };\n};\n\n/** Launches the Customer Sheet UI. */\nconst present = async (\n params: CustomerSheetPresentParams = {}\n): Promise<CustomerSheetResult> => {\n try {\n return await NativeStripeSdk.presentCustomerSheet(params);\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * You can use this to obtain the selected payment method without presenting the CustomerSheet.\n * This will return an error if you have not called `.initialize`\n */\nconst retrievePaymentOptionSelection =\n async (): Promise<CustomerSheetResult> => {\n try {\n return await NativeStripeSdk.retrieveCustomerSheetPaymentOptionSelection();\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\n/**\n * Props\n */\nexport type Props = {\n /** Whether the sheet is visible. Defaults to false. */\n visible: boolean;\n /** Called when the user submits, dismisses, or cancels the sheet, or when an error occurs. */\n onResult: (result: CustomerSheetResult) => void;\n} & CustomerSheetInitParams &\n CustomerSheetPresentParams;\n\n/**\n * A component wrapper around the Customer Sheet functions. Upon passing `true` to the `visible` prop,\n * Customer Sheet will call `initialize` and `present`, and the result(s) will be passed through to the\n * onResult callback.\n *\n * @example\n * ```ts\n * const [selectedPaymentOption, setSelectedPaymentOption] = React.useState(null);\n * const [customerSheetVisible, setCustomerSheetVisible] = React.useState(false);\n *\n * return (\n * <CustomerSheet\n * visible={customerSheetVisible}\n * customerEphemeralKeySecret={ephemeralKeySecret}\n * customerId={customer}\n * returnURL={'stripe-example://stripe-redirect'}\n * onResult={({ error, paymentOption, paymentMethod }) => {\n * setCustomerSheetVisible(false);\n * if (error) {\n * Alert.alert(error.code, error.localizedMessage);\n * }\n * if (paymentOption) {\n * setSelectedPaymentOption(paymentOption);\n * console.log(JSON.stringify(paymentOption, null, 2));\n * }\n * if (paymentMethod) {\n * console.log(JSON.stringify(paymentMethod, null, 2));\n * }\n * }}\n * />\n * );\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nfunction Component({\n visible,\n presentationStyle,\n animationStyle,\n style,\n appearance,\n setupIntentClientSecret,\n customerId,\n customerEphemeralKeySecret,\n merchantDisplayName,\n headerTextForSelectionScreen,\n defaultBillingDetails,\n billingDetailsCollectionConfiguration,\n returnURL,\n removeSavedPaymentMethodMessage,\n applePayEnabled,\n googlePayEnabled,\n timeout,\n onResult,\n customerAdapter,\n}: Props) {\n React.useEffect(() => {\n if (visible) {\n initialize({\n style,\n appearance,\n setupIntentClientSecret,\n customerId,\n customerEphemeralKeySecret,\n merchantDisplayName,\n headerTextForSelectionScreen,\n defaultBillingDetails,\n billingDetailsCollectionConfiguration,\n returnURL,\n removeSavedPaymentMethodMessage,\n applePayEnabled,\n googlePayEnabled,\n customerAdapter,\n }).then((initResult) => {\n if (initResult.error) {\n onResult(initResult);\n } else {\n present({\n timeout,\n presentationStyle,\n animationStyle,\n }).then((presentResult) => {\n onResult(presentResult);\n });\n }\n });\n }\n // Only run this hook when visible prop changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [visible]);\n\n return null;\n}\n\n/**\n * The Customer Sheet is a prebuilt UI component that lets your customers manage their saved payment methods.\n */\nexport const CustomerSheet = {\n Component,\n initialize,\n present,\n retrievePaymentOptionSelection,\n};\n"],"mappings":"2QAAA,oDACA,yCAKA,2EAUA,GAAMA,aAAY,CAAG,GAAIC,gCAAkB,CAACC,0BAAa,CAACC,SAAS,CAAC,CACpE,GAAIC,4BAAuD,CAAG,IAAI,CAClE,GAAIC,4BAAuD,CAAG,IAAI,CAClE,GAAIC,4BAAuD,CAAG,IAAI,CAClE,GAAIC,iCAA4D,CAAG,IAAI,CACvE,GAAIC,mCAA8D,CAAG,IAAI,CACzE,GAAIC,iDAA4E,CAC9E,IAAI,CAGN,GAAMC,WAAU,oDAAG,UACjBC,MAA+B,CAC0B,CACzD,GAAIC,yBAAwB,CAAG,CAAC,CAAC,CACjC,GAAID,MAAM,CAACE,eAAe,CAAE,CAC1BD,wBAAwB,CAAGE,sCAAsC,CAC/DH,MAAM,CAACE,eAAe,CACvB,CACH,CAEA,GAAI,CACF,+BAAwBE,yBAAe,CAACC,iBAAiB,CACvDL,MAAM,CACNC,wBAAwB,CACzB,CAHOK,KAAK,uBAALA,KAAK,CAIb,GAAIA,KAAK,CAAE,CACT,MAAO,CAAEA,KAAK,CAALA,KAAM,CAAC,CAClB,CACA,MAAO,CAAC,CAAC,CACX,CAAE,MAAOA,KAAU,CAAE,CACnB,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBAxBKP,WAAU,4CAwBf,CAED,GAAMI,uCAAsC,CAAG,QAAzCA,uCAAsC,CAC1CD,eAAgC,CACqB,CACrD,GAAIA,eAAe,CAACK,mBAAmB,CAAE,2BACvC,uBAAAd,2BAA2B,eAA3B,sBAA6Be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
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeSdk","eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","fetchPaymentMethodsCallback","attachPaymentMethodCallback","detachPaymentMethodCallback","setSelectedPaymentOptionCallback","fetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttachCallback","initialize","_ref","_asyncToGenerator2","default","params","customerAdapterOverrides","customerAdapter","configureCustomerAdapterEventListeners","_yield$NativeStripeSd","NativeStripeSdk","initCustomerSheet","error","_x","apply","arguments","fetchPaymentMethods","_fetchPaymentMethodsC","remove","addListener","paymentMethods","customerAdapterFetchPaymentMethodsCallback","Error","attachPaymentMethod","_attachPaymentMethodC","_ref4","_ref3","paymentMethodId","paymentMethod","customerAdapterAttachPaymentMethodCallback","_x2","detachPaymentMethod","_detachPaymentMethodC","_ref6","_ref5","customerAdapterDetachPaymentMethodCallback","_x3","setSelectedPaymentOption","_setSelectedPaymentOp","_ref8","_ref7","paymentOption","customerAdapterSetSelectedPaymentOptionCallback","_x4","fetchSelectedPaymentOption","_fetchSelectedPayment","customerAdapterFetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttach","_setupIntentClientSec","clientSecret","customerAdapterSetupIntentClientSecretForCustomerAttachCallback","present","_ref11","length","undefined","presentCustomerSheet","retrievePaymentOptionSelection","_ref12","retrieveCustomerSheetPaymentOptionSelection","Component","_ref13","visible","presentationStyle","animationStyle","style","appearance","setupIntentClientSecret","customerId","customerEphemeralKeySecret","merchantDisplayName","headerTextForSelectionScreen","defaultBillingDetails","billingDetailsCollectionConfiguration","returnURL","removeSavedPaymentMethodMessage","applePayEnabled","googlePayEnabled","timeout","onResult","React","useEffect","then","initResult","presentResult","CustomerSheet","exports"],"sourceRoot":"../../../src","sources":["components/CustomerSheet.tsx"],"mappings":"2QAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAKA,IAAAE,gBAAA,CAAAH,s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CAAE,CAACtB,OAAO,CAAC,CAAC,CAEb,MAAO,KAAI,CACb,CAKO,GAAM,CAAAuB,aAAa,CAAAC,OAAA,CAAAD,aAAA,CAAG,CAC3BzB,SAAS,CAATA,SAAS,CACT1D,UAAU,CAAVA,UAAU,CACVkD,OAAO,CAAPA,OAAO,CACPK,8BAA8B,CAA9BA,8BACF,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var GooglePayButtonNative=(0,_reactNative.requireNativeComponent)('GooglePayButton');var _default=
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var GooglePayButtonNative=(0,_reactNative.requireNativeComponent)('GooglePayButton');var _default=exports.default=GooglePayButtonNative;
|
|
2
2
|
//# sourceMappingURL=GooglePayButtonNative.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GooglePayButtonNative","requireNativeComponent"],"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","GooglePayButtonNative","requireNativeComponent","_default","exports","default"],"sourceRoot":"../../../src","sources":["components/GooglePayButtonNative.tsx"],"mappings":"gFAAA,IAAAA,YAAA,CAAAC,OAAA,iBAEA,GAAM,CAAAC,qBAAqB,CACzB,GAAAC,mCAAsB,EACpB,iBACF,CAAC,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAAC,OAAA,CACWJ,qBAAqB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _PlatformPay=require("../types/PlatformPay");var _GooglePayButtonNative=_interopRequireDefault(require("./GooglePayButtonNative"));var _ApplePayButtonNative=_interopRequireDefault(require("./ApplePayButtonNative"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/PlatformPayButton.tsx";var _excluded=["type","appearance","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style"];function PlatformPayButton(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?_PlatformPay.ButtonType.Default:_ref$type,_ref$appearance=_ref.appearance,appearance=_ref$appearance===void 0?_PlatformPay.ButtonStyle.Automatic:_ref$appearance,onPress=_ref.onPress,disabled=_ref.disabled,borderRadius=_ref.borderRadius,onShippingMethodSelected=_ref.onShippingMethodSelected,onShippingContactSelected=_ref.onShippingContactSelected,onCouponCodeEntered=_ref.onCouponCodeEntered,setOrderTracking=_ref.setOrderTracking,style=_ref.style,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var shippingMethodCallback=onShippingMethodSelected?function(value){onShippingMethodSelected&&onShippingMethodSelected(value.nativeEvent);}:undefined;var shippingContactCallback=onShippingContactSelected?function(value){onShippingContactSelected(value.nativeEvent);}:undefined;var couponCodeCallback=onCouponCodeEntered?function(value){onCouponCodeEntered&&onCouponCodeEntered(value.nativeEvent);}:undefined;var orderTrackingCallback=setOrderTracking?function(){setOrderTracking(_NativeStripeSdk.default.configureOrderTracking);}:undefined;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:disabled?0.3:1,onPress:onPress,style:[disabled?styles.disabled:styles.notDisabled,style],children:_reactNative.Platform.OS==='ios'?(0,_jsxRuntime.jsx)(_ApplePayButtonNative.default,Object.assign({type:type,buttonStyle:appearance,borderRadius:borderRadius,disabled:disabled,onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback,onOrderTrackingAction:orderTrackingCallback,style:styles.nativeButtonStyle},props)):(0,_jsxRuntime.jsx)(_GooglePayButtonNative.default,Object.assign({type:type,appearance:appearance,borderRadius:borderRadius,style:styles.nativeButtonStyle},props))});}var styles=_reactNative.StyleSheet.create({disabled:{flex:0,opacity:0.4},notDisabled:{flex:0},nativeButtonStyle:{flex:1}});
|
|
2
2
|
//# sourceMappingURL=PlatformPayButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PlatformPayButton","type","ButtonType","Default","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style","props","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","orderTrackingCallback","NativeStripeSdk","configureOrderTracking","styles","notDisabled","Platform","OS","nativeButtonStyle","StyleSheet","create","flex","opacity"],"sources":["PlatformPayButton.tsx"],"
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_NativeStripeSdk","_PlatformPay","_GooglePayButtonNative","_ApplePayButtonNative","_jsxRuntime","_jsxFileName","_excluded","PlatformPayButton","_ref","_ref$type","type","ButtonType","Default","_ref$appearance","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","setOrderTracking","style","props","_objectWithoutProperties2","default","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","orderTrackingCallback","NativeStripeSdk","configureOrderTracking","jsx","TouchableOpacity","activeOpacity","styles","notDisabled","children","Platform","OS","Object","assign","buttonStyle","onShippingMethodSelectedAction","onShippingContactSelectedAction","onCouponCodeEnteredAction","onOrderTrackingAction","nativeButtonStyle","StyleSheet","create","flex","opacity"],"sourceRoot":"../../../src","sources":["components/PlatformPayButton.tsx"],"mapp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CACvBK,YAAY,CAAEA,YAAa,CAC3BK,KAAK,CAAEgB,MAAM,CAACY,iBAAkB,EAC5B3B,KAAK,CACV,CACF,CACe,CAAC,CAEvB,CAEA,GAAM,CAAAe,MAAM,CAAGa,uBAAU,CAACC,MAAM,CAAC,CAC/BpC,QAAQ,CAAE,CACRqC,IAAI,CAAE,CAAC,CACPC,OAAO,CAAE,GACX,CAAC,CACDf,WAAW,CAAE,CACXc,IAAI,CAAE,CACR,CAAC,CACDH,iBAAiB,CAAE,CAAEG,IAAI,CAAE,CAAE,CAC/B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeContainer=StripeContainer;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxFileName="/Users/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeContainer=StripeContainer;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/StripeContainer.tsx";var StripeContainerNative=(0,_reactNative.requireNativeComponent)('StripeContainer');function StripeContainer(_ref){var keyboardShouldPersistTaps=_ref.keyboardShouldPersistTaps,children=_ref.children;return(0,_jsxRuntime.jsx)(StripeContainerNative,{keyboardShouldPersistTaps:keyboardShouldPersistTaps,style:styles.container,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,accessible:false,children:children})});}var styles=_reactNative.StyleSheet.create({container:{flex:1}});
|
|
2
2
|
//# sourceMappingURL=StripeContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StripeContainerNative","requireNativeComponent","StripeContainer","keyboardShouldPersistTaps","children","styles","container","StyleSheet","create","flex"],"
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","StripeContainerNative","requireNativeComponent","StripeContainer","_ref","keyboardShouldPersistTaps","children","jsx","style","styles","container","View","accessible","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["components/StripeContainer.tsx"],"mappings":"oLAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,YAAA,CAAAD,OAAA,iBAMsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,sFAEtB,GAAM,CAAAC,qBAAqB,CAAG,GAAAC,mCAAsB,EAAM,iBAAiB,CAAC,CAkBrE,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAGrB,IAFR,CAAAC,yBAAyB,CAAAD,IAAA,CAAzBC,yBAAyB,CACzBC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAER,MACE,GAAAP,WAAA,CAAAQ,GAAA,EAACN,qBAAqB,EACpBI,yBAAyB,CAAEA,yBAA0B,CACrDG,KAAK,CAAEC,MAAM,CAACC,SAAU,CAAAJ,QAAA,CAExB,GAAAP,WAAA,CAAAQ,GAAA,EAACT,YAAA,CAAAa,IAAI,EAACH,KAAK,CAAEC,MAAM,CAACC,SAAU,CAACE,UAAU,CAAE,KAAM,CAAAN,QAAA,CAC9CA,QAAQ,CACL,CAAC,CACc,CAAC,CAE5B,CAEA,GAAM,CAAAG,MAAM,CAAGI,uBAAU,CAACC,MAAM,CAAC,CAC/BJ,SAAS,CAAE,CACTK,IAAI,CAAE,CACR,CACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeProvider=StripeProvider;exports.initStripe=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireWildcard(require("react"));var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../../package.json"));function _getRequireWildcardCache(
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeProvider=StripeProvider;exports.initStripe=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireWildcard(require("react"));var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../../package.json"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var EXPO_PARTNER_ID='pp_partner_JBN7LkABco2yUu';var repository=_package.default.repository;var appInfo={name:(0,_helpers.shouldAttributeExpo)()?`${_package.default.name}/expo`:_package.default.name,url:repository.url||repository,version:_package.default.version,partnerId:(0,_helpers.shouldAttributeExpo)()?EXPO_PARTNER_ID:undefined};var initStripe=exports.initStripe=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS==='android'){var stripeHeadlessTask=function stripeHeadlessTask(){return new Promise(function(){});};_reactNative.AppRegistry.registerHeadlessTask('StripeKeepJsAwakeTask',function(){return stripeHeadlessTask;});}var extendedParams=Object.assign({},params,{appInfo:appInfo});_NativeStripeSdk.default.initialise(extendedParams);});return function initStripe(_x){return _ref.apply(this,arguments);};}();function StripeProvider(_ref2){var children=_ref2.children,publishableKey=_ref2.publishableKey,merchantIdentifier=_ref2.merchantIdentifier,threeDSecureParams=_ref2.threeDSecureParams,stripeAccountId=_ref2.stripeAccountId,urlScheme=_ref2.urlScheme,setReturnUrlSchemeOnAndroid=_ref2.setReturnUrlSchemeOnAndroid;(0,_react.useEffect)(function(){if(!publishableKey){return;}if(_helpers.isAndroid){_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,urlScheme:urlScheme,setReturnUrlSchemeOnAndroid:setReturnUrlSchemeOnAndroid});}else{_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,merchantIdentifier:merchantIdentifier,urlScheme:urlScheme});}},[publishableKey,merchantIdentifier,stripeAccountId,threeDSecureParams,urlScheme,setReturnUrlSchemeOnAndroid]);return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:children});}
|
|
2
2
|
//# sourceMappingURL=StripeProvider.js.map
|