@stripe/stripe-react-native 0.27.2 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +2 -2
  3. package/android/gradle.properties +1 -1
  4. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +4 -0
  5. package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +5 -0
  6. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +4 -0
  7. package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +5 -0
  8. package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +33 -7
  9. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +0 -5
  10. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +11 -27
  11. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +131 -6
  12. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +29 -6
  13. package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +2 -0
  14. package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +14 -1
  15. package/ios/ApplePayButtonView.swift +4 -18
  16. package/ios/ApplePayViewController.swift +1 -28
  17. package/ios/CardFieldManager.m +1 -0
  18. package/ios/CardFieldView.swift +6 -0
  19. package/ios/CardFormManager.m +2 -2
  20. package/ios/CardFormView.swift +9 -9
  21. package/ios/StripeSdk+PaymentSheet.swift +100 -10
  22. package/ios/StripeSdk.m +15 -29
  23. package/ios/StripeSdk.swift +32 -91
  24. package/jest/mock.js +0 -6
  25. package/lib/commonjs/NativeStripeSdk.js.map +1 -1
  26. package/lib/commonjs/components/ApplePayButtonNative.js.map +1 -1
  27. package/lib/commonjs/components/CardField.js +1 -1
  28. package/lib/commonjs/components/CardField.js.map +1 -1
  29. package/lib/commonjs/components/CardForm.js +1 -1
  30. package/lib/commonjs/components/CardForm.js.map +1 -1
  31. package/lib/commonjs/components/GooglePayButtonNative.js.map +1 -1
  32. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  33. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  34. package/lib/commonjs/functions.js +1 -1
  35. package/lib/commonjs/functions.js.map +1 -1
  36. package/lib/commonjs/hooks/useStripe.js +1 -1
  37. package/lib/commonjs/hooks/useStripe.js.map +1 -1
  38. package/lib/commonjs/index.js +1 -1
  39. package/lib/commonjs/index.js.map +1 -1
  40. package/lib/commonjs/types/ApplePay.js.map +1 -1
  41. package/lib/commonjs/types/PaymentIntent.js.map +1 -1
  42. package/lib/commonjs/types/PaymentSheet.js +1 -1
  43. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  44. package/lib/commonjs/types/PlatformPay.js.map +1 -1
  45. package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
  46. package/lib/commonjs/types/components/CardFormView.js.map +1 -1
  47. package/lib/commonjs/types/components/GooglePayButtonComponent.js.map +1 -1
  48. package/lib/commonjs/types/index.js +1 -1
  49. package/lib/commonjs/types/index.js.map +1 -1
  50. package/lib/module/NativeStripeSdk.js.map +1 -1
  51. package/lib/module/components/ApplePayButtonNative.js.map +1 -1
  52. package/lib/module/components/CardField.js +1 -1
  53. package/lib/module/components/CardField.js.map +1 -1
  54. package/lib/module/components/CardForm.js +1 -1
  55. package/lib/module/components/CardForm.js.map +1 -1
  56. package/lib/module/components/GooglePayButtonNative.js.map +1 -1
  57. package/lib/module/components/PlatformPayButton.js +1 -1
  58. package/lib/module/components/PlatformPayButton.js.map +1 -1
  59. package/lib/module/functions.js +1 -1
  60. package/lib/module/functions.js.map +1 -1
  61. package/lib/module/hooks/useStripe.js +1 -1
  62. package/lib/module/hooks/useStripe.js.map +1 -1
  63. package/lib/module/index.js +1 -1
  64. package/lib/module/index.js.map +1 -1
  65. package/lib/module/types/ApplePay.js.map +1 -1
  66. package/lib/module/types/PaymentIntent.js.map +1 -1
  67. package/lib/module/types/PaymentSheet.js +1 -1
  68. package/lib/module/types/PaymentSheet.js.map +1 -1
  69. package/lib/module/types/PlatformPay.js.map +1 -1
  70. package/lib/module/types/components/CardFieldInput.js.map +1 -1
  71. package/lib/module/types/components/CardFormView.js.map +1 -1
  72. package/lib/module/types/components/GooglePayButtonComponent.js.map +1 -1
  73. package/lib/module/types/index.js +1 -1
  74. package/lib/module/types/index.js.map +1 -1
  75. package/lib/typescript/src/NativeStripeSdk.d.ts +4 -15
  76. package/lib/typescript/src/components/ApplePayButtonNative.d.ts +1 -1
  77. package/lib/typescript/src/components/CardField.d.ts +2 -0
  78. package/lib/typescript/src/components/CardForm.d.ts +2 -0
  79. package/lib/typescript/src/components/GooglePayButtonNative.d.ts +1 -1
  80. package/lib/typescript/src/components/PlatformPayButton.d.ts +2 -1
  81. package/lib/typescript/src/functions.d.ts +8 -27
  82. package/lib/typescript/src/hooks/usePlatformPay.d.ts +1 -1
  83. package/lib/typescript/src/hooks/useStripe.d.ts +2 -18
  84. package/lib/typescript/src/index.d.ts +0 -7
  85. package/lib/typescript/src/types/ApplePay.d.ts +0 -52
  86. package/lib/typescript/src/types/PaymentIntent.d.ts +3 -2
  87. package/lib/typescript/src/types/PaymentSheet.d.ts +48 -2
  88. package/lib/typescript/src/types/PlatformPay.d.ts +35 -5
  89. package/lib/typescript/src/types/components/CardFieldInput.d.ts +1 -0
  90. package/lib/typescript/src/types/components/CardFormView.d.ts +1 -0
  91. package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts +0 -1
  92. package/lib/typescript/src/types/index.d.ts +1 -4
  93. package/package.json +1 -1
  94. package/src/NativeStripeSdk.tsx +6 -31
  95. package/src/components/ApplePayButtonNative.tsx +1 -1
  96. package/src/components/CardField.tsx +2 -0
  97. package/src/components/CardForm.tsx +2 -4
  98. package/src/components/GooglePayButtonNative.tsx +1 -1
  99. package/src/components/PlatformPayButton.tsx +2 -1
  100. package/src/functions.ts +54 -200
  101. package/src/hooks/useStripe.tsx +2 -109
  102. package/src/index.tsx +0 -7
  103. package/src/types/ApplePay.ts +0 -71
  104. package/src/types/PaymentIntent.ts +4 -2
  105. package/src/types/PaymentSheet.ts +86 -2
  106. package/src/types/PlatformPay.ts +36 -5
  107. package/src/types/components/CardFieldInput.ts +1 -0
  108. package/src/types/components/CardFormView.ts +1 -1
  109. package/src/types/components/GooglePayButtonComponent.ts +0 -1
  110. package/src/types/index.ts +0 -6
  111. package/stripe-react-native.podspec +1 -1
  112. package/lib/commonjs/components/ApplePayButton.js +0 -2
  113. package/lib/commonjs/components/ApplePayButton.js.map +0 -1
  114. package/lib/commonjs/components/GooglePayButton.js +0 -2
  115. package/lib/commonjs/components/GooglePayButton.js.map +0 -1
  116. package/lib/commonjs/hooks/useApplePay.js +0 -2
  117. package/lib/commonjs/hooks/useApplePay.js.map +0 -1
  118. package/lib/commonjs/hooks/useGooglePay.js +0 -2
  119. package/lib/commonjs/hooks/useGooglePay.js.map +0 -1
  120. package/lib/commonjs/types/GooglePay.js +0 -2
  121. package/lib/commonjs/types/GooglePay.js.map +0 -1
  122. package/lib/module/components/ApplePayButton.js +0 -2
  123. package/lib/module/components/ApplePayButton.js.map +0 -1
  124. package/lib/module/components/GooglePayButton.js +0 -2
  125. package/lib/module/components/GooglePayButton.js.map +0 -1
  126. package/lib/module/hooks/useApplePay.js +0 -2
  127. package/lib/module/hooks/useApplePay.js.map +0 -1
  128. package/lib/module/hooks/useGooglePay.js +0 -2
  129. package/lib/module/hooks/useGooglePay.js.map +0 -1
  130. package/lib/module/types/GooglePay.js +0 -2
  131. package/lib/module/types/GooglePay.js.map +0 -1
  132. package/lib/typescript/src/components/ApplePayButton.d.ts +0 -31
  133. package/lib/typescript/src/components/GooglePayButton.d.ts +0 -26
  134. package/lib/typescript/src/hooks/useApplePay.d.ts +0 -54
  135. package/lib/typescript/src/hooks/useGooglePay.d.ts +0 -11
  136. package/lib/typescript/src/types/GooglePay.d.ts +0 -47
  137. package/src/components/ApplePayButton.tsx +0 -108
  138. package/src/components/GooglePayButton.tsx +0 -58
  139. package/src/hooks/useApplePay.tsx +0 -161
  140. package/src/hooks/useGooglePay.tsx +0 -72
  141. package/src/types/GooglePay.ts +0 -74
