@stripe/stripe-react-native 0.42.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 +14 -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/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.project +0 -11
- package/android/.settings/org.eclipse.buildship.core.prefs +3 -3
- 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 +33 -24
- package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +107 -85
- 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 +137 -156
- 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 +295 -258
- package/android/src/main/java/com/reactnativestripesdk/utils/PostalCodeUtilities.kt +2 -11
- package/ios/CustomerSheet/CustomerSheetUtils.swift +3 -1
- package/ios/FinancialConnections.swift +6 -2
- package/ios/StripeSdk+CustomerSheet.swift +2 -1
- package/ios/StripeSdk+PaymentSheet.swift +42 -0
- package/ios/StripeSdk.m +2 -0
- package/ios/StripeSdk.swift +72 -11
- 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.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.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.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.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 +4 -3
- 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 +6 -5
- 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 +3 -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 +21 -17
- 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 +16 -15
- package/lib/typescript/src/types/PaymentIntent.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentMethod.d.ts +21 -16
- 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 +32 -40
- package/src/NativeStripeSdk.tsx +4 -2
- 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 +13 -14
- package/src/types/Common.ts +3 -0
- package/src/types/CustomerSheet.ts +7 -0
- package/src/types/FinancialConnections.ts +3 -0
- package/src/types/PaymentMethod.ts +5 -1
- package/src/types/PaymentSheet.ts +64 -4
- package/src/types/components/CardFieldInput.ts +8 -4
- package/src/types/components/CardFormView.ts +8 -4
- package/stripe-react-native.podspec +2 -1
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- /package/android/.gradle/{8.9 → 8.11.1}/fileChanges/last-build.bin +0 -0
- /package/android/.gradle/{8.9/dependencies-accessors → 8.11.1}/gc.properties +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useConfirmSetupIntent","useState","loading","setLoading","useStripe","confirmSetupIntent","_confirmSetupIntent","useCallback","paymentIntentClientSecret","data","options","result"],"
|
|
1
|
+
{"version":3,"names":["_react","require","_useStripe2","useConfirmSetupIntent","_useState","useState","_useState2","_slicedToArray2","default","loading","setLoading","_useStripe","useStripe","confirmSetupIntent","_confirmSetupIntent","useCallback","_ref","_asyncToGenerator2","paymentIntentClientSecret","data","options","arguments","length","undefined","result","_x","_x2","apply"],"sourceRoot":"../../../src","sources":["hooks/useConfirmSetupIntent.tsx"],"mappings":"8XAAA,IAAAA,MAAA,CAAAC,OAAA,UAEA,IAAAC,WAAA,CAAAD,OAAA,gBAKO,QAAS,CAAAE,qBAAqBA,CAAA,CAAG,CACtC,IAAAC,SAAA,CAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,CAAAC,UAAA,IAAAC,eAAA,CAAAC,OAAA,EAAAJ,SAAA,IAAtCK,OAAO,CAAAH,UAAA,IAAEI,UAAU,CAAAJ,UAAA,IAC1B,IAAAK,UAAA,CAAmD,GAAAC,qBAAS,EAAC,CAAC,CAAlCC,kBAAkB,CAAAF,UAAA,CAAtCE,kBAAkB,CAE1B,GAAM,CAAAC,mBAAmB,CAAG,GAAAC,kBAAW,iBAAAC,IAAA,IAAAC,kBAAA,CAAAT,OAAA,EACrC,UACEU,yBAAiC,CACjCC,IAA+B,CAE5B,IADH,CAAAC,OAAmC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAExCX,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAM,CAAAc,MAAM,MAAS,CAAAX,kBAAkB,CACrCK,yBAAyB,CACzBC,IAAI,CACJC,OACF,CAAC,CAEDV,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAO,CAAAc,MAAM,CACf,CAAC,kBAAAC,EAAA,CAAAC,GAAA,SAAAV,IAAA,CAAAW,KAAA,MAAAN,SAAA,QACD,CAACR,kBAAkB,CACrB,CAAC,CAED,MAAO,CACLA,kBAAkB,CAAEC,mBAAmB,CACvCL,OAAO,CAAPA,OACF,CAAC,CACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useFinancialConnectionsSheet","useState","loading","setLoading","useStripe","collectBankAccountToken","collectFinancialConnectionsAccounts","_collectBankAccountToken","useCallback","clientSecret","params","result","
|
|
1
|
+
{"version":3,"names":["_react","require","_useStripe2","useFinancialConnectionsSheet","_useState","useState","_useState2","_slicedToArray2","default","loading","setLoading","_useStripe","useStripe","collectBankAccountToken","collectFinancialConnectionsAccounts","_collectBankAccountToken","useCallback","_ref","_asyncToGenerator2","clientSecret","params","result","_x","_x2","apply","arguments","_collectFinancialConnectionsAccounts","_ref2","_x3","_x4"],"sourceRoot":"../../../src","sources":["hooks/useFinancialConnectionsSheet.tsx"],"mappings":"4YAAA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,WAAA,CAAAD,OAAA,gBAUO,QAAS,CAAAE,4BAA4BA,CAAA,CAAG,CAC7C,IAAAC,SAAA,CAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,CAAAC,UAAA,IAAAC,eAAA,CAA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initPaymentSheet","presentPaymentSheetNative","presentPaymentSheet","confirmPaymentSheetPaymentNative","confirmPaymentSheetPayment","resetPaymentSheetCustomerNative","resetPaymentSheetCustomer","useState","loading","setLoading","useCallback","params","result","options"],"
|
|
1
|
+
{"version":3,"names":["_react","require","_useStripe2","usePaymentSheet","_useStripe","useStripe","initPaymentSheetNative","initPaymentSheet","presentPaymentSheetNative","presentPaymentSheet","confirmPaymentSheetPaymentNative","confirmPaymentSheetPayment","resetPaymentSheetCustomerNative","resetPaymentSheetCustomer","_useState","useState","_useState2","_slicedToArray2","default","loading","setLoading","useCallback","_ref","_asyncToGenerator2","params","result","_x","apply","arguments","_ref2","options","_x2"],"sourceRoot":"../../../src","sources":["hooks/usePaymentSheet.tsx"],"mappings":"kXAAA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,WAAA,CAAAD,OAAA,gBAOO,QAAS,CAAAE,eAAeA,CAAA,CAAG,CAChC,IAAAC,UAAA,CAKI,GAAAC,qBAAS,EAAC,CAAC,CAJKC,sBAAsB,CAAAF,UAAA,CAAxCG,gBAAgB,CACKC,yBAAyB,CAAAJ,UAAA,CAA9CK,mBAAmB,CACSC,gCAAgC,CAAAN,UAAA,CAA5DO,0BAA0B,CACCC,+BAA+B,CAAAR,UAAA,CAA1DS,yBAAyB,CAE3B,IAAAC,SAAA,CAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,CAAAC,UAAA,IAAAC,eAAA,CAAAC,OAAA,EAAAJ,SAAA,IAAtCK,OAAO,CAAAH,UAAA,IAAEI,UAAU,CAAAJ,UAAA,IAE1B,GAAM,CAAAT,gBAAgB,CAAG,GAAAc,kBAAW,iBAAAC,IAAA,IAAAC,kBAAA,CAAAL,OAAA,EAClC,UAAOM,MAAgC,CAAK,CAC1CJ,UAAU,CAAC,IAAI,CAAC,CAChB,GAAM,CAAAK,MAAM,MAAS,CAAAnB,sBAAsB,CAACkB,MAAM,CAAC,CACnDJ,UAAU,CAAC,KAAK,CAAC,CACj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List":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["usePlatformPay","useStripe","isPlatformPaySupported","confirmPlatformPaySetupIntent","confirmPlatformPayPayment","createPlatformPayPaymentMethod","createPlatformPayToken","dismissPlatformPay","updatePlatformPaySheet","canAddCardToWallet","openPlatformPaySetup","useState","loading","setLoading","_isPlatformPaySupported","useCallback","params","result","_confirmPlatformPaySetupIntent","clientSecret","_confirmPlatformPayPayment","_createPlatformPayPaymentMethod","_createPlatformPayToken","_dismissPlatformPay","_updatePlatformPaySheet","_canAddCardToWallet","_openPlatformPaySetup"],"sources":["usePlatformPay.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport type {\n PlatformPay,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n} from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * usePlatformPay hook. Access all Apple and Google Pay functionality with this hook.\n */\nexport function usePlatformPay() {\n const {\n isPlatformPaySupported,\n confirmPlatformPaySetupIntent,\n confirmPlatformPayPayment,\n createPlatformPayPaymentMethod,\n createPlatformPayToken,\n dismissPlatformPay,\n updatePlatformPaySheet,\n canAddCardToWallet,\n openPlatformPaySetup,\n } = useStripe();\n const [loading, setLoading] = useState(false);\n\n const _isPlatformPaySupported = useCallback(\n async (params?: { googlePay?: PlatformPay.IsGooglePaySupportedParams }) => {\n setLoading(true);\n\n const result = await isPlatformPaySupported(params);\n setLoading(false);\n\n return result;\n },\n [isPlatformPaySupported]\n );\n\n const _confirmPlatformPaySetupIntent = useCallback(\n async (clientSecret: string, params: PlatformPay.ConfirmParams) => {\n setLoading(true);\n\n const result = await confirmPlatformPaySetupIntent(clientSecret, params);\n setLoading(false);\n\n return result;\n },\n [confirmPlatformPaySetupIntent]\n );\n\n const _confirmPlatformPayPayment = useCallback(\n async (clientSecret: string, params: PlatformPay.ConfirmParams) => {\n setLoading(true);\n\n const result = await confirmPlatformPayPayment(clientSecret, params);\n setLoading(false);\n\n return result;\n },\n [confirmPlatformPayPayment]\n );\n\n const _createPlatformPayPaymentMethod = useCallback(\n async (params: PlatformPay.PaymentMethodParams) => {\n setLoading(true);\n\n const result = await createPlatformPayPaymentMethod(params);\n setLoading(false);\n\n return result;\n },\n [createPlatformPayPaymentMethod]\n );\n\n const _createPlatformPayToken = useCallback(\n async (params: PlatformPay.PaymentMethodParams) => {\n setLoading(true);\n\n const result = await createPlatformPayToken(params);\n setLoading(false);\n\n return result;\n },\n [createPlatformPayToken]\n );\n\n const _dismissPlatformPay = useCallback(async () => {\n setLoading(true);\n\n const result = await dismissPlatformPay();\n setLoading(false);\n\n return result;\n }, [dismissPlatformPay]);\n\n const _updatePlatformPaySheet = useCallback(\n async (params: {\n applePay: {\n cartItems: Array<PlatformPay.CartSummaryItem>;\n shippingMethods: Array<PlatformPay.ShippingMethod>;\n errors: Array<PlatformPay.ApplePaySheetError>;\n };\n }) => {\n setLoading(true);\n\n const result = await updatePlatformPaySheet(params);\n setLoading(false);\n\n return result;\n },\n [updatePlatformPaySheet]\n );\n\n const _canAddCardToWallet = useCallback(\n async (\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult> => {\n setLoading(true);\n\n const result = await canAddCardToWallet(params);\n setLoading(false);\n\n return result;\n },\n [canAddCardToWallet]\n );\n\n const _openPlatformPaySetup = useCallback(async (): Promise<void> => {\n return openPlatformPaySetup();\n }, [openPlatformPaySetup]);\n\n return {\n /** Use this boolean to present a spinner or other similar loading screen. `true` if the SDK is currently processing, `false` if it is not. */\n loading,\n /**\n * Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.\n * @returns A boolean indicating whether or not the native wallet is supported.\n */\n isPlatformPaySupported: _isPlatformPaySupported,\n /**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [SetupIntent](https://stripe.com/docs/api/setup_intents).\n * @param clientSecret The client secret of the SetupIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `setupIntent` and `paymentMethod` fields.\n */\n confirmPlatformPaySetupIntent: _confirmPlatformPaySetupIntent,\n /**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param clientSecret The client secret of the PaymentIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentIntent` and `paymentMethod` fields.\n */\n confirmPlatformPayPayment: _confirmPlatformPayPayment,\n /**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [PaymentMethod](https://stripe.com/docs/api/payment_methods) and [token](https://stripe.com/docs/api/tokens).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentMethod` and `token` fields.\n */\n createPlatformPayPaymentMethod: _createPlatformPayPaymentMethod,\n /**\n * @deprecated The Tokens API is deprecated, you should use Payment Methods and `createPlatformPayPaymentMethod` instead. Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [token](https://stripe.com/docs/api/tokens).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `token` field.\n */\n createPlatformPayToken: _createPlatformPayToken,\n /**\n * Dismiss the Apple Pay sheet if it is open. iOS only, this is a no-op on Android.\n * @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.\n */\n dismissPlatformPay: _dismissPlatformPay,\n /**\n * Update different items on the Apple Pay sheet, including the summary items, the shipping methods, and any errors shown. iOS only, this is a no-op on Android.\n * @param cartItems An array of payment summary items to display in the Apple Pay sheet.\n * @param shippingMethods An array of shipping methods to display in the Apple Pay sheet.\n * @param errors An array of errors associated with the user's input that must be corrected to proceed with payment. These errors will be shown in the Apple Pay sheet.\n *\n * @returns An object with an optional 'error' field, which is only populated if something went wrong.\n */\n updatePlatformPaySheet: _updatePlatformPaySheet,\n /**\n * Check if the app & device support adding this card to the native wallet.\n * @param params An object containing fields for `primaryAccountIdentifier`, `cardLastFour`, and `testEnv`.\n *\n * @returns A promise resolving to an object of type CanAddCardToWalletResult. Check the `canAddCard` field, if it's true, you should show the `<AddToWalletButton />`\n */\n canAddCardToWallet: _canAddCardToWallet,\n /**\n * iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards.\n * This method transfers control to the Wallet app on iPhone or to the Settings\n * app on iPad. For devices that don’t support Apple Pay, this method does nothing.\n */\n openPlatformPaySetup: _openPlatformPaySetup,\n };\n}\n"],"mappings":"gXAAA,4BAMA,uCAKO,QAASA,eAAc,EAAG,CAC/B,eAUI,GAAAC,qBAAS,GAAE,CATbC,sBAAsB,YAAtBA,sBAAsB,CACtBC,6BAA6B,YAA7BA,6BAA6B,CAC7BC,yBAAyB,YAAzBA,yBAAyB,CACzBC,8BAA8B,YAA9BA,8BAA8B,CAC9BC,sBAAsB,YAAtBA,sBAAsB,CACtBC,kBAAkB,YAAlBA,kBAAkB,CAClBC,sBAAsB,YAAtBA,sBAAsB,CACtBC,kBAAkB,YAAlBA,kBAAkB,CAClBC,oBAAoB,YAApBA,oBAAoB,CAEtB,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAE1B,GAAMC,wBAAuB,CAAG,GAAAC,kBAAW,qDACzC,UAAOC,MAA+D,CAAK,CACzEH,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMI,OAAM,MAASf,uBAAsB,CAACc,MAAM,CAAC,CACnDH,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOI,OAAM,CACf,CAAC,8DACD,CAACf,sBAAsB,CAAC,CACzB,CAED,GAAMgB,+BAA8B,CAAG,GAAAH,kBAAW,sDAChD,UAAOI,YAAoB,CAAEH,MAAiC,CAAK,CACjEH,UAAU,CAAC,IAAI,CAAC,CAEhB,G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,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMI,OAAM,MAAST,uBAAsB,CAACQ,MAAM,CAAC,CACnDH,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOI,OAAM,CACf,CAAC,gEACD,CAACT,sBAAsB,CAAC,CACzB,CAED,GAAMiB,oBAAmB,CAAG,GAAAV,kBAAW,sDACrC,UACEC,MAAgC,CACM,CACtCH,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMI,OAAM,MAASR,mBAAkB,CAACO,MAAM,CAAC,CAC/CH,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOI,OAAM,CACf,CAAC,gEACD,CAACR,kBAAkB,CAAC,CACrB,CAED,GAAMiB,sBAAqB,CAAG,GAAAX,kBAAW,iCAAC,WAA2B,CACnE,MAAOL,qBAAoB,EAAE,CAC/B,CAAC,EAAE,CAACA,oBAAoB,CAAC,CAAC,CAE1B,MAAO,CAELE,OAAO,CAAPA,OAAO,CAKPV,sBAAsB,CAAEY,uBAAuB,CAO/CX,6BAA6B,CAAEe,8BAA8B,CAO7Dd,yBAAyB,CAAEgB,0BAA0B,CAMrDf,8BAA8B,CAAEgB,+BAA+B,CAM/Df,sBAAsB,CAAEgB,uBAAuB,CAK/Cf,kBAAkB,CAAEgB,mBAAmB,CASvCf,sBAAsB,CAAEgB,uBAAuB,CAO/Cf,kBAAkB,CAAEgB,mBAAmB,CAMvCf,oBAAoB,CAAEgB,qBACxB,CAAC,CACH"}
|
|
1
|
+
{"version":3,"names":["_react","require","_useStripe2","usePlatformPay","_useStripe","useStripe","isPlatformPaySupported","confirmPlatformPaySetupIntent","confirmPlatformPayPayment","createPlatformPayPaymentMethod","createPlatformPayToken","dismissPlatformPay","updatePlatformPaySheet","canAddCardToWallet","openPlatformPaySetup","_useState","useState","_useState2","_slicedToArray2","default","loading","setLoading","_isPlatformPaySupported","useCallback","_ref","_asyncToGenerator2","params","result","_x","apply","arguments","_confirmPlatformPaySetupIntent","_ref2","clientSecret","_x2","_x3","_confirmPlatformPayPayment","_ref3","_x4","_x5","_createPlatformPayPaymentMethod","_ref4","_x6","_createPlatformPayToken","_ref5","_x7","_dismissPlatformPay","_updatePlatformPaySheet","_ref7","_x8","_canAddCardToWallet","_ref8","_x9","_openPlatformPaySetup"],"sourceRoot":"../../../src","sources":["hooks/usePlatformPay.tsx"],"mappings":"gXAAA,IAAAA,MAAA,CAAAC,OAAA,UAMA,IAAAC,WAAA,CAAAD,OAAA,gBAKO,QAAS,CAAAE,cAAcA,CAAA,CAAG,CAC/B,IAAAC,UAAA,CAUI,GAAAC,qBAAS,EAAC,CAAC,CATbC,sBAAsB,CAAAF,UAAA,CAAtBE,sBAAsB,CACtBC,6BAA6B,CAAAH,UAAA,CAA7BG,6BAA6B,CAC7BC,yBAAyB,CAAAJ,UAAA,CAAzBI,yBAAyB,CACzBC,8BAA8B,CAAAL,UAAA,CAA9BK,8BAA8B,CAC9BC,sBAAsB,CAAAN,UAAA,CAAtBM,sBAAsB,CACtBC,kBAAkB,CAAAP,UAAA,CAAlBO,kBAAkB,CAClBC,sBAAsB,CAAAR,UAAA,CAAtBQ,sBAAsB,CACtBC,kBAAkB,CAAAT,UAAA,CAAlBS,kBAAkB,CAClBC,oBAAoB,CAAAV,UAAA,CAApBU,oBAAoB,CAEtB,IAAAC,SAAA,CAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,CAAAC,UAAA,IAAAC,eAAA,CAAAC,OAAA,EAAAJ,SAAA,IAAtCK,OAAO,CAAAH,UAAA,IAAEI,UAAU,CAAAJ,UAAA,IAE1B,GAAM,CAAAK,uBAAuB,CAAG,GAAAC,kBAAW,iBAAAC,IAAA,IAAAC,kBAAA,CAAAN,OAAA,EACzC,UAAOO,MAA+D,CAAK,CACzEL,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAM,CAAAM,MAAM,MAAS,CAAArB,sBAAsB,CAACoB,MAAM,CAAC,CACnDL,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAO,CAAAM,MAAM,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UAAU,CAAC,IAAI,CAAC,CAEhB,GAAM,CAAAM,MAAM,MAAS,CAAAd,kBAAkB,CAACa,MAAM,CAAC,CAC/CL,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAO,CAAAM,MAAM,CACf,CAAC,kBAAAyB,GAAA,SAAAD,KAAA,CAAAtB,KAAA,MAAAC,SAAA,QACD,CAACjB,kBAAkB,CACrB,CAAC,CAED,GAAM,CAAAwC,qBAAqB,CAAG,GAAA9B,kBAAW,KAAAE,kBAAA,CAAAN,OAAA,EAAC,WAA2B,CACnE,MAAO,CAAAL,oBAAoB,CAAC,CAAC,CAC/B,CAAC,EAAE,CAACA,oBAAoB,CAAC,CAAC,CAE1B,MAAO,CAELM,OAAO,CAAPA,OAAO,CAKPd,sBAAsB,CAAEgB,uBAAuB,CAO/Cf,6BAA6B,CAAEwB,8BAA8B,CAO7DvB,yBAAyB,CAAE4B,0BAA0B,CAMrD3B,8BAA8B,CAAE+B,+BAA+B,CAM/D9B,sBAAsB,CAAEiC,uBAAuB,CAK/ChC,kBAAkB,CAAEmC,mBAAmB,CASvClC,sBAAsB,CAAEmC,uBAAuB,CAO/ClC,kBAAkB,CAAEqC,mBAAmB,CAMvCpC,oBAAoB,CAAEuC,qBACxB,CAAC,CACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStripe","_createPaymentMethod","useCallback","data","options","createPaymentMethod","_createToken","params","createToken","_retrievePaymentIntent","clientSecret","retrievePaymentIntent","_retrieveSetupIntent","retrieveSetupIntent","_confirmPayment","paymentIntentClientSecret","confirmPayment","_handleNextAction","returnURL","handleNextAction","_handleNextActionForSetup","setupIntentClientSecret","handleNextActionForSetup","_confirmSetupIntent","confirmSetupIntent","_createTokenForCVCUpdate","cvc","createTokenForCVCUpdate","_initPaymentSheet","initPaymentSheet","_presentPaymentSheet","presentPaymentSheet","_confirmPaymentSheetPayment","confirmPaymentSheetPayment","_handleURLCallback","url","handleURLCallback","_collectBankAccountForPayment","collectBankAccountForPayment","_collectBankAccountForSetup","collectBankAccountForSetup","_verifyMicrodepositsForPayment","verifyMicrodepositsForPayment","_verifyMicrodepositsForSetup","verifyMicrodepositsForSetup","_canAddCardToWallet","canAddCardToWallet","_collectBankAccountToken","collectBankAccountToken","_collectFinancialConnectionsAccounts","collectFinancialConnectionsAccounts","_resetPaymentSheetCustomer","resetPaymentSheetCustomer","_isPlatformPaySupported","isPlatformPaySupported","_confirmPlatformPaySetupIntent","confirmPlatformPaySetupIntent","_confirmPlatformPayPayment","confirmPlatformPayPayment","_dismissPlatformPay","dismissPlatformPay","_createPlatformPayPaymentMethod","createPlatformPayPaymentMethod","_createPlatformPayToken","createPlatformPayToken","_updatePlatformPaySheet","updatePlatformPaySheet","_openPlatformPaySetup","openPlatformPaySetup"],"sources":["useStripe.tsx"],"sourcesContent":["import type {\n PaymentMethod,\n PaymentIntent,\n PaymentSheet,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n HandleNextActionForSetupResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n StripeError,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n CreateTokenResult,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForSetupResult,\n CollectBankAccountForPaymentResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n PlatformPay,\n PlatformPayError,\n} from '../types';\nimport { useCallback } from 'react';\nimport {\n confirmPayment,\n createPaymentMethod,\n retrievePaymentIntent,\n retrieveSetupIntent,\n confirmSetupIntent,\n createTokenForCVCUpdate,\n handleNextAction,\n handleNextActionForSetup,\n handleURLCallback,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\n createToken,\n collectBankAccountForPayment,\n collectBankAccountForSetup,\n verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup,\n canAddCardToWallet,\n collectBankAccountToken,\n collectFinancialConnectionsAccounts,\n resetPaymentSheetCustomer,\n isPlatformPaySupported,\n confirmPlatformPaySetupIntent,\n confirmPlatformPayPayment,\n dismissPlatformPay,\n createPlatformPayPaymentMethod,\n createPlatformPayToken,\n updatePlatformPaySheet,\n openPlatformPaySetup,\n} from '../functions';\nimport type { CollectBankAccountTokenParams } from 'src/types/PaymentMethod';\nimport type { CollectFinancialConnectionsAccountsParams } from 'src/types/FinancialConnections';\n\n/**\n * useStripe hook\n */\nexport function useStripe() {\n const _createPaymentMethod = useCallback(\n async (\n data: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n ): Promise<CreatePaymentMethodResult> => {\n return createPaymentMethod(data, options);\n },\n []\n );\n\n const _createToken = useCallback(\n async (params: Token.CreateParams): Promise<CreateTokenResult> => {\n return createToken(params);\n },\n []\n );\n\n const _retrievePaymentIntent = useCallback(\n async (clientSecret: string): Promise<RetrievePaymentIntentResult> => {\n return retrievePaymentIntent(clientSecret);\n },\n []\n );\n\n const _retrieveSetupIntent = useCallback(\n async (clientSecret: string): Promise<RetrieveSetupIntentResult> => {\n return retrieveSetupIntent(clientSecret);\n },\n []\n );\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n ): Promise<ConfirmPaymentResult> => {\n return confirmPayment(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _handleNextAction = useCallback(\n async (\n paymentIntentClientSecret: string,\n returnURL?: string\n ): Promise<HandleNextActionResult> => {\n return handleNextAction(paymentIntentClientSecret, returnURL);\n },\n []\n );\n\n const _handleNextActionForSetup = useCallback(\n async (\n setupIntentClientSecret: string,\n returnURL?: string\n ): Promise<HandleNextActionForSetupResult> => {\n return handleNextActionForSetup(setupIntentClientSecret, returnURL);\n },\n []\n );\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n ): Promise<ConfirmSetupIntentResult> => {\n return confirmSetupIntent(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _createTokenForCVCUpdate = useCallback(\n async (cvc: string): Promise<CreateTokenForCVCUpdateResult> => {\n return createTokenForCVCUpdate(cvc);\n },\n []\n );\n\n const _initPaymentSheet = useCallback(\n async (\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult> => {\n return initPaymentSheet(params);\n },\n []\n );\n\n const _presentPaymentSheet = useCallback(\n async (\n options?: PaymentSheet.PresentOptions\n ): Promise<PresentPaymentSheetResult> => {\n return presentPaymentSheet(options);\n },\n []\n );\n\n const _confirmPaymentSheetPayment =\n useCallback(async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n return confirmPaymentSheetPayment();\n }, []);\n\n const _handleURLCallback = useCallback(\n async (url: string): Promise<boolean> => {\n return handleURLCallback(url);\n },\n []\n );\n\n const _collectBankAccountForPayment = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForPaymentResult> => {\n return collectBankAccountForPayment(clientSecret, params);\n },\n []\n );\n\n const _collectBankAccountForSetup = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForSetupResult> => {\n return collectBankAccountForSetup(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForPayment = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForPaymentResult> => {\n return verifyMicrodepositsForPayment(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForSetup = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForSetupResult> => {\n return verifyMicrodepositsForSetup(clientSecret, params);\n },\n []\n );\n\n const _canAddCardToWallet = useCallback(\n async (\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult> => {\n return canAddCardToWallet(params);\n },\n []\n );\n\n const _collectBankAccountToken = useCallback(\n async (\n clientSecret: string,\n params?: CollectBankAccountTokenParams\n ): Promise<FinancialConnections.TokenResult> => {\n return collectBankAccountToken(clientSecret, params);\n },\n []\n );\n\n const _collectFinancialConnectionsAccounts = useCallback(\n async (\n clientSecret: string,\n params?: CollectFinancialConnectionsAccountsParams\n ): Promise<FinancialConnections.SessionResult> => {\n return collectFinancialConnectionsAccounts(clientSecret, params);\n },\n []\n );\n\n const _resetPaymentSheetCustomer = useCallback(async (): Promise<null> => {\n return resetPaymentSheetCustomer();\n }, []);\n\n const _isPlatformPaySupported = useCallback(\n async (params?: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n }): Promise<boolean> => {\n return isPlatformPaySupported(params);\n },\n []\n );\n\n const _confirmPlatformPaySetupIntent = useCallback(\n async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n ): Promise<PlatformPay.ConfirmSetupIntentResult> => {\n return confirmPlatformPaySetupIntent(clientSecret, params);\n },\n []\n );\n\n const _confirmPlatformPayPayment = useCallback(\n async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n ): Promise<PlatformPay.ConfirmPaymentResult> => {\n return confirmPlatformPayPayment(clientSecret, params);\n },\n []\n );\n\n const _dismissPlatformPay = useCallback(async (): Promise<boolean> => {\n return dismissPlatformPay();\n }, []);\n\n const _createPlatformPayPaymentMethod = useCallback(\n async (\n params: PlatformPay.PaymentMethodParams\n ): Promise<PlatformPay.PaymentMethodResult> => {\n return createPlatformPayPaymentMethod(params);\n },\n []\n );\n\n const _createPlatformPayToken = useCallback(\n async (\n params: PlatformPay.PaymentMethodParams\n ): Promise<PlatformPay.TokenResult> => {\n return createPlatformPayToken(params);\n },\n []\n );\n\n const _updatePlatformPaySheet = useCallback(\n async (params: {\n applePay: {\n cartItems: Array<PlatformPay.CartSummaryItem>;\n shippingMethods: Array<PlatformPay.ShippingMethod>;\n errors: Array<PlatformPay.ApplePaySheetError>;\n };\n }): Promise<{\n error?: StripeError<PlatformPayError>;\n }> => {\n return updatePlatformPaySheet(params);\n },\n []\n );\n\n const _openPlatformPaySetup = useCallback(async (): Promise<void> => {\n return openPlatformPaySetup();\n }, []);\n\n return {\n retrievePaymentIntent: _retrievePaymentIntent,\n retrieveSetupIntent: _retrieveSetupIntent,\n confirmPayment: _confirmPayment,\n createPaymentMethod: _createPaymentMethod,\n handleNextAction: _handleNextAction,\n handleNextActionForSetup: _handleNextActionForSetup,\n confirmSetupIntent: _confirmSetupIntent,\n createTokenForCVCUpdate: _createTokenForCVCUpdate,\n handleURLCallback: _handleURLCallback,\n confirmPaymentSheetPayment: _confirmPaymentSheetPayment,\n presentPaymentSheet: _presentPaymentSheet,\n initPaymentSheet: _initPaymentSheet,\n createToken: _createToken,\n collectBankAccountForPayment: _collectBankAccountForPayment,\n collectBankAccountForSetup: _collectBankAccountForSetup,\n verifyMicrodepositsForPayment: _verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup: _verifyMicrodepositsForSetup,\n canAddCardToWallet: _canAddCardToWallet,\n collectBankAccountToken: _collectBankAccountToken,\n collectFinancialConnectionsAccounts: _collectFinancialConnectionsAccounts,\n /**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\n resetPaymentSheetCustomer: _resetPaymentSheetCustomer,\n isPlatformPaySupported: _isPlatformPaySupported,\n confirmPlatformPaySetupIntent: _confirmPlatformPaySetupIntent,\n confirmPlatformPayPayment: _confirmPlatformPayPayment,\n dismissPlatformPay: _dismissPlatformPay,\n createPlatformPayPaymentMethod: _createPlatformPayPaymentMethod,\n createPlatformPayToken: _createPlatformPayToken,\n updatePlatformPaySheet: _updatePlatformPaySheet,\n openPlatformPaySetup: _openPlatformPaySetup,\n };\n}\n"],"mappings":"0QA8BA,4BACA,uCAqCO,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,wBAAwB,CACjDW,iBAAiB,CAAEF,kBAAkB,CACrCD,0BAA0B,CAAED,2BAA2B,CACvDD,mBAAmB,CAAED,oBAAoB,CACzCD,gBAAgB,CAAED,iBAAiB,CACnCpB,WAAW,CAAEF,YAAY,CACzBgC,4BAA4B,CAAED,6BAA6B,CAC3DG,0BAA0B,CAAED,2BAA2B,CACvDG,6BAA6B,CAAED,8BAA8B,CAC7DG,2BAA2B,CAAED,4BAA4B,CACzDG,kBAAkB,CAAED,mBAAmB,CACvCG,uBAAuB,CAAED,wBAAwB,CACjDG,mCAAmC,CAAED,oCAAoC,CAMzEG,yBAAyB,CAAED,0BAA0B,CACrDG,sBAAsB,CAAED,uBAAuB,CAC/CG,6BAA6B,CAAED,8BAA8B,CAC7DG,yBAAyB,CAAED,0BAA0B,CACrDG,kBAAkB,CAAED,mBAAmB,CACvCG,8BAA8B,CAAED,+BAA+B,CAC/DG,sBAAsB,CAAED,uBAAuB,CAC/CG,sBAAsB,CAAED,uBAAuB,CAC/CG,oBAAoB,CAAED,qBACxB,CAAC,CACH"}
|
|
1
|
+
{"version":3,"names":["_react","require","_functions","useStripe","_createPaymentMethod","useCallback","_ref","_asyncToGenerator2","default","data","options","arguments","length","undefined","createPaymentMethod","_x","apply","_createToken","_ref2","params","createToken","_x2","_retrievePaymentIntent","_ref3","clientSecret","retrievePaymentIntent","_x3","_retrieveSetupIntent","_ref4","retrieveSetupIntent","_x4","_confirmPayment","_ref5","paymentIntentClientSecret","confirmPayment","_x5","_x6","_handleNextAction","_ref6","returnURL","handleNextAction","_x7","_x8","_handleNextActionForSetup","_ref7","setupIntentClientSecret","handleNextActionForSetup","_x9","_x10","_confirmSetupIntent","_ref8","confirmSetupIntent","_x11","_x12","_createTokenForCVCUpdate","_ref9","cvc","createTokenForCVCUpdate","_x13","_initPaymentSheet","_ref10","initPaymentSheet","_x14","_presentPaymentSheet","_ref11","presentPaymentSheet","_x15","_confirmPaymentSheetPayment","confirmPaymentSheetPayment","_handleURLCallback","_ref13","url","handleURLCallback","_x16","_collectBankAccountForPayment","_ref14","collectBankAccountForPayment","_x17","_x18","_collectBankAccountForSetup","_ref15","collectBankAccountForSetup","_x19","_x20","_verifyMicrodepositsForPayment","_ref16","verifyMicrodepositsForPayment","_x21","_x22","_verifyMicrodepositsForSetup","_ref17","verifyMicrodepositsForSetup","_x23","_x24","_canAddCardToWallet","_ref18","canAddCardToWallet","_x25","_collectBankAccountToken","_ref19","collectBankAccountToken","_x26","_x27","_collectFinancialConnectionsAccounts","_ref20","collectFinancialConnectionsAccounts","_x28","_x29","_resetPaymentSheetCustomer","resetPaymentSheetCustomer","_isPlatformPaySupported","_ref22","isPlatformPaySupported","_x30","_confirmPlatformPaySetupIntent","_ref23","confirmPlatformPaySetupIntent","_x31","_x32","_confirmPlatformPayPayment","_ref24","confirmPlatformPayPayment","_x33","_x34","_dismissPlatformPay","dismissPlatformPay","_createPlatformPayPaymentMethod","_ref26","createPlatformPayPaymentMethod","_x35","_createPlatformPayToken","_ref27","createPlatformPayToken","_x36","_updatePlatformPaySheet","_ref28","updatePlatformPaySheet","_x37","_openPlatformPaySetup","openPlatformPaySetup"],"sourceRoot":"../../../src","sources":["hooks/useStripe.tsx"],"mappings":"0QA8BA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,UAAA,CAAAD,OAAA,iBAqCO,QAAS,CAAAE,SAASA,CAAA,CAAG,CAC1B,GAAM,CAAAC,oBAAoB,CAAG,GAAAC,kBAAW,iBAAAC,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EACtC,UACEC,IAAgC,CAEO,IADvC,CAAAC,OAAoC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAEzC,MAAO,GAAAG,8BAAmB,EAACL,IAAI,CAAEC,OAAO,CAAC,CAC3C,CAAC,kBAAAK,EAAA,SAAAT,IAAA,CAAAU,KAAA,MAAAL,SAAA,QACD,EACF,CAAC,CAED,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EAAC,CAAC,CAC/B,CAAC,EAAE,EAAE,CAAC,CAEN,MAAO,CACLlH,qBAAqB,CAAEH,sBAAsB,CAC7CO,mBAAmB,CAAEF,oBAAoB,CACzCO,cAAc,CAAEH,eAAe,CAC/BjB,mBAAmB,CAAEV,oBAAoB,CACzCoC,gBAAgB,CAAEH,iBAAiB,CACnCS,wBAAwB,CAAEH,yBAAyB,CACnDQ,kBAAkB,CAAEF,mBAAmB,CACvCQ,uBAAuB,CAAEH,wBAAwB,CACjDkB,iBAAiB,CAAEH,kBAAkB,CACrCD,0BAA0B,CAAED,2BAA2B,CACvDF,mBAAmB,CAAEF,oBAAoB,CACzCF,gBAAgB,CAAEF,iBAAiB,CACnCvC,WAAW,CAAEH,YAAY,CACzB2D,4BAA4B,CAAEF,6BAA6B,CAC3DO,0BAA0B,CAAEF,2BAA2B,CACvDO,6BAA6B,CAAEF,8BAA8B,CAC7DO,2BAA2B,CAAEF,4BAA4B,CACzDO,kBAAkB,CAAEF,mBAAmB,CACvCM,uBAAuB,CAAEF,wBAAwB,CACjDO,mCAAmC,CAAEF,oCAAoC,CAMzEM,yBAAyB,CAAED,0BAA0B,CACrDI,sBAAsB,CAAEF,uBAAuB,CAC/CM,6BAA6B,CAAEF,8BAA8B,CAC7DO,yBAAyB,CAAEF,0BAA0B,CACrDM,kBAAkB,CAAED,mBAAmB,CACvCI,8BAA8B,CAAEF,+BAA+B,CAC/DM,sBAAsB,CAAEF,uBAAuB,CAC/CM,sBAAsB,CAAEF,uBAAuB,CAC/CK,oBAAoB,CAAED,qBACxB,CAAC,CACH","ignoreList":[]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"
|
|
1
|
+
{"version":3,"names":["_useConfirmPayment","require","_useConfirmSetupIntent","_useStripe","_usePlatformPay","_usePaymentSheet","_useFinancialConnectionsSheet","_StripeProvider","_CardField","_CardForm","_AuBECSDebitForm","_StripeContainer","_AddToWalletButton","_AddressSheet","_PlatformPayButton","_functions","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_index","_CustomerSheet"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"2vEACA,IAAAA,kBAAA,CAAAC,OAAA,8BACA,IAAAC,sBAAA,CAAAD,OAAA,kCACA,IAAAE,UAAA,CAAAF,OAAA,sBACA,IAAAG,eAAA,CAAAH,OAAA,2BACA,IAAAI,gBAAA,CAAAJ,OAAA,4BACA,IAAAK,6BAAA,CAAAL,OAAA,yCAGA,IAAAM,eAAA,CAAAN,OAAA,gCAEA,IAAAO,UAAA,CAAAP,OAAA,2BAEA,IAAAQ,SAAA,CAAAR,OAAA,0BAEA,IAAAS,gBAAA,CAAAT,OAAA,iCAEA,IAAAU,gBAAA,CAAAV,OAAA,iCAEA,IAAAW,kBAAA,CAAAX,OAAA,mCAEA,IAAAY,aAAA,CAAAZ,OAAA,8BAEA,IAAAa,kBAAA,CAAAb,OAAA,mCAGA,IAAAc,UAAA,CAAAd,OAAA,gBAAAe,MAAA,CAAAC,IAAA,CAAAF,UAAA,EAAAG,OAAA,UAAAC,GAAA,KAAAA,GAAA,cAAAA,GAAA,0BAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,CAAAJ,GAAA,YAAAA,GAAA,IAAAK,OAAA,EAAAA,OAAA,CAAAL,GAAA,IAAAJ,UAAA,CAAAI,GAAA,SAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,CAAAL,GAAA,EAAAO,UAAA,MAAAC,GAAA,UAAAA,IAAA,SAAAZ,UAAA,CAAAI,GAAA,SAEA,IAAAS,MAAA,CAAA3B,OAAA,kBAAAe,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,UAAAC,GAAA,KAAAA,GAAA,cAAAA,GAAA,0BAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,CAAAJ,GAAA,YAAAA,GAAA,IAAAK,OAAA,EAAAA,OAAA,CAAAL,GAAA,IAAAS,MAAA,CAAAT,GAAA,SAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,CAAAL,GAAA,EAAAO,UAAA,MAAAC,GAAA,UAAAA,IAAA,SAAAC,MAAA,CAAAT,GAAA,SAEA,IAAAU,cAAA,CAAA5B,OAAA,+BAAAe,MAAA,CAAAC,IAAA,CAAAY,cAAA,EAAAX,OAAA,UAAAC,GAAA,KAAAA,GAAA,cAAAA,GAAA,0BAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,CAAAJ,GAAA,YAAAA,GAAA,IAAAK,OAAA,EAAAA,OAAA,CAAAL,GAAA,IAAAU,cAAA,CAAAV,GAAA,SAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,CAAAL,GAAA,EAAAO,UAAA,MAAAC,GAAA,UAAAA,IAAA,SAAAE,cAAA,CAAAV,GAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.setApplePayEntitlement=setApplePayEntitlement;exports.setGooglePayMetaData=setGooglePayMetaData;exports.withNoopSwiftFile=void 0;var _configPlugins=require("@expo/config-plugins");var _AndroidConfig$Manife=_configPlugins.AndroidConfig.Manifest,addMetaDataItemToMainApplication=_AndroidConfig$Manife.addMetaDataItemToMainApplication,getMainApplicationOrThrow=_AndroidConfig$Manife.getMainApplicationOrThrow,removeMetaDataItemFromMainApplication=_AndroidConfig$Manife.removeMetaDataItemFromMainApplication;var pkg=require('@stripe/stripe-react-native/package.json');var withStripe=function withStripe(config,props){config=withStripeIos(config,props);config=withNoopSwiftFile(config);config=withStripeAndroid(config,props);return config;};var withStripeIos=function withStripeIos(expoConfig,_ref){var merchantIdentifier=_ref.merchantIdentifier;return(0,_configPlugins.withEntitlementsPlist)(expoConfig,function(config){config.modResults=setApplePayEntitlement(merchantIdentifier,config.modResults);return config;});};function setApplePayEntitlement(merchantIdentifiers,entitlements){var _entitlements$key;var key='com.apple.developer.in-app-payments';var merchants=(_entitlements$key=entitlements[key])!=null?_entitlements$key:[];if(!Array.isArray(merchantIdentifiers)){merchantIdentifiers=[merchantIdentifiers];}for(var id of merchantIdentifiers){if(id&&!merchants.includes(id)){merchants.push(id);}}if(merchants.length){entitlements[key]=merchants;}return entitlements;}var withNoopSwiftFile=function withNoopSwiftFile(config){return _configPlugins.IOSConfig.XcodeProjectFile.withBuildSourceFile(config,{filePath:'noop-file.swift',contents:['//','// @generated','// A blank Swift file must be created for native modules with Swift files to work correctly.','//',''].join('\n')});};
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.setApplePayEntitlement=setApplePayEntitlement;exports.setGooglePayMetaData=setGooglePayMetaData;exports.withNoopSwiftFile=void 0;var _configPlugins=require("@expo/config-plugins");var _AndroidConfig$Manife=_configPlugins.AndroidConfig.Manifest,addMetaDataItemToMainApplication=_AndroidConfig$Manife.addMetaDataItemToMainApplication,getMainApplicationOrThrow=_AndroidConfig$Manife.getMainApplicationOrThrow,removeMetaDataItemFromMainApplication=_AndroidConfig$Manife.removeMetaDataItemFromMainApplication;var pkg=require('@stripe/stripe-react-native/package.json');var withStripe=function withStripe(config,props){config=withStripeIos(config,props);config=withNoopSwiftFile(config);config=withStripeAndroid(config,props);return config;};var withStripeIos=function withStripeIos(expoConfig,_ref){var merchantIdentifier=_ref.merchantIdentifier;return(0,_configPlugins.withEntitlementsPlist)(expoConfig,function(config){config.modResults=setApplePayEntitlement(merchantIdentifier,config.modResults);return config;});};function setApplePayEntitlement(merchantIdentifiers,entitlements){var _entitlements$key;var key='com.apple.developer.in-app-payments';var merchants=(_entitlements$key=entitlements[key])!=null?_entitlements$key:[];if(!Array.isArray(merchantIdentifiers)){merchantIdentifiers=[merchantIdentifiers];}for(var id of merchantIdentifiers){if(id&&!merchants.includes(id)){merchants.push(id);}}if(merchants.length){entitlements[key]=merchants;}return entitlements;}var withNoopSwiftFile=exports.withNoopSwiftFile=function withNoopSwiftFile(config){return _configPlugins.IOSConfig.XcodeProjectFile.withBuildSourceFile(config,{filePath:'noop-file.swift',contents:['//','// @generated','// A blank Swift file must be created for native modules with Swift files to work correctly.','//',''].join('\n')});};var withStripeAndroid=function withStripeAndroid(expoConfig,_ref2){var _ref2$enableGooglePay=_ref2.enableGooglePay,enableGooglePay=_ref2$enableGooglePay===void 0?false:_ref2$enableGooglePay;return(0,_configPlugins.withAndroidManifest)(expoConfig,function(config){config.modResults=setGooglePayMetaData(enableGooglePay,config.modResults);return config;});};function setGooglePayMetaData(enabled,modResults){var GOOGLE_PAY_META_NAME='com.google.android.gms.wallet.api.enabled';var mainApplication=getMainApplicationOrThrow(modResults);if(enabled){addMetaDataItemToMainApplication(mainApplication,GOOGLE_PAY_META_NAME,'true');}else{removeMetaDataItemFromMainApplication(mainApplication,GOOGLE_PAY_META_NAME);}return modResults;}var _default=exports.default=(0,_configPlugins.createRunOncePlugin)(withStripe,pkg.name,pkg.version);
|
|
2
2
|
//# sourceMappingURL=withStripe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AndroidConfig","Manifest","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","pkg","
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","_AndroidConfig$Manife","AndroidConfig","Manifest","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","pkg","withStripe","config","props","withStripeIos","withNoopSwiftFile","withStripeAndroid","expoConfig","_ref","merchantIdentifier","withEntitlementsPlist","modResults","setApplePayEntitlement","merchantIdentifiers","entitlements","_entitlements$key","key","merchants","Array","isArray","id","includes","push","length","exports","IOSConfig","XcodeProjectFile","withBuildSourceFile","filePath","contents","join","_ref2","_ref2$enableGooglePay","enableGooglePay","withAndroidManifest","setGooglePayMetaData","enabled","GOOGLE_PAY_META_NAME","mainApplication","_default","default","createRunOncePlugin","name","version"],"sourceRoot":"../../../src","sources":["plugin/withStripe.ts"],"mappings":"yNAAA,IAAAA,cAAA,CAAAC,OAAA,yBASA,IAAAC,qBAAA,CAIIC,4BAAa,CAACC,QAAQ,CAHxBC,gCAAgC,CAAAH,qBAAA,CAAhCG,gCAAgC,CAChCC,yBAAyB,CAAAJ,qBAAA,CAAzBI,yBAAyB,CACzBC,qCAAqC,CAAAL,qBAAA,CAArCK,qCAAqC,CAGvC,GAAM,CAAAC,GAAG,CAAGP,OAAO,CAAC,0CAA0C,CAAC,CAW/D,GAAM,CAAAQ,UAA2C,CAAG,QAA9C,CAAAA,UAA2CA,CAAIC,MAAM,CAAEC,KAAK,CAAK,CACrED,MAAM,CAAGE,aAAa,CAACF,MAAM,CAAEC,KAAK,CAAC,CACrCD,MAAM,CAAGG,iBAAiB,CAACH,MAAM,CAAC,CAClCA,MAAM,CAAGI,iBAAiB,CAACJ,MAAM,CAAEC,KAAK,CAAC,CACzC,MAAO,CAAAD,MAAM,CACf,CAAC,CAED,GAAM,CAAAE,aAA8C,CAAG,QAAjD,CAAAA,aAA8CA,CAClDG,UAAU,CAAAC,IAAA,CAEP,IADD,CAAAC,kBAAkB,CAAAD,IAAA,CAAlBC,kBAAkB,CAEpB,MAAO,GAAAC,oCAAqB,EAACH,UAAU,CAAE,SAACL,MAAM,CAAK,CACnDA,MAAM,CAACS,UAAU,CAAGC,sBAAsB,CACxCH,kBAAkB,CAClBP,MAAM,CAACS,UACT,CAAC,CACD,MAAO,CAAAT,MAAM,CACf,CAAC,CAAC,CACJ,CAAC,CAUM,QAAS,CAAAU,sBAAsBA,CACpCC,mBAAsC,CACtCC,YAAiC,CACZ,KAAAC,iBAAA,CACrB,GAAM,CAAAC,GAAG,CAAG,qCAAqC,CAEjD,GAAM,CAAAC,SAAmB,EAAAF,iBAAA,CAAGD,YAAY,CAACE,GAAG,CAAC,QAAAD,iBAAA,CAA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,CACV,CACxC,GAAM,CAAA0B,oBAAoB,CAAG,2CAA2C,CACxE,GAAM,CAAAC,eAAe,CAAGxC,yBAAyB,CAACa,UAAU,CAAC,CAC7D,GAAIyB,OAAO,CAAE,CACXvC,gCAAgC,CAC9ByC,eAAe,CACfD,oBAAoB,CACpB,MACF,CAAC,CACH,CAAC,IAAM,CACLtC,qCAAqC,CACnCuC,eAAe,CACfD,oBACF,CAAC,CACH,CAEA,MAAO,CAAA1B,UAAU,CACnB,CAAC,IAAA4B,QAAA,CAAAf,OAAA,CAAAgB,OAAA,CAEc,GAAAC,kCAAmB,EAACxC,UAAU,CAAED,GAAG,CAAC0C,IAAI,CAAE1C,GAAG,CAAC2C,OAAO,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ApplePay.ts"],"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/ApplePay.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.CardBrand=void 0;var CardBrand
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.CardBrand=void 0;var CardBrand=exports.CardBrand=function(CardBrand){CardBrand[CardBrand["JCB"]=0]="JCB";CardBrand[CardBrand["Amex"]=1]="Amex";CardBrand[CardBrand["CartesBancaires"]=2]="CartesBancaires";CardBrand[CardBrand["DinersClub"]=3]="DinersClub";CardBrand[CardBrand["Discover"]=4]="Discover";CardBrand[CardBrand["Mastercard"]=5]="Mastercard";CardBrand[CardBrand["UnionPay"]=6]="UnionPay";CardBrand[CardBrand["Visa"]=7]="Visa";CardBrand[CardBrand["Unknown"]=8]="Unknown";return CardBrand;}({});
|
|
2
2
|
//# sourceMappingURL=Common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CardBrand"],"
|
|
1
|
+
{"version":3,"names":["CardBrand","exports"],"sourceRoot":"../../../src","sources":["types/Common.ts"],"mappings":"qFA6BY,CAAAA,SAAS,CAAAC,OAAA,CAAAD,SAAA,UAATA,SAAS,EAATA,SAAS,CAATA,SAAS,iBAATA,SAAS,CAATA,SAAS,mBAATA,SAAS,CAATA,SAAS,yCAATA,SAAS,CAATA,SAAS,+BAATA,SAAS,CAATA,SAAS,2BAATA,SAAS,CAATA,SAAS,+BAATA,SAAS,CAATA,SAAS,2BAATA,SAAS,CAATA,SAAS,mBAATA,SAAS,CAATA,SAAS,+BAAT,CAAAA,SAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/CustomerSheet.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.VerifyMicrodepositsError=exports.RetrieveSetupIntentError=exports.RetrievePaymentIntentError=exports.PlatformPayError=exports.PaymentSheetError=exports.MissingRoutingNumber=exports.GooglePayError=exports.CustomerSheetError=exports.CreateTokenError=exports.CreatePaymentMethodError=exports.ConfirmSetupIntentError=exports.ConfirmPaymentError=exports.CollectBankAccountError=exports.CardActionError=exports.ApplePayError=exports.AddressSheetError=void 0;var ConfirmPaymentError
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.VerifyMicrodepositsError=exports.RetrieveSetupIntentError=exports.RetrievePaymentIntentError=exports.PlatformPayError=exports.PaymentSheetError=exports.MissingRoutingNumber=exports.GooglePayError=exports.CustomerSheetError=exports.CreateTokenError=exports.CreatePaymentMethodError=exports.ConfirmSetupIntentError=exports.ConfirmPaymentError=exports.CollectBankAccountError=exports.CardActionError=exports.ApplePayError=exports.AddressSheetError=void 0;var ConfirmPaymentError=exports.ConfirmPaymentError=function(ConfirmPaymentError){ConfirmPaymentError["Canceled"]="Canceled";ConfirmPaymentError["Failed"]="Failed";ConfirmPaymentError["Unknown"]="Unknown";return ConfirmPaymentError;}({});var CardActionError=exports.CardActionError=function(CardActionError){CardActionError["Canceled"]="Canceled";CardActionError["Failed"]="Failed";CardActionError["Unknown"]="Unknown";return CardActionError;}({});var ConfirmSetupIntentError=exports.ConfirmSetupIntentError=function(ConfirmSetupIntentError){ConfirmSetupIntentError["Canceled"]="Canceled";ConfirmSetupIntentError["Failed"]="Failed";ConfirmSetupIntentError["Unknown"]="Unknown";return ConfirmSetupIntentError;}({});var CreatePaymentMethodError=exports.CreatePaymentMethodError=function(CreatePaymentMethodError){CreatePaymentMethodError["Failed"]="Failed";return CreatePaymentMethodError;}({});var CreateTokenError=exports.CreateTokenError=function(CreateTokenError){CreateTokenError["Failed"]="Failed";return CreateTokenError;}({});var RetrievePaymentIntentError=exports.RetrievePaymentIntentError=function(RetrievePaymentIntentError){RetrievePaymentIntentError["Unknown"]="Unknown";return RetrievePaymentIntentError;}({});var RetrieveSetupIntentError=exports.RetrieveSetupIntentError=function(RetrieveSetupIntentError){RetrieveSetupIntentError["Unknown"]="Unknown";return RetrieveSetupIntentError;}({});var ApplePayError=exports.ApplePayError=function(ApplePayError){ApplePayError["Canceled"]="Canceled";ApplePayError["Failed"]="Failed";ApplePayError["Unknown"]="Unknown";return ApplePayError;}({});var PaymentSheetError=exports.PaymentSheetError=function(PaymentSheetError){PaymentSheetError["Failed"]="Failed";PaymentSheetError["Canceled"]="Canceled";PaymentSheetError["Timeout"]="Timeout";return PaymentSheetError;}({});var GooglePayError=exports.GooglePayError=function(GooglePayError){GooglePayError["Failed"]="Failed";GooglePayError["Canceled"]="Canceled";GooglePayError["Unknown"]="Unknown";return GooglePayError;}({});var MissingRoutingNumber=exports.MissingRoutingNumber={code:CreateTokenError.Failed,message:'You must provide a routing number for US bank accounts. This should be the ACH routing number.'};var VerifyMicrodepositsError=exports.VerifyMicrodepositsError=function(VerifyMicrodepositsError){VerifyMicrodepositsError["Canceled"]="Canceled";VerifyMicrodepositsError["Failed"]="Failed";VerifyMicrodepositsError["Unknown"]="Unknown";return VerifyMicrodepositsError;}({});var CollectBankAccountError=exports.CollectBankAccountError=function(CollectBankAccountError){CollectBankAccountError["Canceled"]="Canceled";CollectBankAccountError["Failed"]="Failed";CollectBankAccountError["Unknown"]="Unknown";return CollectBankAccountError;}({});var AddressSheetError=exports.AddressSheetError=function(AddressSheetError){AddressSheetError["Failed"]="Failed";AddressSheetError["Canceled"]="Canceled";return AddressSheetError;}({});var CustomerSheetError=exports.CustomerSheetError=function(CustomerSheetError){CustomerSheetError["Failed"]="Failed";CustomerSheetError["Canceled"]="Canceled";return CustomerSheetError;}({});var PlatformPayError=exports.PlatformPayError=function(PlatformPayError){PlatformPayError["Canceled"]="Canceled";PlatformPayError["Failed"]="Failed";PlatformPayError["Unknown"]="Unknown";return PlatformPayError;}({});
|
|
2
2
|
//# sourceMappingURL=Errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ConfirmPaymentError","CardActionError","ConfirmSetupIntentError","CreatePaymentMethodError","CreateTokenError","RetrievePaymentIntentError","RetrieveSetupIntentError","ApplePayError","PaymentSheetError","GooglePayError","MissingRoutingNumber","code","Failed","message","VerifyMicrodepositsError","CollectBankAccountError","AddressSheetError","CustomerSheetError","PlatformPayError"],"
|
|
1
|
+
{"version":3,"names":["ConfirmPaymentError","exports","CardActionError","ConfirmSetupIntentError","CreatePaymentMethodError","CreateTokenError","RetrievePaymentIntentError","RetrieveSetupIntentError","ApplePayError","PaymentSheetError","GooglePayError","MissingRoutingNumber","code","Failed","message","VerifyMicrodepositsError","CollectBankAccountError","AddressSheetError","CustomerSheetError","PlatformPayError"],"sourceRoot":"../../../src","sources":["types/Errors.ts"],"mappings":"wgBAAY,CAAAA,mBAAmB,CAAAC,OAAA,CAAAD,mBAAA,UAAnBA,mBAAmB,EAAnBA,mBAAmB,wBAAnBA,mBAAmB,oBAAnBA,mBAAmB,4BAAnB,CAAAA,mBAAmB,UAMnB,CAAAE,eAAe,CAAAD,OAAA,CAAAC,eA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,wBAAA,UAAxBA,wBAAwB,EAAxBA,wBAAwB,wBAAxBA,wBAAwB,oBAAxBA,wBAAwB,4BAAxB,CAAAA,wBAAwB,UAMxB,CAAAC,uBAAuB,CAAAf,OAAA,CAAAe,uBAAA,UAAvBA,uBAAuB,EAAvBA,uBAAuB,wBAAvBA,uBAAuB,oBAAvBA,uBAAuB,4BAAvB,CAAAA,uBAAuB,UAMvB,CAAAC,iBAAiB,CAAAhB,OAAA,CAAAgB,iBAAA,UAAjBA,iBAAiB,EAAjBA,iBAAiB,oBAAjBA,iBAAiB,8BAAjB,CAAAA,iBAAiB,UAKjB,CAAAC,kBAAkB,CAAAjB,OAAA,CAAAiB,kBAAA,UAAlBA,kBAAkB,EAAlBA,kBAAkB,oBAAlBA,kBAAkB,8BAAlB,CAAAA,kBAAkB,UAKlB,CAAAC,gBAAgB,CAAAlB,OAAA,CAAAkB,gBAAA,UAAhBA,gBAAgB,EAAhBA,gBAAgB,wBAAhBA,gBAAgB,oBAAhBA,gBAAgB,4BAAhB,CAAAA,gBAAgB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.FinancialConnectionsSheetError=exports.FinancialConnectionsEventName=exports.FinancialConnectionsEventErrorCode=void 0;var FinancialConnectionsSheetError
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.FinancialConnectionsSheetError=exports.FinancialConnectionsEventName=exports.FinancialConnectionsEventErrorCode=void 0;var FinancialConnectionsSheetError=exports.FinancialConnectionsSheetError=function(FinancialConnectionsSheetError){FinancialConnectionsSheetError["Failed"]="Failed";FinancialConnectionsSheetError["Canceled"]="Canceled";return FinancialConnectionsSheetError;}({});var FinancialConnectionsEventName=exports.FinancialConnectionsEventName=function(FinancialConnectionsEventName){FinancialConnectionsEventName["Open"]="open";FinancialConnectionsEventName["ManualEntryInitiated"]="manual_entry_initiated";FinancialConnectionsEventName["ConsentAcquired"]="consent_acquired";FinancialConnectionsEventName["SearchInitiated"]="search_initiated";FinancialConnectionsEventName["InstitutionSelected"]="institution_selected";FinancialConnectionsEventName["InstitutionAuthorized"]="institution_authorized";FinancialConnectionsEventName["AccountsSelected"]="accounts_selected";FinancialConnectionsEventName["Success"]="success";FinancialConnectionsEventName["Error"]="error";FinancialConnectionsEventName["Cancel"]="cancel";FinancialConnectionsEventName["FlowLaunchedInBrowser"]="flow_launched_in_browser";return FinancialConnectionsEventName;}({});var FinancialConnectionsEventErrorCode=exports.FinancialConnectionsEventErrorCode=function(FinancialConnectionsEventErrorCode){FinancialConnectionsEventErrorCode["AccountNumbersUnavailable"]="account_numbers_unavailable";FinancialConnectionsEventErrorCode["AccountsUnavailable"]="accounts_unavailable";FinancialConnectionsEventErrorCode["NoDebitableAccount"]="no_debitable_account";FinancialConnectionsEventErrorCode["AuthorizationFailed"]="authorization_failed";FinancialConnectionsEventErrorCode["InstitutionUnavailablePlanned"]="institution_unavailable_planned";FinancialConnectionsEventErrorCode["InstitutionUnavailableUnplanned"]="institution_unavailable_unplanned";FinancialConnectionsEventErrorCode["InstitutionTimeout"]="institution_timeout";FinancialConnectionsEventErrorCode["UnexpectedError"]="unexpected_error";FinancialConnectionsEventErrorCode["SessionExpired"]="session_expired";FinancialConnectionsEventErrorCode["FailedBotDetection"]="failed_bot_detection";return FinancialConnectionsEventErrorCode;}({});
|
|
2
2
|
//# sourceMappingURL=FinancialConnections.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FinancialConnectionsSheetError","FinancialConnectionsEventName","FinancialConnectionsEventErrorCode"],"
|
|
1
|
+
{"version":3,"names":["FinancialConnectionsSheetError","exports","FinancialConnectionsEventName","FinancialConnectionsEventErrorCode"],"sourceRoot":"../../../src","sources":["types/FinancialConnections.ts"],"mappings":"2LAkIY,CAAAA,8BAA8B,CAAAC,OAAA,CAAAD,8BAAA,UAA9BA,8BAA8B,EAA9BA,8BAA8B,oBAA9BA,8BAA8B,8BAA9B,CAAAA,8BAA8B,UAY9B,CAAAE,6BAA6B,CAAAD,OAAA,CAAAC,6BAAA,UAA7BA,6BAA6B,EAA7BA,6BAA6B,gBAA7BA,6BAA6B,kDAA7BA,6BAA6B,uCAA7BA,6BAA6B,uCAA7BA,6BAA6B,+CAA7BA,6BAA6B,mDAA7BA,6BAA6B,yCAA7BA,6BAA6B,sBAA7BA,6BAA6B,kBAA7BA,6BAA6B,oBAA7BA,6BAA6B,2DAA7B,CAAAA,6BAA6B,UAkC7B,CAAAC,kCAAkC,CAAAF,OAAA,CAAAE,kCAAA,UAAlCA,kCAAkC,EAAlCA,kCAAkC,4DAAlCA,kCAAkC,+CAAlCA,kCAAkC,8CAAlCA,kCAAkC,+CAAlCA,kCAAkC,oEAAlCA,kCAAkC,wEAAlCA,kCAAkC,6CAAlCA,kCAAkC,uCAAlCA,kCAAkC,qCAAlCA,kCAAkC,oDAAlC,CAAAA,kCAAkC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["NextAction.ts"],"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/NextAction.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.Status=void 0;var Status
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.Status=void 0;var Status=exports.Status=function(Status){Status["Succeeded"]="Succeeded";Status["RequiresPaymentMethod"]="RequiresPaymentMethod";Status["RequiresConfirmation"]="RequiresConfirmation";Status["Canceled"]="Canceled";Status["Processing"]="Processing";Status["RequiresAction"]="RequiresAction";Status["RequiresCapture"]="RequiresCapture";Status["Unknown"]="Unknown";return Status;}({});
|
|
2
2
|
//# sourceMappingURL=PaymentIntent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Status"],"
|
|
1
|
+
{"version":3,"names":["Status","exports"],"sourceRoot":"../../../src","sources":["types/PaymentIntent.ts"],"mappings":"kFAsEY,CAAAA,MAAM,CAAAC,OAAA,CAAAD,MAAA,UAANA,MAAM,EAANA,MAAM,0BAANA,MAAM,kDAANA,MAAM,gDAANA,MAAM,wBAANA,MAAM,4BAANA,MAAM,oCAANA,MAAM,sCAANA,MAAM,4BAAN,CAAAA,MAAM","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/PaymentMethod.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.PaymentMethodLayout=exports.CollectionMode=exports.CaptureMethod=exports.AddressCollectionMode=void 0;var CollectionMode
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.PaymentMethodLayout=exports.CollectionMode=exports.CardBrandCategory=exports.CardBrandAcceptanceFilter=exports.CaptureMethod=exports.AddressCollectionMode=void 0;var CollectionMode=exports.CollectionMode=function(CollectionMode){CollectionMode["AUTOMATIC"]="automatic";CollectionMode["NEVER"]="never";CollectionMode["ALWAYS"]="always";return CollectionMode;}({});var AddressCollectionMode=exports.AddressCollectionMode=function(AddressCollectionMode){AddressCollectionMode["AUTOMATIC"]="automatic";AddressCollectionMode["NEVER"]="never";AddressCollectionMode["FULL"]="full";return AddressCollectionMode;}({});var CaptureMethod=exports.CaptureMethod=function(CaptureMethod){CaptureMethod["Automatic"]="Automatic";CaptureMethod["Manual"]="Manual";CaptureMethod["AutomaticAsync"]="AutomaticAsync";return CaptureMethod;}({});var PaymentMethodLayout=exports.PaymentMethodLayout=function(PaymentMethodLayout){PaymentMethodLayout["Horizontal"]="Horizontal";PaymentMethodLayout["Vertical"]="Vertical";PaymentMethodLayout["Automatic"]="Automatic";return PaymentMethodLayout;}({});var CardBrandCategory=exports.CardBrandCategory=function(CardBrandCategory){CardBrandCategory["Visa"]="visa";CardBrandCategory["Mastercard"]="mastercard";CardBrandCategory["Amex"]="amex";CardBrandCategory["Discover"]="discover";return CardBrandCategory;}({});var CardBrandAcceptanceFilter=exports.CardBrandAcceptanceFilter=function(CardBrandAcceptanceFilter){CardBrandAcceptanceFilter["All"]="all";CardBrandAcceptanceFilter["Allowed"]="allowed";CardBrandAcceptanceFilter["Disallowed"]="disallowed";return CardBrandAcceptanceFilter;}({});
|
|
2
2
|
//# sourceMappingURL=PaymentSheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CollectionMode","AddressCollectionMode","CaptureMethod","PaymentMethodLayout"],"sources":["PaymentSheet.ts"],"sourcesContent":["import type { BillingDetails, AddressDetails, CardBrand } from './Common';\nimport type { CartSummaryItem } from './ApplePay';\nimport type {\n ButtonType,\n RecurringPaymentRequest,\n AutomaticReloadPaymentRequest,\n MultiMerchantRequest,\n} from './PlatformPay';\nimport type { FutureUsage } from './PaymentIntent';\nimport type { Result } from './PaymentMethod';\nimport type { StripeError } from './Errors';\n\nexport type SetupParamsBase = IntentParams & {\n /** Your customer-facing business name. On Android, this is required and cannot be an empty string. */\n merchantDisplayName: string;\n /** The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id */\n customerId?: string;\n /** When set to true, separates out the payment method selection & confirmation steps.\n * If true, you must call `confirmPaymentSheetPayment` on your own. Defaults to false. */\n customFlow?: boolean;\n /** iOS only. Enable Apple Pay in the Payment Sheet by passing an ApplePayParams object. */\n applePay?: ApplePayParams;\n /** Android only. Enable Google Pay in the Payment Sheet by passing a GooglePayParams object. */\n googlePay?: GooglePayParams;\n /** The color styling to use for PaymentSheet UI. Defaults to 'automatic'. */\n style?: 'alwaysLight' | 'alwaysDark' | 'automatic';\n /** A URL that redirects back to your app that PaymentSheet can use to auto-dismiss web views used for additional authentication, e.g. 3DS2 */\n returnURL?: string;\n /** Configuration for how billing details are collected during checkout. */\n billingDetailsCollectionConfiguration?: BillingDetailsCollectionConfiguration;\n /** PaymentSheet pre-populates the billing fields that are displayed in the Payment Sheet (only country and postal code, as of this version) with the values provided. */\n defaultBillingDetails?: BillingDetails;\n /**\n * The shipping information for the customer. If set, PaymentSheet will pre-populate the form fields with the values provided.\n * This is used to display a \"Billing address is same as shipping\" checkbox if `defaultBillingDetails` is not provided.\n * If `name` and `line1` are populated, it's also [attached to the PaymentIntent](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-shipping) during payment.\n */\n defaultShippingDetails?: AddressDetails;\n /** If true, allows payment methods that do not move money at the end of the checkout. Defaults to false.\n *\n * Some payment methods can’t guarantee you will receive funds from your customer at the end of the checkout\n * because they take time to settle (eg. most bank debits, like SEPA or ACH) or require customer action to\n * complete (e.g. OXXO, Konbini, Boleto). If this is set to true, make sure your integration listens to webhooks\n * for notifications on whether a payment has succeeded or not.\n */\n allowsDelayedPaymentMethods?: boolean;\n /** Customizes the appearance of PaymentSheet */\n appearance?: AppearanceParams;\n /** The label to use for the primary button. If not set, Payment Sheet will display suitable default labels for payment and setup intents. */\n primaryButtonLabel?: string;\n /** Optional configuration to display a custom message when a saved payment method is removed. iOS only. */\n removeSavedPaymentMethodMessage?: 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 /** By default, PaymentSheet will use a dynamic ordering that optimizes payment method display for the customer.\n * You can override the default order in which payment methods are displayed in PaymentSheet with a list of payment method types.\n * See https://stripe.com/docs/api/payment_methods/object#payment_method_object-type for the list of valid types. You may also pass external payment methods.\n * - Example: [\"card\", \"external_paypal\", \"klarna\"]\n * - Note: If you omit payment methods from this list, they’ll be automatically ordered by Stripe after the ones you provide. Invalid payment methods are ignored.\n */\n paymentMethodOrder?: Array<String>;\n /** This is an experimental feature that may be removed at any time.\n * Defaults to true. If true, the customer can delete all saved payment methods.\n * If false, the customer can't delete if they only have one saved payment method remaining.\n */\n allowsRemovalOfLastSavedPaymentMethod?: boolean;\n /**\n * Defines the layout orientations available for displaying payment methods in PaymentSheet.\n * - Note: Defaults to `Automatic` if not set\n */\n paymentMethodLayout?: PaymentMethodLayout;\n};\n\nexport type SetupParams =\n | (SetupParamsBase & {\n /** A short-lived token that allows the SDK to access a Customer’s payment methods. */\n customerEphemeralKeySecret: string;\n customerSessionClientSecret?: never;\n })\n | (SetupParamsBase & {\n customerEphemeralKeySecret?: never;\n /** (Experimental) This parameter can be changed or removed at any time (use at your own risk).\n * The client secret of this Customer Session. Used on the client to set up secure access to the given customer.\n */\n customerSessionClientSecret: string;\n })\n | SetupParamsBase;\n\nexport type IntentParams =\n | {\n paymentIntentClientSecret: string;\n setupIntentClientSecret?: undefined;\n intentConfiguration?: never;\n }\n | {\n setupIntentClientSecret: string;\n paymentIntentClientSecret?: undefined;\n intentConfiguration?: never;\n }\n | {\n setupIntentClientSecret?: never;\n paymentIntentClientSecret?: never;\n intentConfiguration: IntentConfiguration;\n };\n\nexport type ApplePayParams = {\n /** The two-letter ISO 3166 code of the country of your business, e.g. \"US\" */\n merchantCountryCode: string;\n /**\n * An array of CartSummaryItem item objects that summarize the amount of the payment. If you're using a SetupIntent\n * for a recurring payment, you should set this to display the amount you intend to charge. */\n cartItems?: CartSummaryItem[];\n /** Sets the text displayed by the call to action button in the Apple Pay sheet. */\n buttonType?: ButtonType;\n /** A typical request is for a one-time payment. To support different types of payment requests, include a PaymentRequestType. Only supported on iOS 16 and up. */\n request?:\n | RecurringPaymentRequest\n | AutomaticReloadPaymentRequest\n | MultiMerchantRequest;\n /** Callback function for setting the order details (retrieved from your server) to give users the\n * ability to track and manage their purchases in Wallet. Stripe calls your implementation after the\n * payment is complete, but before iOS dismisses the Apple Pay sheet. You must call the `completion`\n * function, or else the Apple Pay sheet will hang. */\n setOrderTracking?: (\n completion: (\n orderIdentifier: string,\n orderTypeIdentifier: string,\n authenticationToken: string,\n webServiceUrl: string\n ) => void\n ) => void;\n};\n\nexport type GooglePayParams = {\n /** The two-letter ISO 3166 code of the country of your business, e.g. \"US\" */\n merchantCountryCode: string;\n /** The three-letter ISO 4217 alphabetic currency code, e.g. \"USD\" or \"EUR\". Required in order to support Google Pay when processing a Setup Intent. */\n currencyCode?: string;\n /** Whether or not to use the Google Pay test environment. Set to `true` until you have applied for and been granted access to the Production environment. */\n testEnv?: boolean;\n /** An optional label to display with the amount. Google Pay may or may not display this label depending on its own internal logic. Defaults to a generic label if none is provided. */\n label?: string;\n /** An optional amount to display for setup intents. Google Pay may or may not display this amount depending on its own internal logic. Defaults to 0 if none is provided. */\n amount?: string;\n /** The Google Pay button type to use. Set to \"Pay\" by default. See\n * [Google's documentation](https://developers.google.com/android/reference/com/google/android/gms/wallet/Wallet.WalletOptions#environment)\n * for more information on button types. */\n buttonType?: ButtonType;\n};\n\n/**\n * Used to customize the appearance of your PaymentSheet\n */\nexport type AppearanceParams = RecursivePartial<{\n /** Describes the appearance of fonts in your PaymentSheet */\n font: FontConfig;\n /** Describes the colors in your PaymentSheet. Provide either a base config, or both `light` and `dark` configs, which will be useed based on whether the user is in Light or Dark mode. */\n colors:\n | GlobalColorConfig\n | { light: GlobalColorConfig; dark: GlobalColorConfig };\n /** Describes the appearance of shapes in the PaymentSheet, such as buttons, inputs, and tabs. */\n shapes: {\n /** The border radius used for buttons, inputs, and tabs in your PaymentSheet.\n * @default 6.0\n */\n borderRadius: number;\n /** The border width used for inputs and tabs in your PaymentSheet.\n * @default 1.0\n */\n borderWidth: number;\n /** iOS only. The shadow used for buttons, inputs, and tabs in your PaymentSheet */\n shadow: ShadowConfig;\n };\n /** Describes the appearance of the primary \"Pay\" button at the bottom of your Payment Sheet */\n primaryButton: PrimaryButtonConfig;\n}>;\n\nexport type FontConfig = {\n /**\n * The font used for regular text. PaymentSheet will attempt to use medium and bold versions of this font if they exist.\n *\n * On iOS, this should be the \"PostScript name\" found in Font Book after installing the font.\n * On Android, this should be the name of the font file (containing only lowercase alphanumeric characters) in android/app/src/main/res/font\n *\n * @default The OS's system font\n */\n family: string;\n /** The scale factor for all fonts in your PaymentSheet. This value is required to be greater than 0. Font sizes are multiplied by this value before being displayed. For example, setting this to 1.2 increases the size of all text by 20%.\n * @default 1.0\n */\n scale: number;\n};\n\nexport type ShadowConfig = {\n /** The color of the shadow.\n * @default \"#000000\"\n * */\n color: string;\n /** The alpha or opacity of the shadow.\n * @default 0.05\n */\n opacity: number;\n /** The positioning of the shadow relative to the component. For example, a negative x and y will result in a shadow placed below and to the left of the component.\n * @default {x: 0, y: 2}\n */\n offset: { x: number; y: number };\n /** The blur radius of the shadow.\n * @default 4\n */\n blurRadius: number;\n};\n\nexport type GlobalColorConfig = {\n /** A primary color used throughout your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System blue color on iOS, and \"#007AFF\" (light) / \"#0074D4\" (dark) on Android.\n */\n primary: string;\n /** The color used for the background of your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System background color on iOS, and \"#ffffff\" (light) / \"#2e2e2e\" (dark) on Android.\n */\n background: string;\n /** The color used for the background of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System background color (light) / System secondary background color (dark) on iOS, and \"#ffffff\" (light) / \"#a9a9a9\" (dark) on Android.\n */\n componentBackground: string;\n /** The color used for the external border of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System gray (3) color on iOS, and \"#33787880\" (light) / \"#787880\" (dark) on Android.\n */\n componentBorder: string;\n /** The color used for the internal border (meaning the border is shared with another component) of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System gray (3) color on iOS, and \"#33787880\" (light) / \"#787880\" (dark) on Android.\n */\n componentDivider: string;\n /** The color of the header text in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System label color on iOS, and \"#000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n primaryText: string;\n /** The color of the label text of input fields, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System seconday label color on iOS, and \"#000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n secondaryText: string;\n /** The color of the input text in your PaymentSheet components, such as the user's card number or zip code, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default \"#000000\"\n */\n componentText: string;\n /** The color of the placeholder text of input fields, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System label color on iOS, and \"#99000000\" (light) / \"#99ffffff\" (dark) on Android.\n */\n placeholderText: string;\n /** The color used for icons in your Payment Sheet, such as the close or back icons, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System seconday label color on iOS, and \"#99000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n icon: string;\n /** The color used to indicate errors or destructive actions in your Payment Sheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System red color on iOS, and \"#ff0000\" (light) / \"#ff0000\" (dark) on Android.\n */\n error: string;\n};\n\nexport type PrimaryButtonConfig = {\n /** The font family used specifically for the primary button.\n * @default The root `appearance.font.family`\n */\n font: Pick<FontConfig, 'family'>;\n /** The colors used specifically for the primary button. Provide either a base config, or both `light` and `dark` configs, which will be useed based on whether the user is in Light or Dark mode. */\n colors:\n | PrimaryButtonColorConfig\n | { light: PrimaryButtonColorConfig; dark: PrimaryButtonColorConfig };\n /** Describes the border and shadow of the primary button. */\n shapes: {\n /** The border radius used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.borderRadius`\n */\n borderRadius: number;\n /** The border width used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.borderWidth`\n */\n borderWidth: number;\n /** iOS only. The shadow used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.shadow`\n */\n shadow: ShadowConfig;\n };\n};\n\nexport type PrimaryButtonColorConfig = {\n /** The background color used for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The root `appearance.colors.primary`\n */\n background: string;\n /** The color of the text for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default White or black, depending on the color of the button.\n */\n text: string;\n /** The border color used for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System quaternary label on iOS, transparent on Android.\n */\n border: string;\n};\n\ntype RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? RecursivePartial<U>[]\n : T[P] extends object\n ? RecursivePartial<T[P]>\n : T[P];\n};\nexport interface PaymentOption {\n label: string;\n image: string;\n}\n\nexport type PresentOptions = {\n /** The number of milliseconds (after presenting) before the Payment Sheet closes automatically, at which point\n *`presentPaymentSheet` will resolve with an `error.code` of `PaymentSheetError.Timeout`. The default is no timeout.\n */\n timeout?: number;\n};\n\nexport type BillingDetailsCollectionConfiguration = {\n /** How to collect the name field. Defaults to `CollectionMode.automatic`. */\n name?: CollectionMode;\n /** How to collect the phone field. Defaults to `CollectionMode.automatic`. */\n phone?: CollectionMode;\n /** How to collect the email field. Defaults to `CollectionMode.automatic`. */\n email?: CollectionMode;\n /** How to collect the billing address. Defaults to `CollectionMode.automatic`. */\n address?: AddressCollectionMode;\n /** Whether the values included in `Configuration.defaultBillingDetails` should be attached to the payment method, this includes fields that aren't displayed in the form. If `false` (the default), those values will only be used to prefill the corresponding fields in the form. */\n attachDefaultsToPaymentMethod?: Boolean;\n};\n\nexport enum CollectionMode {\n /** The field may or may not be collected depending on the Payment Method's requirements. */\n AUTOMATIC = 'automatic',\n /** The field will never be collected. If this field is required by the Payment Method, you must provide it as part of `defaultBillingDetails`. */\n NEVER = 'never',\n /** The field will always be collected, even if it isn't required for the Payment Method. */\n ALWAYS = 'always',\n}\n\nexport enum AddressCollectionMode {\n /** Only the fields required by the Payment Method will be collected, which may be none. */\n AUTOMATIC = 'automatic',\n /** Billing address will never be collected. If the Payment Method requires a billing address, you must provide it as part of `defaultBillingDetails`. */\n NEVER = 'never',\n /** Collect the full billing address, regardless of the Payment Method's requirements. */\n FULL = 'full',\n}\n\nexport type IntentCreationError = StripeError<'Failed'>;\n\nexport type IntentCreationCallbackParams =\n | {\n clientSecret: string;\n error?: never;\n }\n | {\n clientSecret?: never;\n error: IntentCreationError;\n };\n\nexport type IntentConfiguration = {\n /*\n Called when the customer confirms payment. Your implementation should create a PaymentIntent or SetupIntent on your server and call the `intentCreationCallback` with its client secret or an error if one occurred.\n - Note: You must create the PaymentIntent or SetupIntent with the same values used as the `IntentConfiguration` e.g. the same amount, currency, etc.\n - Parameters:\n - paymentMethod: The PaymentMethod representing the customer's payment details.\n - shouldSavePaymentMethod: This is `true` if the customer selected the \"Save this payment method for future use\" checkbox. Set `setup_future_usage` on the PaymentIntent to `off_session` if this is `true`.\n - intentCreationCallback: Call this with the `client_secret` of the PaymentIntent or SetupIntent created by your server or the error that occurred. If you're using customFlow: false (default), the error's localizedMessage will be displayed to the customer in the sheet. If you're using customFlow: true, the `confirm` method fails with the error.\n */\n confirmHandler: (\n paymentMethod: Result,\n shouldSavePaymentMethod: boolean,\n intentCreationCallback: (result: IntentCreationCallbackParams) => void\n ) => void;\n /* Information about the payment (PaymentIntent) or setup (SetupIntent).*/\n mode: Mode;\n /* A list of payment method types to display to the customer. If undefined or empty, we dynamically determine the payment methods using your Stripe Dashboard settings. */\n paymentMethodTypes?: Array<string>;\n};\n\nexport type Mode = PaymentMode | SetupMode;\n\n/**\n * Controls when the funds will be captured. Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method\n */\nexport enum CaptureMethod {\n /** (Default) Stripe automatically captures funds when the customer authorizes the payment. */\n Automatic = 'Automatic',\n /** Place a hold on the funds when the customer authorizes the payment, but don’t capture the funds until later. (Not all payment methods support this.) */\n Manual = 'Manual',\n /** Asynchronously capture funds when the customer authorizes the payment.\n - Note: Recommended over `CaptureMethod.Automatic` due to improved latency, but may require additional integration changes.\n - Seealso: https://stripe.com/docs/payments/payment-intents/asynchronous-capture-automatic-async */\n AutomaticAsync = 'AutomaticAsync',\n}\n\n/* Use this if your integration creates a PaymentIntent */\nexport type PaymentMode = {\n /* Amount intended to be collected in the smallest currency unit (e.g. 100 cents to charge $1.00). Shown in Apple Pay, Google Pay, Buy now pay later UIs, the Pay button, and influences available payment methods.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-amount */\n amount: number;\n /* Three-letter ISO currency code. Filters out payment methods based on supported currency.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-currency */\n currencyCode: string;\n /* Indicates that you intend to make future payments.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage */\n setupFutureUsage?: FutureUsage;\n /* Controls when the funds will be captured.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method */\n captureMethod?: CaptureMethod;\n};\n\n/* Use this if your integration creates a SetupIntent */\nexport type SetupMode = {\n /* Three-letter ISO currency code. Filters out payment methods based on supported currency.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-currency */\n currencyCode?: string;\n /* Indicates that you intend to make future payments.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage */\n setupFutureUsage: FutureUsage;\n};\n\nexport enum PaymentMethodLayout {\n /**\n * Payment methods are arranged horizontally.\n * Users can swipe left or right to navigate through different payment methods.\n */\n Horizontal = 'Horizontal',\n\n /**\n * Payment methods are arranged vertically.\n * Users can scroll up or down to navigate through different payment methods.\n */\n Vertical = 'Vertical',\n\n /**\n * This lets Stripe choose the best layout for payment methods in the sheet.\n */\n Automatic = 'Automatic',\n}\n"],"mappings":"0KA6UYA,eAAc,iDAAdA,cAAc,EAAdA,cAAc,0BAAdA,cAAc,kBAAdA,cAAc,uBAAdA,cAAc,0BAAdA,cAAc,SASdC,sBAAqB,+DAArBA,qBAAqB,EAArBA,qBAAqB,0BAArBA,qBAAqB,kBAArBA,qBAAqB,mBAArBA,qBAAqB,iCAArBA,qBAAqB,SA8CrBC,cAAa,+CAAbA,aAAa,EAAbA,aAAa,0BAAbA,aAAa,oBAAbA,aAAa,uCAAbA,aAAa,yBAAbA,aAAa,SAqCbC,oBAAmB,2DAAnBA,mBAAmB,EAAnBA,mBAAmB,4BAAnBA,mBAAmB,wBAAnBA,mBAAmB,6BAAnBA,mBAAmB,+BAAnBA,mBAAmB"}
|
|
1
|
+
{"version":3,"names":["CollectionMode","exports","AddressCollectionMode","CaptureMethod","PaymentMethodLayout","CardBrandCategory","CardBrandAcceptanceFilter"],"sourceRoot":"../../../src","sources":["types/PaymentSheet.ts"],"mappings":"sOAyVY,CAAAA,cAAc,CAAAC,OAAA,CAAAD,cAAA,UAAdA,cAAc,EAAdA,cAAc,0BAAdA,cAAc,kBAAdA,cAAc,0BAAd,CAAAA,cAAc,UASd,CAAAE,qBAAqB,CAAAD,OAAA,CAAAC,qBAAA,UAArBA,qBAAqB,EAArBA,qBAAqB,0BAArBA,qBAAqB,kBAArBA,qBAAqB,sBAArB,CAAAA,qBAAqB,UA8CrB,CAAAC,aAAa,CAAAF,OAAA,CAAAE,aAAA,UAAbA,aAAa,EAAbA,aAAa,0BAAbA,aAAa,oBAAbA,aAAa,0CAAb,CAAAA,aAAa,UAqCb,CAAAC,mBAAmB,CAAAH,OAAA,CAAAG,mBAAA,UAAnBA,mBAAmB,EAAnBA,mBAAmB,4BAAnBA,mBAAmB,wBAAnBA,mBAAmB,gCAAnB,CAAAA,mBAAmB,UAoBnB,CAAAC,iBAAiB,CAAAJ,OAAA,CAAAI,iBAAA,UAAjBA,iBAAiB,EAAjBA,iBAAiB,gBAAjBA,iBAAiB,4BAAjBA,iBAAiB,gBAAjBA,iBAAiB,8BAAjB,CAAAA,iBAAiB,UAejB,CAAAC,yBAAyB,CAAAL,OAAA,CAAAK,yBAAA,UAAzBA,yBAAyB,EAAzBA,yBAAyB,cAAzBA,yBAAyB,sBAAzBA,yBAAyB,kCAAzB,CAAAA,yBAAyB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.PaymentType=exports.PaymentRequestType=exports.InvalidShippingField=exports.IntervalUnit=exports.ContactField=exports.ButtonType=exports.ButtonStyle=exports.BillingAddressFormat=exports.ApplePayShippingType=exports.ApplePaySheetErrorType=exports.ApplePayMerchantCapability=void 0;var ApplePaySheetErrorType
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.PaymentType=exports.PaymentRequestType=exports.InvalidShippingField=exports.IntervalUnit=exports.ContactField=exports.ButtonType=exports.ButtonStyle=exports.BillingAddressFormat=exports.ApplePayShippingType=exports.ApplePaySheetErrorType=exports.ApplePayMerchantCapability=void 0;var ApplePaySheetErrorType=exports.ApplePaySheetErrorType=function(ApplePaySheetErrorType){ApplePaySheetErrorType["InvalidShippingAddress"]="InvalidShippingAddress";ApplePaySheetErrorType["UnserviceableShippingAddress"]="UnserviceableShippingAddress";ApplePaySheetErrorType["InvalidCouponCode"]="InvalidCouponCode";ApplePaySheetErrorType["ExpiredCouponCode"]="ExpiredCouponCode";return ApplePaySheetErrorType;}({});var ContactField=exports.ContactField=function(ContactField){ContactField["EmailAddress"]="emailAddress";ContactField["Name"]="name";ContactField["PhoneNumber"]="phoneNumber";ContactField["PhoneticName"]="phoneticName";ContactField["PostalAddress"]="postalAddress";return ContactField;}({});var InvalidShippingField=exports.InvalidShippingField=function(InvalidShippingField){InvalidShippingField["Street"]="street";InvalidShippingField["City"]="city";InvalidShippingField["SubAdministrativeArea"]="subAdministrativeArea";InvalidShippingField["State"]="state";InvalidShippingField["PostalCode"]="postalCode";InvalidShippingField["Country"]="country";InvalidShippingField["CountryCode"]="countryCode";InvalidShippingField["SubLocality"]="subLocality";return InvalidShippingField;}({});var PaymentRequestType=exports.PaymentRequestType=function(PaymentRequestType){PaymentRequestType["Recurring"]="Recurring";PaymentRequestType["AutomaticReload"]="AutomaticReload";PaymentRequestType["MultiMerchant"]="MultiMerchant";return PaymentRequestType;}({});var ApplePayMerchantCapability=exports.ApplePayMerchantCapability=function(ApplePayMerchantCapability){ApplePayMerchantCapability["Supports3DS"]="supports3DS";ApplePayMerchantCapability["SupportsCredit"]="supportsCredit";ApplePayMerchantCapability["SupportsDebit"]="supportsDebit";return ApplePayMerchantCapability;}({});var ApplePayShippingType=exports.ApplePayShippingType=function(ApplePayShippingType){ApplePayShippingType["Shipping"]="shipping";ApplePayShippingType["Delivery"]="delivery";ApplePayShippingType["StorePickup"]="storePickup";ApplePayShippingType["ServicePickup"]="servicePickup";return ApplePayShippingType;}({});var BillingAddressFormat=exports.BillingAddressFormat=function(BillingAddressFormat){BillingAddressFormat["Full"]="FULL";BillingAddressFormat["Min"]="MIN";return BillingAddressFormat;}({});var ButtonType=exports.ButtonType=function(ButtonType){ButtonType[ButtonType["Default"]=0]="Default";ButtonType[ButtonType["Buy"]=1]="Buy";ButtonType[ButtonType["Book"]=6]="Book";ButtonType[ButtonType["Checkout"]=5]="Checkout";ButtonType[ButtonType["Donate"]=4]="Donate";ButtonType[ButtonType["Order"]=11]="Order";ButtonType[ButtonType["Subscribe"]=7]="Subscribe";ButtonType[ButtonType["SetUp"]=2]="SetUp";ButtonType[ButtonType["InStore"]=3]="InStore";ButtonType[ButtonType["Reload"]=8]="Reload";ButtonType[ButtonType["AddMoney"]=9]="AddMoney";ButtonType[ButtonType["TopUp"]=10]="TopUp";ButtonType[ButtonType["Rent"]=12]="Rent";ButtonType[ButtonType["Support"]=13]="Support";ButtonType[ButtonType["Contribute"]=14]="Contribute";ButtonType[ButtonType["Tip"]=15]="Tip";ButtonType[ButtonType["Continue"]=16]="Continue";ButtonType[ButtonType["Pay"]=1000]="Pay";ButtonType[ButtonType["GooglePayMark"]=1001]="GooglePayMark";return ButtonType;}({});var ButtonStyle=exports.ButtonStyle=function(ButtonStyle){ButtonStyle[ButtonStyle["White"]=0]="White";ButtonStyle[ButtonStyle["WhiteOutline"]=1]="WhiteOutline";ButtonStyle[ButtonStyle["Black"]=2]="Black";ButtonStyle[ButtonStyle["Automatic"]=3]="Automatic";return ButtonStyle;}({});var PaymentType=exports.PaymentType=function(PaymentType){PaymentType["Deferred"]="Deferred";PaymentType["Immediate"]="Immediate";PaymentType["Recurring"]="Recurring";return PaymentType;}({});var IntervalUnit=exports.IntervalUnit=function(IntervalUnit){IntervalUnit["Minute"]="minute";IntervalUnit["Hour"]="hour";IntervalUnit["Day"]="day";IntervalUnit["Month"]="month";IntervalUnit["Year"]="year";return IntervalUnit;}({});
|
|
2
2
|
//# sourceMappingURL=PlatformPay.js.map
|