@stripe/stripe-react-native 0.42.0 → 0.44.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 (309) hide show
  1. package/.husky/pre-commit +0 -3
  2. package/CHANGELOG.md +26 -0
  3. package/android/.gradle/8.11.1/checksums/checksums.lock +0 -0
  4. package/android/.gradle/8.11.1/checksums/md5-checksums.bin +0 -0
  5. package/android/.gradle/8.11.1/checksums/sha1-checksums.bin +0 -0
  6. package/android/.gradle/8.11.1/executionHistory/executionHistory.lock +0 -0
  7. package/android/.gradle/8.11.1/fileHashes/fileHashes.lock +0 -0
  8. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  9. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  10. package/android/.project +0 -11
  11. package/android/.settings/org.eclipse.buildship.core.prefs +3 -3
  12. package/android/build.gradle +8 -1
  13. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  14. package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  15. package/android/gradle.properties +4 -1
  16. package/android/gradlew +249 -0
  17. package/android/gradlew.bat +92 -0
  18. package/android/spotless.gradle +19 -0
  19. package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormView.kt +30 -34
  20. package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +20 -10
  21. package/android/src/main/java/com/reactnativestripesdk/CardChangedEvent.kt +12 -13
  22. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +242 -105
  23. package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +58 -20
  24. package/android/src/main/java/com/reactnativestripesdk/CardFocusEvent.kt +8 -11
  25. package/android/src/main/java/com/reactnativestripesdk/CardFormCompleteEvent.kt +10 -12
  26. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +135 -87
  27. package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +57 -22
  28. package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +33 -24
  29. package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +107 -85
  30. package/android/src/main/java/com/reactnativestripesdk/FormCompleteEvent.kt +9 -11
  31. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +16 -9
  32. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +36 -28
  33. package/android/src/main/java/com/reactnativestripesdk/GooglePayLauncherFragment.kt +67 -43
  34. package/android/src/main/java/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.kt +21 -16
  35. package/android/src/main/java/com/reactnativestripesdk/GooglePayRequestHelper.kt +101 -56
  36. package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +244 -166
  37. package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +137 -156
  38. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +181 -57
  39. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +422 -258
  40. package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +11 -4
  41. package/android/src/main/java/com/reactnativestripesdk/StripeContainerView.kt +5 -1
  42. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +656 -299
  43. package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +12 -14
  44. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressLauncherFragment.kt +42 -37
  45. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetEvent.kt +12 -11
  46. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +29 -29
  47. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +50 -18
  48. package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +227 -147
  49. package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +15 -18
  50. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +33 -15
  51. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +63 -37
  52. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletCompleteEvent.kt +9 -13
  53. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/EphemeralKeyProvider.kt +15 -17
  54. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/PushProvisioningProxy.kt +76 -60
  55. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/TapAndPayProxy.kt +71 -47
  56. package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +117 -51
  57. package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +4 -3
  58. package/android/src/main/java/com/reactnativestripesdk/utils/KeepJsAwakeTask.kt +39 -0
  59. package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +295 -258
  60. package/android/src/main/java/com/reactnativestripesdk/utils/PostalCodeUtilities.kt +2 -11
  61. package/ios/CustomerSheet/CustomerSheetUtils.swift +13 -7
  62. package/ios/FinancialConnections.swift +6 -2
  63. package/ios/StripeSdk+CustomerSheet.swift +3 -1
  64. package/ios/StripeSdk+PaymentSheet.swift +86 -21
  65. package/ios/StripeSdk.m +2 -0
  66. package/ios/StripeSdk.swift +72 -11
  67. package/lib/commonjs/NativeStripeSdk.js +1 -1
  68. package/lib/commonjs/NativeStripeSdk.js.map +1 -1
  69. package/lib/commonjs/components/AddToWalletButton.js +1 -1
  70. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  71. package/lib/commonjs/components/AddressSheet.js +1 -1
  72. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  73. package/lib/commonjs/components/ApplePayButtonNative.js +1 -1
  74. package/lib/commonjs/components/ApplePayButtonNative.js.map +1 -1
  75. package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
  76. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  77. package/lib/commonjs/components/CardField.js +1 -1
  78. package/lib/commonjs/components/CardField.js.map +1 -1
  79. package/lib/commonjs/components/CardForm.js +1 -1
  80. package/lib/commonjs/components/CardForm.js.map +1 -1
  81. package/lib/commonjs/components/CustomerSheet.js +1 -1
  82. package/lib/commonjs/components/CustomerSheet.js.map +1 -1
  83. package/lib/commonjs/components/GooglePayButtonNative.js +1 -1
  84. package/lib/commonjs/components/GooglePayButtonNative.js.map +1 -1
  85. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  86. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  87. package/lib/commonjs/components/StripeContainer.js +1 -1
  88. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  89. package/lib/commonjs/components/StripeProvider.js +1 -1
  90. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  91. package/lib/commonjs/functions.js +1 -1
  92. package/lib/commonjs/functions.js.map +1 -1
  93. package/lib/commonjs/helpers.js +1 -1
  94. package/lib/commonjs/helpers.js.map +1 -1
  95. package/lib/commonjs/hooks/useConfirmPayment.js.map +1 -1
  96. package/lib/commonjs/hooks/useConfirmSetupIntent.js.map +1 -1
  97. package/lib/commonjs/hooks/useFinancialConnectionsSheet.js.map +1 -1
  98. package/lib/commonjs/hooks/usePaymentSheet.js.map +1 -1
  99. package/lib/commonjs/hooks/usePlatformPay.js.map +1 -1
  100. package/lib/commonjs/hooks/useStripe.js.map +1 -1
  101. package/lib/commonjs/index.js.map +1 -1
  102. package/lib/commonjs/package.json +1 -0
  103. package/lib/commonjs/plugin/withStripe.js +1 -1
  104. package/lib/commonjs/plugin/withStripe.js.map +1 -1
  105. package/lib/commonjs/types/ApplePay.js.map +1 -1
  106. package/lib/commonjs/types/Common.js +1 -1
  107. package/lib/commonjs/types/Common.js.map +1 -1
  108. package/lib/commonjs/types/CustomerSheet.js.map +1 -1
  109. package/lib/commonjs/types/Errors.js +1 -1
  110. package/lib/commonjs/types/Errors.js.map +1 -1
  111. package/lib/commonjs/types/FinancialConnections.js +1 -1
  112. package/lib/commonjs/types/FinancialConnections.js.map +1 -1
  113. package/lib/commonjs/types/NextAction.js.map +1 -1
  114. package/lib/commonjs/types/PaymentIntent.js +1 -1
  115. package/lib/commonjs/types/PaymentIntent.js.map +1 -1
  116. package/lib/commonjs/types/PaymentMethod.js.map +1 -1
  117. package/lib/commonjs/types/PaymentSheet.js +1 -1
  118. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  119. package/lib/commonjs/types/PlatformPay.js +1 -1
  120. package/lib/commonjs/types/PlatformPay.js.map +1 -1
  121. package/lib/commonjs/types/PushProvisioning.js +1 -1
  122. package/lib/commonjs/types/PushProvisioning.js.map +1 -1
  123. package/lib/commonjs/types/SetupIntent.js +1 -1
  124. package/lib/commonjs/types/SetupIntent.js.map +1 -1
  125. package/lib/commonjs/types/ThreeDSecure.js +1 -1
  126. package/lib/commonjs/types/ThreeDSecure.js.map +1 -1
  127. package/lib/commonjs/types/Token.js.map +1 -1
  128. package/lib/commonjs/types/components/ApplePayButtonComponent.js.map +1 -1
  129. package/lib/commonjs/types/components/AuBECSDebitFormComponent.js.map +1 -1
  130. package/lib/commonjs/types/components/CardFieldInput.js +1 -1
  131. package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
  132. package/lib/commonjs/types/components/CardFormView.js.map +1 -1
  133. package/lib/commonjs/types/components/GooglePayButtonComponent.js.map +1 -1
  134. package/lib/commonjs/types/index.js +1 -1
  135. package/lib/commonjs/types/index.js.map +1 -1
  136. package/lib/module/NativeStripeSdk.js +1 -1
  137. package/lib/module/NativeStripeSdk.js.map +1 -1
  138. package/lib/module/components/AddToWalletButton.js +1 -1
  139. package/lib/module/components/AddToWalletButton.js.map +1 -1
  140. package/lib/module/components/AddressSheet.js +1 -1
  141. package/lib/module/components/AddressSheet.js.map +1 -1
  142. package/lib/module/components/ApplePayButtonNative.js +1 -1
  143. package/lib/module/components/ApplePayButtonNative.js.map +1 -1
  144. package/lib/module/components/AuBECSDebitForm.js +1 -1
  145. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  146. package/lib/module/components/CardField.js +1 -1
  147. package/lib/module/components/CardField.js.map +1 -1
  148. package/lib/module/components/CardForm.js +1 -1
  149. package/lib/module/components/CardForm.js.map +1 -1
  150. package/lib/module/components/CustomerSheet.js +1 -1
  151. package/lib/module/components/CustomerSheet.js.map +1 -1
  152. package/lib/module/components/GooglePayButtonNative.js +1 -1
  153. package/lib/module/components/GooglePayButtonNative.js.map +1 -1
  154. package/lib/module/components/PlatformPayButton.js +1 -1
  155. package/lib/module/components/PlatformPayButton.js.map +1 -1
  156. package/lib/module/components/StripeContainer.js +1 -1
  157. package/lib/module/components/StripeContainer.js.map +1 -1
  158. package/lib/module/components/StripeProvider.js +1 -1
  159. package/lib/module/components/StripeProvider.js.map +1 -1
  160. package/lib/module/functions.js +1 -1
  161. package/lib/module/functions.js.map +1 -1
  162. package/lib/module/helpers.js +1 -1
  163. package/lib/module/helpers.js.map +1 -1
  164. package/lib/module/hooks/useConfirmPayment.js.map +1 -1
  165. package/lib/module/hooks/useConfirmSetupIntent.js.map +1 -1
  166. package/lib/module/hooks/useFinancialConnectionsSheet.js.map +1 -1
  167. package/lib/module/hooks/usePaymentSheet.js.map +1 -1
  168. package/lib/module/hooks/usePlatformPay.js.map +1 -1
  169. package/lib/module/hooks/useStripe.js.map +1 -1
  170. package/lib/module/index.js.map +1 -1
  171. package/lib/module/package.json +1 -0
  172. package/lib/module/plugin/withStripe.js +1 -1
  173. package/lib/module/plugin/withStripe.js.map +1 -1
  174. package/lib/module/types/ApplePay.js.map +1 -1
  175. package/lib/module/types/Common.js +1 -1
  176. package/lib/module/types/Common.js.map +1 -1
  177. package/lib/module/types/CustomerSheet.js.map +1 -1
  178. package/lib/module/types/Errors.js +1 -1
  179. package/lib/module/types/Errors.js.map +1 -1
  180. package/lib/module/types/FinancialConnections.js +1 -1
  181. package/lib/module/types/FinancialConnections.js.map +1 -1
  182. package/lib/module/types/NextAction.js.map +1 -1
  183. package/lib/module/types/PaymentIntent.js +1 -1
  184. package/lib/module/types/PaymentIntent.js.map +1 -1
  185. package/lib/module/types/PaymentMethod.js.map +1 -1
  186. package/lib/module/types/PaymentSheet.js +1 -1
  187. package/lib/module/types/PaymentSheet.js.map +1 -1
  188. package/lib/module/types/PlatformPay.js +1 -1
  189. package/lib/module/types/PlatformPay.js.map +1 -1
  190. package/lib/module/types/PushProvisioning.js +1 -1
  191. package/lib/module/types/PushProvisioning.js.map +1 -1
  192. package/lib/module/types/SetupIntent.js +1 -1
  193. package/lib/module/types/SetupIntent.js.map +1 -1
  194. package/lib/module/types/ThreeDSecure.js +1 -1
  195. package/lib/module/types/ThreeDSecure.js.map +1 -1
  196. package/lib/module/types/Token.js.map +1 -1
  197. package/lib/module/types/components/ApplePayButtonComponent.js.map +1 -1
  198. package/lib/module/types/components/AuBECSDebitFormComponent.js.map +1 -1
  199. package/lib/module/types/components/CardFieldInput.js +1 -1
  200. package/lib/module/types/components/CardFieldInput.js.map +1 -1
  201. package/lib/module/types/components/CardFormView.js.map +1 -1
  202. package/lib/module/types/components/GooglePayButtonComponent.js.map +1 -1
  203. package/lib/module/types/index.js +1 -1
  204. package/lib/module/types/index.js.map +1 -1
  205. package/lib/typescript/src/NativeStripeSdk.d.ts +4 -3
  206. package/lib/typescript/src/NativeStripeSdk.d.ts.map +1 -0
  207. package/lib/typescript/src/components/AddToWalletButton.d.ts +3 -1
  208. package/lib/typescript/src/components/AddToWalletButton.d.ts.map +1 -0
  209. package/lib/typescript/src/components/AddressSheet.d.ts +4 -2
  210. package/lib/typescript/src/components/AddressSheet.d.ts.map +1 -0
  211. package/lib/typescript/src/components/ApplePayButtonNative.d.ts +1 -0
  212. package/lib/typescript/src/components/ApplePayButtonNative.d.ts.map +1 -0
  213. package/lib/typescript/src/components/AuBECSDebitForm.d.ts +3 -1
  214. package/lib/typescript/src/components/AuBECSDebitForm.d.ts.map +1 -0
  215. package/lib/typescript/src/components/CardField.d.ts +1 -0
  216. package/lib/typescript/src/components/CardField.d.ts.map +1 -0
  217. package/lib/typescript/src/components/CardForm.d.ts +1 -0
  218. package/lib/typescript/src/components/CardForm.d.ts.map +1 -0
  219. package/lib/typescript/src/components/CustomerSheet.d.ts +2 -1
  220. package/lib/typescript/src/components/CustomerSheet.d.ts.map +1 -0
  221. package/lib/typescript/src/components/GooglePayButtonNative.d.ts +1 -0
  222. package/lib/typescript/src/components/GooglePayButtonNative.d.ts.map +1 -0
  223. package/lib/typescript/src/components/PlatformPayButton.d.ts +3 -1
  224. package/lib/typescript/src/components/PlatformPayButton.d.ts.map +1 -0
  225. package/lib/typescript/src/components/StripeContainer.d.ts +2 -1
  226. package/lib/typescript/src/components/StripeContainer.d.ts.map +1 -0
  227. package/lib/typescript/src/components/StripeProvider.d.ts +3 -2
  228. package/lib/typescript/src/components/StripeProvider.d.ts.map +1 -0
  229. package/lib/typescript/src/functions.d.ts +6 -5
  230. package/lib/typescript/src/functions.d.ts.map +1 -0
  231. package/lib/typescript/src/helpers.d.ts +1 -0
  232. package/lib/typescript/src/helpers.d.ts.map +1 -0
  233. package/lib/typescript/src/hooks/useConfirmPayment.d.ts +2 -1
  234. package/lib/typescript/src/hooks/useConfirmPayment.d.ts.map +1 -0
  235. package/lib/typescript/src/hooks/useConfirmSetupIntent.d.ts +1 -0
  236. package/lib/typescript/src/hooks/useConfirmSetupIntent.d.ts.map +1 -0
  237. package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts +3 -2
  238. package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts.map +1 -0
  239. package/lib/typescript/src/hooks/usePaymentSheet.d.ts +2 -1
  240. package/lib/typescript/src/hooks/usePaymentSheet.d.ts.map +1 -0
  241. package/lib/typescript/src/hooks/usePlatformPay.d.ts +4 -3
  242. package/lib/typescript/src/hooks/usePlatformPay.d.ts.map +1 -0
  243. package/lib/typescript/src/hooks/useStripe.d.ts +11 -8
  244. package/lib/typescript/src/hooks/useStripe.d.ts.map +1 -0
  245. package/lib/typescript/src/index.d.ts +1 -0
  246. package/lib/typescript/src/index.d.ts.map +1 -0
  247. package/lib/typescript/src/plugin/withStripe.d.ts +2 -1
  248. package/lib/typescript/src/plugin/withStripe.d.ts.map +1 -0
  249. package/lib/typescript/src/types/ApplePay.d.ts +6 -5
  250. package/lib/typescript/src/types/ApplePay.d.ts.map +1 -0
  251. package/lib/typescript/src/types/Common.d.ts +4 -1
  252. package/lib/typescript/src/types/Common.d.ts.map +1 -0
  253. package/lib/typescript/src/types/CustomerSheet.d.ts +16 -4
  254. package/lib/typescript/src/types/CustomerSheet.d.ts.map +1 -0
  255. package/lib/typescript/src/types/Errors.d.ts +2 -1
  256. package/lib/typescript/src/types/Errors.d.ts.map +1 -0
  257. package/lib/typescript/src/types/FinancialConnections.d.ts +21 -17
  258. package/lib/typescript/src/types/FinancialConnections.d.ts.map +1 -0
  259. package/lib/typescript/src/types/NextAction.d.ts +9 -8
  260. package/lib/typescript/src/types/NextAction.d.ts.map +1 -0
  261. package/lib/typescript/src/types/PaymentIntent.d.ts +16 -15
  262. package/lib/typescript/src/types/PaymentIntent.d.ts.map +1 -0
  263. package/lib/typescript/src/types/PaymentMethod.d.ts +21 -16
  264. package/lib/typescript/src/types/PaymentMethod.d.ts.map +1 -0
  265. package/lib/typescript/src/types/PaymentSheet.d.ts +91 -22
  266. package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -0
  267. package/lib/typescript/src/types/PlatformPay.d.ts +22 -21
  268. package/lib/typescript/src/types/PlatformPay.d.ts.map +1 -0
  269. package/lib/typescript/src/types/PushProvisioning.d.ts +5 -4
  270. package/lib/typescript/src/types/PushProvisioning.d.ts.map +1 -0
  271. package/lib/typescript/src/types/SetupIntent.d.ts +4 -3
  272. package/lib/typescript/src/types/SetupIntent.d.ts.map +1 -0
  273. package/lib/typescript/src/types/ThreeDSecure.d.ts +1 -0
  274. package/lib/typescript/src/types/ThreeDSecure.d.ts.map +1 -0
  275. package/lib/typescript/src/types/Token.d.ts +10 -9
  276. package/lib/typescript/src/types/Token.d.ts.map +1 -0
  277. package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts +3 -2
  278. package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts.map +1 -0
  279. package/lib/typescript/src/types/components/AuBECSDebitFormComponent.d.ts +1 -0
  280. package/lib/typescript/src/types/components/AuBECSDebitFormComponent.d.ts.map +1 -0
  281. package/lib/typescript/src/types/components/CardFieldInput.d.ts +8 -5
  282. package/lib/typescript/src/types/components/CardFieldInput.d.ts.map +1 -0
  283. package/lib/typescript/src/types/components/CardFormView.d.ts +9 -6
  284. package/lib/typescript/src/types/components/CardFormView.d.ts.map +1 -0
  285. package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts +1 -0
  286. package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts.map +1 -0
  287. package/lib/typescript/src/types/index.d.ts +24 -23
  288. package/lib/typescript/src/types/index.d.ts.map +1 -0
  289. package/package.json +32 -40
  290. package/src/NativeStripeSdk.tsx +4 -2
  291. package/src/components/CardField.tsx +1 -1
  292. package/src/components/CardForm.tsx +12 -9
  293. package/src/components/CustomerSheet.tsx +4 -6
  294. package/src/components/StripeProvider.tsx +17 -0
  295. package/src/functions.ts +13 -14
  296. package/src/helpers.ts +2 -1
  297. package/src/types/Common.ts +3 -0
  298. package/src/types/CustomerSheet.ts +11 -0
  299. package/src/types/FinancialConnections.ts +3 -0
  300. package/src/types/PaymentMethod.ts +5 -1
  301. package/src/types/PaymentSheet.ts +85 -4
  302. package/src/types/components/CardFieldInput.ts +8 -4
  303. package/src/types/components/CardFormView.ts +8 -4
  304. package/stripe-react-native.podspec +2 -1
  305. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  306. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  307. package/android/.gradle/8.9/gc.properties +0 -0
  308. /package/android/.gradle/{8.9 → 8.11.1}/fileChanges/last-build.bin +0 -0
  309. /package/android/.gradle/{8.9/dependencies-accessors → 8.11.1}/gc.properties +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["createPaymentMethod","params","options","NativeStripeSdk","paymentMethod","error","createToken","type","country","toLowerCase","routingNumber","MissingRoutingNumber","token","retrievePaymentIntent","clientSecret","paymentIntent","retrieveSetupIntent","setupIntent","confirmPayment","paymentIntentClientSecret","handleNextAction","returnURL","Platform","OS","createError","handleNextActionForSetup","setupIntentClientSecret","confirmSetupIntent","createTokenForCVCUpdate","cvc","tokenId","handleURLCallback","url","stripeHandled","verifyMicrodepositsForPayment","verifyMicrodeposits","verifyMicrodepositsForSetup","eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","confirmHandlerCallback","orderTrackingCallbackListener","financialConnectionsEventListener","initPaymentSheet","result","confirmHandler","intentConfiguration","remove","addListener","shouldSavePaymentMethod","intentCreationCallback","orderTrackingCallback","applePay","setOrderTracking","configureOrderTracking","console","warn","paymentOption","presentPaymentSheet","confirmPaymentSheetPayment","resetPaymentSheetCustomer","collectBankAccountForPayment","onEvent","collectBankAccount","collectBankAccountForSetup","collectBankAccountToken","session","collectFinancialConnectionsAccounts","canAddCardToWallet","canAddCard","details","isCardInWallet","isInWallet","Constants","getConstants","isPlatformPaySupported","confirmPlatformPaySetupIntent","confirmPlatformPay","confirmPlatformPayPayment","dismissPlatformPay","didDismiss","createPlatformPayPaymentMethod","shippingContact","createPlatformPayToken","updatePlatformPaySheet","cartItems","shippingMethods","errors","openPlatformPaySetup","openApplePaySetup"],"sources":["functions.ts"],"sourcesContent":["import { createError } from './helpers';\nimport { MissingRoutingNumber } from './types/Errors';\nimport NativeStripeSdk from './NativeStripeSdk';\nimport type {\n PlatformPayError,\n ConfirmPaymentResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n PaymentIntent,\n ConfirmSetupIntentResult,\n CreatePaymentMethodResult,\n CreateTokenForCVCUpdateResult,\n CreateTokenResult,\n HandleNextActionResult,\n HandleNextActionForSetupResult,\n InitPaymentSheetResult,\n PaymentMethod,\n PaymentSheet,\n PresentPaymentSheetResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n StripeError,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForPaymentResult,\n CollectBankAccountForSetupResult,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n PlatformPay,\n} from './types';\nimport {\n Platform,\n NativeEventEmitter,\n NativeModules,\n EmitterSubscription,\n} from 'react-native';\nimport type { CollectFinancialConnectionsAccountsParams } from './types/FinancialConnections';\nimport type { CollectBankAccountTokenParams } from './types/PaymentMethod';\n\nexport const createPaymentMethod = async (\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n): Promise<CreatePaymentMethodResult> => {\n try {\n const { paymentMethod, error } = await NativeStripeSdk.createPaymentMethod(\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createToken = async (\n params: Token.CreateParams\n): Promise<CreateTokenResult> => {\n if (\n params.type === 'BankAccount' &&\n params.country?.toLowerCase() === 'us' &&\n !params.routingNumber\n ) {\n return {\n error: MissingRoutingNumber,\n };\n }\n\n try {\n const { token, error } = await NativeStripeSdk.createToken(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrievePaymentIntent = async (\n clientSecret: string\n): Promise<RetrievePaymentIntentResult> => {\n try {\n const { paymentIntent, error } =\n await NativeStripeSdk.retrievePaymentIntent(clientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrieveSetupIntent = async (\n clientSecret: string\n): Promise<RetrieveSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.retrieveSetupIntent(\n clientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Confirm and, if necessary, authenticate a PaymentIntent.\n *\n * @param {string} paymentIntentClientSecret The client_secret of the associated [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param {object=} params An optional object that contains data related to the payment method used to confirm this payment. If no object is provided (undefined), then it is assumed that the payment method has already been [attached to the Payment Intent](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method).\n * @param {object=} options An optional object that contains options for this payment method.\n * @returns A promise that resolves to an object containing either a `paymentIntent` field, or an `error` field.\n */\nexport const confirmPayment = async (\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n): Promise<ConfirmPaymentResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.confirmPayment(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** Handles any nextAction required to authenticate the PaymentIntent.\n * Call this method if you are using manual confirmation. See https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=custom\n *\n * @param {string} paymentIntentClientSecret The client secret associated with the PaymentIntent.\n * @param {string=} returnURL An optional return URL so the Stripe SDK can redirect back to your app after authentication. This should match the `return_url` you specified during PaymentIntent confirmation.\n * */\nexport const handleNextAction = async (\n paymentIntentClientSecret: string,\n returnURL?: string\n): Promise<HandleNextActionResult> => {\n try {\n const { paymentIntent, error } =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleNextAction(\n paymentIntentClientSecret,\n returnURL ?? null\n )\n : await NativeStripeSdk.handleNextAction(paymentIntentClientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/** Handles any nextAction required to authenticate the SetupIntent.\n * Call this method if you are confirming the SetupIntent on your backend and get a status of requires_action.\n *\n * @param {string} setupIntentClientSecret The client secret associated with the SetupIntent.\n * @param {string=} returnURL An optional return URL so the Stripe SDK can redirect back to your app after authentication. This should match the `return_url` you specified during PaymentIntent confirmation.\n * */\nexport const handleNextActionForSetup = async (\n setupIntentClientSecret: string,\n returnURL?: string\n): Promise<HandleNextActionForSetupResult> => {\n try {\n const { setupIntent, error } =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleNextActionForSetup(\n setupIntentClientSecret,\n returnURL ?? null\n )\n : await NativeStripeSdk.handleNextActionForSetup(\n setupIntentClientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const confirmSetupIntent = async (\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n): Promise<ConfirmSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.confirmSetupIntent(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createTokenForCVCUpdate = async (\n cvc: string\n): Promise<CreateTokenForCVCUpdateResult> => {\n try {\n const { tokenId, error } = await NativeStripeSdk.createTokenForCVCUpdate(\n cvc\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n tokenId: tokenId!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Call this method in your app whenever you receive a URL for a Stripe callback.\n * For convenience, you can pass all URLs you receive to this method first, and\n * check the return value to easily determine whether it is a callback URL that Stripe will handle\n * or if your app should process it normally. This is iOS-only, and will always return false on Android.\n */\nexport const handleURLCallback = async (url: string): Promise<boolean> => {\n const stripeHandled =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleURLCallback(url)\n : false;\n return stripeHandled;\n};\n\nexport const verifyMicrodepositsForPayment = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n true,\n clientSecret,\n params\n )) as VerifyMicrodepositsForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const verifyMicrodepositsForSetup = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n false,\n clientSecret,\n params\n )) as VerifyMicrodepositsForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nconst eventEmitter = new NativeEventEmitter(NativeModules.StripeSdk);\nlet confirmHandlerCallback: EmitterSubscription | null = null;\nlet orderTrackingCallbackListener: EmitterSubscription | null = null;\nlet financialConnectionsEventListener: EmitterSubscription | null = null;\n\nexport const initPaymentSheet = async (\n params: PaymentSheet.SetupParams\n): Promise<InitPaymentSheetResult> => {\n let result;\n const confirmHandler = params?.intentConfiguration?.confirmHandler;\n if (confirmHandler) {\n confirmHandlerCallback?.remove();\n confirmHandlerCallback = eventEmitter.addListener(\n 'onConfirmHandlerCallback',\n ({\n paymentMethod,\n shouldSavePaymentMethod,\n }: {\n paymentMethod: PaymentMethod.Result;\n shouldSavePaymentMethod: boolean;\n }) => {\n confirmHandler(\n paymentMethod,\n shouldSavePaymentMethod,\n NativeStripeSdk.intentCreationCallback\n );\n }\n );\n }\n\n const orderTrackingCallback = params?.applePay?.setOrderTracking;\n if (orderTrackingCallback) {\n orderTrackingCallbackListener?.remove();\n orderTrackingCallbackListener = eventEmitter.addListener(\n 'onOrderTrackingCallback',\n () => {\n orderTrackingCallback(NativeStripeSdk.configureOrderTracking);\n }\n );\n }\n\n try {\n if (Platform.OS === 'ios' && !params.returnURL) {\n console.warn(\n `[@stripe/stripe-react-native] You have not provided the 'returnURL' field to 'initPaymentSheet', so payment methods that require redirects will not be shown in your iOS Payment Sheet. Visit https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-set-up-return-url to learn more.`\n );\n }\n result = await NativeStripeSdk.initPaymentSheet(params);\n\n if (result.error) {\n return {\n error: result.error,\n };\n }\n return {\n paymentOption: result.paymentOption,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const presentPaymentSheet = async (\n options: PaymentSheet.PresentOptions = {}\n): Promise<PresentPaymentSheetResult> => {\n try {\n const { paymentOption, error } = await NativeStripeSdk.presentPaymentSheet(\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption: paymentOption!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const confirmPaymentSheetPayment =\n async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n try {\n const { error } = await NativeStripeSdk.confirmPaymentSheetPayment();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\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 */\nexport const resetPaymentSheetCustomer = async (): Promise<null> => {\n return await NativeStripeSdk.resetPaymentSheetCustomer();\n};\n\nexport const collectBankAccountForPayment = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForPaymentResult> => {\n financialConnectionsEventListener?.remove();\n\n if (params.onEvent) {\n financialConnectionsEventListener = eventEmitter.addListener(\n 'onFinancialConnectionsEvent',\n params.onEvent\n );\n }\n\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.collectBankAccount(\n true,\n clientSecret,\n params\n )) as CollectBankAccountForPaymentResult;\n\n financialConnectionsEventListener?.remove();\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n financialConnectionsEventListener?.remove();\n return {\n error: createError(error),\n };\n }\n};\n\nexport const collectBankAccountForSetup = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForSetupResult> => {\n financialConnectionsEventListener?.remove();\n\n if (params.onEvent) {\n financialConnectionsEventListener = eventEmitter.addListener(\n 'onFinancialConnectionsEvent',\n params.onEvent\n );\n }\n\n try {\n const { setupIntent, error } = (await NativeStripeSdk.collectBankAccount(\n false,\n clientSecret,\n params\n )) as CollectBankAccountForSetupResult;\n\n financialConnectionsEventListener?.remove();\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n financialConnectionsEventListener?.remove();\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectBankAccountToken in the [Add a Financial Connections Account to a US Custom Connect](https://stripe.com/docs/financial-connections/connect-payouts) account flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account for payouts.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @param {CollectBankAccountTokenParams} params Optional parameters.\n * @returns A promise that resolves to an object containing either `session` and `token` fields, or an error field.\n */\nexport const collectBankAccountToken = async (\n clientSecret: string,\n params: CollectBankAccountTokenParams = {}\n): Promise<FinancialConnections.TokenResult> => {\n financialConnectionsEventListener?.remove();\n\n if (params.onEvent) {\n financialConnectionsEventListener = eventEmitter.addListener(\n 'onFinancialConnectionsEvent',\n params.onEvent\n );\n }\n\n try {\n const { session, token, error } =\n await NativeStripeSdk.collectBankAccountToken(clientSecret);\n\n financialConnectionsEventListener?.remove();\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n token: token!,\n };\n } catch (error: any) {\n financialConnectionsEventListener?.remove();\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectFinancialConnectionsAccounts in the [Collect an account to build data-powered products](https://stripe.com/docs/financial-connections/other-data-powered-products) flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @param {CollectFinancialConnectionsAccountsParams} params Optional parameters.\n * @returns A promise that resolves to an object containing either a `session` field, or an error field.\n */\nexport const collectFinancialConnectionsAccounts = async (\n clientSecret: string,\n params: CollectFinancialConnectionsAccountsParams = {}\n): Promise<FinancialConnections.SessionResult> => {\n financialConnectionsEventListener?.remove();\n\n if (params.onEvent) {\n financialConnectionsEventListener = eventEmitter.addListener(\n 'onFinancialConnectionsEvent',\n params.onEvent\n );\n }\n\n try {\n const { session, error } =\n await NativeStripeSdk.collectFinancialConnectionsAccounts(clientSecret);\n\n financialConnectionsEventListener?.remove();\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n };\n } catch (error: any) {\n financialConnectionsEventListener?.remove();\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Check if the app & device support adding this card to the native wallet.\n * @param params An object containing fields for `primaryAccountIdentifier`, `cardLastFour`, and `testEnv`.\n *\n * @returns A promise resolving to an object of type CanAddCardToWalletResult. Check the `canAddCard` field, if it's true, you should show the `<AddToWalletButton />`\n */\nexport const canAddCardToWallet = async (\n params: CanAddCardToWalletParams\n): Promise<CanAddCardToWalletResult> => {\n try {\n const { canAddCard, details, error } =\n await NativeStripeSdk.canAddCardToWallet(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n canAddCard: canAddCard as boolean,\n details: details,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/** @deprecated Please use `canAddCardToWallet` instead. */\nexport const isCardInWallet = async (params: {\n cardLastFour: string;\n}): Promise<IsCardInWalletResult> => {\n try {\n const { isInWallet, token, error } = await NativeStripeSdk.isCardInWallet(\n params\n );\n\n if (error) {\n return {\n error,\n };\n }\n return {\n isInWallet: isInWallet as boolean,\n token: token,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const Constants = NativeStripeSdk.getConstants();\n\n/**\n * Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.\n * @returns A boolean indicating whether or not the native wallet is supported.\n */\nexport const isPlatformPaySupported = async (params?: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n}): Promise<boolean> => {\n return await NativeStripeSdk.isPlatformPaySupported(params ?? {});\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [SetupIntent](https://stripe.com/docs/api/setup_intents).\n * @param clientSecret The client secret of the SetupIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `setupIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPaySetupIntent = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmSetupIntentResult> => {\n try {\n const { error, setupIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n false\n )) as PlatformPay.ConfirmSetupIntentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param clientSecret The client secret of the PaymentIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPayPayment = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmPaymentResult> => {\n try {\n const { error, paymentIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n true\n )) as PlatformPay.ConfirmPaymentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this will always return false on Android. Dismisses the Apple Pay sheet if it is open.\n * @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.\n */\nexport const dismissPlatformPay = async (): Promise<boolean> => {\n if (Platform.OS !== 'ios') {\n return false;\n }\n try {\n const didDismiss = await NativeStripeSdk.dismissPlatformPay();\n return didDismiss;\n } catch (error: any) {\n return false;\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [PaymentMethod](https://stripe.com/docs/api/payment_methods).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `paymentMethod` field.\n */\nexport const createPlatformPayPaymentMethod = async (\n params: PlatformPay.PaymentMethodParams\n): Promise<PlatformPay.PaymentMethodResult> => {\n try {\n const { error, paymentMethod, shippingContact } =\n (await NativeStripeSdk.createPlatformPayPaymentMethod(\n params,\n false\n )) as PlatformPay.PaymentMethodResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n shippingContact,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * @deprecated The Tokens API is deprecated, you should use Payment Methods and `createPlatformPayPaymentMethod` instead. Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [token](https://stripe.com/docs/api/tokens).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `token` field.\n */\nexport const createPlatformPayToken = async (\n params: PlatformPay.PaymentMethodParams\n): Promise<PlatformPay.TokenResult> => {\n try {\n const { error, token, shippingContact } =\n (await NativeStripeSdk.createPlatformPayPaymentMethod(\n params,\n true\n )) as PlatformPay.TokenResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n shippingContact,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only. Update different items on the Apple Pay sheet, including the summary items, the shipping methods, and any errors shown. iOS only, this is a no-op on Android.\n * @param params an object describing the Apple Pay configuration, with the following fields:\n * - cartItems An array of payment summary items to display in the Apple Pay sheet.\n * - shippingMethods An array of shipping methods to display in the Apple Pay sheet.\n * - errors An array of errors associated with the user's input that must be corrected to proceed with payment. These errors will be shown in the Apple Pay sheet.\n *\n * @returns An object with an optional 'error' field, which is only populated if something went wrong.\n */\nexport const updatePlatformPaySheet = 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 if (Platform.OS !== 'ios') {\n return {};\n }\n\n try {\n await NativeStripeSdk.updatePlatformPaySheet(\n params.applePay.cartItems,\n params.applePay.shippingMethods,\n params.applePay.errors\n );\n\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards.\n * This method transfers control to the Wallet app on iPhone or to the Settings\n * app on iPad. For devices that don’t support Apple Pay, this method does nothing.\n */\nexport const openPlatformPaySetup = async (): Promise<void> => {\n if (Platform.OS === 'ios') {\n await NativeStripeSdk.openApplePaySetup();\n }\n};\n"],"mappings":"qqCAAA,kCACA,sCACA,0EAgCA,yCASO,GAAMA,oBAAmB,oDAAG,UACjCC,MAAkC,CAEK,IADvCC,QAAoC,2DAAG,CAAC,CAAC,CAEzC,GAAI,CACF,+BAAuCC,yBAAe,CAACH,mBAAmB,CACxEC,MAAM,CACNC,OAAO,CACR,CAHOE,aAAa,uBAAbA,aAAa,CAAEC,KAAK,uBAALA,KAAK,CAI5B,GAAIA,KAAK,CAAE,CACT,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACA,MAAO,CACLD,aAAa,CA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B,4CAIhC,CAAC"}