@@ -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","_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 = useCallback(\n async (\n options?: PaymentSheet.PresentOptions\n ): Promise<PresentPaymentSheetResult> => {\n return presentPaymentSheet(options);\n },\n []\n );\n\n const _confirmPaymentSheetPayment =\n useCallback(async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n return confirmPaymentSheetPayment();\n }, []);\n\n const _handleURLCallback = useCallback(\n async (url: string): Promise<boolean> => {\n return handleURLCallback(url);\n },\n []\n );\n\n const _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":"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"}
1
+ {"version":3,"names":["useStripe","_createPaymentMethod","useCallback","data","options","createPaymentMethod","_createToken","params","createToken","_retrievePaymentIntent","clientSecret","retrievePaymentIntent","_retrieveSetupIntent","retrieveSetupIntent","_confirmPayment","paymentIntentClientSecret","confirmPayment","_handleNextAction","returnURL","handleNextAction","_confirmSetupIntent","confirmSetupIntent","_createTokenForCVCUpdate","cvc","createTokenForCVCUpdate","_initPaymentSheet","initPaymentSheet","_presentPaymentSheet","presentPaymentSheet","_confirmPaymentSheetPayment","confirmPaymentSheetPayment","_handleURLCallback","url","handleURLCallback","_collectBankAccountForPayment","collectBankAccountForPayment","_collectBankAccountForSetup","collectBankAccountForSetup","_verifyMicrodepositsForPayment","verifyMicrodepositsForPayment","_verifyMicrodepositsForSetup","verifyMicrodepositsForSetup","_canAddCardToWallet","canAddCardToWallet","_collectBankAccountToken","collectBankAccountToken","_collectFinancialConnectionsAccounts","collectFinancialConnectionsAccounts","_resetPaymentSheetCustomer","resetPaymentSheetCustomer","_isPlatformPaySupported","isPlatformPaySupported","_confirmPlatformPaySetupIntent","confirmPlatformPaySetupIntent","_confirmPlatformPayPayment","confirmPlatformPayPayment","_dismissPlatformPay","dismissPlatformPay","_createPlatformPayPaymentMethod","createPlatformPayPaymentMethod","_createPlatformPayToken","createPlatformPayToken","_updatePlatformPaySheet","updatePlatformPaySheet","_openPlatformPaySetup","openPlatformPaySetup"],"sources":["useStripe.tsx"],"sourcesContent":["import type {\n PaymentMethod,\n PaymentIntent,\n PaymentSheet,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n StripeError,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n CreateTokenResult,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForSetupResult,\n CollectBankAccountForPaymentResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n PlatformPay,\n PlatformPayError,\n} from '../types';\nimport { useCallback } from 'react';\nimport {\n confirmPayment,\n createPaymentMethod,\n retrievePaymentIntent,\n retrieveSetupIntent,\n confirmSetupIntent,\n createTokenForCVCUpdate,\n handleNextAction,\n handleURLCallback,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\n createToken,\n collectBankAccountForPayment,\n collectBankAccountForSetup,\n verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup,\n canAddCardToWallet,\n collectBankAccountToken,\n collectFinancialConnectionsAccounts,\n resetPaymentSheetCustomer,\n isPlatformPaySupported,\n confirmPlatformPaySetupIntent,\n confirmPlatformPayPayment,\n dismissPlatformPay,\n createPlatformPayPaymentMethod,\n createPlatformPayToken,\n updatePlatformPaySheet,\n openPlatformPaySetup,\n} from '../functions';\n\n/**\n * useStripe hook\n */\nexport function useStripe() {\n const _createPaymentMethod = useCallback(\n async (\n data: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n ): Promise<CreatePaymentMethodResult> => {\n return createPaymentMethod(data, options);\n },\n []\n );\n\n const _createToken = useCallback(\n async (params: Token.CreateParams): Promise<CreateTokenResult> => {\n return createToken(params);\n },\n []\n );\n\n const _retrievePaymentIntent = useCallback(\n async (clientSecret: string): Promise<RetrievePaymentIntentResult> => {\n return retrievePaymentIntent(clientSecret);\n },\n []\n );\n\n const _retrieveSetupIntent = useCallback(\n async (clientSecret: string): Promise<RetrieveSetupIntentResult> => {\n return retrieveSetupIntent(clientSecret);\n },\n []\n );\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n ): Promise<ConfirmPaymentResult> => {\n return confirmPayment(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _handleNextAction = useCallback(\n async (\n paymentIntentClientSecret: string,\n returnURL?: string\n ): Promise<HandleNextActionResult> => {\n return handleNextAction(paymentIntentClientSecret, returnURL);\n },\n []\n );\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n ): Promise<ConfirmSetupIntentResult> => {\n return confirmSetupIntent(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _createTokenForCVCUpdate = useCallback(\n async (cvc: string): Promise<CreateTokenForCVCUpdateResult> => {\n return createTokenForCVCUpdate(cvc);\n },\n []\n );\n\n const _initPaymentSheet = useCallback(\n async (\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult> => {\n return initPaymentSheet(params);\n },\n []\n );\n\n const _presentPaymentSheet = useCallback(\n async (\n options?: PaymentSheet.PresentOptions\n ): Promise<PresentPaymentSheetResult> => {\n return presentPaymentSheet(options);\n },\n []\n );\n\n const _confirmPaymentSheetPayment =\n useCallback(async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n return confirmPaymentSheetPayment();\n }, []);\n\n const _handleURLCallback = useCallback(\n async (url: string): Promise<boolean> => {\n return handleURLCallback(url);\n },\n []\n );\n\n const _collectBankAccountForPayment = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForPaymentResult> => {\n return collectBankAccountForPayment(clientSecret, params);\n },\n []\n );\n\n const _collectBankAccountForSetup = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForSetupResult> => {\n return collectBankAccountForSetup(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForPayment = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForPaymentResult> => {\n return verifyMicrodepositsForPayment(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForSetup = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForSetupResult> => {\n return verifyMicrodepositsForSetup(clientSecret, params);\n },\n []\n );\n\n const _canAddCardToWallet = useCallback(\n async (\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult> => {\n return canAddCardToWallet(params);\n },\n []\n );\n\n const _collectBankAccountToken = useCallback(\n async (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?: PlatformPay.IsGooglePaySupportedParams;\n }): Promise<boolean> => {\n return isPlatformPaySupported(params);\n },\n []\n );\n\n const _confirmPlatformPaySetupIntent = useCallback(\n async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n ): Promise<PlatformPay.ConfirmSetupIntentResult> => {\n return confirmPlatformPaySetupIntent(clientSecret, params);\n },\n []\n );\n\n const _confirmPlatformPayPayment = useCallback(\n async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n ): Promise<PlatformPay.ConfirmPaymentResult> => {\n return confirmPlatformPayPayment(clientSecret, params);\n },\n []\n );\n\n const _dismissPlatformPay = useCallback(async (): Promise<boolean> => {\n return dismissPlatformPay();\n }, []);\n\n const _createPlatformPayPaymentMethod = useCallback(\n async (\n params: PlatformPay.PaymentMethodParams\n ): Promise<PlatformPay.PaymentMethodResult> => {\n return createPlatformPayPaymentMethod(params);\n },\n []\n );\n\n const _createPlatformPayToken = useCallback(\n async (\n params: PlatformPay.PaymentMethodParams\n ): Promise<PlatformPay.TokenResult> => {\n return createPlatformPayToken(params);\n },\n []\n );\n\n const _updatePlatformPaySheet = useCallback(\n async (params: {\n applePay: {\n cartItems: Array<PlatformPay.CartSummaryItem>;\n shippingMethods: Array<PlatformPay.ShippingMethod>;\n errors: Array<PlatformPay.ApplePaySheetError>;\n };\n }): Promise<{\n error?: StripeError<PlatformPayError>;\n }> => {\n return updatePlatformPaySheet(params);\n },\n []\n );\n\n const _openPlatformPaySetup = useCallback(async (): Promise<void> => {\n return openPlatformPaySetup();\n }, []);\n\n return {\n retrievePaymentIntent: _retrievePaymentIntent,\n retrieveSetupIntent: _retrieveSetupIntent,\n confirmPayment: _confirmPayment,\n createPaymentMethod: _createPaymentMethod,\n handleNextAction: _handleNextAction,\n confirmSetupIntent: _confirmSetupIntent,\n createTokenForCVCUpdate: _createTokenForCVCUpdate,\n handleURLCallback: _handleURLCallback,\n confirmPaymentSheetPayment: _confirmPaymentSheetPayment,\n presentPaymentSheet: _presentPaymentSheet,\n initPaymentSheet: _initPaymentSheet,\n createToken: _createToken,\n collectBankAccountForPayment: _collectBankAccountForPayment,\n collectBankAccountForSetup: _collectBankAccountForSetup,\n verifyMicrodepositsForPayment: _verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup: _verifyMicrodepositsForSetup,\n canAddCardToWallet: _canAddCardToWallet,\n collectBankAccountToken: _collectBankAccountToken,\n collectFinancialConnectionsAccounts: _collectFinancialConnectionsAccounts,\n /**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\n resetPaymentSheetCustomer: _resetPaymentSheetCustomer,\n isPlatformPaySupported: _isPlatformPaySupported,\n confirmPlatformPaySetupIntent: _confirmPlatformPaySetupIntent,\n confirmPlatformPayPayment: _confirmPlatformPayPayment,\n dismissPlatformPay: _dismissPlatformPay,\n createPlatformPayPaymentMethod: _createPlatformPayPaymentMethod,\n createPlatformPayToken: _createPlatformPayToken,\n updatePlatformPaySheet: _updatePlatformPaySheet,\n openPlatformPaySetup: _openPlatformPaySetup,\n };\n}\n"],"mappings":"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"}
@@ -1,2 +1,2 @@
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];}});});
1
+ Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={useConfirmPayment:true,useConfirmSetupIntent:true,useStripe:true,usePlatformPay:true,usePaymentSheet:true,useFinancialConnectionsSheet:true,initStripe:true,StripeProvider:true,CardField:true,CardForm:true,AuBECSDebitForm:true,StripeContainer: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,"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,"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,"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,"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 _usePaymentSheet=require("./hooks/usePaymentSheet");var _useFinancialConnectionsSheet=require("./hooks/useFinancialConnectionsSheet");var _StripeProvider=require("./components/StripeProvider");var _CardField=require("./components/CardField");var _CardForm=require("./components/CardForm");var _AuBECSDebitForm=require("./components/AuBECSDebitForm");var _StripeContainer=require("./components/StripeContainer");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
@@ -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 } 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
+ {"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 { usePaymentSheet } from './hooks/usePaymentSheet';\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 { 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 { 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":"2vEACA,4DACA,oEACA,4CACA,sDACA,wDACA,kFAGA,2DAEA,iDAEA,+CAEA,6DAEA,6DAEA,iEAEA,uDAEA,iEAGA,gWAEA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["ApplePay.ts"],"sourcesContent":["export type ContactFieldsType =\n | 'emailAddress'\n | 'name'\n | 'phoneNumber'\n | 'phoneticName'\n | 'postalAddress';\n\nexport type AddressFields =\n | 'street'\n | 'city'\n | 'subAdministrativeArea'\n | 'state'\n | 'postalCode'\n | 'country'\n | 'countryCode'\n | 'subLocality';\n\nexport interface 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\ninterface PostalAddress {\n city?: string;\n country?: string;\n postalCode?: string;\n state?: string;\n street?: string;\n isoCountryCode?: string;\n subAdministrativeArea?: string;\n subLocality?: string;\n}\n\ninterface ContactName {\n familyName?: string;\n namePrefix?: string;\n nameSuffix?: string;\n givenName?: string;\n middleName?: string;\n nickname?: string;\n}\n\nexport interface ShippingContact {\n emailAddress?: string;\n name: ContactName;\n phoneNumber?: string;\n postalAddress: PostalAddress;\n}\n\nexport type CartSummaryItem =\n | DeferredCartSummaryItem\n | ImmediateCartSummaryItem\n | RecurringCartSummaryItem;\n\nexport type CartSummaryItemType = 'Deferred' | 'Immediate' | 'Recurring';\n\n/** 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: '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/** Use this type for payments that will occur immediately. */\nexport type ImmediateCartSummaryItem = {\n 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/** 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: '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: 'minute' | 'hour' | 'day' | 'month' | 'year';\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\nexport interface PresentParams {\n cartItems: CartSummaryItem[];\n country: string;\n currency: string;\n requiredShippingAddressFields?: ContactFieldsType[];\n requiredBillingContactFields?: ContactFieldsType[];\n shippingMethods?: ShippingMethod[];\n jcbEnabled?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["ApplePay.ts"],"sourcesContent":["export type CartSummaryItem =\n | DeferredCartSummaryItem\n | ImmediateCartSummaryItem\n | RecurringCartSummaryItem;\n\nexport type CartSummaryItemType = 'Deferred' | 'Immediate' | 'Recurring';\n\n/** 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: '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/** Use this type for payments that will occur immediately. */\nexport type ImmediateCartSummaryItem = {\n 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/** 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: '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: 'minute' | 'hour' | 'day' | 'month' | 'year';\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"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":["Status"],"sources":["PaymentIntent.ts"],"sourcesContent":["import type { StripeError } from '.';\nimport type { Address, BillingDetails } from './Common';\nimport type { Result as PaymentMethodResult } from './PaymentMethod';\nimport type { NextAction } from './NextAction';\nimport type * as PaymentMethod from './PaymentMethod';\nimport type { FormDetails } from './components/AuBECSDebitFormComponent';\nimport type { BankAcccountHolderType, BankAcccountType } from './Token';\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 =\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 | CashAppParams;\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\nexport type MandateData = {\n customerAcceptance: {\n online: {\n ipAddress: string;\n userAgent: string;\n };\n };\n};\n\nexport type CardParams =\n | {\n paymentMethodType: 'Card';\n paymentMethodData?: {\n token?: string;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n }\n | {\n paymentMethodType: 'Card';\n paymentMethodData: {\n paymentMethodId: string;\n cvc?: string;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n };\n\nexport interface IdealParams {\n paymentMethodType: 'Ideal';\n paymentMethodData?: {\n bankName?: string;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface FPXParams {\n paymentMethodType: 'Fpx';\n paymentMethodData?: { testOfflineBank?: boolean; mandateData?: MandateData };\n}\n\nexport interface AlipayParams {\n paymentMethodType: 'Alipay';\n paymentMethodData?: {\n mandateData?: MandateData;\n };\n}\n\nexport interface OxxoParams {\n paymentMethodType: 'Oxxo';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface SofortParams {\n paymentMethodType: 'Sofort';\n paymentMethodData: {\n country: string;\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\nexport interface GrabPayParams {\n paymentMethodType: 'GrabPay';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface BancontactParams {\n paymentMethodType: 'Bancontact';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface SepaParams {\n paymentMethodType: 'SepaDebit';\n paymentMethodData: {\n iban: string;\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface GiropayParams {\n paymentMethodType: 'Giropay';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface AfterpayClearpayParams {\n paymentMethodType: 'AfterpayClearpay';\n paymentMethodData: {\n shippingDetails: BillingDetails;\n billingDetails: BillingDetails;\n mandateData?: MandateData;\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?: BillingDetails;\n mandateData?: MandateData;\n };\n};\n\nexport interface EpsParams {\n paymentMethodType: 'Eps';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface P24Params {\n paymentMethodType: 'P24';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface WeChatPayParams {\n paymentMethodType: 'WeChatPay';\n paymentMethodData: {\n appId: string;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface AuBecsDebitParams {\n paymentMethodType: 'AuBecsDebit';\n paymentMethodData: { formDetails: FormDetails; mandateData?: MandateData };\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?: BillingDetails;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\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 mandateData?: MandateData;\n };\n};\n\nexport type PayPalParams = {\n paymentMethodType: 'PayPal';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n};\n\nexport type CashAppParams = {\n paymentMethodType: 'CashApp';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n};\n\nexport type CollectBankAccountParams = {\n paymentMethodType: 'USBankAccount';\n paymentMethodData: {\n billingDetails: {\n name: string;\n email?: string;\n };\n mandateData?: MandateData;\n };\n};\n"],"mappings":"kFAmEYA,OAAM,iCAANA,MAAM,EAANA,MAAM,0BAANA,MAAM,kDAANA,MAAM,gDAANA,MAAM,wBAANA,MAAM,4BAANA,MAAM,oCAANA,MAAM,sCAANA,MAAM,yBAANA,MAAM,kBAANA,MAAM"}
1
+ {"version":3,"names":["Status"],"sources":["PaymentIntent.ts"],"sourcesContent":["import type { StripeError } from '.';\nimport type { Address, BillingDetails } from './Common';\nimport type { Result as PaymentMethodResult } from './PaymentMethod';\nimport type { NextAction } from './NextAction';\nimport type * as PaymentMethod from './PaymentMethod';\nimport type { FormDetails } from './components/AuBECSDebitFormComponent';\nimport type { BankAcccountHolderType, BankAcccountType } from './Token';\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: CaptureMethod;\n confirmationMethod: CaptureMethod;\n lastPaymentError: LastPaymentError | null;\n shipping: ShippingDetails | null;\n nextAction: NextAction | null;\n}\n\nexport type CaptureMethod = 'Automatic' | 'Manual';\n\nexport type ConfirmParams =\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 | CashAppParams;\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\nexport type MandateData = {\n customerAcceptance: {\n online: {\n ipAddress: string;\n userAgent: string;\n };\n };\n};\n\nexport type CardParams =\n | {\n paymentMethodType: 'Card';\n paymentMethodData?: {\n token?: string;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n }\n | {\n paymentMethodType: 'Card';\n paymentMethodData: {\n paymentMethodId: string;\n cvc?: string;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n };\n\nexport interface IdealParams {\n paymentMethodType: 'Ideal';\n paymentMethodData?: {\n bankName?: string;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface FPXParams {\n paymentMethodType: 'Fpx';\n paymentMethodData?: { testOfflineBank?: boolean; mandateData?: MandateData };\n}\n\nexport interface AlipayParams {\n paymentMethodType: 'Alipay';\n paymentMethodData?: {\n mandateData?: MandateData;\n };\n}\n\nexport interface OxxoParams {\n paymentMethodType: 'Oxxo';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface SofortParams {\n paymentMethodType: 'Sofort';\n paymentMethodData: {\n country: string;\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\nexport interface GrabPayParams {\n paymentMethodType: 'GrabPay';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface BancontactParams {\n paymentMethodType: 'Bancontact';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface SepaParams {\n paymentMethodType: 'SepaDebit';\n paymentMethodData: {\n iban: string;\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface GiropayParams {\n paymentMethodType: 'Giropay';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface AfterpayClearpayParams {\n paymentMethodType: 'AfterpayClearpay';\n paymentMethodData: {\n shippingDetails: BillingDetails;\n billingDetails: BillingDetails;\n mandateData?: MandateData;\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?: BillingDetails;\n mandateData?: MandateData;\n };\n};\n\nexport interface EpsParams {\n paymentMethodType: 'Eps';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface P24Params {\n paymentMethodType: 'P24';\n paymentMethodData: {\n billingDetails: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface WeChatPayParams {\n paymentMethodType: 'WeChatPay';\n paymentMethodData: {\n appId: string;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n}\n\nexport interface AuBecsDebitParams {\n paymentMethodType: 'AuBecsDebit';\n paymentMethodData: { formDetails: FormDetails; mandateData?: MandateData };\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?: BillingDetails;\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\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 mandateData?: MandateData;\n };\n};\n\nexport type PayPalParams = {\n paymentMethodType: 'PayPal';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n};\n\nexport type CashAppParams = {\n paymentMethodType: 'CashApp';\n paymentMethodData?: {\n billingDetails?: BillingDetails;\n mandateData?: MandateData;\n };\n};\n\nexport type CollectBankAccountParams = {\n paymentMethodType: 'USBankAccount';\n paymentMethodData: {\n billingDetails: {\n name: string;\n email?: string;\n };\n mandateData?: MandateData;\n };\n};\n"],"mappings":"kFAqEYA,OAAM,iCAANA,MAAM,EAANA,MAAM,0BAANA,MAAM,kDAANA,MAAM,gDAANA,MAAM,wBAANA,MAAM,4BAANA,MAAM,oCAANA,MAAM,sCAANA,MAAM,yBAANA,MAAM,kBAANA,MAAM"}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.CollectionMode=exports.AddressCollectionMode=void 0;var CollectionMode;exports.CollectionMode=CollectionMode;(function(CollectionMode){CollectionMode["AUTOMATIC"]="automatic";CollectionMode["NEVER"]="never";CollectionMode["ALWAYS"]="always";})(CollectionMode||(exports.CollectionMode=CollectionMode={}));var AddressCollectionMode;exports.AddressCollectionMode=AddressCollectionMode;(function(AddressCollectionMode){AddressCollectionMode["AUTOMATIC"]="automatic";AddressCollectionMode["NEVER"]="never";AddressCollectionMode["FULL"]="full";})(AddressCollectionMode||(exports.AddressCollectionMode=AddressCollectionMode={}));
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.CollectionMode=exports.CaptureMethod=exports.AddressCollectionMode=void 0;var CollectionMode;exports.CollectionMode=CollectionMode;(function(CollectionMode){CollectionMode["AUTOMATIC"]="automatic";CollectionMode["NEVER"]="never";CollectionMode["ALWAYS"]="always";})(CollectionMode||(exports.CollectionMode=CollectionMode={}));var AddressCollectionMode;exports.AddressCollectionMode=AddressCollectionMode;(function(AddressCollectionMode){AddressCollectionMode["AUTOMATIC"]="automatic";AddressCollectionMode["NEVER"]="never";AddressCollectionMode["FULL"]="full";})(AddressCollectionMode||(exports.AddressCollectionMode=AddressCollectionMode={}));var CaptureMethod;exports.CaptureMethod=CaptureMethod;(function(CaptureMethod){CaptureMethod["Automatic"]="Automatic";CaptureMethod["Manual"]="Manual";CaptureMethod["AutomaticAsync"]="AutomaticAsync";})(CaptureMethod||(exports.CaptureMethod=CaptureMethod={}));
2
2
  //# sourceMappingURL=PaymentSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CollectionMode","AddressCollectionMode"],"sources":["PaymentSheet.ts"],"sourcesContent":["import type { BillingDetails, AddressDetails } from './Common';\nimport type { CartSummaryItem } from './ApplePay';\nimport type {\n ButtonType,\n RecurringPaymentRequest,\n AutomaticReloadPaymentRequest,\n MultiMerchantRequest,\n} from './PlatformPay';\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 /** Configuration for how billing details are collected during checkout. */\n billingDetailsCollectionConfiguration?: BillingDetailsCollectionConfiguration;\n /** PaymentSheet pre-populates the billing fields that are displayed in the Payment Sheet (only country and postal code, as of this version) with the values provided. */\n defaultBillingDetails?: BillingDetails;\n /**\n * The shipping information for the customer. If set, PaymentSheet will pre-populate the form fields with the values provided.\n * This is used to display a \"Billing address is same as shipping\" checkbox if `defaultBillingDetails` is not provided.\n * If `name` and `line1` are populated, it's also [attached to the PaymentIntent](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-shipping) during payment.\n */\n defaultShippingDetails?: AddressDetails;\n /** If true, allows payment methods that do not move money at the end of the checkout. Defaults to false.\n *\n * Some payment methods can’t guarantee you will receive funds from your customer at the end of the checkout\n * because they take time to settle (eg. most bank debits, like SEPA or ACH) or require customer action to\n * complete (e.g. OXXO, Konbini, Boleto). If this is set to true, make sure your integration listens to webhooks\n * for notifications on whether a payment has succeeded or not.\n */\n allowsDelayedPaymentMethods?: boolean;\n /** Customizes the appearance of PaymentSheet */\n appearance?: AppearanceParams;\n /** The label to use for the primary button. If not set, Payment Sheet will display suitable default labels for payment and setup intents. */\n primaryButtonLabel?: string;\n};\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 cartItems?: CartSummaryItem[];\n /** Sets the text displayed by the call to action button in the Apple Pay sheet. */\n buttonType?: ButtonType;\n /** A typical request is for a one-time payment. To support different types of payment requests, include a PaymentRequestType. Only supported on iOS 16 and up. */\n request?:\n | RecurringPaymentRequest\n | AutomaticReloadPaymentRequest\n | MultiMerchantRequest;\n /** Callback function for setting the order details (retrieved from your server) to give users the\n * ability to track and manage their purchases in Wallet. Stripe calls your implementation after the\n * payment is complete, but before iOS dismisses the Apple Pay sheet. You must call the `completion`\n * function, or else the Apple Pay sheet will hang. */\n setOrderTracking?: (\n completion: (\n orderIdentifier: string,\n orderTypeIdentifier: string,\n authenticationToken: string,\n webServiceUrl: string\n ) => void\n ) => void;\n};\n\nexport type GooglePayParams = {\n /** The two-letter ISO 3166 code of the country of your business, e.g. \"US\" */\n merchantCountryCode: string;\n /** The three-letter ISO 4217 alphabetic currency code, e.g. \"USD\" or \"EUR\". Required in order to support Google Pay when processing a Setup Intent. */\n currencyCode?: string;\n /** Whether or not to use the Google Pay test environment. Set to `true` until you have applied for and been granted access to the Production environment. */\n testEnv?: boolean;\n};\n\n/**\n * Used to customize the appearance of your PaymentSheet\n */\nexport type AppearanceParams = RecursivePartial<{\n /** Describes the appearance of fonts in your PaymentSheet */\n font: FontConfig;\n /** Describes the colors in your PaymentSheet. Provide either a base config, or both `light` and `dark` configs, which will be useed based on whether the user is in Light or Dark mode. */\n colors:\n | GlobalColorConfig\n | { light: GlobalColorConfig; dark: GlobalColorConfig };\n /** Describes the appearance of shapes in the PaymentSheet, such as buttons, inputs, and tabs. */\n shapes: {\n /** The border radius used for buttons, inputs, and tabs in your PaymentSheet.\n * @default 6.0\n */\n borderRadius: number;\n /** The border width used for inputs and tabs in your PaymentSheet.\n * @default 1.0\n */\n borderWidth: number;\n /** iOS only. The shadow used for buttons, inputs, and tabs in your PaymentSheet */\n shadow: ShadowConfig;\n };\n /** Describes the appearance of the primary \"Pay\" button at the bottom of your Payment Sheet */\n primaryButton: PrimaryButtonConfig;\n}>;\n\nexport type FontConfig = {\n /**\n * The font used for regular text. PaymentSheet will attempt to use medium and bold versions of this font if they exist.\n *\n * On iOS, this should be the \"PostScript name\" found in Font Book after installing the font.\n * On Android, this should be the name of the font file (containing only lowercase alphanumeric characters) in android/app/src/main/res/font\n *\n * @default The OS's system font\n */\n family: string;\n /** The scale factor for all fonts in your PaymentSheet. This value is required to be greater than 0. Font sizes are multiplied by this value before being displayed. For example, setting this to 1.2 increases the size of all text by 20%.\n * @default 1.0\n */\n scale: number;\n};\n\nexport type ShadowConfig = {\n /** The color of the shadow.\n * @default \"#000000\"\n * */\n color: string;\n /** The alpha or opacity of the shadow.\n * @default 0.05\n */\n opacity: number;\n /** The positioning of the shadow relative to the component. For example, a negative x and y will result in a shadow placed below and to the left of the component.\n * @default {x: 0, y: 2}\n */\n offset: { x: number; y: number };\n /** The blur radius of the shadow.\n * @default 4\n */\n blurRadius: number;\n};\n\nexport type GlobalColorConfig = {\n /** A primary color used throughout your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System blue color on iOS, and \"#007AFF\" (light) / \"#0074D4\" (dark) on Android.\n */\n primary: string;\n /** The color used for the background of your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System background color on iOS, and \"#ffffff\" (light) / \"#2e2e2e\" (dark) on Android.\n */\n background: string;\n /** The color used for the background of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System background color (light) / System secondary background color (dark) on iOS, and \"#ffffff\" (light) / \"#a9a9a9\" (dark) on Android.\n */\n componentBackground: string;\n /** The color used for the external border of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System gray (3) color on iOS, and \"#33787880\" (light) / \"#787880\" (dark) on Android.\n */\n componentBorder: string;\n /** The color used for the internal border (meaning the border is shared with another component) of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System gray (3) color on iOS, and \"#33787880\" (light) / \"#787880\" (dark) on Android.\n */\n componentDivider: string;\n /** The color of the header text in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System label color on iOS, and \"#000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n primaryText: string;\n /** The color of the label text of input fields, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System seconday label color on iOS, and \"#000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n secondaryText: string;\n /** The color of the input text in your PaymentSheet components, such as the user's card number or zip code, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default \"#000000\"\n */\n componentText: string;\n /** The color of the placeholder text of input fields, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System label color on iOS, and \"#99000000\" (light) / \"#99ffffff\" (dark) on Android.\n */\n placeholderText: string;\n /** The color used for icons in your Payment Sheet, such as the close or back icons, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System seconday label color on iOS, and \"#99000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n icon: string;\n /** The color used to indicate errors or destructive actions in your Payment Sheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System red color on iOS, and \"#ff0000\" (light) / \"#ff0000\" (dark) on Android.\n */\n error: string;\n};\n\nexport type PrimaryButtonConfig = {\n /** The font family used specifically for the primary button.\n * @default The root `appearance.font.family`\n */\n font: Pick<FontConfig, 'family'>;\n /** The colors used specifically for the primary button. Provide either a base config, or both `light` and `dark` configs, which will be useed based on whether the user is in Light or Dark mode. */\n colors:\n | PrimaryButtonColorConfig\n | { light: PrimaryButtonColorConfig; dark: PrimaryButtonColorConfig };\n /** Describes the border and shadow of the primary button. */\n shapes: {\n /** The border radius used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.borderRadius`\n */\n borderRadius: number;\n /** The border width used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.borderWidth`\n */\n borderWidth: number;\n /** iOS only. The shadow used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.shadow`\n */\n shadow: ShadowConfig;\n };\n};\n\nexport type PrimaryButtonColorConfig = {\n /** The background color used for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The root `appearance.colors.primary`\n */\n background: string;\n /** The color of the text for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default White or black, depending on the color of the button.\n */\n text: string;\n /** The border color used for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System quaternary label on iOS, transparent on Android.\n */\n border: string;\n};\n\ntype RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? RecursivePartial<U>[]\n : T[P] extends object\n ? RecursivePartial<T[P]>\n : T[P];\n};\nexport interface PaymentOption {\n label: string;\n image: string;\n}\n\nexport type PresentOptions = {\n /** The number of milliseconds (after presenting) before the Payment Sheet closes automatically, at which point\n *`presentPaymentSheet` will resolve with an `error.code` of `PaymentSheetError.Timeout`. The default is no timeout.\n */\n timeout?: number;\n};\n\nexport type BillingDetailsCollectionConfiguration = {\n /** How to collect the name field. Defaults to `CollectionMode.automatic`. */\n name?: CollectionMode;\n /** How to collect the phone field. Defaults to `CollectionMode.automatic`. */\n phone?: CollectionMode;\n /** How to collect the email field. Defaults to `CollectionMode.automatic`. */\n email?: CollectionMode;\n /** How to collect the billing address. Defaults to `CollectionMode.automatic`. */\n address?: AddressCollectionMode;\n /** Whether the values included in `Configuration.defaultBillingDetails` should be attached to the payment method, this includes fields that aren't displayed in the form. If `false` (the default), those values will only be used to prefill the corresponding fields in the form. */\n attachDefaultsToPaymentMethod?: Boolean;\n};\n\nexport enum CollectionMode {\n /** The field may or may not be collected depending on the Payment Method's requirements. */\n AUTOMATIC = 'automatic',\n /** The field will never be collected. If this field is required by the Payment Method, you must provide it as part of `defaultBillingDetails`. */\n NEVER = 'never',\n /** The field will always be collected, even if it isn't required for the Payment Method. */\n ALWAYS = 'always',\n}\n\nexport enum AddressCollectionMode {\n /** Only the fields required by the Payment Method will be collected, which may be none. */\n AUTOMATIC = 'automatic',\n /** Billing address will never be collected. If the Payment Method requires a billing address, you must provide it as part of `defaultBillingDetails`. */\n NEVER = 'never',\n /** Collect the full billing address, regardless of the Payment Method's requirements. */\n FULL = 'full',\n}\n"],"mappings":"wHAwRYA,eAAc,iDAAdA,cAAc,EAAdA,cAAc,0BAAdA,cAAc,kBAAdA,cAAc,uBAAdA,cAAc,0BAAdA,cAAc,SASdC,sBAAqB,+DAArBA,qBAAqB,EAArBA,qBAAqB,0BAArBA,qBAAqB,kBAArBA,qBAAqB,mBAArBA,qBAAqB,iCAArBA,qBAAqB"}
