@stripe/stripe-react-native 0.22.1 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +1 -0
- package/android/src/main/java/com/reactnativestripesdk/GooglePayRequestHelper.kt +21 -9
- package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +2 -2
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +6 -4
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +67 -65
- package/android/src/main/res/layout/googlepay_mark_button.xml +0 -2
- package/ios/ApplePayViewController.swift +25 -15
- package/ios/Mappers.swift +11 -9
- package/ios/PaymentMethodFactory.swift +1 -1
- package/ios/StripeSdk.m +1 -0
- package/ios/StripeSdk.swift +8 -5
- package/ios/Tests/ApplePayUtilsTests.swift +0 -1
- package/jest/mock.js +6 -0
- package/lib/commonjs/NativeStripeSdk.js.map +1 -1
- package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
- package/lib/commonjs/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/hooks/useApplePay.js +1 -1
- package/lib/commonjs/hooks/useApplePay.js.map +1 -1
- package/lib/commonjs/hooks/usePlatformPay.js +1 -1
- package/lib/commonjs/hooks/usePlatformPay.js.map +1 -1
- package/lib/commonjs/hooks/useStripe.js +1 -1
- package/lib/commonjs/hooks/useStripe.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +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.map +1 -1
- package/lib/commonjs/types/PlatformPay.js.map +1 -1
- package/lib/commonjs/types/PushProvisioning.js.map +1 -1
- package/lib/commonjs/types/SetupIntent.js.map +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/NativeStripeSdk.js.map +1 -1
- package/lib/module/components/AddToWalletButton.js.map +1 -1
- package/lib/module/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/hooks/useApplePay.js +1 -1
- package/lib/module/hooks/useApplePay.js.map +1 -1
- package/lib/module/hooks/usePlatformPay.js +1 -1
- package/lib/module/hooks/usePlatformPay.js.map +1 -1
- package/lib/module/hooks/useStripe.js +1 -1
- package/lib/module/hooks/useStripe.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +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.map +1 -1
- package/lib/module/types/PlatformPay.js.map +1 -1
- package/lib/module/types/PushProvisioning.js.map +1 -1
- package/lib/module/types/SetupIntent.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 +1 -1
- package/lib/typescript/src/components/AddToWalletButton.d.ts +1 -1
- package/lib/typescript/src/functions.d.ts +8 -2
- package/lib/typescript/src/hooks/usePlatformPay.d.ts +6 -0
- package/lib/typescript/src/hooks/useStripe.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +22 -11
- package/lib/typescript/src/types/PaymentIntent.d.ts +2 -0
- package/lib/typescript/src/types/PaymentMethod.d.ts +1 -0
- package/lib/typescript/src/types/PaymentSheet.d.ts +1 -1
- package/lib/typescript/src/types/PlatformPay.d.ts +6 -1
- package/lib/typescript/src/types/PushProvisioning.d.ts +1 -1
- package/lib/typescript/src/types/SetupIntent.d.ts +2 -0
- package/lib/typescript/src/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/NativeStripeSdk.tsx +3 -2
- package/src/components/AddToWalletButton.tsx +1 -1
- package/src/functions.ts +35 -4
- package/src/hooks/useApplePay.tsx +1 -2
- package/src/hooks/usePlatformPay.tsx +19 -0
- package/src/hooks/useStripe.tsx +11 -0
- package/src/index.tsx +22 -36
- package/src/types/PaymentIntent.ts +2 -0
- package/src/types/PaymentMethod.ts +1 -0
- package/src/types/PaymentSheet.ts +1 -1
- package/src/types/PlatformPay.ts +9 -1
- package/src/types/PushProvisioning.ts +1 -1
- package/src/types/SetupIntent.ts +2 -0
- package/src/types/index.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStripe","useState","isApplePaySupported","setApplePaySupported","useEffect","checkApplePaySupport","isSupported","isiOS","NativeStripeSdk","_createPaymentMethod","useCallback","data","options","createPaymentMethod","_createToken","params","createToken","_retrievePaymentIntent","clientSecret","retrievePaymentIntent","_retrieveSetupIntent","retrieveSetupIntent","_confirmPayment","paymentIntentClientSecret","confirmPayment","_presentApplePay","presentApplePay","_updateApplePaySummaryItems","summaryItems","errorAddressFields","updateApplePaySummaryItems","_confirmApplePayPayment","confirmApplePayPayment","_handleNextAction","returnURL","handleNextAction","_confirmSetupIntent","confirmSetupIntent","_createTokenForCVCUpdate","cvc","createTokenForCVCUpdate","_initPaymentSheet","initPaymentSheet","_presentPaymentSheet","presentPaymentSheet","_confirmPaymentSheetPayment","confirmPaymentSheetPayment","_handleURLCallback","url","handleURLCallback","_isGooglePaySupported","isGooglePaySupported","_initGooglePay","initGooglePay","_presentGooglePay","presentGooglePay","_createGooglePayPaymentMethod","createGooglePayPaymentMethod","_openApplePaySetup","openApplePaySetup","_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","_updatePlatformPaySheet","updatePlatformPaySheet","_openPlatformPaySetup","openPlatformPaySetup"],"sources":["useStripe.tsx"],"sourcesContent":["import type {\n PaymentMethod,\n PaymentIntent,\n ApplePay,\n PaymentSheet,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n ApplePayResult,\n ApplePayError,\n StripeError,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n CreateTokenResult,\n PayWithGooglePayResult,\n GooglePayInitResult,\n GooglePay,\n CreateGooglePayPaymentMethodResult,\n OpenApplePaySetupResult,\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, useEffect, useState } from 'react';\nimport { isiOS } from '../helpers';\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport {\n confirmPayment,\n createPaymentMethod,\n retrievePaymentIntent,\n retrieveSetupIntent,\n confirmApplePayPayment,\n confirmSetupIntent,\n createTokenForCVCUpdate,\n handleNextAction,\n handleURLCallback,\n presentApplePay,\n updateApplePaySummaryItems,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\n createToken,\n isGooglePaySupported,\n initGooglePay,\n createGooglePayPaymentMethod,\n presentGooglePay,\n openApplePaySetup,\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 updatePlatformPaySheet,\n openPlatformPaySetup,\n} from '../functions';\n\n/**\n * useStripe hook\n */\nexport function useStripe() {\n const [isApplePaySupported, setApplePaySupported] = useState<boolean | null>(\n null\n );\n\n useEffect(() => {\n async function checkApplePaySupport() {\n const isSupported =\n isiOS && (await NativeStripeSdk.isApplePaySupported());\n setApplePaySupported(isSupported);\n }\n\n checkApplePaySupport();\n }, []);\n\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 _presentApplePay = useCallback(\n async (params: ApplePay.PresentParams): Promise<ApplePayResult> => {\n return presentApplePay(params);\n },\n []\n );\n\n const _updateApplePaySummaryItems = useCallback(\n async (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }> = []\n ): Promise<{ error?: StripeError<ApplePayError> }> => {\n return updateApplePaySummaryItems(summaryItems, errorAddressFields);\n },\n []\n );\n\n const _confirmApplePayPayment = useCallback(\n async (\n clientSecret: string\n ): Promise<{ error?: StripeError<ApplePayError> }> => {\n return confirmApplePayPayment(clientSecret);\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 _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 =\n useCallback(async (): Promise<PresentPaymentSheetResult> => {\n return presentPaymentSheet();\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 _isGooglePaySupported = useCallback(\n async (params?: GooglePay.IsSupportedParams): Promise<boolean> => {\n return isGooglePaySupported(params);\n },\n []\n );\n\n const _initGooglePay = useCallback(\n async (params: GooglePay.InitParams): Promise<GooglePayInitResult> => {\n return initGooglePay(params);\n },\n []\n );\n\n const _presentGooglePay = useCallback(\n async (\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult> => {\n return presentGooglePay(params);\n },\n []\n );\n\n const _createGooglePayPaymentMethod = useCallback(\n async (\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult> => {\n return createGooglePayPaymentMethod(params);\n },\n []\n );\n\n const _openApplePaySetup =\n useCallback(async (): Promise<OpenApplePaySetupResult> => {\n return openApplePaySetup();\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 (clientSecret: string): Promise<FinancialConnections.TokenResult> => {\n return collectBankAccountToken(clientSecret);\n },\n []\n );\n\n const _collectFinancialConnectionsAccounts = useCallback(\n async (\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult> => {\n return collectFinancialConnectionsAccounts(clientSecret);\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?: GooglePay.IsSupportedParams;\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 _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 isApplePaySupported: isApplePaySupported,\n presentApplePay: _presentApplePay,\n confirmApplePayPayment: _confirmApplePayPayment,\n confirmSetupIntent: _confirmSetupIntent,\n createTokenForCVCUpdate: _createTokenForCVCUpdate,\n updateApplePaySummaryItems: _updateApplePaySummaryItems,\n handleURLCallback: _handleURLCallback,\n confirmPaymentSheetPayment: _confirmPaymentSheetPayment,\n presentPaymentSheet: _presentPaymentSheet,\n initPaymentSheet: _initPaymentSheet,\n createToken: _createToken,\n isGooglePaySupported: _isGooglePaySupported,\n initGooglePay: _initGooglePay,\n presentGooglePay: _presentGooglePay,\n createGooglePayPaymentMethod: _createGooglePayPaymentMethod,\n openApplePaySetup: _openApplePaySetup,\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 updatePlatformPaySheet: _updatePlatformPaySheet,\n openPlatformPaySetup: _openPlatformPaySetup,\n };\n}\n"],"mappings":"sWAqCA,4BACA,mCACA,2EACA,uCAyCO,QAASA,UAAS,EAAG,CAC1B,cAAoD,GAAAC,eAAQ,EAC1D,IAAI,CACL,qDAFMC,mBAAmB,eAAEC,oBAAoB,eAIhD,GAAAC,gBAAS,EAAC,UAAM,SACCC,qBAAoB,6IAAnC,WAAsC,CACpC,GAAMC,YAAW,CACfC,cAAK,QAAWC,yBAAe,CAACN,mBAAmB,EAAE,CAAC,CACxDC,oBAAoB,CAACG,WAAW,CAAC,CACnC,CAAC,sDAEDD,oBAAoB,EAAE,CACxB,CAAC,CAAE,EAAE,CAAC,CAEN,GAAMI,qBAAoB,CAAG,GAAAC,kBAAW,qDACtC,UACEC,IAAgC,CAEO,IADvCC,QAAoC,2DAAG,CAAC,CAAC,CAEzC,MAAO,GAAAC,8BAAmB,EAACF,IAAI,CAAEC,OAAO,CAAC,CAC3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,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,oBAAoB,CAAED,qBACxB,CAAC,CACH"}
|
|
1
|
+
{"version":3,"names":["useStripe","useState","isApplePaySupported","setApplePaySupported","useEffect","checkApplePaySupport","isSupported","isiOS","NativeStripeSdk","_createPaymentMethod","useCallback","data","options","createPaymentMethod","_createToken","params","createToken","_retrievePaymentIntent","clientSecret","retrievePaymentIntent","_retrieveSetupIntent","retrieveSetupIntent","_confirmPayment","paymentIntentClientSecret","confirmPayment","_presentApplePay","presentApplePay","_updateApplePaySummaryItems","summaryItems","errorAddressFields","updateApplePaySummaryItems","_confirmApplePayPayment","confirmApplePayPayment","_handleNextAction","returnURL","handleNextAction","_confirmSetupIntent","confirmSetupIntent","_createTokenForCVCUpdate","cvc","createTokenForCVCUpdate","_initPaymentSheet","initPaymentSheet","_presentPaymentSheet","presentPaymentSheet","_confirmPaymentSheetPayment","confirmPaymentSheetPayment","_handleURLCallback","url","handleURLCallback","_isGooglePaySupported","isGooglePaySupported","_initGooglePay","initGooglePay","_presentGooglePay","presentGooglePay","_createGooglePayPaymentMethod","createGooglePayPaymentMethod","_openApplePaySetup","openApplePaySetup","_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 ApplePay,\n PaymentSheet,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n ApplePayResult,\n ApplePayError,\n StripeError,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n CreateTokenResult,\n PayWithGooglePayResult,\n GooglePayInitResult,\n GooglePay,\n CreateGooglePayPaymentMethodResult,\n OpenApplePaySetupResult,\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, useEffect, useState } from 'react';\nimport { isiOS } from '../helpers';\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport {\n confirmPayment,\n createPaymentMethod,\n retrievePaymentIntent,\n retrieveSetupIntent,\n confirmApplePayPayment,\n confirmSetupIntent,\n createTokenForCVCUpdate,\n handleNextAction,\n handleURLCallback,\n presentApplePay,\n updateApplePaySummaryItems,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\n createToken,\n isGooglePaySupported,\n initGooglePay,\n createGooglePayPaymentMethod,\n presentGooglePay,\n openApplePaySetup,\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';\n\n/**\n * useStripe hook\n */\nexport function useStripe() {\n const [isApplePaySupported, setApplePaySupported] = useState<boolean | null>(\n null\n );\n\n useEffect(() => {\n async function checkApplePaySupport() {\n const isSupported =\n isiOS && (await NativeStripeSdk.isApplePaySupported());\n setApplePaySupported(isSupported);\n }\n\n checkApplePaySupport();\n }, []);\n\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 _presentApplePay = useCallback(\n async (params: ApplePay.PresentParams): Promise<ApplePayResult> => {\n return presentApplePay(params);\n },\n []\n );\n\n const _updateApplePaySummaryItems = useCallback(\n async (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }> = []\n ): Promise<{ error?: StripeError<ApplePayError> }> => {\n return updateApplePaySummaryItems(summaryItems, errorAddressFields);\n },\n []\n );\n\n const _confirmApplePayPayment = useCallback(\n async (\n clientSecret: string\n ): Promise<{ error?: StripeError<ApplePayError> }> => {\n return confirmApplePayPayment(clientSecret);\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 _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 =\n useCallback(async (): Promise<PresentPaymentSheetResult> => {\n return presentPaymentSheet();\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 _isGooglePaySupported = useCallback(\n async (params?: GooglePay.IsSupportedParams): Promise<boolean> => {\n return isGooglePaySupported(params);\n },\n []\n );\n\n const _initGooglePay = useCallback(\n async (params: GooglePay.InitParams): Promise<GooglePayInitResult> => {\n return initGooglePay(params);\n },\n []\n );\n\n const _presentGooglePay = useCallback(\n async (\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult> => {\n return presentGooglePay(params);\n },\n []\n );\n\n const _createGooglePayPaymentMethod = useCallback(\n async (\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult> => {\n return createGooglePayPaymentMethod(params);\n },\n []\n );\n\n const _openApplePaySetup =\n useCallback(async (): Promise<OpenApplePaySetupResult> => {\n return openApplePaySetup();\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 (clientSecret: string): Promise<FinancialConnections.TokenResult> => {\n return collectBankAccountToken(clientSecret);\n },\n []\n );\n\n const _collectFinancialConnectionsAccounts = useCallback(\n async (\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult> => {\n return collectFinancialConnectionsAccounts(clientSecret);\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?: GooglePay.IsSupportedParams;\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 isApplePaySupported: isApplePaySupported,\n presentApplePay: _presentApplePay,\n confirmApplePayPayment: _confirmApplePayPayment,\n confirmSetupIntent: _confirmSetupIntent,\n createTokenForCVCUpdate: _createTokenForCVCUpdate,\n updateApplePaySummaryItems: _updateApplePaySummaryItems,\n handleURLCallback: _handleURLCallback,\n confirmPaymentSheetPayment: _confirmPaymentSheetPayment,\n presentPaymentSheet: _presentPaymentSheet,\n initPaymentSheet: _initPaymentSheet,\n createToken: _createToken,\n isGooglePaySupported: _isGooglePaySupported,\n initGooglePay: _initGooglePay,\n presentGooglePay: _presentGooglePay,\n createGooglePayPaymentMethod: _createGooglePayPaymentMethod,\n openApplePaySetup: _openApplePaySetup,\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":"sWAqCA,4BACA,mCACA,2EACA,uCA0CO,QAASA,UAAS,EAAG,CAC1B,cAAoD,GAAAC,eAAQ,EAC1D,IAAI,CACL,qDAFMC,mBAAmB,eAAEC,oBAAoB,eAIhD,GAAAC,gBAAS,EAAC,UAAM,SACCC,qBAAoB,6IAAnC,WAAsC,CACpC,GAAMC,YAAW,CACfC,cAAK,QAAWC,yBAAe,CAACN,mBAAmB,EAAE,CAAC,CACxDC,oBAAoB,CAACG,WAAW,CAAC,CACnC,CAAC,sDAEDD,oBAAoB,EAAE,CACxB,CAAC,CAAE,EAAE,CAAC,CAEN,GAAMI,qBAAoB,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ED,iBAAiB,CACnCG,4BAA4B,CAAED,6BAA6B,CAC3DG,iBAAiB,CAAED,kBAAkB,CACrCG,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"}
|
package/lib/module/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={useConfirmPayment:true,useConfirmSetupIntent:true,useStripe:true,usePlatformPay:true,useApplePay:true,
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={useConfirmPayment:true,useConfirmSetupIntent:true,useStripe:true,usePlatformPay:true,useApplePay:true,usePaymentSheet:true,useGooglePay:true,useFinancialConnectionsSheet:true,initStripe:true,StripeProvider:true,CardField:true,CardForm:true,ApplePayButton:true,AuBECSDebitForm:true,StripeContainer:true,GooglePayButton:true,AddToWalletButton:true,AddressSheet:true,PlatformPayButton:true};Object.defineProperty(exports,"AddToWalletButton",{enumerable:true,get:function get(){return _AddToWalletButton.AddToWalletButton;}});Object.defineProperty(exports,"AddressSheet",{enumerable:true,get:function get(){return _AddressSheet.AddressSheet;}});Object.defineProperty(exports,"ApplePayButton",{enumerable:true,get:function get(){return _ApplePayButton.ApplePayButton;}});Object.defineProperty(exports,"AuBECSDebitForm",{enumerable:true,get:function get(){return _AuBECSDebitForm.AuBECSDebitForm;}});Object.defineProperty(exports,"CardField",{enumerable:true,get:function get(){return _CardField.CardField;}});Object.defineProperty(exports,"CardForm",{enumerable:true,get:function get(){return _CardForm.CardForm;}});Object.defineProperty(exports,"GooglePayButton",{enumerable:true,get:function get(){return _GooglePayButton.GooglePayButton;}});Object.defineProperty(exports,"PlatformPayButton",{enumerable:true,get:function get(){return _PlatformPayButton.PlatformPayButton;}});Object.defineProperty(exports,"StripeContainer",{enumerable:true,get:function get(){return _StripeContainer.StripeContainer;}});Object.defineProperty(exports,"StripeProvider",{enumerable:true,get:function get(){return _StripeProvider.StripeProvider;}});Object.defineProperty(exports,"initStripe",{enumerable:true,get:function get(){return _StripeProvider.initStripe;}});Object.defineProperty(exports,"useApplePay",{enumerable:true,get:function get(){return _useApplePay.useApplePay;}});Object.defineProperty(exports,"useConfirmPayment",{enumerable:true,get:function get(){return _useConfirmPayment.useConfirmPayment;}});Object.defineProperty(exports,"useConfirmSetupIntent",{enumerable:true,get:function get(){return _useConfirmSetupIntent.useConfirmSetupIntent;}});Object.defineProperty(exports,"useFinancialConnectionsSheet",{enumerable:true,get:function get(){return _useFinancialConnectionsSheet.useFinancialConnectionsSheet;}});Object.defineProperty(exports,"useGooglePay",{enumerable:true,get:function get(){return _useGooglePay.useGooglePay;}});Object.defineProperty(exports,"usePaymentSheet",{enumerable:true,get:function get(){return _usePaymentSheet.usePaymentSheet;}});Object.defineProperty(exports,"usePlatformPay",{enumerable:true,get:function get(){return _usePlatformPay.usePlatformPay;}});Object.defineProperty(exports,"useStripe",{enumerable:true,get:function get(){return _useStripe.useStripe;}});var _useConfirmPayment=require("./hooks/useConfirmPayment");var _useConfirmSetupIntent=require("./hooks/useConfirmSetupIntent");var _useStripe=require("./hooks/useStripe");var _usePlatformPay=require("./hooks/usePlatformPay");var _useApplePay=require("./hooks/useApplePay");var _usePaymentSheet=require("./hooks/usePaymentSheet");var _useGooglePay=require("./hooks/useGooglePay");var _useFinancialConnectionsSheet=require("./hooks/useFinancialConnectionsSheet");var _StripeProvider=require("./components/StripeProvider");var _CardField=require("./components/CardField");var _CardForm=require("./components/CardForm");var _ApplePayButton=require("./components/ApplePayButton");var _AuBECSDebitForm=require("./components/AuBECSDebitForm");var _StripeContainer=require("./components/StripeContainer");var _GooglePayButton=require("./components/GooglePayButton");var _AddToWalletButton=require("./components/AddToWalletButton");var _AddressSheet=require("./components/AddressSheet");var _PlatformPayButton=require("./components/PlatformPayButton");var _functions=require("./functions");Object.keys(_functions).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_functions[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _functions[key];}});});var _index=require("./types/index");Object.keys(_index).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_index[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _index[key];}});});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["// hooks\nexport { useConfirmPayment } from './hooks/useConfirmPayment';\nexport { useConfirmSetupIntent } from './hooks/useConfirmSetupIntent';\nexport { useStripe } from './hooks/useStripe';\nexport { usePlatformPay } from './hooks/usePlatformPay';\nexport { useApplePay
|
|
1
|
+
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["// hooks\nexport { useConfirmPayment } from './hooks/useConfirmPayment';\nexport { useConfirmSetupIntent } from './hooks/useConfirmSetupIntent';\nexport { useStripe } from './hooks/useStripe';\nexport { usePlatformPay } from './hooks/usePlatformPay';\nexport { useApplePay } from './hooks/useApplePay';\nexport type { Props as UseApplePayProps } from './hooks/useApplePay';\nexport { usePaymentSheet } from './hooks/usePaymentSheet';\nexport { useGooglePay } from './hooks/useGooglePay';\nexport { useFinancialConnectionsSheet } from './hooks/useFinancialConnectionsSheet';\n\n//components\nexport { initStripe, StripeProvider } from './components/StripeProvider';\nexport type { Props as StripeProviderProps } from './components/StripeProvider';\nexport { CardField } from './components/CardField';\nexport type { Props as CardFieldProps } from './components/CardField';\nexport { CardForm } from './components/CardForm';\nexport type { Props as CardFormProps } from './components/CardForm';\nexport { ApplePayButton } from './components/ApplePayButton';\nexport type { Props as ApplePayButtonProps } from './components/ApplePayButton';\nexport { AuBECSDebitForm } from './components/AuBECSDebitForm';\nexport type { Props as AuBECSDebitFormProps } from './components/AuBECSDebitForm';\nexport { StripeContainer } from './components/StripeContainer';\nexport type { Props as StripeContainerProps } from './components/StripeContainer';\nexport { GooglePayButton } from './components/GooglePayButton';\nexport type { Props as GooglePayButtonProps } from './components/GooglePayButton';\nexport { AddToWalletButton } from './components/AddToWalletButton';\nexport type { Props as AddToWalletButtonProps } from './components/AddToWalletButton';\nexport { AddressSheet } from './components/AddressSheet';\nexport type { Props as AddressSheetProps } from './components/AddressSheet';\nexport { PlatformPayButton } from './components/PlatformPayButton';\nexport type { Props as PlatformPayButtonProps } from './components/PlatformPayButton';\n\nexport * from './functions';\n\nexport * from './types/index';\n"],"mappings":"+yFACA,4DACA,oEACA,4CACA,sDACA,gDAEA,wDACA,kDACA,kFAGA,2DAEA,iDAEA,+CAEA,2DAEA,6DAEA,6DAEA,6DAEA,iEAEA,uDAEA,iEAGA,gWAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Status"],"sources":["PaymentIntent.ts"],"sourcesContent":["import type { StripeError } from '.';\nimport type { Address } from './Common';\nimport type { Result as PaymentMethodResult } from './PaymentMethod';\nimport type { NextAction } from './NextAction';\nimport type * as PaymentMethod from './PaymentMethod';\n\nexport interface Result {\n id: string;\n amount: number;\n /** The UNIX timestamp (in milliseconds) of the date this PaymentIntent was created. */\n created: string;\n currency: string;\n status: Status;\n description: string | null;\n receiptEmail: string | null;\n canceledAt: string | null;\n clientSecret: string;\n livemode: boolean;\n paymentMethodId: string;\n captureMethod: 'Automatic' | 'Manual';\n confirmationMethod: 'Automatic' | 'Manual';\n lastPaymentError: LastPaymentError | null;\n shipping: ShippingDetails | null;\n nextAction: NextAction | null;\n}\n\nexport type ConfirmParams = PaymentMethod.CreateParams;\n\nexport type ConfirmOptions = PaymentMethod.ConfirmOptions;\n\nexport type LastPaymentError = StripeError<string> & {\n paymentMethod: PaymentMethodResult;\n};\n\nexport type FutureUsage = 'OffSession' | 'OnSession';\n\nexport interface ShippingDetails {\n address: Required<Address>;\n name: string;\n carrier: string;\n phone: string;\n trackingNumber: string;\n}\n\nexport enum Status {\n Succeeded = 'Succeeded',\n RequiresPaymentMethod = 'RequiresPaymentMethod',\n RequiresConfirmation = 'RequiresConfirmation',\n Canceled = 'Canceled',\n Processing = 'Processing',\n RequiresAction = 'RequiresAction',\n RequiresCapture = 'RequiresCapture',\n Unknown = 'Unknown',\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["Status"],"sources":["PaymentIntent.ts"],"sourcesContent":["import type { StripeError } from '.';\nimport type { Address } from './Common';\nimport type { Result as PaymentMethodResult } from './PaymentMethod';\nimport type { NextAction } from './NextAction';\nimport type * as PaymentMethod from './PaymentMethod';\n\nexport interface Result {\n id: string;\n amount: number;\n /** The UNIX timestamp (in milliseconds) of the date this PaymentIntent was created. */\n created: string;\n currency: string;\n status: Status;\n description: string | null;\n receiptEmail: string | null;\n canceledAt: string | null;\n clientSecret: string;\n livemode: boolean;\n /** @deprecated Use paymentMethod.id instead. */\n paymentMethodId: string;\n paymentMethod: PaymentMethodResult | null;\n captureMethod: 'Automatic' | 'Manual';\n confirmationMethod: 'Automatic' | 'Manual';\n lastPaymentError: LastPaymentError | null;\n shipping: ShippingDetails | null;\n nextAction: NextAction | null;\n}\n\nexport type ConfirmParams = PaymentMethod.CreateParams;\n\nexport type ConfirmOptions = PaymentMethod.ConfirmOptions;\n\nexport type LastPaymentError = StripeError<string> & {\n paymentMethod: PaymentMethodResult;\n};\n\nexport type FutureUsage = 'OffSession' | 'OnSession';\n\nexport interface ShippingDetails {\n address: Required<Address>;\n name: string;\n carrier: string;\n phone: string;\n trackingNumber: string;\n}\n\nexport enum Status {\n Succeeded = 'Succeeded',\n RequiresPaymentMethod = 'RequiresPaymentMethod',\n RequiresConfirmation = 'RequiresConfirmation',\n Canceled = 'Canceled',\n Processing = 'Processing',\n RequiresAction = 'RequiresAction',\n RequiresCapture = 'RequiresCapture',\n Unknown = 'Unknown',\n}\n"],"mappings":"kFA8CYA,OAAM,iCAANA,MAAM,EAANA,MAAM,0BAANA,MAAM,kDAANA,MAAM,gDAANA,MAAM,wBAANA,MAAM,4BAANA,MAAM,oCAANA,MAAM,sCAANA,MAAM,yBAANA,MAAM,kBAANA,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["PaymentMethod.ts"],"sourcesContent":["import type { FormDetails } from './components/AuBECSDebitFormComponent';\nimport type {\n CardBrand,\n BankAcccountHolderType,\n BankAcccountType,\n} from './Token';\nimport type { FutureUsage } from './PaymentIntent';\nimport type { Address, BillingDetails } from './Common';\n\nexport interface Result {\n id: string;\n liveMode: boolean;\n customerId: string;\n billingDetails: BillingDetails;\n paymentMethodType: Type;\n AuBecsDebit: AuBecsDebitResult;\n BacsDebit: BacsDebitResult;\n Card: CardResult;\n Fpx: FpxResult;\n Ideal: IdealResult;\n SepaDebit: SepaDebitResult;\n Sofort: SofortResult;\n Upi: UpiResult;\n USBankAccount: USBankAccountResult;\n}\n\nexport type CreateParams =\n | CardParams\n | IdealParams\n | OxxoParams\n | P24Params\n | AlipayParams\n | GiropayParams\n | SepaParams\n | EpsParams\n | AuBecsDebitParams\n | SofortParams\n | GrabPayParams\n | FPXParams\n | AfterpayClearpayParams\n | KlarnaParams\n // | WeChatPayParams\n | BancontactParams\n | USBankAccountParams\n | PayPalParams\n | AffirmParams;\n\nexport type ConfirmParams = CreateParams;\n\nexport type CreateOptions = {\n setupFutureUsage?: FutureUsage;\n};\n\nexport type ConfirmOptions = CreateOptions;\n\nexport type ShippingDetails = BillingDetails;\n\nexport type CardParams =\n | {\n paymentMethodType: 'Card';\n paymentMethodData?: {\n token?: string;\n billingDetails?: BillingDetails;\n };\n }\n | {\n paymentMethodType: 'Card';\n paymentMethodData: {\n paymentMethodId: string;\n cvc?: string;\n billingDetails?: BillingDetails;\n };\n };\n\nexport interface IdealParams {\n paymentMethodType: 'Ideal';\n paymentMethodData?: {\n bankName?: string;\n billingDetails?: BillingDetails;\n };\n}\n\nexport interface FPXParams {\n paymentMethodType: 'Fpx';\n paymentMethodData?: { testOfflineBank?: boolean };\n}\n\nexport interface AlipayParams {\n paymentMethodType: 'Alipay';\n}\n\nexport interface OxxoParams {\n paymentMethodType: 'Oxxo';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface SofortParams {\n paymentMethodType: 'Sofort';\n paymentMethodData: {\n country: string;\n billingDetails: BillingDetails;\n };\n}\nexport interface GrabPayParams {\n paymentMethodType: 'GrabPay';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n };\n}\n\nexport interface BancontactParams {\n paymentMethodType: 'Bancontact';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface SepaParams {\n paymentMethodType: 'SepaDebit';\n paymentMethodData: {\n iban: string;\n billingDetails: BillingDetails;\n };\n}\n\nexport interface GiropayParams {\n paymentMethodType: 'Giropay';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface AfterpayClearpayParams {\n paymentMethodType: 'AfterpayClearpay';\n paymentMethodData: {\n shippingDetails: ShippingDetails;\n billingDetails: BillingDetails;\n };\n}\n\nexport type KlarnaParams = {\n paymentMethodType: 'Klarna';\n paymentMethodData: {\n billingDetails: Pick<Required<BillingDetails>, 'email'> & {\n address: Pick<Required<Address>, 'country'>;\n } & BillingDetails;\n };\n};\n\nexport interface EpsParams {\n paymentMethodType: 'Eps';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface P24Params {\n paymentMethodType: 'P24';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface WeChatPayParams {\n paymentMethodType: 'WeChatPay';\n paymentMethodData: {\n appId: string;\n billingDetails?: BillingDetails;\n };\n}\n\nexport interface AuBecsDebitParams {\n paymentMethodType: 'AuBecsDebit';\n paymentMethodData: { formDetails: FormDetails };\n}\n\nexport type AffirmParams = {\n paymentMethodType: 'Affirm';\n paymentMethodData?: {\n /** Affirm requires that shipping is present for the payment to succeed because it significantly helps with loan approval rates. Shipping details can either be provided here or via the Payment Intent- https://stripe.com/docs/api/payment_intents/create#create_payment_intent-shipping. */\n shippingDetails?: ShippingDetails;\n billingDetails?: BillingDetails;\n };\n};\n\n/**\n * If paymentMethodData is null, it is assumed that the bank account details have already been attached\n * via `collectBankAccountForPayment` or `collectBankAccountForSetup`.\n */\nexport type USBankAccountParams = {\n paymentMethodType: 'USBankAccount';\n paymentMethodData?: {\n billingDetails: Pick<Required<BillingDetails>, 'name'> & BillingDetails;\n accountNumber: string;\n routingNumber: string;\n /** Defaults to Individual */\n accountHolderType?: BankAcccountHolderType;\n /** Defaults to Checking */\n accountType?: BankAcccountType;\n };\n};\n\nexport type PayPalParams = {\n paymentMethodType: 'PayPal';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n };\n};\n\nexport interface AuBecsDebitResult {\n fingerprint?: string;\n last4?: string;\n bsbNumber?: string;\n}\n\nexport interface BacsDebitResult {\n sortCode?: string;\n last4?: string;\n fingerprint?: string;\n}\n\nexport interface CardResult {\n brand?: CardBrand;\n country?: string;\n expYear?: number;\n expMonth?: number;\n fingerprint?: string;\n funding?: string;\n last4?: string;\n preferredNetwork?: string;\n availableNetworks?: Array<string>;\n}\n\nexport interface FpxResult {\n bank?: string;\n}\n\nexport interface IdealResult {\n bankIdentifierCode?: string;\n bank?: string;\n}\n\nexport interface SepaDebitResult {\n bankCode?: string;\n country?: string;\n fingerprint?: string;\n last4?: string;\n}\n\nexport interface SofortResult {\n country?: string;\n}\n\nexport interface UpiResult {\n vpa?: string;\n}\n\nexport type USBankAccountResult = {\n routingNumber?: string;\n accountHolderType?: BankAcccountHolderType;\n accountType?: BankAcccountType;\n last4?: string;\n bankName?: string;\n linkedAccount?: string;\n fingerprint?: string;\n preferredNetwork?: string;\n supportedNetworks?: string[];\n};\n\nexport type Type =\n | 'AfterpayClearpay'\n | 'Card'\n | 'Alipay'\n | 'GrabPay'\n | 'Ideal'\n | 'Fpx'\n | 'CardPresent'\n | 'SepaDebit'\n | 'AuBecsDebit'\n | 'BacsDebit'\n | 'Giropay'\n | 'P24'\n | 'Eps'\n | 'Bancontact'\n | 'Oxxo'\n | 'Sofort'\n | 'Upi'\n | 'USBankAccount'\n | 'PayPal'\n | 'Unknown';\n\nexport type CollectBankAccountParams = {\n paymentMethodType: 'USBankAccount';\n paymentMethodData: {\n billingDetails: {\n name: string;\n email?: string;\n };\n };\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["PaymentMethod.ts"],"sourcesContent":["import type { FormDetails } from './components/AuBECSDebitFormComponent';\nimport type {\n CardBrand,\n BankAcccountHolderType,\n BankAcccountType,\n} from './Token';\nimport type { FutureUsage } from './PaymentIntent';\nimport type { Address, BillingDetails } from './Common';\n\nexport interface Result {\n id: string;\n liveMode: boolean;\n customerId: string;\n billingDetails: BillingDetails;\n paymentMethodType: Type;\n AuBecsDebit: AuBecsDebitResult;\n BacsDebit: BacsDebitResult;\n Card: CardResult;\n Fpx: FpxResult;\n Ideal: IdealResult;\n SepaDebit: SepaDebitResult;\n Sofort: SofortResult;\n Upi: UpiResult;\n USBankAccount: USBankAccountResult;\n}\n\nexport type CreateParams =\n | CardParams\n | IdealParams\n | OxxoParams\n | P24Params\n | AlipayParams\n | GiropayParams\n | SepaParams\n | EpsParams\n | AuBecsDebitParams\n | SofortParams\n | GrabPayParams\n | FPXParams\n | AfterpayClearpayParams\n | KlarnaParams\n // | WeChatPayParams\n | BancontactParams\n | USBankAccountParams\n | PayPalParams\n | AffirmParams;\n\nexport type ConfirmParams = CreateParams;\n\nexport type CreateOptions = {\n setupFutureUsage?: FutureUsage;\n};\n\nexport type ConfirmOptions = CreateOptions;\n\nexport type ShippingDetails = BillingDetails;\n\nexport type CardParams =\n | {\n paymentMethodType: 'Card';\n paymentMethodData?: {\n token?: string;\n billingDetails?: BillingDetails;\n };\n }\n | {\n paymentMethodType: 'Card';\n paymentMethodData: {\n paymentMethodId: string;\n cvc?: string;\n billingDetails?: BillingDetails;\n };\n };\n\nexport interface IdealParams {\n paymentMethodType: 'Ideal';\n paymentMethodData?: {\n bankName?: string;\n billingDetails?: BillingDetails;\n };\n}\n\nexport interface FPXParams {\n paymentMethodType: 'Fpx';\n paymentMethodData?: { testOfflineBank?: boolean };\n}\n\nexport interface AlipayParams {\n paymentMethodType: 'Alipay';\n}\n\nexport interface OxxoParams {\n paymentMethodType: 'Oxxo';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface SofortParams {\n paymentMethodType: 'Sofort';\n paymentMethodData: {\n country: string;\n billingDetails: BillingDetails;\n };\n}\nexport interface GrabPayParams {\n paymentMethodType: 'GrabPay';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n };\n}\n\nexport interface BancontactParams {\n paymentMethodType: 'Bancontact';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface SepaParams {\n paymentMethodType: 'SepaDebit';\n paymentMethodData: {\n iban: string;\n billingDetails: BillingDetails;\n };\n}\n\nexport interface GiropayParams {\n paymentMethodType: 'Giropay';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface AfterpayClearpayParams {\n paymentMethodType: 'AfterpayClearpay';\n paymentMethodData: {\n shippingDetails: ShippingDetails;\n billingDetails: BillingDetails;\n };\n}\n\nexport type KlarnaParams = {\n paymentMethodType: 'Klarna';\n paymentMethodData: {\n billingDetails: Pick<Required<BillingDetails>, 'email'> & {\n address: Pick<Required<Address>, 'country'>;\n } & BillingDetails;\n shippingDetails?: ShippingDetails;\n };\n};\n\nexport interface EpsParams {\n paymentMethodType: 'Eps';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface P24Params {\n paymentMethodType: 'P24';\n paymentMethodData: {\n billingDetails: BillingDetails;\n };\n}\n\nexport interface WeChatPayParams {\n paymentMethodType: 'WeChatPay';\n paymentMethodData: {\n appId: string;\n billingDetails?: BillingDetails;\n };\n}\n\nexport interface AuBecsDebitParams {\n paymentMethodType: 'AuBecsDebit';\n paymentMethodData: { formDetails: FormDetails };\n}\n\nexport type AffirmParams = {\n paymentMethodType: 'Affirm';\n paymentMethodData?: {\n /** Affirm requires that shipping is present for the payment to succeed because it significantly helps with loan approval rates. Shipping details can either be provided here or via the Payment Intent- https://stripe.com/docs/api/payment_intents/create#create_payment_intent-shipping. */\n shippingDetails?: ShippingDetails;\n billingDetails?: BillingDetails;\n };\n};\n\n/**\n * If paymentMethodData is null, it is assumed that the bank account details have already been attached\n * via `collectBankAccountForPayment` or `collectBankAccountForSetup`.\n */\nexport type USBankAccountParams = {\n paymentMethodType: 'USBankAccount';\n paymentMethodData?: {\n billingDetails: Pick<Required<BillingDetails>, 'name'> & BillingDetails;\n accountNumber: string;\n routingNumber: string;\n /** Defaults to Individual */\n accountHolderType?: BankAcccountHolderType;\n /** Defaults to Checking */\n accountType?: BankAcccountType;\n };\n};\n\nexport type PayPalParams = {\n paymentMethodType: 'PayPal';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n };\n};\n\nexport interface AuBecsDebitResult {\n fingerprint?: string;\n last4?: string;\n bsbNumber?: string;\n}\n\nexport interface BacsDebitResult {\n sortCode?: string;\n last4?: string;\n fingerprint?: string;\n}\n\nexport interface CardResult {\n brand?: CardBrand;\n country?: string;\n expYear?: number;\n expMonth?: number;\n fingerprint?: string;\n funding?: string;\n last4?: string;\n preferredNetwork?: string;\n availableNetworks?: Array<string>;\n}\n\nexport interface FpxResult {\n bank?: string;\n}\n\nexport interface IdealResult {\n bankIdentifierCode?: string;\n bank?: string;\n}\n\nexport interface SepaDebitResult {\n bankCode?: string;\n country?: string;\n fingerprint?: string;\n last4?: string;\n}\n\nexport interface SofortResult {\n country?: string;\n}\n\nexport interface UpiResult {\n vpa?: string;\n}\n\nexport type USBankAccountResult = {\n routingNumber?: string;\n accountHolderType?: BankAcccountHolderType;\n accountType?: BankAcccountType;\n last4?: string;\n bankName?: string;\n linkedAccount?: string;\n fingerprint?: string;\n preferredNetwork?: string;\n supportedNetworks?: string[];\n};\n\nexport type Type =\n | 'AfterpayClearpay'\n | 'Card'\n | 'Alipay'\n | 'GrabPay'\n | 'Ideal'\n | 'Fpx'\n | 'CardPresent'\n | 'SepaDebit'\n | 'AuBecsDebit'\n | 'BacsDebit'\n | 'Giropay'\n | 'P24'\n | 'Eps'\n | 'Bancontact'\n | 'Oxxo'\n | 'Sofort'\n | 'Upi'\n | 'USBankAccount'\n | 'PayPal'\n | 'Unknown';\n\nexport type CollectBankAccountParams = {\n paymentMethodType: 'USBankAccount';\n paymentMethodData: {\n billingDetails: {\n name: string;\n email?: string;\n };\n };\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["PaymentSheet.ts"],"sourcesContent":["import type { BillingDetails, AddressDetails } from './Common';\nimport type { CartSummaryItem } from './ApplePay';\n\nexport type SetupParams = ClientSecretParams & {\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 /** A short-lived token that allows the SDK to access a Customer’s payment methods. */\n customerEphemeralKeySecret?: 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 /** PaymentSheet pre-populates the billing fields 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};\n\nexport type ClientSecretParams =\n | {\n paymentIntentClientSecret: string;\n setupIntentClientSecret?: undefined;\n }\n | {\n setupIntentClientSecret: string;\n paymentIntentClientSecret?: undefined;\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 paymentSummaryItems?: CartSummaryItem[];\n // TODO: Uncomment when https://github.com/stripe/stripe-react-native/pull/1164 lands\n // buttonType: ButtonType\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};\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"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["PaymentSheet.ts"],"sourcesContent":["import type { BillingDetails, AddressDetails } from './Common';\nimport type { CartSummaryItem } from './ApplePay';\n\nexport type SetupParams = ClientSecretParams & {\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 /** A short-lived token that allows the SDK to access a Customer’s payment methods. */\n customerEphemeralKeySecret?: 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 /** 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};\n\nexport type ClientSecretParams =\n | {\n paymentIntentClientSecret: string;\n setupIntentClientSecret?: undefined;\n }\n | {\n setupIntentClientSecret: string;\n paymentIntentClientSecret?: undefined;\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 paymentSummaryItems?: CartSummaryItem[];\n // TODO: Uncomment when https://github.com/stripe/stripe-react-native/pull/1164 lands\n // buttonType: ButtonType\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};\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"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ApplePaySheetErrorType","ContactField","InvalidShippingField","ApplePayMerchantCapability","ApplePayShippingType","BillingAddressFormat","ButtonType","ButtonStyle","PaymentType","IntervalUnit"],"sources":["PlatformPay.ts"],"sourcesContent":["import type { Result as Token } from './Token';\nimport type { Result as PaymentMethod } from './PaymentMethod';\nimport type { Result as PaymentIntent } from './PaymentIntent';\nimport type { Result as SetupIntent } from './SetupIntent';\nimport type { StripeError, PlatformPayError } from './Errors';\nimport type { ShippingContact as ApplePayShippingContact } from './ApplePay';\nimport type { IsSupportedParams } from './GooglePay';\n\nexport type ApplePaySheetError =\n | {\n errorType: ApplePaySheetErrorType.InvalidShippingAddress;\n field: InvalidShippingField;\n message?: string;\n }\n | {\n errorType:\n | ApplePaySheetErrorType.UnserviceableShippingAddress\n | ApplePaySheetErrorType.InvalidCouponCode\n | ApplePaySheetErrorType.ExpiredCouponCode;\n message?: string;\n };\n\nexport enum ApplePaySheetErrorType {\n InvalidShippingAddress = 'InvalidShippingAddress',\n UnserviceableShippingAddress = 'UnserviceableShippingAddress',\n InvalidCouponCode = 'InvalidCouponCode',\n ExpiredCouponCode = 'ExpiredCouponCode',\n}\n\nexport enum ContactField {\n EmailAddress = 'emailAddress',\n Name = 'name',\n PhoneNumber = 'phoneNumber',\n PhoneticName = 'phoneticName',\n PostalAddress = 'postalAddress',\n}\n\nexport enum InvalidShippingField {\n Street = 'street',\n City = 'city',\n SubAdministrativeArea = 'subAdministrativeArea',\n State = 'state',\n PostalCode = 'postalCode',\n Country = 'country',\n CountryCode = 'countryCode',\n SubLocality = 'subLocality',\n}\n\nexport type ApplePayBaseParams = {\n /** ISO 3166-1 alpha-2 country code where the transaction is processed. */\n merchantCountryCode: string;\n /** ISO 4217 alphabetic currency code. */\n currencyCode: string;\n /** The SDK accepts Amex, Mastercard, Visa, and Discover for Apple Pay by default. Set this property to enable other card networks, for example: [\"JCB\", \"barcode\", \"chinaUnionPay\"]. A full list of possible networks can be found at https://developer.apple.com/documentation/passkit/pkpaymentnetwork. */\n additionalEnabledNetworks?: Array<string>;\n /** The list of items that describe a purchase. For example: total, tax, discount, and grand total. */\n cartItems: Array<CartSummaryItem>;\n /** The list of fields that you need for a shipping contact in order to process the transaction. If provided, you must implement the PlatformPayButton component's `onShippingContactSelected` callback and call `updatePlatformPaySheet` from there.*/\n requiredShippingAddressFields?: Array<ContactField>;\n /** The list of fields that you need for a billing contact in order to process the transaction. */\n requiredBillingContactFields?: Array<ContactField>;\n /** An array of shipping method objects that describe the supported shipping methods. If provided, you must implement the PlatformPayButton component's `onShippingMethodSelected` callback and call `updatePlatformPaySheet` from there. */\n shippingMethods?: Array<ShippingMethod>;\n /** Set the payment capabilities you support. If set, 3DS is required. */\n merchantCapabilities?: Array<ApplePayMerchantCapability>;\n /** An optional value that indicates how to ship purchased items. Defaults to 'Shipping'.*/\n shippingType?: ApplePayShippingType;\n /** A list of two-letter ISO 3166 country codes for limiting payment to cards from specific countries or regions. */\n supportedCountries?: Array<string>;\n};\n\nexport type ApplePayPaymentMethodParams = {\n /** Set this value to true to display the coupon code field, or pass the 'couponCode' field to autofill with a coupon code. Defaults to false. If true, you must implement the PlatformPayButton component's `onCouponCodeEntered` callback and call `updatePlatformPaySheet` from there. */\n supportsCouponCode?: boolean;\n /** Set this value to autofill with a coupon code. If provided, you must implement the PlatformPayButton component's `onCouponCodeEntered` callback and call `updatePlatformPaySheet` from there. */\n couponCode?: string;\n};\n\nexport enum ApplePayMerchantCapability {\n /** Required. This value must be supplied. */\n Supports3DS = 'supports3DS',\n /** Optional. If present, only transactions that are categorized as credit cards are allowed. */\n SupportsCredit = 'supportsCredit',\n /** Optional. If present, only transactions that are categorized as debit cards are allowed. */\n SupportsDebit = 'supportsDebit',\n}\n\n/** A type that indicates how to ship purchased items. */\nexport enum ApplePayShippingType {\n /** Default. */\n Shipping = 'shipping',\n Delivery = 'delivery',\n StorePickup = 'storePickup',\n ServicePickup = 'servicePickup',\n}\n\nexport type GooglePayBaseParams = {\n /**\n * Set to true to run in a test environment with relaxed application / merchant requirements. This environment is suggested for early development and for easily testing SDK.\n - Does not require the application to be uploaded to the Google Play Store.\n - Does not require a Google Pay Developer Profile.\n - It uses production data, but at the end of the transaction you will receive a fake and non chargeable payment credential.\n - The user will see a warning message that the app is not recognized/verified.\n */\n testEnv: boolean;\n /** ISO 3166-1 alpha-2 country code where the transaction is processed. */\n merchantCountryCode: string;\n /** ISO 4217 alphabetic currency code. */\n currencyCode: string;\n /** Your merchant name, displayed in the Google Pay sheet. */\n merchantName?: string;\n /** Set to true to request an email address. Defaults to false. */\n isEmailRequired?: boolean;\n /** Set to false if you don't support credit cards. Defaults to true. */\n allowCreditCards?: boolean;\n /** If true, Google Pay is considered \"available\" if the customer's Google Pay wallet has an existing payment method. Defaults to false. */\n existingPaymentMethodRequired?: boolean;\n /** Describes the configuration for billing address collection in the Google Pay sheet. */\n billingAddressConfig?: {\n /** Set to true if billing address is required for payment. Defaults to false. */\n isRequired?: boolean;\n /** Set to true if phone number is required for payment. Defaults to false. */\n isPhoneNumberRequired?: boolean;\n /** Defines what address fields to collect. Defaults to BillingAddressFormat.Min */\n format?: BillingAddressFormat;\n };\n};\n\nexport type GooglePayPaymentMethodParams = {\n /** Total monetary value of the transaction. */\n amount: number;\n /** Describes the configuration for shipping address collection in the Google Pay sheet. */\n shippingAddressConfig?: {\n /** Set to true if shipping address is required for payment. Defaults to false. */\n isRequired?: boolean;\n /** Set to true if phone number is required for payment. Defaults to false. */\n isPhoneNumberRequired?: boolean;\n /** Set of ISO 3166-1 alpha-2 country code values of the countries where shipping is allowed. Defaults to all shipping address countries. */\n allowedCountryCodes?: Array<string>;\n };\n};\n\nexport enum BillingAddressFormat {\n /** Collect name, street address, locality, region, country code, and postal code. */\n Full = 'FULL',\n /** Collect name, country code, and postal code (default). */\n Min = 'MIN',\n}\n\nexport type PaymentMethodParams = {\n /** Defines Google Pay behavior. Android only. */\n googlePay?: GooglePayBaseParams & GooglePayPaymentMethodParams;\n /** Defines Apple Pay behavior. iOS only. */\n applePay?: ApplePayBaseParams & ApplePayPaymentMethodParams;\n};\n\nexport type ConfirmParams = {\n /** Defines Google Pay behavior. Android only. */\n googlePay?: GooglePayBaseParams;\n /** Defines Apple Pay behavior. iOS only. */\n applePay?: ApplePayBaseParams;\n};\n\nexport enum ButtonType {\n /** A button with the Apple Pay or Google Pay logo only, useful when an additional call to action isn't needed. */\n Default = 0,\n /** A button useful for product purchases. */\n Buy = 1,\n /** A button useful for booking trips, flights, or other experiences. */\n Book = 6,\n /** A button useful for purchase experiences that include other payment buttons that start with “Check out”. */\n Checkout = 5,\n /** A button used by approved nonprofit organization that lets people make donations. */\n Donate = 4,\n /** A button useful for placing orders for such as like meals or flowers. */\n Order = 11,\n /** A button useful for purchasing a subscription such as a gym membership or meal-kit delivery service. */\n Subscribe = 7,\n /** iOS only. A button useful for prompting the user to set up a card. */\n SetUp = 2,\n /** iOS only. A button useful for paying bills or invoices. */\n InStore = 3,\n /** iOS only. A button useful for adding money to a card, account, or payment system.*/\n Reload = 8,\n /** iOS only. A button useful for adding money to a card, account, or payment system. */\n AddMoney = 9,\n /** iOS only. A button useful for adding money to a card, account, or payment system. */\n TopUp = 10,\n /** iOS only. A button useful for renting items such as cars or scooters. */\n Rent = 12,\n /** iOS only. A button useful supporting people give money to projects, causes, organizations, and other entities.*/\n Support = 13,\n /** iOS only. A button useful to help people contribute money to projects, causes, organizations, and other entities. */\n Contribute = 14,\n /** iOS only. A button useful useful for letting people tip for goods or services. */\n Tip = 15,\n /** iOS only. A button useful for general purchases. */\n Continue = 16,\n /** Android only. A button useful for general payments. */\n Pay = 1000,\n /** Android only. A plain white button with the Google Pay logo. Use when you show Google Pay as a payment option in your payment flows. */\n GooglePayMark = 1001,\n}\n\n/** iOS only. */\nexport enum ButtonStyle {\n /** A white button with black lettering. */\n White = 0,\n /** A white button with black lettering and a black outline. */\n WhiteOutline = 1,\n /** A black button with white lettering. */\n Black = 2,\n /** Default. A button that automatically changes its appearance when the user switches between Light Mode and Dark Mode. */\n Automatic = 3,\n}\n\n/** iOS only. */\nexport type CartSummaryItem =\n | DeferredCartSummaryItem\n | ImmediateCartSummaryItem\n | RecurringCartSummaryItem;\n\n/** iOS only. */\nexport enum PaymentType {\n Deferred = 'Deferred',\n Immediate = 'Immediate',\n Recurring = 'Recurring',\n}\n\n/** iOS only. Use this type for a payment that occurs in the future, such as a pre-order. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem. */\nexport type DeferredCartSummaryItem = {\n paymentType: PaymentType.Deferred;\n /** The unix timestamp of the date, in the future, of the payment. Measured in seconds. */\n deferredDate: number;\n label: string;\n amount: string;\n};\n\n/** iOS only. Use this type for payments that will occur immediately. */\nexport type ImmediateCartSummaryItem = {\n paymentType: PaymentType.Immediate;\n /** When creating items for estimates or charges whose final value is not yet known, set this to true. */\n isPending?: boolean;\n label: string;\n amount: string;\n};\n\n/** iOS only. Use this type for payments that occur more than once, such as a subscription. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem.*/\nexport type RecurringCartSummaryItem = {\n paymentType: PaymentType.Recurring;\n /** The amount of time – in calendar units such as Day, Month, or Year – that represents a fraction of the total payment interval. For example, if you set the intervalUnit to 'Month' and intervalCount to 3, then the payment interval is three months.*/\n intervalUnit: IntervalUnit;\n /** The number of interval units that make up the total payment interval. For example, if you set the intervalUnit to 'Month' and intervalCount to 3, then the payment interval is three months.*/\n intervalCount: number;\n /** The unix timestamp of the start date. Measured in seconds. */\n startDate?: number;\n /** The unix timestamp of the end date. Measured in seconds. */\n endDate?: number;\n label: string;\n amount: string;\n};\n\n/** iOS only. */\nexport enum IntervalUnit {\n Minute = 'minute',\n Hour = 'hour',\n Day = 'day',\n Month = 'month',\n Year = 'year',\n}\n\n/** iOS only. */\nexport type ShippingMethod = {\n /** A short, localized description. */\n label: string;\n /** The cost associated with this shipping option. */\n amount: string;\n /** When creating items for estimates or charges whose final value is not yet known, set this to true. */\n isPending?: boolean;\n /** A unique identifier for the shipping method. */\n identifier: string;\n /** A user-readable description of the shipping method. For example “Ships in 24 hours.” Don't repeat the content of the 'label' property. */\n detail?: string;\n /** The unix timestamp of the start date of the expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup. Measured in seconds. */\n startDate?: number;\n /** The unix timestamp of the end date of the expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup. Measured in seconds. */\n endDate?: number;\n};\n\n/** iOS only. */\nexport type ShippingContact = ApplePayShippingContact;\n\n/** Android only. */\nexport type IsGooglePaySupportedParams = IsSupportedParams;\n\nexport type PaymentMethodResult =\n | {\n paymentMethod: PaymentMethod;\n token: Token;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n token?: undefined;\n error: StripeError<PlatformPayError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent;\n error?: StripeError<PlatformPayError>;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<PlatformPayError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent;\n error?: StripeError<PlatformPayError>;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<PlatformPayError>;\n };\n"],"mappings":"iUAsBYA,uBAAsB,iEAAtBA,sBAAsB,EAAtBA,sBAAsB,oDAAtBA,sBAAsB,gEAAtBA,sBAAsB,0CAAtBA,sBAAsB,6CAAtBA,sBAAsB,kCAAtBA,sBAAsB,SAOtBC,aAAY,6CAAZA,YAAY,EAAZA,YAAY,gCAAZA,YAAY,gBAAZA,YAAY,8BAAZA,YAAY,gCAAZA,YAAY,qCAAZA,YAAY,wBAAZA,YAAY,SAQZC,qBAAoB,6DAApBA,oBAAoB,EAApBA,oBAAoB,oBAApBA,oBAAoB,gBAApBA,oBAAoB,kDAApBA,oBAAoB,kBAApBA,oBAAoB,4BAApBA,oBAAoB,sBAApBA,oBAAoB,8BAApBA,oBAAoB,iCAApBA,oBAAoB,gCAApBA,oBAAoB,SAyCpBC,2BAA0B,yEAA1BA,0BAA0B,EAA1BA,0BAA0B,8BAA1BA,0BAA0B,oCAA1BA,0BAA0B,qCAA1BA,0BAA0B,sCAA1BA,0BAA0B,SAU1BC,qBAAoB,6DAApBA,oBAAoB,EAApBA,oBAAoB,wBAApBA,oBAAoB,wBAApBA,oBAAoB,8BAApBA,oBAAoB,qCAApBA,oBAAoB,gCAApBA,oBAAoB,SAsDpBC,qBAAoB,6DAApBA,oBAAoB,EAApBA,oBAAoB,gBAApBA,oBAAoB,iBAApBA,oBAAoB,gCAApBA,oBAAoB,SAqBpBC,WAAU,yCAAVA,UAAU,EAAVA,UAAU,CAAVA,UAAU,yBAAVA,UAAU,CAAVA,UAAU,iBAAVA,UAAU,CAAVA,UAAU,mBAAVA,UAAU,CAAVA,UAAU,2BAAVA,UAAU,CAAVA,UAAU,uBAAVA,UAAU,CAAVA,UAAU,sBAAVA,UAAU,CAAVA,UAAU,6BAAVA,UAAU,CAAVA,UAAU,qBAAVA,UAAU,CAAVA,UAAU,yBAAVA,UAAU,CAAVA,UAAU,uBAAVA,UAAU,CAAVA,UAAU,2BAAVA,UAAU,CAAVA,UAAU,sBAAVA,UAAU,CAAVA,UAAU,oBAAVA,UAAU,CAAVA,UAAU,0BAAVA,UAAU,CAAVA,UAAU,gCAAVA,UAAU,CAAVA,UAAU,kBAAVA,UAAU,CAAVA,UAAU,4BAAVA,UAAU,CAAVA,UAAU,oBAAVA,UAAU,CAAVA,UAAU,2CAAVA,UAAU,sBAAVA,UAAU,SA0CVC,YAAW,2CAAXA,WAAW,EAAXA,WAAW,CAAXA,WAAW,qBAAXA,WAAW,CAAXA,WAAW,mCAAXA,WAAW,CAAXA,WAAW,qBAAXA,WAAW,CAAXA,WAAW,gCAAXA,WAAW,uBAAXA,WAAW,SAkBXC,YAAW,2CAAXA,WAAW,EAAXA,WAAW,wBAAXA,WAAW,0BAAXA,WAAW,6BAAXA,WAAW,uBAAXA,WAAW,SAwCXC,aAAY,6CAAZA,YAAY,EAAZA,YAAY,oBAAZA,YAAY,gBAAZA,YAAY,cAAZA,YAAY,kBAAZA,YAAY,mBAAZA,YAAY,wBAAZA,YAAY"}
|
|
1
|
+
{"version":3,"names":["ApplePaySheetErrorType","ContactField","InvalidShippingField","ApplePayMerchantCapability","ApplePayShippingType","BillingAddressFormat","ButtonType","ButtonStyle","PaymentType","IntervalUnit"],"sources":["PlatformPay.ts"],"sourcesContent":["import type { Result as Token } from './Token';\nimport type { Result as PaymentMethod } from './PaymentMethod';\nimport type { Result as PaymentIntent } from './PaymentIntent';\nimport type { Result as SetupIntent } from './SetupIntent';\nimport type { StripeError, PlatformPayError } from './Errors';\nimport type { ShippingContact as ApplePayShippingContact } from './ApplePay';\nimport type { IsSupportedParams } from './GooglePay';\n\nexport type ApplePaySheetError =\n | {\n errorType: ApplePaySheetErrorType.InvalidShippingAddress;\n field: InvalidShippingField;\n message?: string;\n }\n | {\n errorType:\n | ApplePaySheetErrorType.UnserviceableShippingAddress\n | ApplePaySheetErrorType.InvalidCouponCode\n | ApplePaySheetErrorType.ExpiredCouponCode;\n message?: string;\n };\n\nexport enum ApplePaySheetErrorType {\n InvalidShippingAddress = 'InvalidShippingAddress',\n UnserviceableShippingAddress = 'UnserviceableShippingAddress',\n InvalidCouponCode = 'InvalidCouponCode',\n ExpiredCouponCode = 'ExpiredCouponCode',\n}\n\nexport enum ContactField {\n EmailAddress = 'emailAddress',\n Name = 'name',\n PhoneNumber = 'phoneNumber',\n PhoneticName = 'phoneticName',\n PostalAddress = 'postalAddress',\n}\n\nexport enum InvalidShippingField {\n Street = 'street',\n City = 'city',\n SubAdministrativeArea = 'subAdministrativeArea',\n State = 'state',\n PostalCode = 'postalCode',\n Country = 'country',\n CountryCode = 'countryCode',\n SubLocality = 'subLocality',\n}\n\nexport type ApplePayBaseParams = {\n /** ISO 3166-1 alpha-2 country code where the transaction is processed. */\n merchantCountryCode: string;\n /** ISO 4217 alphabetic currency code. */\n currencyCode: string;\n /** The SDK accepts Amex, Mastercard, Visa, and Discover for Apple Pay by default. Set this property to enable other card networks, for example: [\"JCB\", \"barcode\", \"chinaUnionPay\"]. A full list of possible networks can be found at https://developer.apple.com/documentation/passkit/pkpaymentnetwork. */\n additionalEnabledNetworks?: Array<string>;\n /** The list of items that describe a purchase. For example: total, tax, discount, and grand total. */\n cartItems: Array<CartSummaryItem>;\n /** The list of fields that you need for a shipping contact in order to process the transaction. If provided, you must implement the PlatformPayButton component's `onShippingContactSelected` callback and call `updatePlatformPaySheet` from there.*/\n requiredShippingAddressFields?: Array<ContactField>;\n /** The list of fields that you need for a billing contact in order to process the transaction. */\n requiredBillingContactFields?: Array<ContactField>;\n /** An array of shipping method objects that describe the supported shipping methods. If provided, you must implement the PlatformPayButton component's `onShippingMethodSelected` callback and call `updatePlatformPaySheet` from there. */\n shippingMethods?: Array<ShippingMethod>;\n /** Set the payment capabilities you support. If set, 3DS is required. */\n merchantCapabilities?: Array<ApplePayMerchantCapability>;\n /** An optional value that indicates how to ship purchased items. Defaults to 'Shipping'.*/\n shippingType?: ApplePayShippingType;\n /** A list of two-letter ISO 3166 country codes for limiting payment to cards from specific countries or regions. */\n supportedCountries?: Array<string>;\n};\n\nexport type ApplePayPaymentMethodParams = {\n /** Set this value to true to display the coupon code field, or pass the 'couponCode' field to autofill with a coupon code. Defaults to false. If true, you must implement the PlatformPayButton component's `onCouponCodeEntered` callback and call `updatePlatformPaySheet` from there. */\n supportsCouponCode?: boolean;\n /** Set this value to autofill with a coupon code. If provided, you must implement the PlatformPayButton component's `onCouponCodeEntered` callback and call `updatePlatformPaySheet` from there. */\n couponCode?: string;\n};\n\nexport enum ApplePayMerchantCapability {\n /** Required. This value must be supplied. */\n Supports3DS = 'supports3DS',\n /** Optional. If present, only transactions that are categorized as credit cards are allowed. */\n SupportsCredit = 'supportsCredit',\n /** Optional. If present, only transactions that are categorized as debit cards are allowed. */\n SupportsDebit = 'supportsDebit',\n}\n\n/** A type that indicates how to ship purchased items. */\nexport enum ApplePayShippingType {\n /** Default. */\n Shipping = 'shipping',\n Delivery = 'delivery',\n StorePickup = 'storePickup',\n ServicePickup = 'servicePickup',\n}\n\nexport type GooglePayBaseParams = {\n /**\n * Set to true to run in a test environment with relaxed application / merchant requirements. This environment is suggested for early development and for easily testing SDK.\n - Does not require the application to be uploaded to the Google Play Store.\n - Does not require a Google Pay Developer Profile.\n - It uses production data, but at the end of the transaction you will receive a fake and non chargeable payment credential.\n - The user will see a warning message that the app is not recognized/verified.\n */\n testEnv: boolean;\n /** ISO 3166-1 alpha-2 country code where the transaction is processed. */\n merchantCountryCode: string;\n /** ISO 4217 alphabetic currency code. */\n currencyCode: string;\n /** Your merchant name, displayed in the Google Pay sheet. */\n merchantName?: string;\n /** Set to true to request an email address. Defaults to false. */\n isEmailRequired?: boolean;\n /** Set to false if you don't support credit cards. Defaults to true. */\n allowCreditCards?: boolean;\n /** If true, Google Pay is considered \"available\" if the customer's Google Pay wallet has an existing payment method. Defaults to false. */\n existingPaymentMethodRequired?: boolean;\n /** Describes the configuration for billing address collection in the Google Pay sheet. */\n billingAddressConfig?: {\n /** Set to true if billing address is required for payment. Defaults to false. */\n isRequired?: boolean;\n /** Set to true if phone number is required for payment. Defaults to false. */\n isPhoneNumberRequired?: boolean;\n /** Defines what address fields to collect. Defaults to BillingAddressFormat.Min */\n format?: BillingAddressFormat;\n };\n};\n\nexport type GooglePayPaymentMethodParams = {\n /** Total monetary value of the transaction. */\n amount: number;\n /** Describes the configuration for shipping address collection in the Google Pay sheet. */\n shippingAddressConfig?: {\n /** Set to true if shipping address is required for payment. Defaults to false. */\n isRequired?: boolean;\n /** Set to true if phone number is required for payment. Defaults to false. */\n isPhoneNumberRequired?: boolean;\n /** Set of ISO 3166-1 alpha-2 country code values of the countries where shipping is allowed. Defaults to all shipping address countries. */\n allowedCountryCodes?: Array<string>;\n };\n};\n\nexport enum BillingAddressFormat {\n /** Collect name, street address, locality, region, country code, and postal code. */\n Full = 'FULL',\n /** Collect name, country code, and postal code (default). */\n Min = 'MIN',\n}\n\nexport type PaymentMethodParams = {\n /** Defines Google Pay behavior. Android only. */\n googlePay?: GooglePayBaseParams & GooglePayPaymentMethodParams;\n /** Defines Apple Pay behavior. iOS only. */\n applePay?: ApplePayBaseParams & ApplePayPaymentMethodParams;\n};\n\nexport type ConfirmParams = {\n /** Defines Google Pay behavior. Android only. */\n googlePay?: GooglePayBaseParams;\n /** Defines Apple Pay behavior. iOS only. */\n applePay?: ApplePayBaseParams;\n};\n\nexport enum ButtonType {\n /** A button with the Apple Pay or Google Pay logo only, useful when an additional call to action isn't needed. */\n Default = 0,\n /** A button useful for product purchases. */\n Buy = 1,\n /** A button useful for booking trips, flights, or other experiences. */\n Book = 6,\n /** A button useful for purchase experiences that include other payment buttons that start with “Check out”. */\n Checkout = 5,\n /** A button used by approved nonprofit organization that lets people make donations. */\n Donate = 4,\n /** A button useful for placing orders for such as like meals or flowers. */\n Order = 11,\n /** A button useful for purchasing a subscription such as a gym membership or meal-kit delivery service. */\n Subscribe = 7,\n /** iOS only. A button useful for prompting the user to set up a card. */\n SetUp = 2,\n /** iOS only. A button useful for paying bills or invoices. */\n InStore = 3,\n /** iOS only. A button useful for adding money to a card, account, or payment system.*/\n Reload = 8,\n /** iOS only. A button useful for adding money to a card, account, or payment system. */\n AddMoney = 9,\n /** iOS only. A button useful for adding money to a card, account, or payment system. */\n TopUp = 10,\n /** iOS only. A button useful for renting items such as cars or scooters. */\n Rent = 12,\n /** iOS only. A button useful supporting people give money to projects, causes, organizations, and other entities.*/\n Support = 13,\n /** iOS only. A button useful to help people contribute money to projects, causes, organizations, and other entities. */\n Contribute = 14,\n /** iOS only. A button useful useful for letting people tip for goods or services. */\n Tip = 15,\n /** iOS only. A button useful for general purchases. */\n Continue = 16,\n /** Android only. A button useful for general payments. */\n Pay = 1000,\n /** Android only. A plain white button with the Google Pay logo. Use when you show Google Pay as a payment option in your payment flows. */\n GooglePayMark = 1001,\n}\n\n/** iOS only. */\nexport enum ButtonStyle {\n /** A white button with black lettering. */\n White = 0,\n /** A white button with black lettering and a black outline. */\n WhiteOutline = 1,\n /** A black button with white lettering. */\n Black = 2,\n /** Default. A button that automatically changes its appearance when the user switches between Light Mode and Dark Mode. */\n Automatic = 3,\n}\n\n/** iOS only. */\nexport type CartSummaryItem =\n | DeferredCartSummaryItem\n | ImmediateCartSummaryItem\n | RecurringCartSummaryItem;\n\n/** iOS only. */\nexport enum PaymentType {\n Deferred = 'Deferred',\n Immediate = 'Immediate',\n Recurring = 'Recurring',\n}\n\n/** iOS only. Use this type for a payment that occurs in the future, such as a pre-order. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem. */\nexport type DeferredCartSummaryItem = {\n paymentType: PaymentType.Deferred;\n /** The unix timestamp of the date, in the future, of the payment. Measured in seconds. */\n deferredDate: number;\n label: string;\n amount: string;\n};\n\n/** iOS only. Use this type for payments that will occur immediately. */\nexport type ImmediateCartSummaryItem = {\n paymentType: PaymentType.Immediate;\n /** When creating items for estimates or charges whose final value is not yet known, set this to true. */\n isPending?: boolean;\n label: string;\n amount: string;\n};\n\n/** iOS only. Use this type for payments that occur more than once, such as a subscription. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem.*/\nexport type RecurringCartSummaryItem = {\n paymentType: PaymentType.Recurring;\n /** The amount of time – in calendar units such as Day, Month, or Year – that represents a fraction of the total payment interval. For example, if you set the intervalUnit to 'Month' and intervalCount to 3, then the payment interval is three months.*/\n intervalUnit: IntervalUnit;\n /** The number of interval units that make up the total payment interval. For example, if you set the intervalUnit to 'Month' and intervalCount to 3, then the payment interval is three months.*/\n intervalCount: number;\n /** The unix timestamp of the start date. Measured in seconds. */\n startDate?: number;\n /** The unix timestamp of the end date. Measured in seconds. */\n endDate?: number;\n label: string;\n amount: string;\n};\n\n/** iOS only. */\nexport enum IntervalUnit {\n Minute = 'minute',\n Hour = 'hour',\n Day = 'day',\n Month = 'month',\n Year = 'year',\n}\n\n/** iOS only. */\nexport type ShippingMethod = {\n /** A short, localized description. */\n label: string;\n /** The cost associated with this shipping option. */\n amount: string;\n /** When creating items for estimates or charges whose final value is not yet known, set this to true. */\n isPending?: boolean;\n /** A unique identifier for the shipping method. */\n identifier: string;\n /** A user-readable description of the shipping method. For example “Ships in 24 hours.” Don't repeat the content of the 'label' property. */\n detail?: string;\n /** The unix timestamp of the start date of the expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup. Measured in seconds. */\n startDate?: number;\n /** The unix timestamp of the end date of the expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup. Measured in seconds. */\n endDate?: number;\n};\n\n/** iOS only. */\nexport type ShippingContact = ApplePayShippingContact;\n\n/** Android only. */\nexport type IsGooglePaySupportedParams = IsSupportedParams;\n\nexport type PaymentMethodResult =\n | {\n paymentMethod: PaymentMethod;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<PlatformPayError>;\n };\n\nexport type TokenResult =\n | {\n token: Token;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<PlatformPayError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent;\n error?: StripeError<PlatformPayError>;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<PlatformPayError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent;\n error?: StripeError<PlatformPayError>;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<PlatformPayError>;\n };\n"],"mappings":"iUAsBYA,uBAAsB,iEAAtBA,sBAAsB,EAAtBA,sBAAsB,oDAAtBA,sBAAsB,gEAAtBA,sBAAsB,0CAAtBA,sBAAsB,6CAAtBA,sBAAsB,kCAAtBA,sBAAsB,SAOtBC,aAAY,6CAAZA,YAAY,EAAZA,YAAY,gCAAZA,YAAY,gBAAZA,YAAY,8BAAZA,YAAY,gCAAZA,YAAY,qCAAZA,YAAY,wBAAZA,YAAY,SAQZC,qBAAoB,6DAApBA,oBAAoB,EAApBA,oBAAoB,oBAApBA,oBAAoB,gBAApBA,oBAAoB,kDAApBA,oBAAoB,kBAApBA,oBAAoB,4BAApBA,oBAAoB,sBAApBA,oBAAoB,8BAApBA,oBAAoB,iCAApBA,oBAAoB,gCAApBA,oBAAoB,SAyCpBC,2BAA0B,yEAA1BA,0BAA0B,EAA1BA,0BAA0B,8BAA1BA,0BAA0B,oCAA1BA,0BAA0B,qCAA1BA,0BAA0B,sCAA1BA,0BAA0B,SAU1BC,qBAAoB,6DAApBA,oBAAoB,EAApBA,oBAAoB,wBAApBA,oBAAoB,wBAApBA,oBAAoB,8BAApBA,oBAAoB,qCAApBA,oBAAoB,gCAApBA,oBAAoB,SAsDpBC,qBAAoB,6DAApBA,oBAAoB,EAApBA,oBAAoB,gBAApBA,oBAAoB,iBAApBA,oBAAoB,gCAApBA,oBAAoB,SAqBpBC,WAAU,yCAAVA,UAAU,EAAVA,UAAU,CAAVA,UAAU,yBAAVA,UAAU,CAAVA,UAAU,iBAAVA,UAAU,CAAVA,UAAU,mBAAVA,UAAU,CAAVA,UAAU,2BAAVA,UAAU,CAAVA,UAAU,uBAAVA,UAAU,CAAVA,UAAU,sBAAVA,UAAU,CAAVA,UAAU,6BAAVA,UAAU,CAAVA,UAAU,qBAAVA,UAAU,CAAVA,UAAU,yBAAVA,UAAU,CAAVA,UAAU,uBAAVA,UAAU,CAAVA,UAAU,2BAAVA,UAAU,CAAVA,UAAU,sBAAVA,UAAU,CAAVA,UAAU,oBAAVA,UAAU,CAAVA,UAAU,0BAAVA,UAAU,CAAVA,UAAU,gCAAVA,UAAU,CAAVA,UAAU,kBAAVA,UAAU,CAAVA,UAAU,4BAAVA,UAAU,CAAVA,UAAU,oBAAVA,UAAU,CAAVA,UAAU,2CAAVA,UAAU,sBAAVA,UAAU,SA0CVC,YAAW,2CAAXA,WAAW,EAAXA,WAAW,CAAXA,WAAW,qBAAXA,WAAW,CAAXA,WAAW,mCAAXA,WAAW,CAAXA,WAAW,qBAAXA,WAAW,CAAXA,WAAW,gCAAXA,WAAW,uBAAXA,WAAW,SAkBXC,YAAW,2CAAXA,WAAW,EAAXA,WAAW,wBAAXA,WAAW,0BAAXA,WAAW,6BAAXA,WAAW,uBAAXA,WAAW,SAwCXC,aAAY,6CAAZA,YAAY,EAAZA,YAAY,oBAAZA,YAAY,gBAAZA,YAAY,cAAZA,YAAY,kBAAZA,YAAY,mBAAZA,YAAY,wBAAZA,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GooglePayCardTokenStatus","CanAddCardToWalletStatus"],"sources":["PushProvisioning.ts"],"sourcesContent":["import type { StripeError, GooglePayError } from './Errors';\n\nexport type GooglePayCardToken = {\n id: string;\n cardLastFour: string;\n network: number;\n serviceProvider: number;\n issuer: string;\n status: GooglePayCardTokenStatus;\n};\n\nexport enum GooglePayCardTokenStatus {\n /** */\n TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION = 'TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION',\n /** */\n TOKEN_STATE_PENDING = 'TOKEN_STATE_PENDING',\n /** */\n TOKEN_STATE_SUSPENDED = 'TOKEN_STATE_SUSPENDED',\n /** */\n TOKEN_STATE_ACTIVE = 'TOKEN_STATE_ACTIVE',\n /** */\n TOKEN_STATE_FELICA_PENDING_PROVISIONING = 'TOKEN_STATE_FELICA_PENDING_PROVISIONING',\n /** */\n TOKEN_STATE_UNTOKENIZED = 'TOKEN_STATE_UNTOKENIZED',\n}\n\nexport type IsCardInWalletResult =\n | {\n isInWallet: boolean;\n token?: GooglePayCardToken;\n error?: undefined;\n }\n | {\n isInWallet?: undefined;\n token?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type CanAddCardToWalletParams = {\n /** The `primary_account_identifier` value from the issued card. Can be an empty string. */\n primaryAccountIdentifier: string | null;\n /** Last 4 digits of the card number. */\n cardLastFour: string;\n /** iOS only. Set this to `true` until shipping through TestFlight || App Store. If
|
|
1
|
+
{"version":3,"names":["GooglePayCardTokenStatus","CanAddCardToWalletStatus"],"sources":["PushProvisioning.ts"],"sourcesContent":["import type { StripeError, GooglePayError } from './Errors';\n\nexport type GooglePayCardToken = {\n id: string;\n cardLastFour: string;\n network: number;\n serviceProvider: number;\n issuer: string;\n status: GooglePayCardTokenStatus;\n};\n\nexport enum GooglePayCardTokenStatus {\n /** */\n TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION = 'TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION',\n /** */\n TOKEN_STATE_PENDING = 'TOKEN_STATE_PENDING',\n /** */\n TOKEN_STATE_SUSPENDED = 'TOKEN_STATE_SUSPENDED',\n /** */\n TOKEN_STATE_ACTIVE = 'TOKEN_STATE_ACTIVE',\n /** */\n TOKEN_STATE_FELICA_PENDING_PROVISIONING = 'TOKEN_STATE_FELICA_PENDING_PROVISIONING',\n /** */\n TOKEN_STATE_UNTOKENIZED = 'TOKEN_STATE_UNTOKENIZED',\n}\n\nexport type IsCardInWalletResult =\n | {\n isInWallet: boolean;\n token?: GooglePayCardToken;\n error?: undefined;\n }\n | {\n isInWallet?: undefined;\n token?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type CanAddCardToWalletParams = {\n /** The `primary_account_identifier` value from the issued card. Can be an empty string. */\n primaryAccountIdentifier: string | null;\n /** Last 4 digits of the card number. */\n cardLastFour: string;\n /** iOS only. Set this to `true` until shipping through TestFlight || App Store. If false, you must be using live cards, and have the proper iOS entitlement set up. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#requesting-access-for-ios */\n testEnv?: boolean;\n /** iOS only. Set this to `true` if: your user has an Apple Watch device currently paired, and you want to check that device for the presence of the specified card. */\n hasPairedAppleWatch?: boolean;\n};\n\nexport type CanAddCardToWalletResult =\n | {\n canAddCard: boolean;\n details?: {\n token?: GooglePayCardToken;\n status?: CanAddCardToWalletStatus;\n };\n error?: undefined;\n }\n | {\n canAddCard?: undefined;\n details?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport enum CanAddCardToWalletStatus {\n /** You are missing configuration required for Push Provisioning. Make sure you've completed all steps at https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native. */\n MISSING_CONFIGURATION = 'MISSING_CONFIGURATION',\n /** This device doesn't support adding a card to the native wallet. */\n UNSUPPORTED_DEVICE = 'UNSUPPORTED_DEVICE',\n /** This card already exists on this device and any paired devices. */\n CARD_ALREADY_EXISTS = 'CARD_ALREADY_EXISTS',\n /** This card already exists on this device, but not on the paired device. */\n CARD_EXISTS_ON_CURRENT_DEVICE = 'CARD_EXISTS_ON_CURRENT_DEVICE',\n /** This card already exists on the paired device, but not on this device. */\n CARD_EXISTS_ON_PAIRED_DEVICE = 'CARD_EXISTS_ON_PAIRED_DEVICE',\n}\n"],"mappings":"qIAWYA,yBAAwB,qEAAxBA,wBAAwB,EAAxBA,wBAAwB,sFAAxBA,wBAAwB,8CAAxBA,wBAAwB,kDAAxBA,wBAAwB,4CAAxBA,wBAAwB,sFAAxBA,wBAAwB,yDAAxBA,wBAAwB,oCAAxBA,wBAAwB,SAqDxBC,yBAAwB,qEAAxBA,wBAAwB,EAAxBA,wBAAwB,kDAAxBA,wBAAwB,4CAAxBA,wBAAwB,8CAAxBA,wBAAwB,kEAAxBA,wBAAwB,mEAAxBA,wBAAwB,oCAAxBA,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Status"],"sources":["SetupIntent.ts"],"sourcesContent":["import type { Type } from './PaymentMethod';\nimport type { LastPaymentError } from './PaymentIntent';\nimport type { NextAction } from './NextAction';\nimport type * as PaymentMethod from './PaymentMethod';\nexport interface Result {\n id: string;\n clientSecret: string;\n lastSetupError: LastPaymentError | null;\n /** The UNIX timestamp (in milliseconds) of the date this Setup Intent was created. */\n created: string | null;\n livemode: boolean;\n paymentMethodId: string | null;\n status: Status;\n paymentMethodTypes: Type[];\n usage: FutureUsage;\n description: string | null;\n nextAction: NextAction | null;\n}\n\nexport type ConfirmParams =\n | PaymentMethod.CardParams\n | PaymentMethod.IdealParams\n | PaymentMethod.OxxoParams\n | PaymentMethod.P24Params\n | PaymentMethod.AlipayParams\n | PaymentMethod.GiropayParams\n | PaymentMethod.SepaParams\n | PaymentMethod.EpsParams\n | PaymentMethod.AuBecsDebitParams\n | PaymentMethod.SofortParams\n | PaymentMethod.GrabPayParams\n | PaymentMethod.FPXParams\n | PaymentMethod.AfterpayClearpayParams\n | PaymentMethod.KlarnaParams\n | PaymentMethod.BancontactParams\n | PaymentMethod.USBankAccountParams;\n// TODO: Change the above back to PaymentMethod.CreateParams when PayPal is supported through SetupIntents\n\nexport type ConfirmOptions = {};\n\nexport type FutureUsage =\n | 'Unknown'\n | 'None'\n | 'OnSession'\n | 'OffSession'\n | 'OneTime';\n\nexport enum Status {\n Succeeded = 'Succeeded',\n RequiresPaymentMethod = 'RequiresPaymentMethod',\n RequiresConfirmation = 'RequiresConfirmation',\n Canceled = 'Canceled',\n Processing = 'Processing',\n RequiresAction = 'RequiresAction',\n Unknown = 'Unknown',\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["Status"],"sources":["SetupIntent.ts"],"sourcesContent":["import type { Type } from './PaymentMethod';\nimport type { LastPaymentError } from './PaymentIntent';\nimport type { NextAction } from './NextAction';\nimport type * as PaymentMethod from './PaymentMethod';\nexport interface Result {\n id: string;\n clientSecret: string;\n lastSetupError: LastPaymentError | null;\n /** The UNIX timestamp (in milliseconds) of the date this Setup Intent was created. */\n created: string | null;\n livemode: boolean;\n /** @deprecated Use paymentMethod.id instead. */\n paymentMethodId: string | null;\n paymentMethod: PaymentMethod.Result | null;\n status: Status;\n paymentMethodTypes: Type[];\n usage: FutureUsage;\n description: string | null;\n nextAction: NextAction | null;\n}\n\nexport type ConfirmParams =\n | PaymentMethod.CardParams\n | PaymentMethod.IdealParams\n | PaymentMethod.OxxoParams\n | PaymentMethod.P24Params\n | PaymentMethod.AlipayParams\n | PaymentMethod.GiropayParams\n | PaymentMethod.SepaParams\n | PaymentMethod.EpsParams\n | PaymentMethod.AuBecsDebitParams\n | PaymentMethod.SofortParams\n | PaymentMethod.GrabPayParams\n | PaymentMethod.FPXParams\n | PaymentMethod.AfterpayClearpayParams\n | PaymentMethod.KlarnaParams\n | PaymentMethod.BancontactParams\n | PaymentMethod.USBankAccountParams;\n// TODO: Change the above back to PaymentMethod.CreateParams when PayPal is supported through SetupIntents\n\nexport type ConfirmOptions = {};\n\nexport type FutureUsage =\n | 'Unknown'\n | 'None'\n | 'OnSession'\n | 'OffSession'\n | 'OneTime';\n\nexport enum Status {\n Succeeded = 'Succeeded',\n RequiresPaymentMethod = 'RequiresPaymentMethod',\n RequiresConfirmation = 'RequiresConfirmation',\n Canceled = 'Canceled',\n Processing = 'Processing',\n RequiresAction = 'RequiresAction',\n Unknown = 'Unknown',\n}\n"],"mappings":"kFAiDYA,OAAM,iCAANA,MAAM,EAANA,MAAM,0BAANA,MAAM,kDAANA,MAAM,gDAANA,MAAM,wBAANA,MAAM,4BAANA,MAAM,oCAANA,MAAM,yBAANA,MAAM,kBAANA,MAAM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={ApplePay:true,PaymentIntent:true,PaymentMethod:true,PaymentSheet:true,SetupIntent:true,ThreeDSecure:true,GooglePay:true,ApplePayButtonComponent:true,GooglePayButtonComponent:true,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,PlatformPay:true
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={ApplePay:true,PaymentIntent:true,PaymentMethod:true,PaymentSheet:true,SetupIntent:true,ThreeDSecure:true,GooglePay:true,ApplePayButtonComponent:true,GooglePayButtonComponent:true,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,PlatformPay:true};exports.Token=exports.ThreeDSecure=exports.SetupIntent=exports.PlatformPay=exports.PaymentSheet=exports.PaymentMethod=exports.PaymentIntent=exports.GooglePayButtonComponent=exports.GooglePay=exports.FinancialConnections=exports.CardFormView=exports.CardFieldInput=exports.AuBECSDebitFormComponent=exports.ApplePayButtonComponent=exports.ApplePay=void 0;var ApplePay=_interopRequireWildcard(require("./ApplePay"));exports.ApplePay=ApplePay;var PaymentIntent=_interopRequireWildcard(require("./PaymentIntent"));exports.PaymentIntent=PaymentIntent;var PaymentMethod=_interopRequireWildcard(require("./PaymentMethod"));exports.PaymentMethod=PaymentMethod;var PaymentSheet=_interopRequireWildcard(require("./PaymentSheet"));exports.PaymentSheet=PaymentSheet;var SetupIntent=_interopRequireWildcard(require("./SetupIntent"));exports.SetupIntent=SetupIntent;var ThreeDSecure=_interopRequireWildcard(require("./ThreeDSecure"));exports.ThreeDSecure=ThreeDSecure;var GooglePay=_interopRequireWildcard(require("./GooglePay"));exports.GooglePay=GooglePay;var ApplePayButtonComponent=_interopRequireWildcard(require("./components/ApplePayButtonComponent"));exports.ApplePayButtonComponent=ApplePayButtonComponent;var GooglePayButtonComponent=_interopRequireWildcard(require("./components/GooglePayButtonComponent"));exports.GooglePayButtonComponent=GooglePayButtonComponent;var AuBECSDebitFormComponent=_interopRequireWildcard(require("./components/AuBECSDebitFormComponent"));exports.AuBECSDebitFormComponent=AuBECSDebitFormComponent;var CardFieldInput=_interopRequireWildcard(require("./components/CardFieldInput"));exports.CardFieldInput=CardFieldInput;var CardFormView=_interopRequireWildcard(require("./components/CardFormView"));exports.CardFormView=CardFormView;var Token=_interopRequireWildcard(require("./Token"));exports.Token=Token;var FinancialConnections=_interopRequireWildcard(require("./FinancialConnections"));exports.FinancialConnections=FinancialConnections;var PlatformPay=_interopRequireWildcard(require("./PlatformPay"));exports.PlatformPay=PlatformPay;var _PushProvisioning=require("./PushProvisioning");Object.keys(_PushProvisioning).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PushProvisioning[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PushProvisioning[key];}});});var _Errors=require("./Errors");Object.keys(_Errors).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_Errors[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _Errors[key];}});});function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import type {\n ApplePayError,\n CardActionError,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n CreatePaymentMethodError,\n CreateTokenError,\n GooglePayError,\n PaymentSheetError,\n RetrievePaymentIntentError,\n RetrieveSetupIntentError,\n StripeError,\n VerifyMicrodepositsError,\n CollectBankAccountError,\n} from './Errors';\nimport * as ApplePay from './ApplePay';\nimport * as PaymentIntent from './PaymentIntent';\nimport * as PaymentMethod from './PaymentMethod';\nimport * as PaymentSheet from './PaymentSheet';\nimport * as SetupIntent from './SetupIntent';\nimport * as ThreeDSecure from './ThreeDSecure';\nimport * as GooglePay from './GooglePay';\nimport * as ApplePayButtonComponent from './components/ApplePayButtonComponent';\nimport * as GooglePayButtonComponent from './components/GooglePayButtonComponent';\nimport * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';\nimport * as CardFieldInput from './components/CardFieldInput';\nimport * as CardFormView from './components/CardFormView';\nimport * as Token from './Token';\nimport * as FinancialConnections from './FinancialConnections';\nimport * as PlatformPay from './PlatformPay';\n\nexport {\n ApplePay,\n PaymentIntent,\n PaymentMethod,\n PaymentSheet,\n SetupIntent,\n ThreeDSecure,\n GooglePay,\n ApplePayButtonComponent,\n GooglePayButtonComponent,\n AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n PlatformPay,\n};\n\nexport * from './PushProvisioning';\nexport * from './Errors';\nexport { Address, BillingDetails, AddressDetails } from './Common';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\nexport interface AppInfo {\n name?: string;\n partnerId?: string;\n url?: string;\n version?: string;\n}\n\nexport type CreatePaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult = {\n paymentOption?: PaymentSheet.PaymentOption | undefined;\n error?: StripeError<PaymentSheetError> | undefined;\n};\n\nexport type CreateTokenResult =\n | {\n token: Token.Result;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<CreateTokenError>;\n };\n\nexport type ConfirmPaymentSheetPaymentResult = {\n error?: StripeError<PaymentSheetError>;\n};\n\nexport type ApplePayResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n stripeAccountId?: string;\n threeDSecureParams?: ThreeDSecure.ConfigurationParams;\n merchantIdentifier?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n}\n\nexport interface InitialiseParams extends InitStripeParams {\n appInfo: AppInfo;\n}\n\nexport type GooglePayInitResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type PayWithGooglePayResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type CreateGooglePayPaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type OpenApplePaySetupResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<ApplePayError>;\n };\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type VerifyMicrodepositsForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type VerifyMicrodepositsForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type CollectBankAccountForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type CollectBankAccountForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import type {\n ApplePayError,\n CardActionError,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n CreatePaymentMethodError,\n CreateTokenError,\n GooglePayError,\n PaymentSheetError,\n RetrievePaymentIntentError,\n RetrieveSetupIntentError,\n StripeError,\n VerifyMicrodepositsError,\n CollectBankAccountError,\n} from './Errors';\nimport * as ApplePay from './ApplePay';\nimport * as PaymentIntent from './PaymentIntent';\nimport * as PaymentMethod from './PaymentMethod';\nimport * as PaymentSheet from './PaymentSheet';\nimport * as SetupIntent from './SetupIntent';\nimport * as ThreeDSecure from './ThreeDSecure';\nimport * as GooglePay from './GooglePay';\nimport * as ApplePayButtonComponent from './components/ApplePayButtonComponent';\nimport * as GooglePayButtonComponent from './components/GooglePayButtonComponent';\nimport * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';\nimport * as CardFieldInput from './components/CardFieldInput';\nimport * as CardFormView from './components/CardFormView';\nimport * as Token from './Token';\nimport * as FinancialConnections from './FinancialConnections';\nimport * as PlatformPay from './PlatformPay';\n\nexport {\n ApplePay,\n PaymentIntent,\n PaymentMethod,\n PaymentSheet,\n SetupIntent,\n ThreeDSecure,\n GooglePay,\n ApplePayButtonComponent,\n GooglePayButtonComponent,\n AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n PlatformPay,\n};\n\nexport * from './PushProvisioning';\nexport * from './Errors';\nexport type { Address, BillingDetails, AddressDetails } from './Common';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\nexport interface AppInfo {\n name?: string;\n partnerId?: string;\n url?: string;\n version?: string;\n}\n\nexport type CreatePaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult = {\n paymentOption?: PaymentSheet.PaymentOption | undefined;\n error?: StripeError<PaymentSheetError> | undefined;\n};\n\nexport type CreateTokenResult =\n | {\n token: Token.Result;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<CreateTokenError>;\n };\n\nexport type ConfirmPaymentSheetPaymentResult = {\n error?: StripeError<PaymentSheetError>;\n};\n\nexport type ApplePayResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n stripeAccountId?: string;\n threeDSecureParams?: ThreeDSecure.ConfigurationParams;\n merchantIdentifier?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n}\n\nexport interface InitialiseParams extends InitStripeParams {\n appInfo: AppInfo;\n}\n\nexport type GooglePayInitResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type PayWithGooglePayResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type CreateGooglePayPaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type OpenApplePaySetupResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<ApplePayError>;\n };\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type VerifyMicrodepositsForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type VerifyMicrodepositsForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type CollectBankAccountForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type CollectBankAccountForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n"],"mappings":"0tBAeA,4DAAuC,0BACvC,sEAAiD,oCACjD,sEAAiD,oCACjD,oEAA+C,kCAC/C,kEAA6C,gCAC7C,oEAA+C,kCAC/C,8DAAyC,4BACzC,qGAAgF,wDAChF,uGAAkF,0DAClF,uGAAkF,0DAClF,mFAA8D,sCAC9D,+EAA0D,kCAC1D,sDAAiC,oBACjC,oFAA+D,kDAC/D,kEAA6C,gCAoB7C,mYACA,iVAAyB"}
|
|
@@ -43,7 +43,7 @@ declare type NativeStripeSdkType = {
|
|
|
43
43
|
isPlatformPaySupported(params: {
|
|
44
44
|
googlePay?: GooglePay.IsSupportedParams;
|
|
45
45
|
}): Promise<boolean>;
|
|
46
|
-
createPlatformPayPaymentMethod(params: PlatformPay.PaymentMethodParams): Promise<PlatformPay.PaymentMethodResult>;
|
|
46
|
+
createPlatformPayPaymentMethod(params: PlatformPay.PaymentMethodParams, usesDeprecatedTokenFlow: boolean): Promise<PlatformPay.PaymentMethodResult | PlatformPay.TokenResult>;
|
|
47
47
|
dismissPlatformPay(): Promise<boolean>;
|
|
48
48
|
updatePlatformPaySheet(summaryItems: Array<ApplePay.CartSummaryItem>, shippingMethods: Array<ApplePay.ShippingMethod>, errors: Array<PlatformPay.ApplePaySheetError>): Promise<void>;
|
|
49
49
|
confirmPlatformPay(clientSecret: string, params: PlatformPay.ConfirmParams, isPaymentIntent: boolean): Promise<PlatformPay.ConfirmPaymentResult | PlatformPay.ConfirmSetupIntentResult>;
|
|
@@ -10,7 +10,7 @@ export interface Props extends AccessibilityProps {
|
|
|
10
10
|
/** The image asset to use as the Google Pay button. Downloadable from https://developers.google.com/pay/issuers/apis/push-provisioning/android/downloads/flutter/googlepay_flutter_buttons.zip */
|
|
11
11
|
androidAssetSource: ImageSourcePropType;
|
|
12
12
|
testID?: string;
|
|
13
|
-
/** iOS only. Set this to `true` until shipping through TestFlight || App Store. If
|
|
13
|
+
/** iOS only. Set this to `true` until shipping through TestFlight || App Store. If false, you must be using live cards, and have the proper iOS entitlement set up. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#requesting-access-for-ios */
|
|
14
14
|
testEnv?: boolean;
|
|
15
15
|
/** Details of the Issued Card you'd like added to the device's wallet */
|
|
16
16
|
cardDetails: {
|
|
@@ -118,11 +118,17 @@ export declare const confirmPlatformPayPayment: (clientSecret: string, params: P
|
|
|
118
118
|
*/
|
|
119
119
|
export declare const dismissPlatformPay: () => Promise<boolean>;
|
|
120
120
|
/**
|
|
121
|
-
* 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)
|
|
121
|
+
* 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).
|
|
122
122
|
* @param params an object describing the Apple Pay and Google Pay configurations.
|
|
123
|
-
* @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with
|
|
123
|
+
* @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `paymentMethod` field.
|
|
124
124
|
*/
|
|
125
125
|
export declare const createPlatformPayPaymentMethod: (params: PlatformPay.PaymentMethodParams) => Promise<PlatformPay.PaymentMethodResult>;
|
|
126
|
+
/**
|
|
127
|
+
* @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).
|
|
128
|
+
* @param params an object describing the Apple Pay and Google Pay configurations.
|
|
129
|
+
* @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `token` field.
|
|
130
|
+
*/
|
|
131
|
+
export declare const createPlatformPayToken: (params: PlatformPay.PaymentMethodParams) => Promise<PlatformPay.TokenResult>;
|
|
126
132
|
/**
|
|
127
133
|
* iOS only. 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.
|
|
128
134
|
* @param params an object describing the Apple Pay configuration, with the following fields:
|
|
@@ -32,6 +32,12 @@ export declare function usePlatformPay(): {
|
|
|
32
32
|
* @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.
|
|
33
33
|
*/
|
|
34
34
|
createPlatformPayPaymentMethod: (params: PlatformPay.PaymentMethodParams) => Promise<PlatformPay.PaymentMethodResult>;
|
|
35
|
+
/**
|
|
36
|
+
* @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).
|
|
37
|
+
* @param params an object describing the Apple Pay and Google Pay configurations.
|
|
38
|
+
* @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `token` field.
|
|
39
|
+
*/
|
|
40
|
+
createPlatformPayToken: (params: PlatformPay.PaymentMethodParams) => Promise<PlatformPay.TokenResult>;
|
|
35
41
|
/**
|
|
36
42
|
* Dismiss the Apple Pay sheet if it is open. iOS only, this is a no-op on Android.
|
|
37
43
|
* @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.
|
|
@@ -51,6 +51,7 @@ export declare function useStripe(): {
|
|
|
51
51
|
confirmPlatformPayPayment: (clientSecret: string, params: PlatformPay.ConfirmParams) => Promise<PlatformPay.ConfirmPaymentResult>;
|
|
52
52
|
dismissPlatformPay: () => Promise<boolean>;
|
|
53
53
|
createPlatformPayPaymentMethod: (params: PlatformPay.PaymentMethodParams) => Promise<PlatformPay.PaymentMethodResult>;
|
|
54
|
+
createPlatformPayToken: (params: PlatformPay.PaymentMethodParams) => Promise<PlatformPay.TokenResult>;
|
|
54
55
|
updatePlatformPaySheet: (params: {
|
|
55
56
|
applePay: {
|
|
56
57
|
cartItems: Array<PlatformPay.CartSummaryItem>;
|
|
@@ -2,19 +2,30 @@ export { useConfirmPayment } from './hooks/useConfirmPayment';
|
|
|
2
2
|
export { useConfirmSetupIntent } from './hooks/useConfirmSetupIntent';
|
|
3
3
|
export { useStripe } from './hooks/useStripe';
|
|
4
4
|
export { usePlatformPay } from './hooks/usePlatformPay';
|
|
5
|
-
export { useApplePay
|
|
5
|
+
export { useApplePay } from './hooks/useApplePay';
|
|
6
|
+
export type { Props as UseApplePayProps } from './hooks/useApplePay';
|
|
6
7
|
export { usePaymentSheet } from './hooks/usePaymentSheet';
|
|
7
8
|
export { useGooglePay } from './hooks/useGooglePay';
|
|
8
9
|
export { useFinancialConnectionsSheet } from './hooks/useFinancialConnectionsSheet';
|
|
9
|
-
export { initStripe, StripeProvider
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
10
|
+
export { initStripe, StripeProvider } from './components/StripeProvider';
|
|
11
|
+
export type { Props as StripeProviderProps } from './components/StripeProvider';
|
|
12
|
+
export { CardField } from './components/CardField';
|
|
13
|
+
export type { Props as CardFieldProps } from './components/CardField';
|
|
14
|
+
export { CardForm } from './components/CardForm';
|
|
15
|
+
export type { Props as CardFormProps } from './components/CardForm';
|
|
16
|
+
export { ApplePayButton } from './components/ApplePayButton';
|
|
17
|
+
export type { Props as ApplePayButtonProps } from './components/ApplePayButton';
|
|
18
|
+
export { AuBECSDebitForm } from './components/AuBECSDebitForm';
|
|
19
|
+
export type { Props as AuBECSDebitFormProps } from './components/AuBECSDebitForm';
|
|
20
|
+
export { StripeContainer } from './components/StripeContainer';
|
|
21
|
+
export type { Props as StripeContainerProps } from './components/StripeContainer';
|
|
22
|
+
export { GooglePayButton } from './components/GooglePayButton';
|
|
23
|
+
export type { Props as GooglePayButtonProps } from './components/GooglePayButton';
|
|
24
|
+
export { AddToWalletButton } from './components/AddToWalletButton';
|
|
25
|
+
export type { Props as AddToWalletButtonProps } from './components/AddToWalletButton';
|
|
26
|
+
export { AddressSheet } from './components/AddressSheet';
|
|
27
|
+
export type { Props as AddressSheetProps } from './components/AddressSheet';
|
|
28
|
+
export { PlatformPayButton } from './components/PlatformPayButton';
|
|
29
|
+
export type { Props as PlatformPayButtonProps } from './components/PlatformPayButton';
|
|
19
30
|
export * from './functions';
|
|
20
31
|
export * from './types/index';
|
|
@@ -15,7 +15,9 @@ export interface Result {
|
|
|
15
15
|
canceledAt: string | null;
|
|
16
16
|
clientSecret: string;
|
|
17
17
|
livemode: boolean;
|
|
18
|
+
/** @deprecated Use paymentMethod.id instead. */
|
|
18
19
|
paymentMethodId: string;
|
|
20
|
+
paymentMethod: PaymentMethodResult | null;
|
|
19
21
|
captureMethod: 'Automatic' | 'Manual';
|
|
20
22
|
confirmationMethod: 'Automatic' | 'Manual';
|
|
21
23
|
lastPaymentError: LastPaymentError | null;
|
|
@@ -106,6 +106,7 @@ export declare type KlarnaParams = {
|
|
|
106
106
|
billingDetails: Pick<Required<BillingDetails>, 'email'> & {
|
|
107
107
|
address: Pick<Required<Address>, 'country'>;
|
|
108
108
|
} & BillingDetails;
|
|
109
|
+
shippingDetails?: ShippingDetails;
|
|
109
110
|
};
|
|
110
111
|
};
|
|
111
112
|
export interface EpsParams {
|