1
+ {"version":3,"names":["_helpers","require","_Errors","_NativeStripeSdk","_interopRequireDefault","_reactNative","createPaymentMethod","exports","_ref","_asyncToGenerator2","default","params","options","arguments","length","undefined","_yield$NativeStripeSd","NativeStripeSdk","paymentMethod","error","_x","apply","createToken","_ref2","_params$country","type","country","toLowerCase","routingNumber","MissingRoutingNumber","_yield$NativeStripeSd2","token","_x2","retrievePaymentIntent","_ref3","clientSecret","_yield$NativeStripeSd3","paymentIntent","_x3","retrieveSetupIntent","_ref4","_yield$NativeStripeSd4","setupIntent","_x4","confirmPayment","_ref5","paymentIntentClientSecret","_yield$NativeStripeSd5","_x5","_x6","handleNextAction","_ref6","returnURL","_ref7","Platform","OS","createError","_x7","_x8","handleNextActionForSetup","_ref8","setupIntentClientSecret","_ref9","_x9","_x10","confirmSetupIntent","_ref10","_yield$NativeStripeSd6","_x11","_x12","createTokenForCVCUpdate","_ref11","cvc","_yield$NativeStripeSd7","tokenId","_x13","handleURLCallback","_ref12","url","stripeHandled","_x14","verifyMicrodepositsForPayment","_ref13","_ref14","verifyMicrodeposits","_x15","_x16","verifyMicrodepositsForSetup","_ref15","_ref16","_x17","_x18","eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","confirmHandlerCallback","orderTrackingCallbackListener","financialConnectionsEventListener","initPaymentSheet","_ref17","_params$intentConfigu","_params$applePay","result","confirmHandler","intentConfiguration","_confirmHandlerCallba","remove","addListener","_ref18","shouldSavePaymentMethod","intentCreationCallback","orderTrackingCallback","applePay","setOrderTracking","_orderTrackingCallbac","configureOrderTracking","console","warn","paymentOption","_x19","presentPaymentSheet","_ref19","_yield$NativeStripeSd8","confirmPaymentSheetPayment","_ref20","_yield$NativeStripeSd9","resetPaymentSheetCustomer","_ref21","collectBankAccountForPayment","_ref22","_financialConnections","onEvent","_financialConnections2","_ref23","collectBankAccount","_financialConnections3","_x20","_x21","collectBankAccountForSetup","_ref24","_financialConnections4","_financialConnections5","_ref25","_financialConnections6","_x22","_x23","collectBankAccountToken","_ref26","_financialConnections7","_financialConnections8","_yield$NativeStripeSd10","session","_financialConnections9","_x24","collectFinancialConnectionsAccounts","_ref27","_financialConnections10","_financialConnections11","_yield$NativeStripeSd11","_financialConnections12","_x25","canAddCardToWallet","_ref28","_yield$NativeStripeSd12","canAddCard","details","_x26","isCardInWallet","_ref29","_yield$NativeStripeSd13","isInWallet","_x27","Constants","getConstants","isPlatformPaySupported","_ref30","_x28","confirmPlatformPaySetupIntent","_ref31","_ref32","confirmPlatformPay","_x29","_x30","confirmPlatformPayPayment","_ref33","_ref34","_x31","_x32","dismissPlatformPay","_ref35","didDismiss","createPlatformPayPaymentMethod","_ref36","_ref37","shippingContact","_x33","createPlatformPayToken","_ref38","_ref39","_x34","updatePlatformPaySheet","_ref40","cartItems","shippingMethods","errors","_x35","openPlatformPaySetup","_ref41","openApplePaySetup"],"sourceRoot":"../../src","sources":["functions.ts"],"mappings":"qqCAAA,IAAAA,QAAA,CAAAC,OAAA,cACA,IAAAC,OAAA,CAAAD,OAAA,mBACA,IAAAE,gBAAA,CAAAC,sBAAA,CAAAH,OAAA,uBAgCA,IAAAI,YAAA,CAAAJ,OAAA,iBASO,GAAM,CAAAK,mBAAmB,CAAAC,OAAA,CAAAD,mBAAA,gBAAAE,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EAAG,UACjCC,MAAkC,CAEK,IADvC,CAAAC,OAAoC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAEzC,GAAI,CACF,IAAAG,qBAAA,MAAuC,CAAAC,wBAAe,CAACX,mBAAmB,CACxEK,MAAM,CACNC,OACF,CAAC,CAHOM,aAAa,CAAAF,qBAAA,CAAbE,aAAa,CAAEC,KAAK,CAAAH,qBAAA,CAALG,KAAK,CAI5B,GAAIA,KAAK,CAAE,CACT,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACA,MAAO,CACLD,aAAa,C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CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBA1BY,CAAAsL,sBAAsBA,CAAAK,IAAA,SAAAJ,MAAA,CAAArL,KAAA,MAAAR,SAAA,OA0BlC,CAOM,GAAM,CAAAkM,oBAAoB,CAAAxM,OAAA,CAAAwM,oBAAA,gBAAAC,MAAA,IAAAvM,kBAAA,CAAAC,OAAA,EAAG,WAA2B,CAC7D,GAAI4C,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAE,CACzB,KAAM,CAAAtC,wBAAe,CAACgM,iBAAiB,CAAC,CAAC,CAC3C,CACF,CAAC,iBAJY,CAAAF,oBAAoBA,CAAA,SAAAC,MAAA,CAAA3L,KAAA,MAAAR,SAAA,OAIhC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.createError=createError;exports.unsupportedMethodMessage=exports.unregisterInput=exports.shouldAttributeExpo=exports.registerInput=exports.isiOS=exports.isAndroid=exports.focusInput=exports.currentlyFocusedInput=void 0;var _reactNative=require("react-native");var TextInputState=require('react-native/Libraries/Components/TextInput/TextInputState');var shouldAttributeExpo=function shouldAttributeExpo(){try{return!!_reactNative.NativeModules.NativeUnimoduleProxy;}catch(_unused){return false;}};exports.shouldAttributeExpo=shouldAttributeExpo;var isiOS=_reactNative.Platform.OS==='ios';exports.isiOS=isiOS;var isAndroid=_reactNative.Platform.OS==='android';exports.isAndroid=isAndroid;function createError(error){return{code:error.code,message:error.message,localizedMessage:error.localizedMessage,declineCode:error.declineCode,stripeErrorCode:error.stripeErrorCode,type:error.type};}var unsupportedMethodMessage=function unsupportedMethodMessage(field){return field+" method is not supported. Consider to upgrade react-native version to 0.63.x or higher";};exports.unsupportedMethodMessage=unsupportedMethodMessage;var focusInput=function focusInput(ref){if('focusInput'in TextInputState){TextInputState.focusInput(ref);}else{if(__DEV__){console.log(unsupportedMethodMessage('focusInput'));}}};exports.focusInput=focusInput;var registerInput=function registerInput(ref){if('registerInput'in TextInputState){TextInputState.registerInput(ref);}else{if(__DEV__){console.log(unsupportedMethodMessage('registerInput'));}}};exports.registerInput=registerInput;var unregisterInput=function unregisterInput(ref){if('unregisterInput'in TextInputState){TextInputState.unregisterInput(ref);}else{if(__DEV__){console.log(unsupportedMethodMessage('unregisterInput'));}}};exports.unregisterInput=unregisterInput;var currentlyFocusedInput=function currentlyFocusedInput(){if('currentlyFocusedInput'in TextInputState){return TextInputState.currentlyFocusedInput();}else{if(__DEV__){console.log(unsupportedMethodMessage('currentlyFocusedInput'));}}};exports.currentlyFocusedInput=currentlyFocusedInput;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.createError=createError;exports.unsupportedMethodMessage=exports.unregisterInput=exports.shouldAttributeExpo=exports.registerInput=exports.isiOS=exports.isAndroid=exports.focusInput=exports.currentlyFocusedInput=void 0;var _reactNative=require("react-native");var _TextInputState=_interopRequireDefault(require("react-native/Libraries/Components/TextInput/TextInputState"));var shouldAttributeExpo=exports.shouldAttributeExpo=function shouldAttributeExpo(){try{return!!_reactNative.NativeModules.NativeUnimoduleProxy;}catch(_unused){return false;}};var isiOS=exports.isiOS=_reactNative.Platform.OS==='ios';var isAndroid=exports.isAndroid=_reactNative.Platform.OS==='android';function createError(error){return{code:error.code,message:error.message,localizedMessage:error.localizedMessage,declineCode:error.declineCode,stripeErrorCode:error.stripeErrorCode,type:error.type};}var unsupportedMethodMessage=exports.unsupportedMethodMessage=function unsupportedMethodMessage(field){return`${field} method is not supported. Consider to upgrade react-native version to 0.63.x or higher`;};var focusInput=exports.focusInput=function focusInput(ref){if('focusInput'in _TextInputState.default){_TextInputState.default.focusInput(ref);}else{if(__DEV__){console.log(unsupportedMethodMessage('focusInput'));}}};var registerInput=exports.registerInput=function registerInput(ref){if('registerInput'in _TextInputState.default){_TextInputState.default.registerInput(ref);}else{if(__DEV__){console.log(unsupportedMethodMessage('registerInput'));}}};var unregisterInput=exports.unregisterInput=function unregisterInput(ref){if('unregisterInput'in _TextInputState.default){_TextInputState.default.unregisterInput(ref);}else{if(__DEV__){console.log(unsupportedMethodMessage('unregisterInput'));}}};var currentlyFocusedInput=exports.currentlyFocusedInput=function currentlyFocusedInput(){if('currentlyFocusedInput'in _TextInputState.default){return _TextInputState.default.currentlyFocusedInput();}else{if(__DEV__){console.log(unsupportedMethodMessage('currentlyFocusedInput'));}}};
2
2
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["TextInputState","require","shouldAttributeExpo","NativeModules","NativeUnimoduleProxy","isiOS","Platform","OS","isAndroid","createError","error","code","message","localizedMessage","declineCode","stripeErrorCode","type","unsupportedMethodMessage","field","focusInput","ref","__DEV__","console","log","registerInput","unregisterInput","currentlyFocusedInput"],"sources":["helpers.ts"],"sourcesContent":["import type React from 'react';\nimport type { StripeError } from './types';\n\nimport { Platform, NativeModules } from 'react-native';\nconst TextInputState = require('react-native/Libraries/Components/TextInput/TextInputState');\n\n/**\n * Determines whether or not this library is being used inside of\n * an \"Expo\" project by identifying if Expo's native module\n * infrastructure (react-native-unimodules AKA expo-modules) is available.\n */\nexport const shouldAttributeExpo = () => {\n try {\n return !!NativeModules.NativeUnimoduleProxy;\n } catch {\n return false;\n }\n};\n\nexport const isiOS = Platform.OS === 'ios';\nexport const isAndroid = Platform.OS === 'android';\n\nexport function createError<T>(error: StripeError<T>) {\n return {\n code: error.code,\n message: error.message,\n localizedMessage: error.localizedMessage,\n declineCode: error.declineCode,\n stripeErrorCode: error.stripeErrorCode,\n type: error.type,\n };\n}\n\nexport const unsupportedMethodMessage = (field: string) =>\n `${field} method is not supported. Consider to upgrade react-native version to 0.63.x or higher`;\n\nexport const focusInput = (ref: React.MutableRefObject<any>) => {\n if ('focusInput' in TextInputState) {\n TextInputState.focusInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('focusInput'));\n }\n }\n};\n\nexport const registerInput = (ref: React.MutableRefObject<any>) => {\n if ('registerInput' in TextInputState) {\n TextInputState.registerInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('registerInput'));\n }\n }\n};\n\nexport const unregisterInput = (ref: React.MutableRefObject<any>) => {\n if ('unregisterInput' in TextInputState) {\n TextInputState.unregisterInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('unregisterInput'));\n }\n }\n};\n\nexport const currentlyFocusedInput = () => {\n if ('currentlyFocusedInput' in TextInputState) {\n return TextInputState.currentlyFocusedInput();\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('currentlyFocusedInput'));\n }\n }\n};\n"],"mappings":"4RAGA,yCACA,GAAMA,eAAc,CAAGC,OAAO,CAAC,4DAA4D,CAAC,CAOrF,GAAMC,oBAAmB,CAAG,QAAtBA,oBAAmB,EAAS,CACvC,GAAI,CACF,MAAO,CAAC,CAACC,0BAAa,CAACC,oBAAoB,CAC7C,CAAE,cAAM,CACN,MAAO,MAAK,CACd,CACF,CAAC,CAAC,gDAEK,GAAMC,MAAK,CAAGC,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAC,oBACpC,GAAMC,UAAS,CAAGF,qBAAQ,CAACC,EAAE,GAAK,SAAS,CAAC,4BAE5C,QAASE,YAAW,CAAIC,KAAqB,CAAE,CACpD,MAAO,CACLC,IAAI,CAAED,KAAK,CAACC,IAAI,CAChBC,OAAO,CAAEF,KAAK,CAACE,OAAO,CACtBC,gBAAgB,CAAEH,KAAK,CAACG,gBAAgB,CACxCC,WAAW,CAAEJ,KAAK,CAACI,WAAW,CAC9BC,eAAe,CAAEL,KAAK,CAACK,eAAe,CACtCC,IAAI,CAAEN,KAAK,CAACM,IACd,CAAC,CACH,CAEO,GAAMC,yBAAwB,CAAG,QAA3BA,yBAAwB,CAAIC,KAAa,QACjDA,MAAK,2FAAwF,CAAC,0DAE5F,GAAMC,WAAU,CAAG,QAAbA,WAAU,CAAIC,GAAgC,CAAK,CAC9D,GAAI,YAAY,EAAIpB,eAAc,CAAE,CAClCA,cAAc,CAACmB,UAAU,CAACC,GAAG,CAAC,CAChC,CAAC,IAAM,CACL,GAAIC,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACN,wBAAwB,CAAC,YAAY,CAAC,CAAC,CACrD,CACF,CACF,CAAC,CAAC,8BAEK,GAAMO,cAAa,CAAG,QAAhBA,cAAa,CAAIJ,GAAgC,CAAK,CACjE,GAAI,eAAe,EAAIpB,eAAc,CAAE,CACrCA,cAAc,CAACwB,aAAa,CAACJ,GAAG,CAAC,CACnC,CAAC,IAAM,CACL,GAAIC,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACN,wBAAwB,CAAC,eAAe,CAAC,CAAC,CACxD,CACF,CACF,CAAC,CAAC,oCAEK,GAAMQ,gBAAe,CAAG,QAAlBA,gBAAe,CAAIL,GAAgC,CAAK,CACnE,GAAI,iBAAiB,EAAIpB,eAAc,CAAE,CACvCA,cAAc,CAACyB,eAAe,CAACL,GAAG,CAAC,CACrC,CAAC,IAAM,CACL,GAAIC,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACN,wBAAwB,CAAC,iBAAiB,CAAC,CAAC,CAC1D,CACF,CACF,CAAC,CAAC,wCAEK,GAAMS,sBAAqB,CAAG,QAAxBA,sBAAqB,EAAS,CACzC,GAAI,uBAAuB,EAAI1B,eAAc,CAAE,CAC7C,MAAOA,eAAc,CAAC0B,qBAAqB,EAAE,CAC/C,CAAC,IAAM,CACL,GAAIL,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACN,wBAAwB,CAAC,uBAAuB,CAAC,CAAC,CAChE,CACF,CACF,CAAC,CAAC"}
1
+ {"version":3,"names":["_reactNative","require","_TextInputState","_interopRequireDefault","shouldAttributeExpo","exports","NativeModules","NativeUnimoduleProxy","_unused","isiOS","Platform","OS","isAndroid","createError","error","code","message","localizedMessage","declineCode","stripeErrorCode","type","unsupportedMethodMessage","field","focusInput","ref","TextInputState","__DEV__","console","log","registerInput","unregisterInput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CAACP,wBAAwB,CAAC,YAAY,CAAC,CAAC,CACrD,CACF,CACF,CAAC,CAEM,GAAM,CAAAQ,aAAa,CAAAxB,OAAA,CAAAwB,aAAA,CAAG,QAAhB,CAAAA,aAAaA,CAAIL,GAAgC,CAAK,CACjE,GAAI,eAAe,EAAI,CAAAC,uBAAc,CAAE,CACrCA,uBAAc,CAACI,aAAa,CAACL,GAAG,CAAC,CACnC,CAAC,IAAM,CACL,GAAIE,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACP,wBAAwB,CAAC,eAAe,CAAC,CAAC,CACxD,CACF,CACF,CAAC,CAEM,GAAM,CAAAS,eAAe,CAAAzB,OAAA,CAAAyB,eAAA,CAAG,QAAlB,CAAAA,eAAeA,CAAIN,GAAgC,CAAK,CACnE,GAAI,iBAAiB,EAAI,CAAAC,uBAAc,CAAE,CACvCA,uBAAc,CAACK,eAAe,CAACN,GAAG,CAAC,CACrC,CAAC,IAAM,CACL,GAAIE,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACP,wBAAwB,CAAC,iBAAiB,CAAC,CAAC,CAC1D,CACF,CACF,CAAC,CAEM,GAAM,CAAAU,qBAAqB,CAAA1B,OAAA,CAAA0B,qBAAA,CAAG,QAAxB,CAAAA,qBAAqBA,CAAA,CAAS,CACzC,GAAI,uBAAuB,EAAI,CAAAN,uBAAc,CAAE,CAC7C,MAAO,CAAAA,uBAAc,CAACM,qBAAqB,CAAC,CAAC,CAC/C,CAAC,IAAM,CACL,GAAIL,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACP,wBAAwB,CAAC,uBAAuB,CAAC,CAAC,CAChE,CACF,CACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useConfirmPayment","useState","loading","setLoading","useStripe","confirmPayment","_confirmPayment","useCallback","paymentIntentClientSecret","data","options","result"],"sources":["useConfirmPayment.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport type { PaymentIntent } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmPayment hook\n */\nexport function useConfirmPayment() {\n const [loading, setLoading] = useState(false);\n const { confirmPayment } = useStripe();\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n ) => {\n setLoading(true);\n\n const result = await confirmPayment(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmPayment]\n );\n\n return {\n confirmPayment: _confirmPayment,\n loading,\n };\n}\n"],"mappings":"sXAAA,4BAEA,uCAKO,QAASA,kBAAiB,EAAG,CAClC,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAC1B,eAA2B,GAAAC,qBAAS,GAAE,CAA9BC,cAAc,YAAdA,cAAc,CAEtB,GAAMC,gBAAe,CAAG,GAAAC,kBAAW,qDACjC,UACEC,yBAAiC,CACjCC,IAAkC,CAE/B,IADHC,QAAqC,2DAAG,CAAC,CAAC,CAE1CP,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMQ,OAAM,MAASN,eAAc,CACjCG,yBAAyB,CACzBC,IAAI,CACJC,OAAO,CACR,CAEDP,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOQ,OAAM,CACf,CAAC,kEACD,CAACN,cAAc,CAAC,CACjB,CAED,MAAO,CACLA,cAAc,CAAEC,eAAe,CAC/BJ,OAAO,CAAPA,OACF,CAAC,CACH"}
1
+ {"version":3,"names":["_react","require","_useStripe2","useConfirmPayment","_useState","useState","_useState2","_slicedToArray2","default","loading","setLoading","_useStripe","useStripe","confirmPayment","_confirmPayment","useCallback","_ref","_asyncToGenerator2","paymentIntentClientSecret","data","options","arguments","length","undefined","result","_x","_x2","apply"],"sourceRoot":"../../../src","sources":["hooks/useConfirmPayment.tsx"],"mappings":"sXAAA,IAAAA,MAAA,CAAAC,OAAA,UAEA,IAAAC,WAAA,CAAAD,OAAA,gBAKO,QAAS,CAAAE,iBAAiBA,CAAA,CAAG,CAClC,IAAAC,SAAA,CAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,CAAAC,UAAA,IAAAC,eAAA,CAAAC,OAAA,EAAAJ,SAAA,IAAtCK,OAAO,CAAAH,UAAA,IAAEI,UAAU,CAAAJ,UAAA,IAC1B,IAAAK,UAAA,CAA2B,GAAAC,qBAAS,EAAC,CAAC,CAA9BC,cAAc,CAAAF,UAAA,CAAdE,cAAc,CAEtB,GAAM,CAAAC,eAAe,CAAG,GAAAC,kBAAW,iBAAAC,IAAA,IAAAC,kBAAA,CAAAT,OAAA,EACjC,UACEU,yBAAiC,CACjCC,IAAkC,CAE/B,IADH,CAAAC,OAAqC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAE1CX,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAM,CAAAc,MAAM,MAAS,CAAAX,cAAc,CACjCK,yBAAyB,CACzBC,IAAI,CACJC,OACF,CAAC,CAEDV,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAO,CAAAc,MAAM,CACf,CAAC,kBAAAC,EAAA,CAAAC,GAAA,SAAAV,IAAA,CAAAW,KAAA,MAAAN,SAAA,QACD,CAACR,cAAc,CACjB,CAAC,CAED,MAAO,CACLA,cAAc,CAAEC,eAAe,CAC/BL,OAAO,CAAPA,OACF,CAAC,CACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useConfirmSetupIntent","useState","loading","setLoading","useStripe","confirmSetupIntent","_confirmSetupIntent","useCallback","paymentIntentClientSecret","data","options","result"],"sources":["useConfirmSetupIntent.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport type { SetupIntent } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmSetupIntent hook\n */\nexport function useConfirmSetupIntent() {\n const [loading, setLoading] = useState(false);\n const { confirmSetupIntent: confirmSetupIntent } = useStripe();\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n ) => {\n setLoading(true);\n\n const result = await confirmSetupIntent(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmSetupIntent]\n );\n\n return {\n confirmSetupIntent: _confirmSetupIntent,\n loading,\n };\n}\n"],"mappings":"8XAAA,4BAEA,uCAKO,QAASA,sBAAqB,EAAG,CACtC,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAC1B,eAAmD,GAAAC,qBAAS,GAAE,CAAlCC,kBAAkB,YAAtCA,kBAAkB,CAE1B,GAAMC,oBAAmB,CAAG,GAAAC,kBAAW,qDACrC,UACEC,yBAAiC,CACjCC,IAA+B,CAE5B,IADHC,QAAmC,2DAAG,CAAC,CAAC,CAExCP,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMQ,OAAM,MAASN,mBAAkB,CACrCG,yBAAyB,CACzBC,IAAI,CACJC,OAAO,CACR,CAEDP,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOQ,OAAM,CACf,CAAC,kEACD,CAACN,kBAAkB,CAAC,CACrB,CAED,MAAO,CACLA,kBAAkB,CAAEC,mBAAmB,CACvCJ,OAAO,CAAPA,OACF,CAAC,CACH"}
1
+ {"version":3,"names":["_react","require","_useStripe2","useConfirmSetupIntent","_useState","useState","_useState2","_slicedToArray2","default","loading","setLoading","_useStripe","useStripe","confirmSetupIntent","_confirmSetupIntent","useCallback","_ref","_asyncToGenerator2","paymentIntentClientSecret","data","options","arguments","length","undefined","result","_x","_x2","apply"],"sourceRoot":"../../../src","sources":["hooks/useConfirmSetupIntent.tsx"],"mappings":"8XAAA,IAAAA,MAAA,CAAAC,OAAA,UAEA,IAAAC,WAAA,CAAAD,OAAA,gBAKO,QAAS,CAAAE,qBAAqBA,CAAA,CAAG,CACtC,IAAAC,SAAA,CAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,CAAAC,UAAA,IAAAC,eAAA,CAAAC,OAAA,EAAAJ,SAAA,IAAtCK,OAAO,CAAAH,UAAA,IAAEI,UAAU,CAAAJ,UAAA,IAC1B,IAAAK,UAAA,CAAmD,GAAAC,qBAAS,EAAC,CAAC,CAAlCC,kBAAkB,CAAAF,UAAA,CAAtCE,kBAAkB,CAE1B,GAAM,CAAAC,mBAAmB,CAAG,GAAAC,kBAAW,iBAAAC,IAAA,IAAAC,kBAAA,CAAAT,OAAA,EACrC,UACEU,yBAAiC,CACjCC,IAA+B,CAE5B,IADH,CAAAC,OAAmC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAExCX,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAM,CAAAc,MAAM,MAAS,CAAAX,kBAAkB,CACrCK,yBAAyB,CACzBC,IAAI,CACJC,OACF,CAAC,CAEDV,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAO,CAAAc,MAAM,CACf,CAAC,kBAAAC,EAAA,CAAAC,GAAA,SAAAV,IAAA,CAAAW,KAAA,MAAAN,SAAA,QACD,CAACR,kBAAkB,CACrB,CAAC,CAED,MAAO,CACLA,kBAAkB,CAAEC,mBAAmB,CACvCL,OAAO,CAAPA,OACF,CAAC,CACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useFinancialConnectionsSheet","useState","loading","setLoading","useStripe","collectBankAccountToken","collectFinancialConnectionsAccounts","_collectBankAccountToken","useCallback","clientSecret","params","result","_collectFinancialConnectionsAccounts"],"sources":["useFinancialConnectionsSheet.tsx"],"sourcesContent":["import { useState, useCallback } from 'react';\nimport { useStripe } from './useStripe';\nimport type { CollectFinancialConnectionsAccountsParams } from 'src/types/FinancialConnections';\nimport type { CollectBankAccountTokenParams } from 'src/types/PaymentMethod';\n\n/**\n * React hook for accessing functions on the Financial Connections sheet.\n *\n * Retuns the `collectBankAccountToken` and `collectFinancialConnectionsAccounts` functions, and a `loading` boolean that you can use\n * to display loading state (like showing a spinner).\n */\nexport function useFinancialConnectionsSheet() {\n const [loading, setLoading] = useState(false);\n const { collectBankAccountToken, collectFinancialConnectionsAccounts } =\n useStripe();\n\n const _collectBankAccountToken = useCallback(\n async (clientSecret: string, params?: CollectBankAccountTokenParams) => {\n setLoading(true);\n const result = await collectBankAccountToken(clientSecret, params);\n setLoading(false);\n return result;\n },\n [collectBankAccountToken]\n );\n\n const _collectFinancialConnectionsAccounts = useCallback(\n async (\n clientSecret: string,\n params?: CollectFinancialConnectionsAccountsParams\n ) => {\n setLoading(true);\n const result = await collectFinancialConnectionsAccounts(\n clientSecret,\n params\n );\n setLoading(false);\n return result;\n },\n [collectFinancialConnectionsAccounts]\n );\n\n return {\n collectBankAccountToken: _collectBankAccountToken,\n collectFinancialConnectionsAccounts: _collectFinancialConnectionsAccounts,\n loading,\n };\n}\n"],"mappings":"4YAAA,4BACA,uCAUO,QAASA,6BAA4B,EAAG,CAC7C,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAC1B,eACE,GAAAC,qBAAS,GAAE,CADLC,uBAAuB,YAAvBA,uBAAuB,CAAEC,mCAAmC,YAAnCA,mCAAmC,CAGpE,GAAMC,yBAAwB,CAAG,GAAAC,kBAAW,qDAC1C,UAAOC,YAAoB,CAAEC,MAAsC,CAAK,CACtEP,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMQ,OAAM,MAASN,wBAAuB,CAACI,YAAY,CAAEC,MAAM,CAAC,CAClEP,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOQ,OAAM,CACf,CAAC,kEACD,CAACN,uBAAuB,CAAC,CAC1B,CAED,GAAMO,qCAAoC,CAAG,GAAAJ,kBAAW,sDACtD,UACEC,YAAoB,CACpBC,MAAkD,CAC/C,CACHP,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMQ,OAAM,MAASL,oCAAmC,CACtDG,YAAY,CACZC,MAAM,CACP,CACDP,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOQ,OAAM,CACf,CAAC,oEACD,CAACL,mCAAmC,CAAC,CACtC,CAED,MAAO,CACLD,uBAAuB,CAAEE,wBAAwB,CACjDD,mCAAmC,CAAEM,oCAAoC,CACzEV,OAAO,CAAPA,OACF,CAAC,CACH"}
1
+ {"version":3,"names":["_react","require","_useStripe2","useFinancialConnectionsSheet","_useState","useState","_useState2","_slicedToArray2","default","loading","setLoading","_useStripe","useStripe","collectBankAccountToken","collectFinancialConnectionsAccounts","_collectBankAccountToken","useCallback","_ref","_asyncToGenerator2","clientSecret","params","result","_x","_x2","apply","arguments","_collectFinancialConnectionsAccounts","_ref2","_x3","_x4"],"sourceRoot":"../../../src","sources":["hooks/useFinancialConnectionsSheet.tsx"],"mappings":"4YAAA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,WAAA,CAAAD,OAAA,gBAUO,QAAS,CAAAE,4BAA4BA,CAAA,CAAG,CAC7C,IAAAC,SAAA,CAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,CAAAC,UAAA,IAAAC,eAAA,CAAAC,OAAA,EAAAJ,SAAA,IAAtCK,OAAO,CAAAH,UAAA,IAAEI,UAAU,CAAAJ,UAAA,IAC1B,IAAAK,UAAA,CACE,GAAAC,qBAAS,EAAC,CAAC,CADLC,uBAAuB,CAAAF,UAAA,CAAvBE,uBAAuB,CAAEC,mCAAmC,CAAAH,UAAA,CAAnCG,mCAAmC,CAGpE,GAAM,CAAAC,wBAAwB,CAAG,GAAAC,kBAAW,iBAAAC,IAAA,IAAAC,kBAAA,CAAAV,OAAA,EAC1C,UAAOW,YAAoB,CAAEC,MAAsC,CAAK,CACtEV,UAAU,CAAC,IAAI,CAAC,CAChB,GAAM,CAAAW,MAAM,MAAS,CAAAR,uBAAuB,CAACM,YAAY,CAAEC,MAAM,CAAC,CAClEV,UAAU,CAAC,KAAK,CAAC,CACjB,MAAO,CAAAW,MAAM,CACf,CAAC,kBAAAC,EAAA,CAAAC,GAAA,SAAAN,IAAA,CAAAO,KAAA,MAAAC,SAAA,QACD,CAACZ,uBAAuB,CAC1B,CAAC,CAED,GAAM,CAAAa,oCAAoC,CAAG,GAAAV,kBAAW,iBAAAW,KAAA,IAAAT,kBAAA,CAAAV,OAAA,EACtD,UACEW,YAAoB,CACpBC,MAAkD,CAC/C,CACHV,UAAU,CAAC,IAAI,CAAC,CAChB,GAAM,CAAAW,MAAM,MAAS,CAAAP,mCAAmC,CACtDK,YAAY,CACZC,MACF,CAAC,CACDV,UAAU,CAAC,KAAK,CAAC,CACjB,MAAO,CAAAW,MAAM,CACf,CAAC,kBAAAO,GAAA,CAAAC,GAAA,SAAAF,KAAA,CAAAH,KAAA,MAAAC,SAAA,QACD,CAACX,mCAAmC,CACtC,CAAC,CAED,MAAO,CACLD,uBAAuB,CAAEE,wBAAwB,CACjDD,mCAAmC,CAAEY,oCAAoC,CACzEjB,OAAO,CAAPA,OACF,CAAC,CACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["usePaymentSheet","useStripe","initPaymentSheetNative","initPaymentSheet","presentPaymentSheetNative","presentPaymentSheet","confirmPaymentSheetPaymentNative","confirmPaymentSheetPayment","resetPaymentSheetCustomerNative","resetPaymentSheetCustomer","useState","loading","setLoading","useCallback","params","result","options"],"sources":["usePaymentSheet.tsx"],"sourcesContent":["import { useState, useCallback } from 'react';\nimport { useStripe } from './useStripe';\n\nimport type { PaymentSheet } from '../types';\n\n/**\n * usePaymentSheet hook\n */\nexport function usePaymentSheet() {\n const {\n initPaymentSheet: initPaymentSheetNative,\n presentPaymentSheet: presentPaymentSheetNative,\n confirmPaymentSheetPayment: confirmPaymentSheetPaymentNative,\n resetPaymentSheetCustomer: resetPaymentSheetCustomerNative,\n } = useStripe();\n const [loading, setLoading] = useState(false);\n\n const initPaymentSheet = useCallback(\n async (params: PaymentSheet.SetupParams) => {\n setLoading(true);\n const result = await initPaymentSheetNative(params);\n setLoading(false);\n return result;\n },\n [initPaymentSheetNative]\n );\n\n const presentPaymentSheet = useCallback(\n async (options?: PaymentSheet.PresentOptions) => {\n setLoading(true);\n const result = await presentPaymentSheetNative(options);\n setLoading(false);\n return result;\n },\n [presentPaymentSheetNative]\n );\n\n const confirmPaymentSheetPayment = useCallback(async () => {\n setLoading(true);\n const result = await confirmPaymentSheetPaymentNative();\n setLoading(false);\n return result;\n }, [confirmPaymentSheetPaymentNative]);\n\n const resetPaymentSheetCustomer = useCallback(async () => {\n setLoading(true);\n const result = await resetPaymentSheetCustomerNative();\n setLoading(false);\n return result;\n }, [resetPaymentSheetCustomerNative]);\n\n return {\n loading,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\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,\n };\n}\n"],"mappings":"kXAAA,4BACA,uCAOO,QAASA,gBAAe,EAAG,CAChC,eAKI,GAAAC,qBAAS,GAAE,CAJKC,sBAAsB,YAAxCC,gBAAgB,CACKC,yBAAyB,YAA9CC,mBAAmB,CACSC,gCAAgC,YAA5DC,0BAA0B,CACCC,+BAA+B,YAA1DC,yBAAyB,CAE3B,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAE1B,GAAMT,iBAAgB,CAAG,GAAAU,kBAAW,qDAClC,UAAOC,MAAgC,CAAK,CAC1CF,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMG,OAAM,MAASb,uBAAsB,CAACY,MAAM,CAAC,CACnDF,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOG,OAAM,CACf,CAAC,8DACD,CAACb,sBAAsB,CAAC,CACzB,CAED,GAAMG,oBAAmB,CAAG,GAAAQ,kBAAW,sDACrC,UAAOG,OAAqC,CAAK,CAC/CJ,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMG,OAAM,MAASX,0BAAyB,CAACY,OAAO,CAAC,CACvDJ,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOG,OAAM,CACf,CAAC,gEACD,CAACX,yBAAyB,CAAC,CAC5B,CAED,GAAMG,2BAA0B,CAAG,GAAAM,kBAAW,iCAAC,WAAY,CACzDD,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMG,OAAM,MAAST,iCAAgC,EAAE,CACvDM,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOG,OAAM,CACf,CAAC,EAAE,CAACT,gCAAgC,CAAC,CAAC,CAEtC,GAAMG,0BAAyB,CAAG,GAAAI,kBAAW,iCAAC,WAAY,CACxDD,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMG,OAAM,MAASP,gCAA+B,EAAE,CACtDI,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOG,OAAM,CACf,CAAC,EAAE,CAACP,+BAA+B,CAAC,CAAC,CAErC,MAAO,CACLG,OAAO,CAAPA,OAAO,CACPR,gBAAgB,CAAhBA,gBAAgB,CAChBE,mBAAmB,CAAnBA,mBAAmB,CACnBE,0BAA0B,CAA1BA,0BAA0B,CAM1BE,yBAAyB,CAAzBA,yBACF,CAAC,CACH"}
1
+ {"version":3,"names":["_react","require","_useStripe2","usePaymentSheet","_useStripe","useStripe","initPaymentSheetNative","initPaymentSheet","presentPaymentSheetNative","presentPaymentSheet","confirmPaymentSheetPaymentNative","confirmPaymentSheetPayment","resetPaymentSheetCustomerNative","resetPaymentSheetCustomer","_useState","useState","_useState2","_slicedToArray2","default","loading","setLoading","useCallback","_ref","_asyncToGenerator2","params","result","_x","apply","arguments","_ref2","options","_x2"],"sourceRoot":"../../../src","sources":["hooks/usePaymentSheet.tsx"],"mappings":"kXAAA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,WAAA,CAAAD,OAAA,gBAOO,QAAS,CAAAE,eAAeA,CAAA,CAAG,CAChC,IAAA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UAAU,CAAC,IAAI,CAAC,CAChB,GAAM,CAAAK,MAAM,MAAS,CAAAf,gCAAgC,CAAC,CAAC,CACvDU,UAAU,CAAC,KAAK,CAAC,CACjB,MAAO,CAAAK,MAAM,CACf,CAAC,EAAE,CAACf,gCAAgC,CAAC,CAAC,CAEtC,GAAM,CAAAG,yBAAyB,CAAG,GAAAQ,kBAAW,KAAAE,kBAAA,CAAAL,OAAA,EAAC,WAAY,CACxDE,UAAU,CAAC,IAAI,CAAC,CAChB,GAAM,CAAAK,MAAM,MAAS,CAAAb,+BAA+B,CAAC,CAAC,CACtDQ,UAAU,CAAC,KAAK,CAAC,CACjB,MAAO,CAAAK,MAAM,CACf,CAAC,EAAE,CAACb,+BAA+B,CAAC,CAAC,CAErC,MAAO,CACLO,OAAO,CAAPA,OAAO,CACPZ,gBAAgB,CAAhBA,gBAAgB,CAChBE,mBAAmB,CAAnBA,mBAAmB,CACnBE,0BAA0B,CAA1BA,0BAA0B,CAM1BE,yBAAyB,CAAzBA,yBACF,CAAC,CACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["usePlatformPay","useStripe","isPlatformPaySupported","confirmPlatformPaySetupIntent","confirmPlatformPayPayment","createPlatformPayPaymentMethod","createPlatformPayToken","dismissPlatformPay","updatePlatformPaySheet","canAddCardToWallet","openPlatformPaySetup","useState","loading","setLoading","_isPlatformPaySupported","useCallback","params","result","_confirmPlatformPaySetupIntent","clientSecret","_confirmPlatformPayPayment","_createPlatformPayPaymentMethod","_createPlatformPayToken","_dismissPlatformPay","_updatePlatformPaySheet","_canAddCardToWallet","_openPlatformPaySetup"],"sources":["usePlatformPay.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport type {\n PlatformPay,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n} from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * usePlatformPay hook. Access all Apple and Google Pay functionality with this hook.\n */\nexport function usePlatformPay() {\n const {\n isPlatformPaySupported,\n confirmPlatformPaySetupIntent,\n confirmPlatformPayPayment,\n createPlatformPayPaymentMethod,\n createPlatformPayToken,\n dismissPlatformPay,\n updatePlatformPaySheet,\n canAddCardToWallet,\n openPlatformPaySetup,\n } = useStripe();\n const [loading, setLoading] = useState(false);\n\n const _isPlatformPaySupported = useCallback(\n async (params?: { googlePay?: PlatformPay.IsGooglePaySupportedParams }) => {\n setLoading(true);\n\n const result = await isPlatformPaySupported(params);\n setLoading(false);\n\n return result;\n },\n [isPlatformPaySupported]\n );\n\n const _confirmPlatformPaySetupIntent = useCallback(\n async (clientSecret: string, params: PlatformPay.ConfirmParams) => {\n setLoading(true);\n\n const result = await confirmPlatformPaySetupIntent(clientSecret, params);\n setLoading(false);\n\n return result;\n },\n [confirmPlatformPaySetupIntent]\n );\n\n const _confirmPlatformPayPayment = useCallback(\n async (clientSecret: string, params: PlatformPay.ConfirmParams) => {\n setLoading(true);\n\n const result = await confirmPlatformPayPayment(clientSecret, params);\n setLoading(false);\n\n return result;\n },\n [confirmPlatformPayPayment]\n );\n\n const _createPlatformPayPaymentMethod = useCallback(\n async (params: PlatformPay.PaymentMethodParams) => {\n setLoading(true);\n\n const result = await createPlatformPayPaymentMethod(params);\n setLoading(false);\n\n return result;\n },\n [createPlatformPayPaymentMethod]\n );\n\n const _createPlatformPayToken = useCallback(\n async (params: PlatformPay.PaymentMethodParams) => {\n setLoading(true);\n\n const result = await createPlatformPayToken(params);\n setLoading(false);\n\n return result;\n },\n [createPlatformPayToken]\n );\n\n const _dismissPlatformPay = useCallback(async () => {\n setLoading(true);\n\n const result = await dismissPlatformPay();\n setLoading(false);\n\n return result;\n }, [dismissPlatformPay]);\n\n const _updatePlatformPaySheet = useCallback(\n async (params: {\n applePay: {\n cartItems: Array<PlatformPay.CartSummaryItem>;\n shippingMethods: Array<PlatformPay.ShippingMethod>;\n errors: Array<PlatformPay.ApplePaySheetError>;\n };\n }) => {\n setLoading(true);\n\n const result = await updatePlatformPaySheet(params);\n setLoading(false);\n\n return result;\n },\n [updatePlatformPaySheet]\n );\n\n const _canAddCardToWallet = useCallback(\n async (\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult> => {\n setLoading(true);\n\n const result = await canAddCardToWallet(params);\n setLoading(false);\n\n return result;\n },\n [canAddCardToWallet]\n );\n\n const _openPlatformPaySetup = useCallback(async (): Promise<void> => {\n return openPlatformPaySetup();\n }, [openPlatformPaySetup]);\n\n return {\n /** Use this boolean to present a spinner or other similar loading screen. `true` if the SDK is currently processing, `false` if it is not. */\n loading,\n /**\n * Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.\n * @returns A boolean indicating whether or not the native wallet is supported.\n */\n isPlatformPaySupported: _isPlatformPaySupported,\n /**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [SetupIntent](https://stripe.com/docs/api/setup_intents).\n * @param clientSecret The client secret of the SetupIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `setupIntent` and `paymentMethod` fields.\n */\n confirmPlatformPaySetupIntent: _confirmPlatformPaySetupIntent,\n /**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param clientSecret The client secret of the PaymentIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentIntent` and `paymentMethod` fields.\n */\n confirmPlatformPayPayment: _confirmPlatformPayPayment,\n /**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [PaymentMethod](https://stripe.com/docs/api/payment_methods) and [token](https://stripe.com/docs/api/tokens).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentMethod` and `token` fields.\n */\n createPlatformPayPaymentMethod: _createPlatformPayPaymentMethod,\n /**\n * @deprecated The Tokens API is deprecated, you should use Payment Methods and `createPlatformPayPaymentMethod` instead. Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [token](https://stripe.com/docs/api/tokens).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `token` field.\n */\n createPlatformPayToken: _createPlatformPayToken,\n /**\n * Dismiss the Apple Pay sheet if it is open. iOS only, this is a no-op on Android.\n * @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.\n */\n dismissPlatformPay: _dismissPlatformPay,\n /**\n * Update different items on the Apple Pay sheet, including the summary items, the shipping methods, and any errors shown. iOS only, this is a no-op on Android.\n * @param cartItems An array of payment summary items to display in the Apple Pay sheet.\n * @param shippingMethods An array of shipping methods to display in the Apple Pay sheet.\n * @param errors An array of errors associated with the user's input that must be corrected to proceed with payment. These errors will be shown in the Apple Pay sheet.\n *\n * @returns An object with an optional 'error' field, which is only populated if something went wrong.\n */\n updatePlatformPaySheet: _updatePlatformPaySheet,\n /**\n * Check if the app & device support adding this card to the native wallet.\n * @param params An object containing fields for `primaryAccountIdentifier`, `cardLastFour`, and `testEnv`.\n *\n * @returns A promise resolving to an object of type CanAddCardToWalletResult. Check the `canAddCard` field, if it's true, you should show the `<AddToWalletButton />`\n */\n canAddCardToWallet: _canAddCardToWallet,\n /**\n * iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards.\n * This method transfers control to the Wallet app on iPhone or to the Settings\n * app on iPad. For devices that don’t support Apple Pay, this method does nothing.\n */\n openPlatformPaySetup: _openPlatformPaySetup,\n };\n}\n"],"mappings":"gXAAA,4BAMA,uCAKO,QAASA,eAAc,EAAG,CAC/B,eAUI,GAAAC,qBAAS,GAAE,CATbC,sBAAsB,YAAtBA,sBAAsB,CACtBC,6BAA6B,YAA7BA,6BAA6B,CAC7BC,yBAAyB,YAAzBA,yBAAyB,CACzBC,8BAA8B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AsB,CAAEY,uBAAuB,CAO/CX,6BAA6B,CAAEe,8BAA8B,CAO7Dd,yBAAyB,CAAEgB,0BAA0B,CAMrDf,8BAA8B,CAAEgB,+BAA+B,CAM/Df,sBAAsB,CAAEgB,uBAAuB,CAK/Cf,kBAAkB,CAAEgB,mBAAmB,CASvCf,sBAAsB,CAAEgB,uBAAuB,CAO/Cf,kBAAkB,CAAEgB,mBAAmB,CAMvCf,oBAAoB,CAAEgB,qBACxB,CAAC,CACH"}
1
+ {"version":3,"names":["_react","require","_useStripe2","usePlatformPay","_useStripe","useStripe","isPlatformPaySupported","confirmPlatformPaySetupIntent","confirmPlatformPayPayment","createPlatformPayPaymentMethod","createPlatformPayToken","dismissPlatformPay","updatePlatformPaySheet","canAddCardToWallet","openPlatformPaySetup","_useState","useState","_useState2","_slicedToArray2","default","loading","setLoading","_isPlatformPaySupported","useCallback","_ref","_asyncToGenerator2","params","result","_x","apply","arguments","_confirmPlatformPaySetupIntent","_ref2","clientSecret","_x2","_x3","_confirmPlatformPayPayment","_ref3","_x4","_x5","_createPlatformPayPaymentMethod","_ref4","_x6","_createPlatformPayToken","_ref5","_x7","_dismissPlatformPay","_updatePlatformPaySheet","_ref7","_x8","_canAddCardToWallet","_ref8","_x9","_openPlatformPaySetup"],"sourceRoot":"../../../src","sources":["hooks/usePlatformPay.tsx"],"mappings":"gXAAA,IAAAA,MAAA,CAAAC,OAAA,UAMA,IAAAC,WAAA,CAAAD,OAAA,gBAKO,QAAS,CAAAE,cAAcA,CAAA,CAAG,CAC/B,IAAAC,UAAA,CAUI,GAAAC,qBAAS,EAAC,CAAC,CATbC,sBAAsB,CAAAF,UAAA,CAAtBE,sBAAsB,CACtBC,6BAA6B,CAAAH,UAAA,CAA7BG,6BAA6B,CAC7BC,yBAAyB,CAAAJ,UAAA,CAAzBI,yBAAyB,CACzBC,8BAA8B,CAAAL,UAAA,CAA9BK,8BAA8B,CAC9BC,sBAAsB,CAAAN,UAAA,CAAtBM,sBAAsB,CACt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,sBAAsB,CAAEiC,uBAAuB,CAK/ChC,kBAAkB,CAAEmC,mBAAmB,CASvClC,sBAAsB,CAAEmC,uBAAuB,CAO/ClC,kBAAkB,CAAEqC,mBAAmB,CAMvCpC,oBAAoB,CAAEuC,qBACxB,CAAC,CACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useStripe","_createPaymentMethod","useCallback","data","options","createPaymentMethod","_createToken","params","createToken","_retrievePaymentIntent","clientSecret","retrievePaymentIntent","_retrieveSetupIntent","retrieveSetupIntent","_confirmPayment","paymentIntentClientSecret","confirmPayment","_handleNextAction","returnURL","handleNextAction","_handleNextActionForSetup","setupIntentClientSecret","handleNextActionForSetup","_confirmSetupIntent","confirmSetupIntent","_createTokenForCVCUpdate","cvc","createTokenForCVCUpdate","_initPaymentSheet","initPaymentSheet","_presentPaymentSheet","presentPaymentSheet","_confirmPaymentSheetPayment","confirmPaymentSheetPayment","_handleURLCallback","url","handleURLCallback","_collectBankAccountForPayment","collectBankAccountForPayment","_collectBankAccountForSetup","collectBankAccountForSetup","_verifyMicrodepositsForPayment","verifyMicrodepositsForPayment","_verifyMicrodepositsForSetup","verifyMicrodepositsForSetup","_canAddCardToWallet","canAddCardToWallet","_collectBankAccountToken","collectBankAccountToken","_collectFinancialConnectionsAccounts","collectFinancialConnectionsAccounts","_resetPaymentSheetCustomer","resetPaymentSheetCustomer","_isPlatformPaySupported","isPlatformPaySupported","_confirmPlatformPaySetupIntent","confirmPlatformPaySetupIntent","_confirmPlatformPayPayment","confirmPlatformPayPayment","_dismissPlatformPay","dismissPlatformPay","_createPlatformPayPaymentMethod","createPlatformPayPaymentMethod","_createPlatformPayToken","createPlatformPayToken","_updatePlatformPaySheet","updatePlatformPaySheet","_openPlatformPaySetup","openPlatformPaySetup"],"sources":["useStripe.tsx"],"sourcesContent":["import type {\n PaymentMethod,\n PaymentIntent,\n PaymentSheet,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n HandleNextActionForSetupResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n StripeError,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n CreateTokenResult,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForSetupResult,\n CollectBankAccountForPaymentResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n PlatformPay,\n PlatformPayError,\n} from '../types';\nimport { useCallback } from 'react';\nimport {\n confirmPayment,\n createPaymentMethod,\n retrievePaymentIntent,\n retrieveSetupIntent,\n confirmSetupIntent,\n createTokenForCVCUpdate,\n handleNextAction,\n handleNextActionForSetup,\n handleURLCallback,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\n createToken,\n collectBankAccountForPayment,\n collectBankAccountForSetup,\n verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup,\n canAddCardToWallet,\n collectBankAccountToken,\n collectFinancialConnectionsAccounts,\n resetPaymentSheetCustomer,\n isPlatformPaySupported,\n confirmPlatformPaySetupIntent,\n confirmPlatformPayPayment,\n dismissPlatformPay,\n createPlatformPayPaymentMethod,\n createPlatformPayToken,\n updatePlatformPaySheet,\n openPlatformPaySetup,\n} from '../functions';\nimport type { CollectBankAccountTokenParams } from 'src/types/PaymentMethod';\nimport type { CollectFinancialConnectionsAccountsParams } from 'src/types/FinancialConnections';\n\n/**\n * useStripe hook\n */\nexport function useStripe() {\n const _createPaymentMethod = useCallback(\n async (\n data: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n ): Promise<CreatePaymentMethodResult> => {\n return createPaymentMethod(data, options);\n },\n []\n );\n\n const _createToken = useCallback(\n async (params: Token.CreateParams): Promise<CreateTokenResult> => {\n return createToken(params);\n },\n []\n );\n\n const _retrievePaymentIntent = useCallback(\n async (clientSecret: string): Promise<RetrievePaymentIntentResult> => {\n return retrievePaymentIntent(clientSecret);\n },\n []\n );\n\n const _retrieveSetupIntent = useCallback(\n async (clientSecret: string): Promise<RetrieveSetupIntentResult> => {\n return retrieveSetupIntent(clientSecret);\n },\n []\n );\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n ): Promise<ConfirmPaymentResult> => {\n return confirmPayment(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _handleNextAction = useCallback(\n async (\n paymentIntentClientSecret: string,\n returnURL?: string\n ): Promise<HandleNextActionResult> => {\n return handleNextAction(paymentIntentClientSecret, returnURL);\n },\n []\n );\n\n const _handleNextActionForSetup = useCallback(\n async (\n setupIntentClientSecret: string,\n returnURL?: string\n ): Promise<HandleNextActionForSetupResult> => {\n return handleNextActionForSetup(setupIntentClientSecret, returnURL);\n },\n []\n );\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n ): Promise<ConfirmSetupIntentResult> => {\n return confirmSetupIntent(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _createTokenForCVCUpdate = useCallback(\n async (cvc: string): Promise<CreateTokenForCVCUpdateResult> => {\n return createTokenForCVCUpdate(cvc);\n },\n []\n );\n\n const _initPaymentSheet = useCallback(\n async (\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult> => {\n return initPaymentSheet(params);\n },\n []\n );\n\n const _presentPaymentSheet = useCallback(\n async (\n options?: PaymentSheet.PresentOptions\n ): Promise<PresentPaymentSheetResult> => {\n return presentPaymentSheet(options);\n },\n []\n );\n\n const _confirmPaymentSheetPayment =\n useCallback(async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n return confirmPaymentSheetPayment();\n }, []);\n\n const _handleURLCallback = useCallback(\n async (url: string): Promise<boolean> => {\n return handleURLCallback(url);\n },\n []\n );\n\n const _collectBankAccountForPayment = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForPaymentResult> => {\n return collectBankAccountForPayment(clientSecret, params);\n },\n []\n );\n\n const _collectBankAccountForSetup = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForSetupResult> => {\n return collectBankAccountForSetup(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForPayment = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForPaymentResult> => {\n return verifyMicrodepositsForPayment(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForSetup = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForSetupResult> => {\n return verifyMicrodepositsForSetup(clientSecret, params);\n },\n []\n );\n\n const _canAddCardToWallet = useCallback(\n async (\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult> => {\n return canAddCardToWallet(params);\n },\n []\n );\n\n const _collectBankAccountToken = useCallback(\n async (\n clientSecret: string,\n params?: CollectBankAccountTokenParams\n ): Promise<FinancialConnections.TokenResult> => {\n return collectBankAccountToken(clientSecret, params);\n },\n []\n );\n\n const _collectFinancialConnectionsAccounts = useCallback(\n async (\n clientSecret: string,\n params?: CollectFinancialConnectionsAccountsParams\n ): Promise<FinancialConnections.SessionResult> => {\n return collectFinancialConnectionsAccounts(clientSecret, params);\n },\n []\n );\n\n const _resetPaymentSheetCustomer = useCallback(async (): Promise<null> => {\n return resetPaymentSheetCustomer();\n }, []);\n\n const _isPlatformPaySupported = useCallback(\n async (params?: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n }): Promise<boolean> => {\n return isPlatformPaySupported(params);\n },\n []\n );\n\n const _confirmPlatformPaySetupIntent = useCallback(\n async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n ): Promise<PlatformPay.ConfirmSetupIntentResult> => {\n return confirmPlatformPaySetupIntent(clientSecret, params);\n },\n []\n );\n\n const _confirmPlatformPayPayment = useCallback(\n async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n ): Promise<PlatformPay.ConfirmPaymentResult> => {\n return confirmPlatformPayPayment(clientSecret, params);\n },\n []\n );\n\n const _dismissPlatformPay = useCallback(async (): Promise<boolean> => {\n return dismissPlatformPay();\n }, []);\n\n const _createPlatformPayPaymentMethod = useCallback(\n async (\n params: PlatformPay.PaymentMethodParams\n ): Promise<PlatformPay.PaymentMethodResult> => {\n return createPlatformPayPaymentMethod(params);\n },\n []\n );\n\n const _createPlatformPayToken = useCallback(\n async (\n params: PlatformPay.PaymentMethodParams\n ): Promise<PlatformPay.TokenResult> => {\n return createPlatformPayToken(params);\n },\n []\n );\n\n const _updatePlatformPaySheet = useCallback(\n async (params: {\n applePay: {\n cartItems: Array<PlatformPay.CartSummaryItem>;\n shippingMethods: Array<PlatformPay.ShippingMethod>;\n errors: Array<PlatformPay.ApplePaySheetError>;\n };\n }): Promise<{\n error?: StripeError<PlatformPayError>;\n }> => {\n return updatePlatformPaySheet(params);\n },\n []\n );\n\n const _openPlatformPaySetup = useCallback(async (): Promise<void> => {\n return openPlatformPaySetup();\n }, []);\n\n return {\n retrievePaymentIntent: _retrievePaymentIntent,\n retrieveSetupIntent: _retrieveSetupIntent,\n confirmPayment: _confirmPayment,\n createPaymentMethod: _createPaymentMethod,\n handleNextAction: _handleNextAction,\n handleNextActionForSetup: _handleNextActionForSetup,\n confirmSetupIntent: _confirmSetupIntent,\n createTokenForCVCUpdate: _createTokenForCVCUpdate,\n handleURLCallback: _handleURLCallback,\n confirmPaymentSheetPayment: _confirmPaymentSheetPayment,\n presentPaymentSheet: _presentPaymentSheet,\n initPaymentSheet: _initPaymentSheet,\n createToken: _createToken,\n collectBankAccountForPayment: _collectBankAccountForPayment,\n collectBankAccountForSetup: _collectBankAccountForSetup,\n verifyMicrodepositsForPayment: _verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup: _verifyMicrodepositsForSetup,\n canAddCardToWallet: _canAddCardToWallet,\n collectBankAccountToken: _collectBankAccountToken,\n collectFinancialConnectionsAccounts: _collectFinancialConnectionsAccounts,\n /**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\n resetPaymentSheetCustomer: _resetPaymentSheetCustomer,\n isPlatformPaySupported: _isPlatformPaySupported,\n confirmPlatformPaySetupIntent: _confirmPlatformPaySetupIntent,\n confirmPlatformPayPayment: _confirmPlatformPayPayment,\n dismissPlatformPay: _dismissPlatformPay,\n createPlatformPayPaymentMethod: _createPlatformPayPaymentMethod,\n createPlatformPayToken: _createPlatformPayToken,\n updatePlatformPaySheet: _updatePlatformPaySheet,\n openPlatformPaySetup: _openPlatformPaySetup,\n };\n}\n"],"mappings":"0QA8BA,4BACA,uCAqCO,QAASA,UAAS,EAAG,CAC1B,GAAMC,qBAAoB,CAAG,GAAAC,kBAAW,qDACtC,UACEC,IAAgC,CAEO,IADvCC,QAAoC,2DAAG,CAAC,CAAC,CAEzC,MAAO,GAAAC,8BAAmB,EAACF,IAAI,CAAEC,OAAO,CAAC,CAC3C,CAAC,8DACD,EAAE,CACH,CAED,GAAME,aAAY,CAAG,GAAAJ,kBAAW,sDAC9B,UAAOK,MAA0B,CAAiC,CAChE,MAAO,GAAAC,sBAAW,EAACD,MAAM,CAAC,CAC5B,CAAC,gEACD,EAAE,CACH,CAED,GAAME,uBAAsB,CAAG,GAAAP,kBAAW,sDACxC,UAAOQ,YAAoB,CAA2C,CACpE,MAAO,GAAAC,gCAAqB,EAACD,YAAY,CAAC,CAC5C,CAAC,gEACD,EAAE,CACH,CAED,GAAME,qBAAoB,CAAG,GAAAV,kBAAW,sDACtC,UAAOQ,YAAoB,CAAyC,CAClE,MAAO,GAAAG,8BAAmB,EAACH,YAAY,CAAC,CAC1C,C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CG,oBAAoB,CAAED,qBACxB,CAAC,CACH"}
1
+ {"version":3,"names":["_react","require","_functions","useStripe","_createPaymentMethod","useCallback","_ref","_asyncToGenerator2","default","data","options","arguments","length","undefined","createPaymentMethod","_x","apply","_createToken","_ref2","params","createToken","_x2","_retrievePaymentIntent","_ref3","clientSecret","retrievePaymentIntent","_x3","_retrieveSetupIntent","_ref4","retrieveSetupIntent","_x4","_confirmPayment","_ref5","paymentIntentClientSecret","confirmPayment","_x5","_x6","_handleNextAction","_ref6","returnURL","handleNextAction","_x7","_x8","_handleNextActionForSetup","_ref7","setupIntentClientSecret","handleNextActionForSetup","_x9","_x10","_confirmSetupIntent","_ref8","confirmSetupIntent","_x11","_x12","_createTokenForCVCUpdate","_ref9","cvc","createTokenForCVCUpdate","_x13","_initPaymentSheet","_ref10","initPaymentSheet","_x14","_presentPaymentSheet","_ref11","presentPaymentSheet","_x15","_confirmPaymentSheetPayment","confirmPaymentSheetPayment","_handleURLCallback","_ref13","url","handleURLCallback","_x16","_collectBankAccountForPayment","_ref14","collectBankAccountForPayment","_x17","_x18","_collectBankAccountForSetup","_ref15","collectBankAccountForSetup","_x19","_x20","_verifyMicrodepositsForPayment","_ref16","verifyMicrodepositsForPayment","_x21","_x22","_verifyMicrodepositsForSetup","_ref17","verifyMicrodepositsForSetup","_x23","_x24","_canAddCardToWallet","_ref18","canAddCardToWallet","_x25","_collectBankAccountToken","_ref19","collectBankAccountToken","_x26","_x27","_collectFinancialConnectionsAccounts","_ref20","collectFinancialConnectionsAccounts","_x28","_x29","_resetPaymentSheetCustomer","resetPaymentSheetCustomer","_isPlatformPaySupported","_ref22","isPlatformPaySupported","_x30","_confirmPlatformPaySetupIntent","_ref23","confirmPlatformPaySetupIntent","_x31","_x32","_confirmPlatformPayPayment","_ref24","confirmPlatformPayPayment","_x33","_x34","_dismissPlatformPay","dismissPlatformPay","_createPlatformPayPaymentMethod","_ref26","createPlatformPayPaymentMethod","_x35","_createPlatformPayToken","_ref27","createPlatformPayToken","_x36","_updatePlatformPaySheet","_ref28","updatePlatformPaySheet","_x37","_openPlatformPaySetup","openPlatformPaySetup"],"sourceRoot":"../../../src","sources":["hooks/useStripe.tsx"],"mappings":"0QA8BA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,UAAA,CAAAD,OAAA,iBAqCO,QAAS,CAAAE,SAASA,CAAA,CAAG,CAC1B,GAAM,CAAAC,oBAAoB,CAAG,GAAAC,kBAAW,iBAAAC,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EACtC,UACEC,IAAgC,CAEO,IADvC,CAAAC,OAAoC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAEzC,MAAO,GAAAG,8BAAmB,EAACL,IAAI,CAAEC,OAAO,CAAC,CAC3C,CAAC,kBAAAK,EAAA,SAAAT,IAAA,CAAAU,KAAA,MAAAL,SAAA,QACD,EACF,CAAC,CAED,GAAM,CAAAM,YAAY,CAAG,GAAAZ,kBAAW,iBAAAa,KAAA,IAAAX,kBAAA,CAAAC,OAAA,EAC9B,UAAOW,MAA0B,CAAiC,CAChE,MAAO,GAAAC,sBAAW,EAACD,MAAM,CAAC,CAC5B,CAAC,kBAAAE,GAAA,SAAAH,KAAA,CAAAF,KAAA,MAAAL,SAAA,QACD,EACF,CAAC,CAED,GAAM,CAAAW,sBAAsB,CAAG,GAAAjB,kBAAW,iBAAAkB,KAAA,IAAAhB,kBAAA,CAAAC,OAAA,EACxC,UAAOgB,YAAoB,CAA2C,CACpE,MAAO,GAAAC,gCAAqB,EAACD,YAAY,CAAC,CAC5C,CAAC,kBAAAE,GAAA,SAAAH,KAAA,CAAAP,KAAA,MAAAL,SAAA,QACD,EACF,CAAC,CAED,GAAM,CAAAgB,oBAAoB,CAAG,GAAAtB,kBAAW,iBAAAuB,KAAA,IAAArB,kBAAA,CAAAC,OAAA,EACtC,UAAOgB,YAAoB,CAAyC,CAClE,MAAO,GAAAK,8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AuB,CAAEF,wBAAwB,CACjDO,mCAAmC,CAAEF,oCAAoC,CAMzEM,yBAAyB,CAAED,0BAA0B,CACrDI,sBAAsB,CAAEF,uBAAuB,CAC/CM,6BAA6B,CAAEF,8BAA8B,CAC7DO,yBAAyB,CAAEF,0BAA0B,CACrDM,kBAAkB,CAAED,mBAAmB,CACvCI,8BAA8B,CAAEF,+BAA+B,CAC/DM,sBAAsB,CAAEF,uBAAuB,CAC/CM,sBAAsB,CAAEF,uBAAuB,CAC/CK,oBAAoB,CAAED,qBACxB,CAAC,CACH","ignoreList":[]}
@@ -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 { 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\nexport * from './components/CustomerSheet';\nexport type { Props as CustomerSheetProps } from './components/CustomerSheet';\n"],"mappings":"2vEACA,4DACA,oEACA,4CACA,sDACA,wDACA,kFAGA,2DAEA,iDAEA,+CAEA,6DAEA,6DAEA,iEAEA,uDAEA,iEAGA,gWAEA,kVAEA"}
1
+ {"version":3,"names":["_useConfirmPayment","require","_useConfirmSetupIntent","_useStripe","_usePlatformPay","_usePaymentSheet","_useFinancialConnectionsSheet","_StripeProvider","_CardField","_CardForm","_AuBECSDebitForm","_StripeContainer","_AddToWalletButton","_AddressSheet","_PlatformPayButton","_functions","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_index","_CustomerSheet"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"2vEACA,IAAAA,kBAAA,CAAAC,OAAA,8BACA,IAAAC,sBAAA,CAAAD,OAAA,kCACA,IAAAE,UAAA,CAAAF,OAAA,sBACA,IAAAG,eAAA,CAAAH,OAAA,2BACA,IAAAI,gBAAA,CAAAJ,OAAA,4BACA,IAAAK,6BAAA,CAAAL,OAAA,yCAGA,IAAAM,eAAA,CAAAN,OAAA,gCAEA,IAAAO,UAAA,CAAAP,OAAA,2BAEA,IAAAQ,SAAA,CAAAR,OAAA,0BAEA,IAAAS,gBAAA,CAAAT,OAAA,iCAEA,IAAAU,gBAAA,CAAAV,OAAA,iCAEA,IAAAW,kBAAA,CAAAX,OAAA,mCAEA,IAAAY,aAAA,CAAAZ,OAAA,8BAEA,IAAAa,kBAAA,CAAAb,OAAA,mCAGA,IAAAc,UAAA,CAAAd,OAAA,gBAAAe,MAAA,CAAAC,IAAA,CAAAF,UAAA,EAAAG,OAAA,UAAAC,GAAA,KAAAA,GAAA,cAAAA,GAAA,0BAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,CAAAJ,GAAA,YAAAA,GAAA,IAAAK,OAAA,EAAAA,OAAA,CAAAL,GAAA,IAAAJ,UAAA,CAAAI,GAAA,SAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,CAAAL,GAAA,EAAAO,UAAA,MAAAC,GAAA,UAAAA,IAAA,SAAAZ,UAAA,CAAAI,GAAA,SAEA,IAAAS,MAAA,CAAA3B,OAAA,kBAAAe,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,UAAAC,GAAA,KAAAA,GAAA,cAAAA,GAAA,0BAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,CAAAJ,GAAA,YAAAA,GAAA,IAAAK,OAAA,EAAAA,OAAA,CAAAL,GAAA,IAAAS,MAAA,CAAAT,GAAA,SAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,CAAAL,GAAA,EAAAO,UAAA,MAAAC,GAAA,UAAAA,IAAA,SAAAC,MAAA,CAAAT,GAAA,SAEA,IAAAU,cAAA,CAAA5B,OAAA,+BAAAe,MAAA,CAAAC,IAAA,CAAAY,cAAA,EAAAX,OAAA,UAAAC,GAAA,KAAAA,GAAA,cAAAA,GAAA,0BAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,CAAAJ,GAAA,YAAAA,GAAA,IAAAK,OAAA,EAAAA,OAAA,CAAAL,GAAA,IAAAU,cAAA,CAAAV,GAAA,SAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,CAAAL,GAAA,EAAAO,UAAA,MAAAC,GAAA,UAAAA,IAAA,SAAAE,cAAA,CAAAV,GAAA","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.setApplePayEntitlement=setApplePayEntitlement;exports.setGooglePayMetaData=setGooglePayMetaData;exports.withNoopSwiftFile=void 0;var _configPlugins=require("@expo/config-plugins");var _AndroidConfig$Manife=_configPlugins.AndroidConfig.Manifest,addMetaDataItemToMainApplication=_AndroidConfig$Manife.addMetaDataItemToMainApplication,getMainApplicationOrThrow=_AndroidConfig$Manife.getMainApplicationOrThrow,removeMetaDataItemFromMainApplication=_AndroidConfig$Manife.removeMetaDataItemFromMainApplication;var pkg=require('@stripe/stripe-react-native/package.json');var withStripe=function withStripe(config,props){config=withStripeIos(config,props);config=withNoopSwiftFile(config);config=withStripeAndroid(config,props);return config;};var withStripeIos=function withStripeIos(expoConfig,_ref){var merchantIdentifier=_ref.merchantIdentifier;return(0,_configPlugins.withEntitlementsPlist)(expoConfig,function(config){config.modResults=setApplePayEntitlement(merchantIdentifier,config.modResults);return config;});};function setApplePayEntitlement(merchantIdentifiers,entitlements){var _entitlements$key;var key='com.apple.developer.in-app-payments';var merchants=(_entitlements$key=entitlements[key])!=null?_entitlements$key:[];if(!Array.isArray(merchantIdentifiers)){merchantIdentifiers=[merchantIdentifiers];}for(var id of merchantIdentifiers){if(id&&!merchants.includes(id)){merchants.push(id);}}if(merchants.length){entitlements[key]=merchants;}return entitlements;}var withNoopSwiftFile=function withNoopSwiftFile(config){return _configPlugins.IOSConfig.XcodeProjectFile.withBuildSourceFile(config,{filePath:'noop-file.swift',contents:['//','// @generated','// A blank Swift file must be created for native modules with Swift files to work correctly.','//',''].join('\n')});};exports.withNoopSwiftFile=withNoopSwiftFile;var withStripeAndroid=function withStripeAndroid(expoConfig,_ref2){var _ref2$enableGooglePay=_ref2.enableGooglePay,enableGooglePay=_ref2$enableGooglePay===void 0?false:_ref2$enableGooglePay;return(0,_configPlugins.withAndroidManifest)(expoConfig,function(config){config.modResults=setGooglePayMetaData(enableGooglePay,config.modResults);return config;});};function setGooglePayMetaData(enabled,modResults){var GOOGLE_PAY_META_NAME='com.google.android.gms.wallet.api.enabled';var mainApplication=getMainApplicationOrThrow(modResults);if(enabled){addMetaDataItemToMainApplication(mainApplication,GOOGLE_PAY_META_NAME,'true');}else{removeMetaDataItemFromMainApplication(mainApplication,GOOGLE_PAY_META_NAME);}return modResults;}var _default=(0,_configPlugins.createRunOncePlugin)(withStripe,pkg.name,pkg.version);exports.default=_default;
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.setApplePayEntitlement=setApplePayEntitlement;exports.setGooglePayMetaData=setGooglePayMetaData;exports.withNoopSwiftFile=void 0;var _configPlugins=require("@expo/config-plugins");var _AndroidConfig$Manife=_configPlugins.AndroidConfig.Manifest,addMetaDataItemToMainApplication=_AndroidConfig$Manife.addMetaDataItemToMainApplication,getMainApplicationOrThrow=_AndroidConfig$Manife.getMainApplicationOrThrow,removeMetaDataItemFromMainApplication=_AndroidConfig$Manife.removeMetaDataItemFromMainApplication;var pkg=require('@stripe/stripe-react-native/package.json');var withStripe=function withStripe(config,props){config=withStripeIos(config,props);config=withNoopSwiftFile(config);config=withStripeAndroid(config,props);return config;};var withStripeIos=function withStripeIos(expoConfig,_ref){var merchantIdentifier=_ref.merchantIdentifier;return(0,_configPlugins.withEntitlementsPlist)(expoConfig,function(config){config.modResults=setApplePayEntitlement(merchantIdentifier,config.modResults);return config;});};function setApplePayEntitlement(merchantIdentifiers,entitlements){var _entitlements$key;var key='com.apple.developer.in-app-payments';var merchants=(_entitlements$key=entitlements[key])!=null?_entitlements$key:[];if(!Array.isArray(merchantIdentifiers)){merchantIdentifiers=[merchantIdentifiers];}for(var id of merchantIdentifiers){if(id&&!merchants.includes(id)){merchants.push(id);}}if(merchants.length){entitlements[key]=merchants;}return entitlements;}var withNoopSwiftFile=exports.withNoopSwiftFile=function withNoopSwiftFile(config){return _configPlugins.IOSConfig.XcodeProjectFile.withBuildSourceFile(config,{filePath:'noop-file.swift',contents:['//','// @generated','// A blank Swift file must be created for native modules with Swift files to work correctly.','//',''].join('\n')});};var withStripeAndroid=function withStripeAndroid(expoConfig,_ref2){var _ref2$enableGooglePay=_ref2.enableGooglePay,enableGooglePay=_ref2$enableGooglePay===void 0?false:_ref2$enableGooglePay;return(0,_configPlugins.withAndroidManifest)(expoConfig,function(config){config.modResults=setGooglePayMetaData(enableGooglePay,config.modResults);return config;});};function setGooglePayMetaData(enabled,modResults){var GOOGLE_PAY_META_NAME='com.google.android.gms.wallet.api.enabled';var mainApplication=getMainApplicationOrThrow(modResults);if(enabled){addMetaDataItemToMainApplication(mainApplication,GOOGLE_PAY_META_NAME,'true');}else{removeMetaDataItemFromMainApplication(mainApplication,GOOGLE_PAY_META_NAME);}return modResults;}var _default=exports.default=(0,_configPlugins.createRunOncePlugin)(withStripe,pkg.name,pkg.version);
2
2
  //# sourceMappingURL=withStripe.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AndroidConfig","Manifest","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","pkg","require","withStripe","config","props","withStripeIos","withNoopSwiftFile","withStripeAndroid","expoConfig","merchantIdentifier","withEntitlementsPlist","modResults","setApplePayEntitlement","merchantIdentifiers","entitlements","key","merchants","Array","isArray","id","includes","push","length","IOSConfig","XcodeProjectFile","withBuildSourceFile","filePath","contents","join","enableGooglePay","withAndroidManifest","setGooglePayMetaData","enabled","GOOGLE_PAY_META_NAME","mainApplication","createRunOncePlugin","name","version"],"sources":["withStripe.ts"],"sourcesContent":["import {\n AndroidConfig,\n ConfigPlugin,\n createRunOncePlugin,\n IOSConfig,\n withAndroidManifest,\n withEntitlementsPlist,\n} from '@expo/config-plugins';\n\nconst {\n addMetaDataItemToMainApplication,\n getMainApplicationOrThrow,\n removeMetaDataItemFromMainApplication,\n} = AndroidConfig.Manifest;\n\nconst pkg = require('@stripe/stripe-react-native/package.json');\n\ntype StripePluginProps = {\n /**\n * The iOS merchant ID used for enabling Apple Pay.\n * Without this, the error \"Missing merchant identifier\" will be thrown on iOS.\n */\n merchantIdentifier: string | string[];\n enableGooglePay: boolean;\n};\n\nconst withStripe: ConfigPlugin<StripePluginProps> = (config, props) => {\n config = withStripeIos(config, props);\n config = withNoopSwiftFile(config);\n config = withStripeAndroid(config, props);\n return config;\n};\n\nconst withStripeIos: ConfigPlugin<StripePluginProps> = (\n expoConfig,\n { merchantIdentifier }\n) => {\n return withEntitlementsPlist(expoConfig, (config) => {\n config.modResults = setApplePayEntitlement(\n merchantIdentifier,\n config.modResults\n );\n return config;\n });\n};\n\n/**\n * Adds the following to the entitlements:\n *\n * <key>com.apple.developer.in-app-payments</key>\n * <array>\n *\t <string>[MERCHANT_IDENTIFIER]</string>\n * </array>\n */\nexport function setApplePayEntitlement(\n merchantIdentifiers: string | string[],\n entitlements: Record<string, any>\n): Record<string, any> {\n const key = 'com.apple.developer.in-app-payments';\n\n const merchants: string[] = entitlements[key] ?? [];\n\n if (!Array.isArray(merchantIdentifiers)) {\n merchantIdentifiers = [merchantIdentifiers];\n }\n\n for (const id of merchantIdentifiers) {\n if (id && !merchants.includes(id)) {\n merchants.push(id);\n }\n }\n\n if (merchants.length) {\n entitlements[key] = merchants;\n }\n return entitlements;\n}\n\n/**\n * Add a blank Swift file to the Xcode project for Swift compatibility.\n */\nexport const withNoopSwiftFile: ConfigPlugin = (config) => {\n return IOSConfig.XcodeProjectFile.withBuildSourceFile(config, {\n filePath: 'noop-file.swift',\n contents: [\n '//',\n '// @generated',\n '// A blank Swift file must be created for native modules with Swift files to work correctly.',\n '//',\n '',\n ].join('\\n'),\n });\n};\n\nconst withStripeAndroid: ConfigPlugin<StripePluginProps> = (\n expoConfig,\n { enableGooglePay = false }\n) => {\n return withAndroidManifest(expoConfig, (config) => {\n config.modResults = setGooglePayMetaData(\n enableGooglePay,\n config.modResults\n );\n\n return config;\n });\n};\n\n/**\n * Adds the following to AndroidManifest.xml:\n *\n * <application>\n * ...\n *\t <meta-data\n * android:name=\"com.google.android.gms.wallet.api.enabled\"\n * android:value=\"true|false\" />\n * </application>\n */\nexport function setGooglePayMetaData(\n enabled: boolean,\n modResults: AndroidConfig.Manifest.AndroidManifest\n): AndroidConfig.Manifest.AndroidManifest {\n const GOOGLE_PAY_META_NAME = 'com.google.android.gms.wallet.api.enabled';\n const mainApplication = getMainApplicationOrThrow(modResults);\n if (enabled) {\n addMetaDataItemToMainApplication(\n mainApplication,\n GOOGLE_PAY_META_NAME,\n 'true'\n );\n } else {\n removeMetaDataItemFromMainApplication(\n mainApplication,\n GOOGLE_PAY_META_NAME\n );\n }\n\n return modResults;\n}\n\nexport default createRunOncePlugin(withStripe, pkg.name, pkg.version);\n"],"mappings":"yNAAA,mDASA,0BAIIA,4BAAa,CAACC,QAAQ,CAHxBC,gCAAgC,uBAAhCA,gCAAgC,CAChCC,yBAAyB,uBAAzBA,yBAAyB,CACzBC,qCAAqC,uBAArCA,qCAAqC,CAGvC,GAAMC,IAAG,CAAGC,OAAO,CAAC,0CAA0C,CAAC,CAW/D,GAAMC,WAA2C,CAAG,QAA9CA,WAA2C,CAAIC,MAAM,CAAEC,KAAK,CAAK,CACrED,MAAM,CAAGE,aAAa,CAACF,MAAM,CAAEC,KAAK,CAAC,CACrCD,MAAM,CAAGG,iBAAiB,CAACH,MAAM,CAAC,CAClCA,MAAM,CAAGI,iBAAiB,CAACJ,MAAM,CAAEC,KAAK,CAAC,CACzC,MAAOD,OAAM,CACf,CAAC,CAED,GAAME,cAA8C,CAAG,QAAjDA,cAA8C,CAClDG,UAAU,MAEP,IADDC,mBAAkB,MAAlBA,kBAAkB,CAEpB,MAAO,GAAAC,oCAAqB,EAACF,UAAU,CAAE,SAACL,MAAM,CAAK,CACnDA,MAAM,CAACQ,UAAU,CAAGC,sBAAsB,CACxCH,kBAAkB,CAClBN,MAAM,CAACQ,UAAU,CAClB,CACD,MAAOR,OAAM,CACf,CAAC,CAAC,CACJ,CAAC,CAUM,QAASS,uBAAsB,CACpCC,mBAAsC,CACtCC,YAAiC,CACZ,uBACrB,GAAMC,IAAG,CAAG,qCAAqC,CAEjD,GAAMC,UAAmB,oBAAGF,YAAY,CAACC,GAAG,CAAC,0BAAI,EAAE,CAEnD,GAAI,CAACE,KAAK,CAACC,OAAO,CAACL,mBAAmB,CAAC,CAAE,CACvCA,mBAAmB,CAAG,CAACA,mBAAmB,CAAC,CAC7C,CAEA,IAAK,GAAMM,GAAE,GAAIN,oBAAmB,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AmB,EAACjC,UAAU,CAAEF,GAAG,CAACoC,IAAI,CAAEpC,GAAG,CAACqC,OAAO,CAAC"}
1
+ {"version":3,"names":["_configPlugins","require","_AndroidConfig$Manife","AndroidConfig","Manifest","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","pkg","withStripe","config","props","withStripeIos","withNoopSwiftFile","withStripeAndroid","expoConfig","_ref","merchantIdentifier","withEntitlementsPlist","modResults","setApplePayEntitlement","merchantIdentifiers","entitlements","_entitlements$key","key","merchants","Array","isArray","id","includes","push","length","exports","IOSConfig","XcodeProjectFile","withBuildSourceFile","filePath","contents","join","_ref2","_ref2$enableGooglePay","enableGooglePay","withAndroidManifest","setGooglePayMetaData","enabled","GOOGLE_PAY_META_NAME","mainApplication","_default","default","createRunOncePlugin","name","version"],"sourceRoot":"../../../src","sources":["plugin/withStripe.ts"],"mappings":"yNAAA,IAAAA,cAAA,CAAAC,OAAA,yBASA,IAAAC,qBAAA,CAIIC,4BAAa,CAACC,QAAQ,CAHxBC,gCAAgC,CAAAH,qBAAA,CAAhCG,gCAAgC,CAChCC,yBAAyB,CAAAJ,qBAAA,CAAzBI,yBAAyB,CACzBC,qCAAqC,CAAAL,qBAAA,CAArCK,qCAAqC,CAGvC,GAAM,CAAAC,GAAG,CAAGP,OAAO,CAAC,0CAA0C,CAAC,CAW/D,GAAM,CAAAQ,UAA2C,CAAG,QAA9C,CAAAA,UAA2CA,CAAIC,MAAM,CAAEC,KAAK,CAAK,CACrED,MAAM,CAAGE,aAAa,CAACF,MAAM,CAAEC,KAAK,CAAC,CACrCD,MAAM,CAAGG,iBAAiB,CAACH,MAAM,CAAC,CAClCA,MAAM,CAAGI,iBAAiB,CAACJ,MAAM,CAAEC,KAAK,CAAC,CACzC,MAAO,CAAAD,MAAM,CACf,CAAC,CAED,GAAM,CAAAE,aAA8C,CAAG,QAAjD,CAAAA,aAA8CA,CAClDG,UAAU,CAAAC,IAAA,CAEP,IADD,CAAAC,kBAA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CAED,GAAM,CAAAxB,iBAAkD,CAAG,QAArD,CAAAA,iBAAkDA,CACtDC,UAAU,CAAAwB,KAAA,CAEP,KAAAC,qBAAA,CAAAD,KAAA,CADDE,eAAe,CAAfA,eAAe,CAAAD,qBAAA,UAAG,KAAK,CAAAA,qBAAA,CAEzB,MAAO,GAAAE,kCAAmB,EAAC3B,UAAU,CAAE,SAACL,MAAM,CAAK,CACjDA,MAAM,CAACS,UAAU,CAAGwB,oBAAoB,CACtCF,eAAe,CACf/B,MAAM,CAACS,UACT,CAAC,CAED,MAAO,CAAAT,MAAM,CACf,CAAC,CAAC,CACJ,CAAC,CAYM,QAAS,CAAAiC,oBAAoBA,CAClCC,OAAgB,CAChBzB,UAAkD,CACV,CACxC,GAAM,CAAA0B,oBAAoB,CAAG,2CAA2C,CACxE,GAAM,CAAAC,eAAe,CAAGxC,yBAAyB,CAACa,UAAU,CAAC,CAC7D,GAAIyB,OAAO,CAAE,CACXvC,gCAAgC,CAC9ByC,eAAe,CACfD,oBAAoB,CACpB,MACF,CAAC,CACH,CAAC,IAAM,CACLtC,qCAAqC,CACnCuC,eAAe,CACfD,oBACF,CAAC,CACH,CAEA,MAAO,CAAA1B,UAAU,CACnB,CAAC,IAAA4B,QAAA,CAAAf,OAAA,CAAAgB,OAAA,CAEc,GAAAC,kCAAmB,EAACxC,UAAU,CAAED,GAAG,CAAC0C,IAAI,CAAE1C,GAAG,CAAC2C,OAAO,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["ApplePay.ts"],"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
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/ApplePay.ts"],"mappings":"","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.CardBrand=void 0;var CardBrand;exports.CardBrand=CardBrand;(function(CardBrand){CardBrand[CardBrand["JCB"]=0]="JCB";CardBrand[CardBrand["Amex"]=1]="Amex";CardBrand[CardBrand["CartesBancaires"]=2]="CartesBancaires";CardBrand[CardBrand["DinersClub"]=3]="DinersClub";CardBrand[CardBrand["Discover"]=4]="Discover";CardBrand[CardBrand["Mastercard"]=5]="Mastercard";CardBrand[CardBrand["UnionPay"]=6]="UnionPay";CardBrand[CardBrand["Visa"]=7]="Visa";CardBrand[CardBrand["Unknown"]=8]="Unknown";})(CardBrand||(exports.CardBrand=CardBrand={}));
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.CardBrand=void 0;var CardBrand=exports.CardBrand=function(CardBrand){CardBrand[CardBrand["JCB"]=0]="JCB";CardBrand[CardBrand["Amex"]=1]="Amex";CardBrand[CardBrand["CartesBancaires"]=2]="CartesBancaires";CardBrand[CardBrand["DinersClub"]=3]="DinersClub";CardBrand[CardBrand["Discover"]=4]="Discover";CardBrand[CardBrand["Mastercard"]=5]="Mastercard";CardBrand[CardBrand["UnionPay"]=6]="UnionPay";CardBrand[CardBrand["Visa"]=7]="Visa";CardBrand[CardBrand["Unknown"]=8]="Unknown";return CardBrand;}({});
2
2
  //# sourceMappingURL=Common.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CardBrand"],"sources":["Common.ts"],"sourcesContent":["export interface BillingDetails {\n email?: string;\n phone?: string;\n name?: string;\n address?: Address;\n}\n\nexport interface Address {\n city?: string;\n country?: string;\n line1?: string;\n line2?: string;\n postalCode?: string;\n state?: string;\n}\n\nexport type AddressDetails = {\n /** The customer's full name. */\n name?: string;\n /** The customer's address. */\n address?: Address;\n /** The customer's phone number. */\n phone?: string;\n /** Whether or not the checkbox is initally selected. Defaults to false.\n * Note: The checkbox is displayed below the other fields when additionalFields.checkboxLabel is set.\n * */\n isCheckboxSelected?: boolean;\n};\n\nexport enum CardBrand {\n JCB = 0,\n Amex = 1,\n CartesBancaires = 2,\n DinersClub = 3,\n Discover = 4,\n Mastercard = 5,\n UnionPay = 6,\n Visa = 7,\n Unknown = 8,\n}\n"],"mappings":"qFA6BYA,UAAS,uCAATA,SAAS,EAATA,SAAS,CAATA,SAAS,iBAATA,SAAS,CAATA,SAAS,mBAATA,SAAS,CAATA,SAAS,yCAATA,SAAS,CAATA,SAAS,+BAATA,SAAS,CAATA,SAAS,2BAATA,SAAS,CAATA,SAAS,+BAATA,SAAS,CAATA,SAAS,2BAATA,SAAS,CAATA,SAAS,mBAATA,SAAS,CAATA,SAAS,4BAATA,SAAS,qBAATA,SAAS"}
1
+ {"version":3,"names":["CardBrand","exports"],"sourceRoot":"../../../src","sources":["types/Common.ts"],"mappings":"qFA6BY,CAAAA,SAAS,CAAAC,OAAA,CAAAD,SAAA,UAATA,SAAS,EAATA,SAAS,CAATA,SAAS,iBAATA,SAAS,CAATA,SAAS,mBAATA,SAAS,CAATA,SAAS,yCAATA,SAAS,CAATA,SAAS,+BAATA,SAAS,CAATA,SAAS,2BAATA,SAAS,CAATA,SAAS,+BAATA,SAAS,CAATA,SAAS,2BAATA,SAAS,CAATA,SAAS,mBAATA,SAAS,CAATA,SAAS,+BAAT,CAAAA,SAAS","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["CustomerSheet.ts"],"sourcesContent":["import type {\n PaymentSheet,\n StripeError,\n CustomerSheetError,\n BillingDetails,\n PaymentMethod,\n CardBrand,\n} from '../types';\n\nexport type CustomerSheetInitParams = {\n /** The color styling to use for PaymentSheet UI. Defaults to 'automatic'. iOS only. */\n style?: 'alwaysLight' | 'alwaysDark' | 'automatic';\n /** Configuration for the look and feel of the UI. */\n appearance?: PaymentSheet.AppearanceParams;\n /** Optional but recommended for cards, required for other payment methods. The SetupIntent client secret that will be used to confirm a new payment method. If this is missing, you will only be able to add cards without authentication steps. */\n setupIntentClientSecret?: 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 /** Your customer-facing business name. The default value is the name of your app. */\n merchantDisplayName?: string;\n /** Optional configuration for setting the header text of the Payment Method selection screen */\n headerTextForSelectionScreen?: string;\n /** CustomerSheet pre-populates fields with the values provided. If `billingDetailsCollectionConfiguration.attachDefaultsToPaymentMethod` is `true`, these values will be attached to the payment method even if they are not collected by the CustomerSheet UI. */\n defaultBillingDetails?: BillingDetails;\n /** Describes how billing details should be collected. All values default to `AUTOMATIC`. If `NEVER` is used for a required field for the Payment Method, you must provide an appropriate value as part of `defaultBillingDetails`. */\n billingDetailsCollectionConfiguration?: PaymentSheet.BillingDetailsCollectionConfiguration;\n /** A URL that redirects back to your app that CustomerSheet can use to auto-dismiss web views used for additional authentication, e.g. 3DS2 */\n returnURL?: string;\n /** Optional configuration to display a custom message when a saved payment method is removed. iOS only. */\n removeSavedPaymentMethodMessage?: string;\n /** Whether to show Apple Pay as an option. Defaults to false. */\n applePayEnabled?: boolean;\n /** Whether to show Google Pay as an option. Defaults to false. */\n googlePayEnabled?: boolean;\n /** The list of preferred networks that should be used to process payments made with a co-branded card.\n * This value will only be used if your user hasn't selected a network themselves. */\n preferredNetworks?: Array<CardBrand>;\n /** Optional override. It is generally recommended to rely on the default behavior, but- provide a CustomerAdapter here if\n * you would prefer retrieving and updating your Stripe customer object via your own backend instead.\n * WARNING: When implementing your own CustomerAdapter, ensure your application complies with all applicable laws and regulations, including data privacy and consumer protection.\n */\n customerAdapter?: CustomerAdapter;\n /** This is an experimental feature that may be removed at any time.\n * Defaults to true. If true, the customer can delete all saved payment methods.\n * If false, the customer can't delete if they only have one saved payment method remaining.\n */\n allowsRemovalOfLastSavedPaymentMethod?: boolean;\n};\n\nexport type CustomerSheetPresentParams = {\n /** Controls how the modal is presented (after animation). iOS only. Defaults to `popover`. See https://developer.apple.com/documentation/uikit/uimodalpresentationstyle for more info. */\n presentationStyle?:\n | 'fullscreen'\n | 'popover'\n | 'pageSheet'\n | 'formSheet'\n | 'automatic'\n | 'overFullScreen';\n /** Controls how the modal animates. iOS only. */\n animationStyle?: 'flip' | 'curl' | 'slide' | 'dissolve';\n /** Time (in milliseconds) before the Customer Sheet will automatically dismiss. */\n timeout?: number;\n};\n\nexport type CustomerSheetResult = {\n /** The users selected payment option, if one exists. */\n paymentOption?: PaymentSheet.PaymentOption;\n /** The Stripe PaymentMethod associated with the paymentOption, if it exists. */\n paymentMethod?: PaymentMethod.Result;\n /** The error that occurred. */\n error?: StripeError<CustomerSheetError>;\n};\n\nexport interface CustomerAdapter {\n /** Retrieves a list of Payment Methods attached to a customer.\n * If you are implementing your own CustomerAdapter:\n * Call the list method ( https://stripe.com/docs/api/payment_methods/list )\n * with the Stripe customer. Return the list of payment methods in JSON format.\n */\n fetchPaymentMethods?(): Promise<Array<object>>;\n /** Adds a Payment Method to a customer.\n * If you are implementing your own CustomerAdapter:\n * On your backend, retrieve the Stripe customer associated with your logged-in user.\n * Then, call the Attach method on the Payment Method with that customer's ID\n * ( https://stripe.com/docs/api/payment_methods/attach ).\n * - Parameters:\n * - paymentMethod: A valid Stripe Payment Method ID\n * Return the payment method in JSON format.\n */\n attachPaymentMethod?(paymentMethodId: string): Promise<object>;\n /** Deletes the given Payment Method from the customer.\n * If you are implementing your own CustomerAdapter:\n * Call the Detach method ( https://stripe.com/docs/api/payment_methods/detach )\n * on the Payment Method.\n * - Parameters:\n * - paymentMethod: The Stripe Payment Method ID to delete from the customer\n * Return the payment method in JSON format.\n */\n detachPaymentMethod?(paymentMethodId: String): Promise<object>;\n /** Set the last selected payment method for the customer.\n * To unset the default payment method, `null` is passed as the `paymentOption`.\n * If you are implementing your own CustomerAdapter:\n * Save a representation of the passed `paymentOption` as the customer's default payment method.\n */\n setSelectedPaymentOption?(\n paymentOption: CustomerPaymentOption | null\n ): Promise<void>;\n /** Retrieve the last selected payment method for the customer.\n * If you are implementing your own CustomerAdapter:\n * Return a CustomerPaymentOption for the customer's default selected payment method.\n * If no default payment method is selected, return null.\n */\n fetchSelectedPaymentOption?(): Promise<CustomerPaymentOption | null>;\n /** Creates a SetupIntent configured to attach a new payment method to a customer,\n * then returns the client secret for the created SetupIntent.\n */\n setupIntentClientSecretForCustomerAttach?(): Promise<String>;\n}\n\nexport type CustomerPaymentOption =\n | 'apple_pay'\n | 'google_pay'\n | 'link'\n | string;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/CustomerSheet.ts"],"mappings":"","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.VerifyMicrodepositsError=exports.RetrieveSetupIntentError=exports.RetrievePaymentIntentError=exports.PlatformPayError=exports.PaymentSheetError=exports.MissingRoutingNumber=exports.GooglePayError=exports.CustomerSheetError=exports.CreateTokenError=exports.CreatePaymentMethodError=exports.ConfirmSetupIntentError=exports.ConfirmPaymentError=exports.CollectBankAccountError=exports.CardActionError=exports.ApplePayError=exports.AddressSheetError=void 0;var ConfirmPaymentError;exports.ConfirmPaymentError=ConfirmPaymentError;(function(ConfirmPaymentError){ConfirmPaymentError["Canceled"]="Canceled";ConfirmPaymentError["Failed"]="Failed";ConfirmPaymentError["Unknown"]="Unknown";})(ConfirmPaymentError||(exports.ConfirmPaymentError=ConfirmPaymentError={}));var CardActionError;exports.CardActionError=CardActionError;(function(CardActionError){CardActionError["Canceled"]="Canceled";CardActionError["Failed"]="Failed";CardActionError["Unknown"]="Unknown";})(CardActionError||(exports.CardActionError=CardActionError={}));var ConfirmSetupIntentError;exports.ConfirmSetupIntentError=ConfirmSetupIntentError;(function(ConfirmSetupIntentError){ConfirmSetupIntentError["Canceled"]="Canceled";ConfirmSetupIntentError["Failed"]="Failed";ConfirmSetupIntentError["Unknown"]="Unknown";})(ConfirmSetupIntentError||(exports.ConfirmSetupIntentError=ConfirmSetupIntentError={}));var CreatePaymentMethodError;exports.CreatePaymentMethodError=CreatePaymentMethodError;(function(CreatePaymentMethodError){CreatePaymentMethodError["Failed"]="Failed";})(CreatePaymentMethodError||(exports.CreatePaymentMethodError=CreatePaymentMethodError={}));var CreateTokenError;exports.CreateTokenError=CreateTokenError;(function(CreateTokenError){CreateTokenError["Failed"]="Failed";})(CreateTokenError||(exports.CreateTokenError=CreateTokenError={}));var RetrievePaymentIntentError;exports.RetrievePaymentIntentError=RetrievePaymentIntentError;(function(RetrievePaymentIntentError){RetrievePaymentIntentError["Unknown"]="Unknown";})(RetrievePaymentIntentError||(exports.RetrievePaymentIntentError=RetrievePaymentIntentError={}));var RetrieveSetupIntentError;exports.RetrieveSetupIntentError=RetrieveSetupIntentError;(function(RetrieveSetupIntentError){RetrieveSetupIntentError["Unknown"]="Unknown";})(RetrieveSetupIntentError||(exports.RetrieveSetupIntentError=RetrieveSetupIntentError={}));var ApplePayError;exports.ApplePayError=ApplePayError;(function(ApplePayError){ApplePayError["Canceled"]="Canceled";ApplePayError["Failed"]="Failed";ApplePayError["Unknown"]="Unknown";})(ApplePayError||(exports.ApplePayError=ApplePayError={}));var PaymentSheetError;exports.PaymentSheetError=PaymentSheetError;(function(PaymentSheetError){PaymentSheetError["Failed"]="Failed";PaymentSheetError["Canceled"]="Canceled";PaymentSheetError["Timeout"]="Timeout";})(PaymentSheetError||(exports.PaymentSheetError=PaymentSheetError={}));var GooglePayError;exports.GooglePayError=GooglePayError;(function(GooglePayError){GooglePayError["Failed"]="Failed";GooglePayError["Canceled"]="Canceled";GooglePayError["Unknown"]="Unknown";})(GooglePayError||(exports.GooglePayError=GooglePayError={}));var MissingRoutingNumber={code:CreateTokenError.Failed,message:'You must provide a routing number for US bank accounts. This should be the ACH routing number.'};exports.MissingRoutingNumber=MissingRoutingNumber;var VerifyMicrodepositsError;exports.VerifyMicrodepositsError=VerifyMicrodepositsError;(function(VerifyMicrodepositsError){VerifyMicrodepositsError["Canceled"]="Canceled";VerifyMicrodepositsError["Failed"]="Failed";VerifyMicrodepositsError["Unknown"]="Unknown";})(VerifyMicrodepositsError||(exports.VerifyMicrodepositsError=VerifyMicrodepositsError={}));var CollectBankAccountError;exports.CollectBankAccountError=CollectBankAccountError;(function(CollectBankAccountError){CollectBankAccountError["Canceled"]="Canceled";CollectBankAccountError["Failed"]="Failed";CollectBankAccountError["Unknown"]="Unknown";})(CollectBankAccountError||(exports.CollectBankAccountError=CollectBankAccountError={}));var AddressSheetError;exports.AddressSheetError=AddressSheetError;(function(AddressSheetError){AddressSheetError["Failed"]="Failed";AddressSheetError["Canceled"]="Canceled";})(AddressSheetError||(exports.AddressSheetError=AddressSheetError={}));var CustomerSheetError;exports.CustomerSheetError=CustomerSheetError;(function(CustomerSheetError){CustomerSheetError["Failed"]="Failed";CustomerSheetError["Canceled"]="Canceled";})(CustomerSheetError||(exports.CustomerSheetError=CustomerSheetError={}));var PlatformPayError;exports.PlatformPayError=PlatformPayError;(function(PlatformPayError){PlatformPayError["Canceled"]="Canceled";PlatformPayError["Failed"]="Failed";PlatformPayError["Unknown"]="Unknown";})(PlatformPayError||(exports.PlatformPayError=PlatformPayError={}));
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.VerifyMicrodepositsError=exports.RetrieveSetupIntentError=exports.RetrievePaymentIntentError=exports.PlatformPayError=exports.PaymentSheetError=exports.MissingRoutingNumber=exports.GooglePayError=exports.CustomerSheetError=exports.CreateTokenError=exports.CreatePaymentMethodError=exports.ConfirmSetupIntentError=exports.ConfirmPaymentError=exports.CollectBankAccountError=exports.CardActionError=exports.ApplePayError=exports.AddressSheetError=void 0;var ConfirmPaymentError=exports.ConfirmPaymentError=function(ConfirmPaymentError){ConfirmPaymentError["Canceled"]="Canceled";ConfirmPaymentError["Failed"]="Failed";ConfirmPaymentError["Unknown"]="Unknown";return ConfirmPaymentError;}({});var CardActionError=exports.CardActionError=function(CardActionError){CardActionError["Canceled"]="Canceled";CardActionError["Failed"]="Failed";CardActionError["Unknown"]="Unknown";return CardActionError;}({});var ConfirmSetupIntentError=exports.ConfirmSetupIntentError=function(ConfirmSetupIntentError){ConfirmSetupIntentError["Canceled"]="Canceled";ConfirmSetupIntentError["Failed"]="Failed";ConfirmSetupIntentError["Unknown"]="Unknown";return ConfirmSetupIntentError;}({});var CreatePaymentMethodError=exports.CreatePaymentMethodError=function(CreatePaymentMethodError){CreatePaymentMethodError["Failed"]="Failed";return CreatePaymentMethodError;}({});var CreateTokenError=exports.CreateTokenError=function(CreateTokenError){CreateTokenError["Failed"]="Failed";return CreateTokenError;}({});var RetrievePaymentIntentError=exports.RetrievePaymentIntentError=function(RetrievePaymentIntentError){RetrievePaymentIntentError["Unknown"]="Unknown";return RetrievePaymentIntentError;}({});var RetrieveSetupIntentError=exports.RetrieveSetupIntentError=function(RetrieveSetupIntentError){RetrieveSetupIntentError["Unknown"]="Unknown";return RetrieveSetupIntentError;}({});var ApplePayError=exports.ApplePayError=function(ApplePayError){ApplePayError["Canceled"]="Canceled";ApplePayError["Failed"]="Failed";ApplePayError["Unknown"]="Unknown";return ApplePayError;}({});var PaymentSheetError=exports.PaymentSheetError=function(PaymentSheetError){PaymentSheetError["Failed"]="Failed";PaymentSheetError["Canceled"]="Canceled";PaymentSheetError["Timeout"]="Timeout";return PaymentSheetError;}({});var GooglePayError=exports.GooglePayError=function(GooglePayError){GooglePayError["Failed"]="Failed";GooglePayError["Canceled"]="Canceled";GooglePayError["Unknown"]="Unknown";return GooglePayError;}({});var MissingRoutingNumber=exports.MissingRoutingNumber={code:CreateTokenError.Failed,message:'You must provide a routing number for US bank accounts. This should be the ACH routing number.'};var VerifyMicrodepositsError=exports.VerifyMicrodepositsError=function(VerifyMicrodepositsError){VerifyMicrodepositsError["Canceled"]="Canceled";VerifyMicrodepositsError["Failed"]="Failed";VerifyMicrodepositsError["Unknown"]="Unknown";return VerifyMicrodepositsError;}({});var CollectBankAccountError=exports.CollectBankAccountError=function(CollectBankAccountError){CollectBankAccountError["Canceled"]="Canceled";CollectBankAccountError["Failed"]="Failed";CollectBankAccountError["Unknown"]="Unknown";return CollectBankAccountError;}({});var AddressSheetError=exports.AddressSheetError=function(AddressSheetError){AddressSheetError["Failed"]="Failed";AddressSheetError["Canceled"]="Canceled";return AddressSheetError;}({});var CustomerSheetError=exports.CustomerSheetError=function(CustomerSheetError){CustomerSheetError["Failed"]="Failed";CustomerSheetError["Canceled"]="Canceled";return CustomerSheetError;}({});var PlatformPayError=exports.PlatformPayError=function(PlatformPayError){PlatformPayError["Canceled"]="Canceled";PlatformPayError["Failed"]="Failed";PlatformPayError["Unknown"]="Unknown";return PlatformPayError;}({});
2
2
  //# sourceMappingURL=Errors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ConfirmPaymentError","CardActionError","ConfirmSetupIntentError","CreatePaymentMethodError","CreateTokenError","RetrievePaymentIntentError","RetrieveSetupIntentError","ApplePayError","PaymentSheetError","GooglePayError","MissingRoutingNumber","code","Failed","message","VerifyMicrodepositsError","CollectBankAccountError","AddressSheetError","CustomerSheetError","PlatformPayError"],"sources":["Errors.ts"],"sourcesContent":["export enum ConfirmPaymentError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum CardActionError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum ConfirmSetupIntentError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum CreatePaymentMethodError {\n Failed = 'Failed',\n}\n\nexport enum CreateTokenError {\n Failed = 'Failed',\n}\n\nexport enum RetrievePaymentIntentError {\n Unknown = 'Unknown',\n}\n\nexport enum RetrieveSetupIntentError {\n Unknown = 'Unknown',\n}\n\nexport enum ApplePayError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum PaymentSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n Timeout = 'Timeout',\n}\n\nexport type ErrorType =\n | 'api_connection_error'\n | 'api_error'\n | 'authentication_error'\n | 'card_error'\n | 'idempotency_error'\n | 'invalid_request_error'\n | 'rate_limit_error';\n\nexport interface StripeError<T> {\n code: T;\n message: string;\n localizedMessage?: string;\n declineCode?: string;\n stripeErrorCode?: string;\n type?: ErrorType;\n}\n\nexport enum GooglePayError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n Unknown = 'Unknown',\n}\n\nexport const MissingRoutingNumber = {\n code: CreateTokenError.Failed,\n message:\n 'You must provide a routing number for US bank accounts. This should be the ACH routing number.',\n};\n\nexport enum VerifyMicrodepositsError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum CollectBankAccountError {\n Canceled = 'Canceled',\n Failed = 'Failed',\n Unknown = 'Unknown',\n}\n\nexport enum AddressSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n}\n\nexport en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,OAAO,CACL,gGACJ,CAAC,CAAC,qDAEUC,yBAAwB,qEAAxBA,wBAAwB,EAAxBA,wBAAwB,wBAAxBA,wBAAwB,oBAAxBA,wBAAwB,yBAAxBA,wBAAwB,oCAAxBA,wBAAwB,SAMxBC,wBAAuB,mEAAvBA,uBAAuB,EAAvBA,uBAAuB,wBAAvBA,uBAAuB,oBAAvBA,uBAAuB,yBAAvBA,uBAAuB,mCAAvBA,uBAAuB,SAMvBC,kBAAiB,uDAAjBA,iBAAiB,EAAjBA,iBAAiB,oBAAjBA,iBAAiB,2BAAjBA,iBAAiB,6BAAjBA,iBAAiB,SAKjBC,mBAAkB,yDAAlBA,kBAAkB,EAAlBA,kBAAkB,oBAAlBA,kBAAkB,2BAAlBA,kBAAkB,8BAAlBA,kBAAkB,SAKlBC,iBAAgB,qDAAhBA,gBAAgB,EAAhBA,gBAAgB,wBAAhBA,gBAAgB,oBAAhBA,gBAAgB,yBAAhBA,gBAAgB,4BAAhBA,gBAAgB"}
1
+ {"version":3,"names":["ConfirmPaymentError","exports","CardActionError","ConfirmSetupIntentError","CreatePaymentMethodError","CreateTokenError","RetrievePaymentIntentError","RetrieveSetupIntentError","ApplePayError","PaymentSheetError","GooglePayError","MissingRoutingNumber","code","Failed","message","VerifyMicrodepositsError","CollectBankAccountError","AddressSheetError","CustomerSheetError","PlatformPayError"],"sourceRoot":"../../../src","sources":["types/Errors.ts"],"mappings":"wgBAAY,CAAAA,mBAAmB,CAAAC,OAAA,CAAAD,mBAAA,UAAnBA,mBAAmB,EAAnBA,mBAAmB,wBAAnBA,mBAAmB,oBAAnBA,mBAAmB,4BAAnB,CAAAA,mBAAmB,UAMnB,CAAAE,eAAe,CAAAD,OAAA,CAAAC,eAAA,UAAfA,eAAe,EAAfA,eAAe,wBAAfA,eAAe,oBAAfA,eAAe,4BAAf,CAAAA,eAAe,UAMf,CAAAC,uBAAuB,CAAAF,OAAA,CAAAE,uBAAA,UAAvBA,uBAAuB,EAAvBA,uBAAuB,w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AAuB,EAAvBA,uBAAuB,wBAAvBA,uBAAuB,oBAAvBA,uBAAuB,4BAAvB,CAAAA,uBAAuB,UAMvB,CAAAC,iBAAiB,CAAAhB,OAAA,CAAAgB,iBAAA,UAAjBA,iBAAiB,EAAjBA,iBAAiB,oBAAjBA,iBAAiB,8BAAjB,CAAAA,iBAAiB,UAKjB,CAAAC,kBAAkB,CAAAjB,OAAA,CAAAiB,kBAAA,UAAlBA,kBAAkB,EAAlBA,kBAAkB,oBAAlBA,kBAAkB,8BAAlB,CAAAA,kBAAkB,UAKlB,CAAAC,gBAAgB,CAAAlB,OAAA,CAAAkB,gBAAA,UAAhBA,gBAAgB,EAAhBA,gBAAgB,wBAAhBA,gBAAgB,oBAAhBA,gBAAgB,4BAAhB,CAAAA,gBAAgB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.FinancialConnectionsSheetError=exports.FinancialConnectionsEventName=exports.FinancialConnectionsEventErrorCode=void 0;var FinancialConnectionsSheetError;exports.FinancialConnectionsSheetError=FinancialConnectionsSheetError;(function(FinancialConnectionsSheetError){FinancialConnectionsSheetError["Failed"]="Failed";FinancialConnectionsSheetError["Canceled"]="Canceled";})(FinancialConnectionsSheetError||(exports.FinancialConnectionsSheetError=FinancialConnectionsSheetError={}));var FinancialConnectionsEventName;exports.FinancialConnectionsEventName=FinancialConnectionsEventName;(function(FinancialConnectionsEventName){FinancialConnectionsEventName["Open"]="open";FinancialConnectionsEventName["ManualEntryInitiated"]="manual_entry_initiated";FinancialConnectionsEventName["ConsentAcquired"]="consent_acquired";FinancialConnectionsEventName["SearchInitiated"]="search_initiated";FinancialConnectionsEventName["InstitutionSelected"]="institution_selected";FinancialConnectionsEventName["InstitutionAuthorized"]="institution_authorized";FinancialConnectionsEventName["AccountsSelected"]="accounts_selected";FinancialConnectionsEventName["Success"]="success";FinancialConnectionsEventName["Error"]="error";FinancialConnectionsEventName["Cancel"]="cancel";FinancialConnectionsEventName["FlowLaunchedInBrowser"]="flow_launched_in_browser";})(FinancialConnectionsEventName||(exports.FinancialConnectionsEventName=FinancialConnectionsEventName={}));var FinancialConnectionsEventErrorCode;exports.FinancialConnectionsEventErrorCode=FinancialConnectionsEventErrorCode;(function(FinancialConnectionsEventErrorCode){FinancialConnectionsEventErrorCode["AccountNumbersUnavailable"]="account_numbers_unavailable";FinancialConnectionsEventErrorCode["AccountsUnavailable"]="accounts_unavailable";FinancialConnectionsEventErrorCode["NoDebitableAccount"]="no_debitable_account";FinancialConnectionsEventErrorCode["AuthorizationFailed"]="authorization_failed";FinancialConnectionsEventErrorCode["InstitutionUnavailablePlanned"]="institution_unavailable_planned";FinancialConnectionsEventErrorCode["InstitutionUnavailableUnplanned"]="institution_unavailable_unplanned";FinancialConnectionsEventErrorCode["InstitutionTimeout"]="institution_timeout";FinancialConnectionsEventErrorCode["UnexpectedError"]="unexpected_error";FinancialConnectionsEventErrorCode["SessionExpired"]="session_expired";FinancialConnectionsEventErrorCode["FailedBotDetection"]="failed_bot_detection";})(FinancialConnectionsEventErrorCode||(exports.FinancialConnectionsEventErrorCode=FinancialConnectionsEventErrorCode={}));
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.FinancialConnectionsSheetError=exports.FinancialConnectionsEventName=exports.FinancialConnectionsEventErrorCode=void 0;var FinancialConnectionsSheetError=exports.FinancialConnectionsSheetError=function(FinancialConnectionsSheetError){FinancialConnectionsSheetError["Failed"]="Failed";FinancialConnectionsSheetError["Canceled"]="Canceled";return FinancialConnectionsSheetError;}({});var FinancialConnectionsEventName=exports.FinancialConnectionsEventName=function(FinancialConnectionsEventName){FinancialConnectionsEventName["Open"]="open";FinancialConnectionsEventName["ManualEntryInitiated"]="manual_entry_initiated";FinancialConnectionsEventName["ConsentAcquired"]="consent_acquired";FinancialConnectionsEventName["SearchInitiated"]="search_initiated";FinancialConnectionsEventName["InstitutionSelected"]="institution_selected";FinancialConnectionsEventName["InstitutionAuthorized"]="institution_authorized";FinancialConnectionsEventName["AccountsSelected"]="accounts_selected";FinancialConnectionsEventName["Success"]="success";FinancialConnectionsEventName["Error"]="error";FinancialConnectionsEventName["Cancel"]="cancel";FinancialConnectionsEventName["FlowLaunchedInBrowser"]="flow_launched_in_browser";return FinancialConnectionsEventName;}({});var FinancialConnectionsEventErrorCode=exports.FinancialConnectionsEventErrorCode=function(FinancialConnectionsEventErrorCode){FinancialConnectionsEventErrorCode["AccountNumbersUnavailable"]="account_numbers_unavailable";FinancialConnectionsEventErrorCode["AccountsUnavailable"]="accounts_unavailable";FinancialConnectionsEventErrorCode["NoDebitableAccount"]="no_debitable_account";FinancialConnectionsEventErrorCode["AuthorizationFailed"]="authorization_failed";FinancialConnectionsEventErrorCode["InstitutionUnavailablePlanned"]="institution_unavailable_planned";FinancialConnectionsEventErrorCode["InstitutionUnavailableUnplanned"]="institution_unavailable_unplanned";FinancialConnectionsEventErrorCode["InstitutionTimeout"]="institution_timeout";FinancialConnectionsEventErrorCode["UnexpectedError"]="unexpected_error";FinancialConnectionsEventErrorCode["SessionExpired"]="session_expired";FinancialConnectionsEventErrorCode["FailedBotDetection"]="failed_bot_detection";return FinancialConnectionsEventErrorCode;}({});
2
2
  //# sourceMappingURL=FinancialConnections.js.map