1
+ {"version":3,"names":["CollectionMode","AddressCollectionMode","CaptureMethod"],"sources":["PaymentSheet.ts"],"sourcesContent":["import type { BillingDetails, AddressDetails } from './Common';\nimport type { CartSummaryItem } from './ApplePay';\nimport type {\n ButtonType,\n RecurringPaymentRequest,\n AutomaticReloadPaymentRequest,\n MultiMerchantRequest,\n} from './PlatformPay';\nimport type { FutureUsage } from './PaymentIntent';\nimport type { Result } from './PaymentMethod';\nimport type { StripeError } from './Errors';\n\nexport type SetupParams = IntentParams & {\n /** Your customer-facing business name. On Android, this is required and cannot be an empty string. */\n merchantDisplayName: string;\n /** The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id */\n customerId?: string;\n /** 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 /** Configuration for how billing details are collected during checkout. */\n billingDetailsCollectionConfiguration?: BillingDetailsCollectionConfiguration;\n /** PaymentSheet pre-populates the billing fields that are displayed in the Payment Sheet (only country and postal code, as of this version) with the values provided. */\n defaultBillingDetails?: BillingDetails;\n /**\n * The shipping information for the customer. If set, PaymentSheet will pre-populate the form fields with the values provided.\n * This is used to display a \"Billing address is same as shipping\" checkbox if `defaultBillingDetails` is not provided.\n * If `name` and `line1` are populated, it's also [attached to the PaymentIntent](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-shipping) during payment.\n */\n defaultShippingDetails?: AddressDetails;\n /** If true, allows payment methods that do not move money at the end of the checkout. Defaults to false.\n *\n * Some payment methods can’t guarantee you will receive funds from your customer at the end of the checkout\n * because they take time to settle (eg. most bank debits, like SEPA or ACH) or require customer action to\n * complete (e.g. OXXO, Konbini, Boleto). If this is set to true, make sure your integration listens to webhooks\n * for notifications on whether a payment has succeeded or not.\n */\n allowsDelayedPaymentMethods?: boolean;\n /** Customizes the appearance of PaymentSheet */\n appearance?: AppearanceParams;\n /** The label to use for the primary button. If not set, Payment Sheet will display suitable default labels for payment and setup intents. */\n primaryButtonLabel?: string;\n};\n\nexport type IntentParams =\n | {\n paymentIntentClientSecret: string;\n setupIntentClientSecret?: undefined;\n intentConfiguration?: never;\n }\n | {\n setupIntentClientSecret: string;\n paymentIntentClientSecret?: undefined;\n intentConfiguration?: never;\n }\n | {\n setupIntentClientSecret?: never;\n paymentIntentClientSecret?: never;\n intentConfiguration: IntentConfiguration;\n };\n\nexport type ApplePayParams = {\n /** The two-letter ISO 3166 code of the country of your business, e.g. \"US\" */\n merchantCountryCode: string;\n /**\n * An array of CartSummaryItem item objects that summarize the amount of the payment. If you're using a SetupIntent\n * for a recurring payment, you should set this to display the amount you intend to charge. */\n cartItems?: CartSummaryItem[];\n /** Sets the text displayed by the call to action button in the Apple Pay sheet. */\n buttonType?: ButtonType;\n /** A typical request is for a one-time payment. To support different types of payment requests, include a PaymentRequestType. Only supported on iOS 16 and up. */\n request?:\n | RecurringPaymentRequest\n | AutomaticReloadPaymentRequest\n | MultiMerchantRequest;\n /** Callback function for setting the order details (retrieved from your server) to give users the\n * ability to track and manage their purchases in Wallet. Stripe calls your implementation after the\n * payment is complete, but before iOS dismisses the Apple Pay sheet. You must call the `completion`\n * function, or else the Apple Pay sheet will hang. */\n setOrderTracking?: (\n completion: (\n orderIdentifier: string,\n orderTypeIdentifier: string,\n authenticationToken: string,\n webServiceUrl: string\n ) => void\n ) => void;\n};\n\nexport type GooglePayParams = {\n /** The two-letter ISO 3166 code of the country of your business, e.g. \"US\" */\n merchantCountryCode: string;\n /** The three-letter ISO 4217 alphabetic currency code, e.g. \"USD\" or \"EUR\". Required in order to support Google Pay when processing a Setup Intent. */\n currencyCode?: string;\n /** Whether or not to use the Google Pay test environment. Set to `true` until you have applied for and been granted access to the Production environment. */\n testEnv?: boolean;\n};\n\n/**\n * Used to customize the appearance of your PaymentSheet\n */\nexport type AppearanceParams = RecursivePartial<{\n /** Describes the appearance of fonts in your PaymentSheet */\n font: FontConfig;\n /** Describes the colors in your PaymentSheet. Provide either a base config, or both `light` and `dark` configs, which will be useed based on whether the user is in Light or Dark mode. */\n colors:\n | GlobalColorConfig\n | { light: GlobalColorConfig; dark: GlobalColorConfig };\n /** Describes the appearance of shapes in the PaymentSheet, such as buttons, inputs, and tabs. */\n shapes: {\n /** The border radius used for buttons, inputs, and tabs in your PaymentSheet.\n * @default 6.0\n */\n borderRadius: number;\n /** The border width used for inputs and tabs in your PaymentSheet.\n * @default 1.0\n */\n borderWidth: number;\n /** iOS only. The shadow used for buttons, inputs, and tabs in your PaymentSheet */\n shadow: ShadowConfig;\n };\n /** Describes the appearance of the primary \"Pay\" button at the bottom of your Payment Sheet */\n primaryButton: PrimaryButtonConfig;\n}>;\n\nexport type FontConfig = {\n /**\n * The font used for regular text. PaymentSheet will attempt to use medium and bold versions of this font if they exist.\n *\n * On iOS, this should be the \"PostScript name\" found in Font Book after installing the font.\n * On Android, this should be the name of the font file (containing only lowercase alphanumeric characters) in android/app/src/main/res/font\n *\n * @default The OS's system font\n */\n family: string;\n /** The scale factor for all fonts in your PaymentSheet. This value is required to be greater than 0. Font sizes are multiplied by this value before being displayed. For example, setting this to 1.2 increases the size of all text by 20%.\n * @default 1.0\n */\n scale: number;\n};\n\nexport type ShadowConfig = {\n /** The color of the shadow.\n * @default \"#000000\"\n * */\n color: string;\n /** The alpha or opacity of the shadow.\n * @default 0.05\n */\n opacity: number;\n /** The positioning of the shadow relative to the component. For example, a negative x and y will result in a shadow placed below and to the left of the component.\n * @default {x: 0, y: 2}\n */\n offset: { x: number; y: number };\n /** The blur radius of the shadow.\n * @default 4\n */\n blurRadius: number;\n};\n\nexport type GlobalColorConfig = {\n /** A primary color used throughout your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System blue color on iOS, and \"#007AFF\" (light) / \"#0074D4\" (dark) on Android.\n */\n primary: string;\n /** The color used for the background of your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System background color on iOS, and \"#ffffff\" (light) / \"#2e2e2e\" (dark) on Android.\n */\n background: string;\n /** The color used for the background of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System background color (light) / System secondary background color (dark) on iOS, and \"#ffffff\" (light) / \"#a9a9a9\" (dark) on Android.\n */\n componentBackground: string;\n /** The color used for the external border of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System gray (3) color on iOS, and \"#33787880\" (light) / \"#787880\" (dark) on Android.\n */\n componentBorder: string;\n /** The color used for the internal border (meaning the border is shared with another component) of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System gray (3) color on iOS, and \"#33787880\" (light) / \"#787880\" (dark) on Android.\n */\n componentDivider: string;\n /** The color of the header text in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System label color on iOS, and \"#000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n primaryText: string;\n /** The color of the label text of input fields, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System seconday label color on iOS, and \"#000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n secondaryText: string;\n /** The color of the input text in your PaymentSheet components, such as the user's card number or zip code, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default \"#000000\"\n */\n componentText: string;\n /** The color of the placeholder text of input fields, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System label color on iOS, and \"#99000000\" (light) / \"#99ffffff\" (dark) on Android.\n */\n placeholderText: string;\n /** The color used for icons in your Payment Sheet, such as the close or back icons, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System seconday label color on iOS, and \"#99000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n icon: string;\n /** The color used to indicate errors or destructive actions in your Payment Sheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System red color on iOS, and \"#ff0000\" (light) / \"#ff0000\" (dark) on Android.\n */\n error: string;\n};\n\nexport type PrimaryButtonConfig = {\n /** The font family used specifically for the primary button.\n * @default The root `appearance.font.family`\n */\n font: Pick<FontConfig, 'family'>;\n /** The colors used specifically for the primary button. Provide either a base config, or both `light` and `dark` configs, which will be useed based on whether the user is in Light or Dark mode. */\n colors:\n | PrimaryButtonColorConfig\n | { light: PrimaryButtonColorConfig; dark: PrimaryButtonColorConfig };\n /** Describes the border and shadow of the primary button. */\n shapes: {\n /** The border radius used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.borderRadius`\n */\n borderRadius: number;\n /** The border width used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.borderWidth`\n */\n borderWidth: number;\n /** iOS only. The shadow used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.shadow`\n */\n shadow: ShadowConfig;\n };\n};\n\nexport type PrimaryButtonColorConfig = {\n /** The background color used for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The root `appearance.colors.primary`\n */\n background: string;\n /** The color of the text for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default White or black, depending on the color of the button.\n */\n text: string;\n /** The border color used for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System quaternary label on iOS, transparent on Android.\n */\n border: string;\n};\n\ntype RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? RecursivePartial<U>[]\n : T[P] extends object\n ? RecursivePartial<T[P]>\n : T[P];\n};\nexport interface PaymentOption {\n label: string;\n image: string;\n}\n\nexport type PresentOptions = {\n /** The number of milliseconds (after presenting) before the Payment Sheet closes automatically, at which point\n *`presentPaymentSheet` will resolve with an `error.code` of `PaymentSheetError.Timeout`. The default is no timeout.\n */\n timeout?: number;\n};\n\nexport type BillingDetailsCollectionConfiguration = {\n /** How to collect the name field. Defaults to `CollectionMode.automatic`. */\n name?: CollectionMode;\n /** How to collect the phone field. Defaults to `CollectionMode.automatic`. */\n phone?: CollectionMode;\n /** How to collect the email field. Defaults to `CollectionMode.automatic`. */\n email?: CollectionMode;\n /** How to collect the billing address. Defaults to `CollectionMode.automatic`. */\n address?: AddressCollectionMode;\n /** Whether the values included in `Configuration.defaultBillingDetails` should be attached to the payment method, this includes fields that aren't displayed in the form. If `false` (the default), those values will only be used to prefill the corresponding fields in the form. */\n attachDefaultsToPaymentMethod?: Boolean;\n};\n\nexport enum CollectionMode {\n /** The field may or may not be collected depending on the Payment Method's requirements. */\n AUTOMATIC = 'automatic',\n /** The field will never be collected. If this field is required by the Payment Method, you must provide it as part of `defaultBillingDetails`. */\n NEVER = 'never',\n /** The field will always be collected, even if it isn't required for the Payment Method. */\n ALWAYS = 'always',\n}\n\nexport enum AddressCollectionMode {\n /** Only the fields required by the Payment Method will be collected, which may be none. */\n AUTOMATIC = 'automatic',\n /** Billing address will never be collected. If the Payment Method requires a billing address, you must provide it as part of `defaultBillingDetails`. */\n NEVER = 'never',\n /** Collect the full billing address, regardless of the Payment Method's requirements. */\n FULL = 'full',\n}\n\nexport type IntentCreationError = StripeError<'Failed'>;\n\nexport type IntentCreationCallbackParams =\n | {\n clientSecret: string;\n error?: never;\n }\n | {\n clientSecret?: never;\n error: IntentCreationError;\n };\n\nexport type IntentConfiguration = {\n /*\n Called when the customer confirms payment. Your implementation should create a PaymentIntent or SetupIntent on your server and call the `intentCreationCallback` with its client secret or an error if one occurred.\n - Note: You must create the PaymentIntent or SetupIntent with the same values used as the `IntentConfiguration` e.g. the same amount, currency, etc.\n - Parameters:\n - paymentMethod: The PaymentMethod representing the customer's payment details.\n - shouldSavePaymentMethod: This is `true` if the customer selected the \"Save this payment method for future use\" checkbox. Set `setup_future_usage` on the PaymentIntent to `off_session` if this is `true`.\n - intentCreationCallback: Call this with the `client_secret` of the PaymentIntent or SetupIntent created by your server or the error that occurred. If you're using customFlow: false (default), the error's localizedMessage will be displayed to the customer in the sheet. If you're using customFlow: true, the `confirm` method fails with the error.\n */\n confirmHandler: (\n paymentMethod: Result,\n shouldSavePaymentMethod: boolean,\n intentCreationCallback: (result: IntentCreationCallbackParams) => void\n ) => void;\n /* Information about the payment (PaymentIntent) or setup (SetupIntent).*/\n mode: Mode;\n /* A list of payment method types to display to the customer. If undefined or empty, we dynamically determine the payment methods using your Stripe Dashboard settings. */\n paymentMethodTypes?: Array<string>;\n};\n\nexport type Mode = PaymentMode | SetupMode;\n\n/**\n * Controls when the funds will be captured. Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method\n */\nexport enum CaptureMethod {\n /** (Default) Stripe automatically captures funds when the customer authorizes the payment. */\n Automatic = 'Automatic',\n /** Place a hold on the funds when the customer authorizes the payment, but don’t capture the funds until later. (Not all payment methods support this.) */\n Manual = 'Manual',\n /** Asynchronously capture funds when the customer authorizes the payment.\n - Note: Recommended over `CaptureMethod.Automatic` due to improved latency, but may require additional integration changes.\n - Seealso: https://stripe.com/docs/payments/payment-intents/asynchronous-capture-automatic-async */\n AutomaticAsync = 'AutomaticAsync',\n}\n\n/* Use this if your integration creates a PaymentIntent */\nexport type PaymentMode = {\n /* Amount intended to be collected in the smallest currency unit (e.g. 100 cents to charge $1.00). Shown in Apple Pay, Google Pay, Buy now pay later UIs, the Pay button, and influences available payment methods.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-amount */\n amount: number;\n /* Three-letter ISO currency code. Filters out payment methods based on supported currency.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-currency */\n currencyCode: string;\n /* Indicates that you intend to make future payments.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage */\n setupFutureUsage?: FutureUsage;\n /* Controls when the funds will be captured.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method */\n captureMethod?: CaptureMethod;\n};\n\n/* Use this if your integration creates a SetupIntent */\nexport type SetupMode = {\n /* Three-letter ISO currency code. Filters out payment methods based on supported currency.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-currency */\n currencyCode?: string;\n /* Indicates that you intend to make future payments.\n Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage */\n setupFutureUsage: FutureUsage;\n};\n"],"mappings":"8IAkSYA,eAAc,iDAAdA,cAAc,EAAdA,cAAc,0BAAdA,cAAc,kBAAdA,cAAc,uBAAdA,cAAc,0BAAdA,cAAc,SASdC,sBAAqB,+DAArBA,qBAAqB,EAArBA,qBAAqB,0BAArBA,qBAAqB,kBAArBA,qBAAqB,mBAArBA,qBAAqB,iCAArBA,qBAAqB,SA8CrBC,cAAa,+CAAbA,aAAa,EAAbA,aAAa,0BAAbA,aAAa,oBAAbA,aAAa,uCAAbA,aAAa,yBAAbA,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"names":["ApplePaySheetErrorType","ContactField","InvalidShippingField","PaymentRequestType","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 ApplePayConfirmParams = {\n /** A typical request is for a one-time payment. To support different types of payment requests, include a PaymentRequestType. Only supported on iOS 16 and up. */\n request?:\n | RecurringPaymentRequest\n | AutomaticReloadPaymentRequest\n | MultiMerchantRequest;\n};\n\nexport enum PaymentRequestType {\n Recurring = 'Recurring',\n AutomaticReload = 'AutomaticReload',\n MultiMerchant = 'MultiMerchant',\n}\n\n/** Use this for a recurring payment, typically a subscription. */\nexport type RecurringPaymentRequest = {\n type: PaymentRequestType.Recurring;\n /** A description that you provide of the recurring payment and that Apple Pay displays to the user in the sheet. */\n description: string;\n /** A URL to a web page where the user can update or delete the payment method for the recurring payment. */\n managementUrl: string;\n /** The regular billing cycle for the payment, including start and end dates, an interval, and an interval count. */\n billing: RecurringCartSummaryItem;\n /** Same as the billing property, but use this if the purchase has a trial period. */\n trialBilling?: RecurringCartSummaryItem;\n /** A localized billing agreement that the sheet displays to the user before the user authorizes the payment. */\n billingAgreement?: string;\n /** A URL you provide to receive life-cycle notifications from the Apple Pay servers about the Apple Pay merchant token for the recurring payment.\n * For more information about handling merchant token life-cycle notifications, see Receiving and handling merchant token notifications.\n */\n tokenNotificationURL?: string;\n};\n\n/** Use this for an automatic reload or refill payment, such as a store card top-up. */\nexport type AutomaticReloadPaymentRequest = {\n type: PaymentRequestType.AutomaticReload;\n /** A description that you provide of the recurring payment and that Apple Pay displays to the user in the sheet. */\n description: string;\n /** A URL to a web page where the user can update or delete the payment method for the recurring payment. */\n managementUrl: string;\n /** A short, localized description of the item. */\n label: string;\n /** This is the amount that is automatically applied to the account when the account balance drops below the threshold amount. */\n reloadAmount: string;\n /** The balance an account reaches before you apply the automatic reload amount. */\n thresholdAmount: string;\n /** A localized billing agreement that the sheet displays to the user before the user authorizes the payment. */\n billingAgreement?: string;\n /** A URL you provide to receive life-cycle notifications from the Apple Pay servers about the Apple Pay merchant token for the recurring payment.\n * For more information about handling merchant token life-cycle notifications, see Receiving and handling merchant token notifications.\n */\n tokenNotificationURL?: string;\n};\n\n/** Use this to indicate payments for multiple merchants. */\nexport type MultiMerchantRequest = {\n type: PaymentRequestType.MultiMerchant;\n merchants: Array<{\n /** The Apple Pay merchant identifier. */\n merchantIdentifier: string;\n /** An external identifier for the merchant. */\n externalIdentifier: string;\n /** The merchant’s display name that the Apple Pay server associates with the payment token. */\n merchantName: string;\n /** The merchant’s top-level domain that the Apple Pay server associates with the payment token. */\n merchantDomain?: string;\n /** The amount to authorize for the payment token. */\n amount: string;\n }>;\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 & ApplePayConfirmParams;\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":"4VAsBYA,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,SA0CpBC,mBAAkB,yDAAlBA,kBAAkB,EAAlBA,kBAAkB,0BAAlBA,kBAAkB,sCAAlBA,kBAAkB,qCAAlBA,kBAAkB,8BAAlBA,kBAAkB,SAsElBC,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","PaymentRequestType","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';\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 you include ContactField.PostalAddress in this array, 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 ApplePayConfirmParams = {\n /** A typical request is for a one-time payment. To support different types of payment requests, include a PaymentRequestType. Only supported on iOS 16 and up. */\n request?:\n | RecurringPaymentRequest\n | AutomaticReloadPaymentRequest\n | MultiMerchantRequest;\n};\n\nexport enum PaymentRequestType {\n Recurring = 'Recurring',\n AutomaticReload = 'AutomaticReload',\n MultiMerchant = 'MultiMerchant',\n}\n\n/** Use this for a recurring payment, typically a subscription. */\nexport type RecurringPaymentRequest = {\n type: PaymentRequestType.Recurring;\n /** A description that you provide of the recurring payment and that Apple Pay displays to the user in the sheet. */\n description: string;\n /** A URL to a web page where the user can update or delete the payment method for the recurring payment. */\n managementUrl: string;\n /** The regular billing cycle for the payment, including start and end dates, an interval, and an interval count. */\n billing: RecurringCartSummaryItem;\n /** Same as the billing property, but use this if the purchase has a trial period. */\n trialBilling?: RecurringCartSummaryItem;\n /** A localized billing agreement that the sheet displays to the user before the user authorizes the payment. */\n billingAgreement?: string;\n /** A URL you provide to receive life-cycle notifications from the Apple Pay servers about the Apple Pay merchant token for the recurring payment.\n * For more information about handling merchant token life-cycle notifications, see Receiving and handling merchant token notifications.\n */\n tokenNotificationURL?: string;\n};\n\n/** Use this for an automatic reload or refill payment, such as a store card top-up. */\nexport type AutomaticReloadPaymentRequest = {\n type: PaymentRequestType.AutomaticReload;\n /** A description that you provide of the recurring payment and that Apple Pay displays to the user in the sheet. */\n description: string;\n /** A URL to a web page where the user can update or delete the payment method for the recurring payment. */\n managementUrl: string;\n /** A short, localized description of the item. */\n label: string;\n /** This is the amount that is automatically applied to the account when the account balance drops below the threshold amount. */\n reloadAmount: string;\n /** The balance an account reaches before you apply the automatic reload amount. */\n thresholdAmount: string;\n /** A localized billing agreement that the sheet displays to the user before the user authorizes the payment. */\n billingAgreement?: string;\n /** A URL you provide to receive life-cycle notifications from the Apple Pay servers about the Apple Pay merchant token for the recurring payment.\n * For more information about handling merchant token life-cycle notifications, see Receiving and handling merchant token notifications.\n */\n tokenNotificationURL?: string;\n};\n\n/** Use this to indicate payments for multiple merchants. */\nexport type MultiMerchantRequest = {\n type: PaymentRequestType.MultiMerchant;\n merchants: Array<{\n /** The Apple Pay merchant identifier. */\n merchantIdentifier: string;\n /** An external identifier for the merchant. */\n externalIdentifier: string;\n /** The merchant’s display name that the Apple Pay server associates with the payment token. */\n merchantName: string;\n /** The merchant’s top-level domain that the Apple Pay server associates with the payment token. */\n merchantDomain?: string;\n /** The amount to authorize for the payment token. */\n amount: string;\n }>;\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 & ApplePayConfirmParams;\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\ninterface PostalAddress {\n city?: string;\n country?: string;\n postalCode?: string;\n state?: string;\n street?: string;\n isoCountryCode?: string;\n subAdministrativeArea?: string;\n subLocality?: string;\n}\n\ninterface ContactName {\n familyName?: string;\n namePrefix?: string;\n nameSuffix?: string;\n givenName?: string;\n middleName?: string;\n nickname?: string;\n}\n\n/** iOS only. */\nexport interface ShippingContact {\n emailAddress?: string;\n name: ContactName;\n phoneNumber?: string;\n postalAddress: PostalAddress;\n}\n\n/** Android only. */\nexport type IsGooglePaySupportedParams = {\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. Defaults to false. */\n testEnv?: boolean;\n /**\n * If `true`, Google Pay is considered ready if the customer's Google Pay wallet\n * has an existing payment method. Defaults to false.\n */\n existingPaymentMethodRequired?: boolean;\n};\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":"4VAoBYA,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,SA0CpBC,mBAAkB,yDAAlBA,kBAAkB,EAAlBA,kBAAkB,0BAAlBA,kBAAkB,sCAAlBA,kBAAkB,qCAAlBA,kBAAkB,8BAAlBA,kBAAkB,SAsElBC,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":["ValidationState"],"sources":["CardFieldInput.ts"],"sourcesContent":["import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\nimport type { CardBrand } from '../Token';\n\nexport type FieldName = 'CardNumber' | 'Cvc' | 'ExpiryDate' | 'PostalCode';\n\nexport enum ValidationState {\n Valid = 'Valid',\n Invalid = 'Invalid',\n Incomplete = 'Incomplete',\n Unknown = 'Unknown',\n}\n\nexport interface Details {\n last4: string;\n expiryMonth: number;\n expiryYear: number;\n postalCode?: string;\n brand: CardBrand;\n complete: boolean;\n validExpiryDate: ValidationState;\n validCVC: ValidationState;\n validNumber: ValidationState;\n /**\n * WARNING: Full card details are only returned when the `dangerouslyGetFullCardDetails` prop\n * on the `CardField` component is set to `true`.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n number?: string;\n cvc?: string;\n}\n\nexport interface Styles {\n borderWidth?: number;\n backgroundColor?: string;\n borderColor?: string;\n borderRadius?: number;\n textColor?: string;\n fontSize?: number;\n placeholderColor?: string;\n cursorColor?: string;\n textErrorColor?: string;\n fontFamily?: string;\n}\n\nexport interface Placeholders {\n number?: string;\n expiration?: string;\n cvc?: string;\n postalCode?: string;\n}\n\n/**\n * @ignore\n */\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n value?: Partial<Details>;\n postalCodeEnabled?: boolean;\n autofocus?: boolean;\n countryCode: string | null;\n onCardChange(event: NativeSyntheticEvent<Details>): void;\n onFocusChange(\n event: NativeSyntheticEvent<{ focusedField: FieldName | null }>\n ): void;\n cardStyle?: Styles;\n placeholders?: Placeholders;\n}\n\nexport interface Methods {\n focus(): void;\n blur(): void;\n clear(): void;\n}\n"],"mappings":"2FAKYA,gBAAe,mDAAfA,eAAe,EAAfA,eAAe,kBAAfA,eAAe,sBAAfA,eAAe,4BAAfA,eAAe,yBAAfA,eAAe,2BAAfA,eAAe"}
1
+ {"version":3,"names":["ValidationState"],"sources":["CardFieldInput.ts"],"sourcesContent":["import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\nimport type { CardBrand } from '../Token';\n\nexport type FieldName = 'CardNumber' | 'Cvc' | 'ExpiryDate' | 'PostalCode';\n\nexport enum ValidationState {\n Valid = 'Valid',\n Invalid = 'Invalid',\n Incomplete = 'Incomplete',\n Unknown = 'Unknown',\n}\n\nexport interface Details {\n last4: string;\n expiryMonth: number;\n expiryYear: number;\n postalCode?: string;\n brand: CardBrand;\n complete: boolean;\n validExpiryDate: ValidationState;\n validCVC: ValidationState;\n validNumber: ValidationState;\n /**\n * WARNING: Full card details are only returned when the `dangerouslyGetFullCardDetails` prop\n * on the `CardField` component is set to `true`.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n number?: string;\n cvc?: string;\n}\n\nexport interface Styles {\n borderWidth?: number;\n backgroundColor?: string;\n borderColor?: string;\n borderRadius?: number;\n textColor?: string;\n fontSize?: number;\n placeholderColor?: string;\n cursorColor?: string;\n textErrorColor?: string;\n fontFamily?: string;\n}\n\nexport interface Placeholders {\n number?: string;\n expiration?: string;\n cvc?: string;\n postalCode?: string;\n}\n\n/**\n * @ignore\n */\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n value?: Partial<Details>;\n postalCodeEnabled?: boolean;\n autofocus?: boolean;\n countryCode: string | null;\n onCardChange(event: NativeSyntheticEvent<Details>): void;\n onFocusChange(\n event: NativeSyntheticEvent<{ focusedField: FieldName | null }>\n ): void;\n cardStyle?: Styles;\n placeholders?: Placeholders;\n disabled?: boolean;\n}\n\nexport interface Methods {\n focus(): void;\n blur(): void;\n clear(): void;\n}\n"],"mappings":"2FAKYA,gBAAe,mDAAfA,eAAe,EAAfA,eAAe,kBAAfA,eAAe,sBAAfA,eAAe,4BAAfA,eAAe,yBAAfA,eAAe,2BAAfA,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["CardFormView.ts"],"sourcesContent":["import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\nimport type { CardBrand } from '../Token';\n\nexport type FieldName = 'CardNumber' | 'Cvc' | 'ExpiryDate' | 'PostalCode';\n\nexport interface Details {\n last4: string;\n expiryMonth: number;\n expiryYear: number;\n postalCode?: string;\n brand: CardBrand;\n complete: boolean;\n country: string;\n /**\n * WARNING: Full card details are only returned when the `dangerouslyGetFullCardDetails` prop\n * on the `CardField` component is set to `true`.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n number?: string;\n cvc?: string;\n}\n\nexport interface Styles {\n backgroundColor?: string;\n // disabledBackgroundColor?: string;\n // type?: 'borderless' | 'standard';\n borderWidth?: number;\n borderColor?: string;\n borderRadius?: number;\n textColor?: string;\n fontSize?: number;\n placeholderColor?: string;\n cursorColor?: string;\n textErrorColor?: string;\n fontFamily?: string;\n}\n\nexport interface Placeholders {\n number?: string;\n expiration?: string;\n cvc?: string;\n postalCode?: string;\n}\n\nexport type DefaultValues = {\n /** The 2-letter country code for the country selected by default on Android. If this is null, it is set by the device's configured region in the Settings app. */\n countryCode?: string;\n};\n\n/**\n * @ignore\n */\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n autofocus?: boolean;\n // isUserInteractionEnabledValue?: boolean;\n cardStyle?: Styles;\n /** Android only */\n placeholders?: Placeholders;\n /** Android only */\n defaultValues?: DefaultValues;\n // postalCodeEnabled: boolean;\n onFocusChange(\n event: NativeSyntheticEvent<{ focusedField: FieldName | null }>\n ): void;\n onFormComplete(event: NativeSyntheticEvent<Details>): void;\n}\n\nexport interface Methods {\n focus(): void;\n blur(): void;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["CardFormView.ts"],"sourcesContent":["import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\nimport type { CardBrand } from '../Token';\n\nexport type FieldName = 'CardNumber' | 'Cvc' | 'ExpiryDate' | 'PostalCode';\n\nexport interface Details {\n last4: string;\n expiryMonth: number;\n expiryYear: number;\n postalCode?: string;\n brand: CardBrand;\n complete: boolean;\n country: string;\n /**\n * WARNING: Full card details are only returned when the `dangerouslyGetFullCardDetails` prop\n * on the `CardField` component is set to `true`.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n number?: string;\n cvc?: string;\n}\n\nexport interface Styles {\n backgroundColor?: string;\n // disabledBackgroundColor?: string;\n // type?: 'borderless' | 'standard';\n borderWidth?: number;\n borderColor?: string;\n borderRadius?: number;\n textColor?: string;\n fontSize?: number;\n placeholderColor?: string;\n cursorColor?: string;\n textErrorColor?: string;\n fontFamily?: string;\n}\n\nexport interface Placeholders {\n number?: string;\n expiration?: string;\n cvc?: string;\n postalCode?: string;\n}\n\nexport type DefaultValues = {\n /** The 2-letter country code for the country selected by default on Android. If this is null, it is set by the device's configured region in the Settings app. */\n countryCode?: string;\n};\n\n/**\n * @ignore\n */\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n autofocus?: boolean;\n cardStyle?: Styles;\n /** Android only */\n placeholders?: Placeholders;\n /** Android only */\n defaultValues?: DefaultValues;\n // postalCodeEnabled: boolean;\n onFocusChange(\n event: NativeSyntheticEvent<{ focusedField: FieldName | null }>\n ): void;\n onFormComplete(event: NativeSyntheticEvent<Details>): void;\n disabled?: boolean;\n}\n\nexport interface Methods {\n focus(): void;\n blur(): void;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["GooglePayButtonComponent.ts"],"sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n type?: number;\n buttonType?: string;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["GooglePayButtonComponent.ts"],"sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n type?: number;\n}\n"],"mappings":""}
@@ -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};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;}
1
+ Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={ApplePay:true,PaymentIntent:true,PaymentMethod:true,PaymentSheet:true,SetupIntent:true,ThreeDSecure: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.FinancialConnections=exports.CardFormView=exports.CardFieldInput=exports.AuBECSDebitFormComponent=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 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 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"}
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 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 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":"6jBAeA,4DAAuC,0BACvC,sEAAiD,oCACjD,sEAAiD,oCACjD,oEAA+C,kCAC/C,kEAA6C,gCAC7C,oEAA+C,kCAC/C,uGAAkF,0DAClF,mFAA8D,sCAC9D,+EAA0D,kCAC1D,sDAAiC,oBACjC,oFAA+D,kDAC/D,kEAA6C,gCAiB7C,mYACA,iVAAyB"}
@@ -1 +1 @@
1
- {"version":3,"names":["StripeSdk","NativeModules"],"sources":["NativeStripeSdk.tsx"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n PaymentIntent,\n ApplePay,\n PlatformPay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n ApplePayResult,\n CreateTokenResult,\n GooglePayInitResult,\n PayWithGooglePayResult,\n CreateGooglePayPaymentMethodResult,\n GooglePay,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options?: PaymentIntent.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n isApplePaySupported(): Promise<boolean>;\n presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;\n confirmApplePayPayment(clientSecret: string): Promise<void>;\n updateApplePaySummaryItems(\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ): Promise<void>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n initPaymentSheetWithOrderTracking(\n params: PaymentSheet.SetupParams,\n callback?: () => void\n ): Promise<InitPaymentSheetResult>;\n presentPaymentSheet(\n options: PaymentSheet.PresentOptions\n ): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n isGooglePaySupported(params: GooglePay.IsSupportedParams): Promise<boolean>;\n initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;\n presentGooglePay(\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult>;\n createGooglePayPaymentMethod(\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n getConstants(): { API_VERSIONS: { CORE: string; ISSUING: string } };\n canAddCardToWallet(\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult>;\n isCardInWallet(params: {\n cardLastFour: string;\n }): Promise<IsCardInWalletResult>;\n collectBankAccountToken(\n clientSecret: string\n ): Promise<FinancialConnections.TokenResult>;\n collectFinancialConnectionsAccounts(\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult>;\n resetPaymentSheetCustomer(): Promise<null>;\n isPlatformPaySupported(params: {\n googlePay?: GooglePay.IsSupportedParams;\n }): Promise<boolean>;\n createPlatformPayPaymentMethod(\n params: PlatformPay.PaymentMethodParams,\n usesDeprecatedTokenFlow: boolean\n ): Promise<PlatformPay.PaymentMethodResult | PlatformPay.TokenResult>;\n dismissPlatformPay(): Promise<boolean>;\n updatePlatformPaySheet(\n summaryItems: Array<ApplePay.CartSummaryItem>,\n shippingMethods: Array<ApplePay.ShippingMethod>,\n errors: Array<PlatformPay.ApplePaySheetError>\n ): Promise<void>;\n confirmPlatformPay(\n clientSecret: string,\n params: PlatformPay.ConfirmParams,\n isPaymentIntent: boolean\n ): Promise<\n PlatformPay.ConfirmPaymentResult | PlatformPay.ConfirmSetupIntentResult\n >;\n configureOrderTracking(\n orderTypeIdentifier: string,\n orderIdentifier: string,\n webServiceUrl: string,\n authenticationToken: string\n ): Promise<void>;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"],"mappings":"gFAAA,yCA+IA,GAAQA,UAAS,CAAKC,0BAAa,CAA3BD,SAAS,CAAmB,aAErBA,SAAS"}
1
+ {"version":3,"names":["StripeSdk","NativeModules"],"sources":["NativeStripeSdk.tsx"],"sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n PaymentIntent,\n PlatformPay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n CreateTokenResult,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options?: PaymentIntent.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n intentCreationCallback(\n result: PaymentSheet.IntentCreationCallbackParams\n ): void;\n presentPaymentSheet(\n options: PaymentSheet.PresentOptions\n ): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n getConstants(): { API_VERSIONS: { CORE: string; ISSUING: string } };\n canAddCardToWallet(\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult>;\n isCardInWallet(params: {\n cardLastFour: string;\n }): Promise<IsCardInWalletResult>;\n collectBankAccountToken(\n clientSecret: string\n ): Promise<FinancialConnections.TokenResult>;\n collectFinancialConnectionsAccounts(\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult>;\n resetPaymentSheetCustomer(): Promise<null>;\n isPlatformPaySupported(params: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n }): Promise<boolean>;\n createPlatformPayPaymentMethod(\n params: PlatformPay.PaymentMethodParams,\n usesDeprecatedTokenFlow: boolean\n ): Promise<PlatformPay.PaymentMethodResult | PlatformPay.TokenResult>;\n dismissPlatformPay(): Promise<boolean>;\n updatePlatformPaySheet(\n summaryItems: Array<PlatformPay.CartSummaryItem>,\n shippingMethods: Array<PlatformPay.ShippingMethod>,\n errors: Array<PlatformPay.ApplePaySheetError>\n ): Promise<void>;\n confirmPlatformPay(\n clientSecret: string,\n params: PlatformPay.ConfirmParams,\n isPaymentIntent: boolean\n ): Promise<\n PlatformPay.ConfirmPaymentResult | PlatformPay.ConfirmSetupIntentResult\n >;\n configureOrderTracking(\n orderTypeIdentifier: string,\n orderIdentifier: string,\n webServiceUrl: string,\n authenticationToken: string\n ): Promise<void>;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"],"mappings":"gFAAA,yCAsHA,GAAQA,UAAS,CAAKC,0BAAa,CAA3BD,SAAS,CAAmB,aAErBA,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"names":["ApplePayButtonNative","requireNativeComponent"],"sources":["ApplePayButtonNative.tsx"],"sourcesContent":["import { requireNativeComponent } from 'react-native';\nimport type { ApplePayButtonComponent } from '../types';\nconst ApplePayButtonNative =\n requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');\nexport default ApplePayButtonNative;\n"],"mappings":"gFAAA,yCAEA,GAAMA,qBAAoB,CACxB,GAAAC,mCAAsB,EAAsC,gBAAgB,CAAC,CAAC,aACjED,oBAAoB"}
1
+ {"version":3,"names":["ApplePayButtonNative","requireNativeComponent"],"sources":["ApplePayButtonNative.tsx"],"sourcesContent":["import { requireNativeComponent } from 'react-native';\nimport type * as ApplePayButtonComponent from '../types/components/ApplePayButtonComponent';\nconst ApplePayButtonNative =\n requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');\nexport default ApplePayButtonNative;\n"],"mappings":"gFAAA,yCAEA,GAAMA,qBAAoB,CACxB,GAAAC,mCAAsB,EAAsC,gBAAgB,CAAC,CAAC,aACjED,oBAAoB"}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _helpers=require("../helpers");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode"];var _this=this,_jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/CardField.tsx";function _getRequireWildcardCache(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;}var CardFieldNative=(0,_reactNative.requireNativeComponent)('CardField');var CardField=(0,_react.forwardRef)(function(_ref,ref){var onCardChange=_ref.onCardChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,postalCodeEnabled=_ref.postalCodeEnabled,countryCode=_ref.countryCode,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onCardChangeHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,validExpiryDate:card.validExpiryDate,validNumber:card.validNumber,validCVC:card.validCVC};if(card.hasOwnProperty('postalCode')){data.postalCode=card.postalCode||'';}if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onCardChange&&card.complete){console.warn("[stripe-react-native] \u26A0\uFE0F WARNING: You've enabled `dangerouslyGetFullCardDetails`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance");}}onCardChange==null?void 0:onCardChange(data);},[onCardChange]);var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);onFocus==null?void 0:onFocus(focusedField);}else{onBlur==null?void 0:onBlur();}},[onFocus,onBlur]);var focus=function focus(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'focus',[]);};var blur=function blur(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'blur',[]);};var clear=function clear(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'clear',[]);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur,clear:clear};});(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return _react.default.createElement(CardFieldNative,(0,_extends2.default)({ref:inputRef,onCardChange:onCardChangeHandler,onFocusChange:onFocusHandler,postalCodeEnabled:postalCodeEnabled!=null?postalCodeEnabled:true,countryCode:countryCode!=null?countryCode:null,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode}},props,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:177,columnNumber:7}}));});exports.CardField=CardField;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _helpers=require("../helpers");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode"];var _this=this,_jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/CardField.tsx";function _getRequireWildcardCache(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;}var CardFieldNative=(0,_reactNative.requireNativeComponent)('CardField');var CardField=(0,_react.forwardRef)(function(_ref,ref){var onCardChange=_ref.onCardChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,postalCodeEnabled=_ref.postalCodeEnabled,countryCode=_ref.countryCode,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onCardChangeHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,validExpiryDate:card.validExpiryDate,validNumber:card.validNumber,validCVC:card.validCVC};if(card.hasOwnProperty('postalCode')){data.postalCode=card.postalCode||'';}if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onCardChange&&card.complete){console.warn("[stripe-react-native] \u26A0\uFE0F WARNING: You've enabled `dangerouslyGetFullCardDetails`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance");}}onCardChange==null?void 0:onCardChange(data);},[onCardChange]);var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);onFocus==null?void 0:onFocus(focusedField);}else{onBlur==null?void 0:onBlur();}},[onFocus,onBlur]);var focus=function focus(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'focus',[]);};var blur=function blur(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'blur',[]);};var clear=function clear(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'clear',[]);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur,clear:clear};});(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return _react.default.createElement(CardFieldNative,(0,_extends2.default)({ref:inputRef,onCardChange:onCardChangeHandler,onFocusChange:onFocusHandler,postalCodeEnabled:postalCodeEnabled!=null?postalCodeEnabled:true,countryCode:countryCode!=null?countryCode:null,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode}},props,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:179,columnNumber:7}}));});exports.CardField=CardField;
2
2
  //# sourceMappingURL=CardField.js.map