@stripe/stripe-react-native 0.19.0 → 0.21.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 (115) hide show
  1. package/CHANGELOG.md +46 -5
  2. package/README.md +2 -2
  3. package/android/build.gradle +1 -2
  4. package/android/gradle.properties +1 -1
  5. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +6 -3
  6. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +22 -7
  7. package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +1 -1
  8. package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +5 -1
  9. package/android/src/main/java/com/reactnativestripesdk/GooglePayFragment.kt +1 -1
  10. package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +2 -1
  11. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +10 -9
  12. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +11 -4
  13. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +27 -14
  14. package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +3 -1
  15. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressLauncherFragment.kt +111 -0
  16. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetEvent.kt +28 -0
  17. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +178 -0
  18. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +67 -0
  19. package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +3 -1
  20. package/ios/AddressSheet/AddressSheetUtils.swift +98 -0
  21. package/ios/AddressSheet/AddressSheetView.swift +131 -0
  22. package/ios/AddressSheet/AddressSheetViewManager.m +25 -0
  23. package/ios/AddressSheet/AddressSheetViewManager.swift +19 -0
  24. package/ios/ApplePayUtils.swift +1 -1
  25. package/ios/CardFieldView.swift +3 -3
  26. package/ios/FinancialConnections.swift +23 -22
  27. package/ios/Mappers.swift +10 -2
  28. package/ios/PaymentMethodFactory.swift +6 -7
  29. package/ios/PaymentSheetAppearance.swift +27 -26
  30. package/ios/{pushprovisioning → PushProvisioning}/AddToWalletButtonManager.m +0 -0
  31. package/ios/{pushprovisioning → PushProvisioning}/AddToWalletButtonManager.swift +0 -0
  32. package/ios/{pushprovisioning → PushProvisioning}/AddToWalletButtonView.swift +0 -0
  33. package/ios/{pushprovisioning → PushProvisioning}/PushProvisioningUtils.swift +0 -0
  34. package/ios/StripeSdk.m +5 -0
  35. package/ios/StripeSdk.swift +75 -27
  36. package/ios/Tests/AddressSheetUtilsTests.swift +279 -0
  37. package/jest/mock.js +2 -0
  38. package/lib/commonjs/NativeStripeSdk.js.map +1 -1
  39. package/lib/commonjs/components/AddressSheet.js +2 -0
  40. package/lib/commonjs/components/AddressSheet.js.map +1 -0
  41. package/lib/commonjs/functions.js +1 -1
  42. package/lib/commonjs/functions.js.map +1 -1
  43. package/lib/commonjs/hooks/usePaymentSheet.js +1 -1
  44. package/lib/commonjs/hooks/usePaymentSheet.js.map +1 -1
  45. package/lib/commonjs/hooks/useStripe.js +1 -1
  46. package/lib/commonjs/hooks/useStripe.js.map +1 -1
  47. package/lib/commonjs/index.js +1 -1
  48. package/lib/commonjs/index.js.map +1 -1
  49. package/lib/commonjs/types/Errors.js +1 -1
  50. package/lib/commonjs/types/Errors.js.map +1 -1
  51. package/lib/commonjs/types/FinancialConnections.js.map +1 -1
  52. package/lib/commonjs/types/index.js +1 -1
  53. package/lib/commonjs/types/index.js.map +1 -1
  54. package/lib/module/NativeStripeSdk.js.map +1 -1
  55. package/lib/module/components/AddressSheet.js +2 -0
  56. package/lib/module/components/AddressSheet.js.map +1 -0
  57. package/lib/module/functions.js +1 -1
  58. package/lib/module/functions.js.map +1 -1
  59. package/lib/module/hooks/usePaymentSheet.js +1 -1
  60. package/lib/module/hooks/usePaymentSheet.js.map +1 -1
  61. package/lib/module/hooks/useStripe.js +1 -1
  62. package/lib/module/hooks/useStripe.js.map +1 -1
  63. package/lib/module/index.js +1 -1
  64. package/lib/module/index.js.map +1 -1
  65. package/lib/module/types/Errors.js +1 -1
  66. package/lib/module/types/Errors.js.map +1 -1
  67. package/lib/module/types/FinancialConnections.js.map +1 -1
  68. package/lib/module/types/index.js +1 -1
  69. package/lib/module/types/index.js.map +1 -1
  70. package/lib/typescript/src/NativeStripeSdk.d.ts +1 -0
  71. package/lib/typescript/src/components/AddressSheet.d.ts +53 -0
  72. package/lib/typescript/src/functions.d.ts +6 -0
  73. package/lib/typescript/src/hooks/usePaymentSheet.d.ts +6 -0
  74. package/lib/typescript/src/hooks/useStripe.d.ts +6 -0
  75. package/lib/typescript/src/index.d.ts +1 -0
  76. package/lib/typescript/src/types/Common.d.ts +12 -0
  77. package/lib/typescript/src/types/Errors.d.ts +4 -0
  78. package/lib/typescript/src/types/FinancialConnections.d.ts +2 -2
  79. package/lib/typescript/src/types/PaymentMethod.d.ts +2 -0
  80. package/lib/typescript/src/types/PaymentSheet.d.ts +24 -1
  81. package/lib/typescript/src/types/index.d.ts +3 -6
  82. package/package.json +1 -1
  83. package/src/NativeStripeSdk.tsx +1 -0
  84. package/src/components/AddressSheet.tsx +82 -0
  85. package/src/functions.ts +9 -0
  86. package/src/hooks/usePaymentSheet.tsx +14 -0
  87. package/src/hooks/useStripe.tsx +11 -0
  88. package/src/index.tsx +4 -1
  89. package/src/types/Common.ts +13 -0
  90. package/src/types/Errors.ts +5 -0
  91. package/src/types/FinancialConnections.ts +4 -4
  92. package/src/types/PaymentMethod.ts +2 -0
  93. package/src/types/PaymentSheet.ts +26 -1
  94. package/src/types/index.ts +5 -10
  95. package/stripe-react-native.podspec +6 -2
  96. package/android/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  97. package/android/.gradle/7.1/dependencies-accessors/gc.properties +0 -0
  98. package/android/.gradle/7.1/fileChanges/last-build.bin +0 -0
  99. package/android/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
  100. package/android/.gradle/7.1/gc.properties +0 -0
  101. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  102. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  103. package/android/.gradle/checksums/checksums.lock +0 -0
  104. package/android/.gradle/vcs-1/gc.properties +0 -0
  105. package/android/.idea/gradle.xml +0 -13
  106. package/android/.idea/misc.xml +0 -9
  107. package/android/.idea/modules/android.iml +0 -18
  108. package/android/.idea/modules.xml +0 -8
  109. package/android/.idea/vcs.xml +0 -6
  110. package/android/local.properties +0 -8
  111. package/ios/StripeSdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  112. package/ios/StripeSdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  113. package/ios/StripeSdk.xcodeproj/project.xcworkspace/xcuserdata/charliecruzan.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  114. package/ios/StripeSdk.xcodeproj/xcuserdata/charliecruzan.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -22
  115. package/ios/StripeSdk.xcodeproj/xcuserdata/charliecruzan.xcuserdatad/xcschemes/xcschememanagement.plist +0 -27
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useStripe=useStripe;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _helpers=require("../helpers");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _functions=require("../functions");function useStripe(){var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),isApplePaySupported=_useState2[0],setApplePaySupported=_useState2[1];(0,_react.useEffect)(function(){function checkApplePaySupport(){return _checkApplePaySupport.apply(this,arguments);}function _checkApplePaySupport(){_checkApplePaySupport=(0,_asyncToGenerator2.default)(function*(){var isSupported=_helpers.isiOS&&(yield _NativeStripeSdk.default.isApplePaySupported());setApplePaySupported(isSupported);});return _checkApplePaySupport.apply(this,arguments);}checkApplePaySupport();},[]);var _createPaymentMethod=(0,_react.useCallback)(function(){var _ref=(0,_asyncToGenerator2.default)(function*(data){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return(0,_functions.createPaymentMethod)(data,options);});return function(_x){return _ref.apply(this,arguments);};}(),[]);var _createToken=(0,_react.useCallback)(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.createToken)(params);});return function(_x2){return _ref2.apply(this,arguments);};}(),[]);var _retrievePaymentIntent=(0,_react.useCallback)(function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.retrievePaymentIntent)(clientSecret);});return function(_x3){return _ref3.apply(this,arguments);};}(),[]);var _retrieveSetupIntent=(0,_react.useCallback)(function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.retrieveSetupIntent)(clientSecret);});return function(_x4){return _ref4.apply(this,arguments);};}(),[]);var _confirmPayment=(0,_react.useCallback)(function(){var _ref5=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,data){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return(0,_functions.confirmPayment)(paymentIntentClientSecret,data,options);});return function(_x5,_x6){return _ref5.apply(this,arguments);};}(),[]);var _presentApplePay=(0,_react.useCallback)(function(){var _ref6=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.presentApplePay)(params);});return function(_x7){return _ref6.apply(this,arguments);};}(),[]);var _updateApplePaySummaryItems=(0,_react.useCallback)(function(){var _ref7=(0,_asyncToGenerator2.default)(function*(summaryItems){var errorAddressFields=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return(0,_functions.updateApplePaySummaryItems)(summaryItems,errorAddressFields);});return function(_x8){return _ref7.apply(this,arguments);};}(),[]);var _confirmApplePayPayment=(0,_react.useCallback)(function(){var _ref8=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.confirmApplePayPayment)(clientSecret);});return function(_x9){return _ref8.apply(this,arguments);};}(),[]);var _handleNextAction=(0,_react.useCallback)(function(){var _ref9=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){return(0,_functions.handleNextAction)(paymentIntentClientSecret,returnURL);});return function(_x10,_x11){return _ref9.apply(this,arguments);};}(),[]);var _confirmSetupIntent=(0,_react.useCallback)(function(){var _ref10=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,data){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return(0,_functions.confirmSetupIntent)(paymentIntentClientSecret,data,options);});return function(_x12,_x13){return _ref10.apply(this,arguments);};}(),[]);var _createTokenForCVCUpdate=(0,_react.useCallback)(function(){var _ref11=(0,_asyncToGenerator2.default)(function*(cvc){return(0,_functions.createTokenForCVCUpdate)(cvc);});return function(_x14){return _ref11.apply(this,arguments);};}(),[]);var _initPaymentSheet=(0,_react.useCallback)(function(){var _ref12=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.initPaymentSheet)(params);});return function(_x15){return _ref12.apply(this,arguments);};}(),[]);var _presentPaymentSheet=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.presentPaymentSheet)();}),[]);var _confirmPaymentSheetPayment=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.confirmPaymentSheetPayment)();}),[]);var _handleURLCallback=(0,_react.useCallback)(function(){var _ref15=(0,_asyncToGenerator2.default)(function*(url){return(0,_functions.handleURLCallback)(url);});return function(_x16){return _ref15.apply(this,arguments);};}(),[]);var _isGooglePaySupported=(0,_react.useCallback)(function(){var _ref16=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.isGooglePaySupported)(params);});return function(_x17){return _ref16.apply(this,arguments);};}(),[]);var _initGooglePay=(0,_react.useCallback)(function(){var _ref17=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.initGooglePay)(params);});return function(_x18){return _ref17.apply(this,arguments);};}(),[]);var _presentGooglePay=(0,_react.useCallback)(function(){var _ref18=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.presentGooglePay)(params);});return function(_x19){return _ref18.apply(this,arguments);};}(),[]);var _createGooglePayPaymentMethod=(0,_react.useCallback)(function(){var _ref19=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.createGooglePayPaymentMethod)(params);});return function(_x20){return _ref19.apply(this,arguments);};}(),[]);var _openApplePaySetup=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.openApplePaySetup)();}),[]);var _collectBankAccountForPayment=(0,_react.useCallback)(function(){var _ref21=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountForPayment)(clientSecret,params);});return function(_x21,_x22){return _ref21.apply(this,arguments);};}(),[]);var _collectBankAccountForSetup=(0,_react.useCallback)(function(){var _ref22=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountForSetup)(clientSecret,params);});return function(_x23,_x24){return _ref22.apply(this,arguments);};}(),[]);var _verifyMicrodepositsForPayment=(0,_react.useCallback)(function(){var _ref23=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.verifyMicrodepositsForPayment)(clientSecret,params);});return function(_x25,_x26){return _ref23.apply(this,arguments);};}(),[]);var _verifyMicrodepositsForSetup=(0,_react.useCallback)(function(){var _ref24=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.verifyMicrodepositsForSetup)(clientSecret,params);});return function(_x27,_x28){return _ref24.apply(this,arguments);};}(),[]);var _canAddCardToWallet=(0,_react.useCallback)(function(){var _ref25=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.canAddCardToWallet)(params);});return function(_x29){return _ref25.apply(this,arguments);};}(),[]);var _collectBankAccountToken=(0,_react.useCallback)(function(){var _ref26=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.collectBankAccountToken)(clientSecret);});return function(_x30){return _ref26.apply(this,arguments);};}(),[]);var _collectFinancialConnectionsAccounts=(0,_react.useCallback)(function(){var _ref27=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.collectFinancialConnectionsAccounts)(clientSecret);});return function(_x31){return _ref27.apply(this,arguments);};}(),[]);return{retrievePaymentIntent:_retrievePaymentIntent,retrieveSetupIntent:_retrieveSetupIntent,confirmPayment:_confirmPayment,createPaymentMethod:_createPaymentMethod,handleNextAction:_handleNextAction,isApplePaySupported:isApplePaySupported,presentApplePay:_presentApplePay,confirmApplePayPayment:_confirmApplePayPayment,confirmSetupIntent:_confirmSetupIntent,createTokenForCVCUpdate:_createTokenForCVCUpdate,updateApplePaySummaryItems:_updateApplePaySummaryItems,handleURLCallback:_handleURLCallback,confirmPaymentSheetPayment:_confirmPaymentSheetPayment,presentPaymentSheet:_presentPaymentSheet,initPaymentSheet:_initPaymentSheet,createToken:_createToken,isGooglePaySupported:_isGooglePaySupported,initGooglePay:_initGooglePay,presentGooglePay:_presentGooglePay,createGooglePayPaymentMethod:_createGooglePayPaymentMethod,openApplePaySetup:_openApplePaySetup,collectBankAccountForPayment:_collectBankAccountForPayment,collectBankAccountForSetup:_collectBankAccountForSetup,verifyMicrodepositsForPayment:_verifyMicrodepositsForPayment,verifyMicrodepositsForSetup:_verifyMicrodepositsForSetup,canAddCardToWallet:_canAddCardToWallet,collectBankAccountToken:_collectBankAccountToken,collectFinancialConnectionsAccounts:_collectFinancialConnectionsAccounts};}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useStripe=useStripe;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _helpers=require("../helpers");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _functions=require("../functions");function useStripe(){var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),isApplePaySupported=_useState2[0],setApplePaySupported=_useState2[1];(0,_react.useEffect)(function(){function checkApplePaySupport(){return _checkApplePaySupport.apply(this,arguments);}function _checkApplePaySupport(){_checkApplePaySupport=(0,_asyncToGenerator2.default)(function*(){var isSupported=_helpers.isiOS&&(yield _NativeStripeSdk.default.isApplePaySupported());setApplePaySupported(isSupported);});return _checkApplePaySupport.apply(this,arguments);}checkApplePaySupport();},[]);var _createPaymentMethod=(0,_react.useCallback)(function(){var _ref=(0,_asyncToGenerator2.default)(function*(data){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return(0,_functions.createPaymentMethod)(data,options);});return function(_x){return _ref.apply(this,arguments);};}(),[]);var _createToken=(0,_react.useCallback)(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.createToken)(params);});return function(_x2){return _ref2.apply(this,arguments);};}(),[]);var _retrievePaymentIntent=(0,_react.useCallback)(function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.retrievePaymentIntent)(clientSecret);});return function(_x3){return _ref3.apply(this,arguments);};}(),[]);var _retrieveSetupIntent=(0,_react.useCallback)(function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.retrieveSetupIntent)(clientSecret);});return function(_x4){return _ref4.apply(this,arguments);};}(),[]);var _confirmPayment=(0,_react.useCallback)(function(){var _ref5=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,data){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return(0,_functions.confirmPayment)(paymentIntentClientSecret,data,options);});return function(_x5,_x6){return _ref5.apply(this,arguments);};}(),[]);var _presentApplePay=(0,_react.useCallback)(function(){var _ref6=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.presentApplePay)(params);});return function(_x7){return _ref6.apply(this,arguments);};}(),[]);var _updateApplePaySummaryItems=(0,_react.useCallback)(function(){var _ref7=(0,_asyncToGenerator2.default)(function*(summaryItems){var errorAddressFields=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return(0,_functions.updateApplePaySummaryItems)(summaryItems,errorAddressFields);});return function(_x8){return _ref7.apply(this,arguments);};}(),[]);var _confirmApplePayPayment=(0,_react.useCallback)(function(){var _ref8=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.confirmApplePayPayment)(clientSecret);});return function(_x9){return _ref8.apply(this,arguments);};}(),[]);var _handleNextAction=(0,_react.useCallback)(function(){var _ref9=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){return(0,_functions.handleNextAction)(paymentIntentClientSecret,returnURL);});return function(_x10,_x11){return _ref9.apply(this,arguments);};}(),[]);var _confirmSetupIntent=(0,_react.useCallback)(function(){var _ref10=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,data){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return(0,_functions.confirmSetupIntent)(paymentIntentClientSecret,data,options);});return function(_x12,_x13){return _ref10.apply(this,arguments);};}(),[]);var _createTokenForCVCUpdate=(0,_react.useCallback)(function(){var _ref11=(0,_asyncToGenerator2.default)(function*(cvc){return(0,_functions.createTokenForCVCUpdate)(cvc);});return function(_x14){return _ref11.apply(this,arguments);};}(),[]);var _initPaymentSheet=(0,_react.useCallback)(function(){var _ref12=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.initPaymentSheet)(params);});return function(_x15){return _ref12.apply(this,arguments);};}(),[]);var _presentPaymentSheet=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.presentPaymentSheet)();}),[]);var _confirmPaymentSheetPayment=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.confirmPaymentSheetPayment)();}),[]);var _handleURLCallback=(0,_react.useCallback)(function(){var _ref15=(0,_asyncToGenerator2.default)(function*(url){return(0,_functions.handleURLCallback)(url);});return function(_x16){return _ref15.apply(this,arguments);};}(),[]);var _isGooglePaySupported=(0,_react.useCallback)(function(){var _ref16=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.isGooglePaySupported)(params);});return function(_x17){return _ref16.apply(this,arguments);};}(),[]);var _initGooglePay=(0,_react.useCallback)(function(){var _ref17=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.initGooglePay)(params);});return function(_x18){return _ref17.apply(this,arguments);};}(),[]);var _presentGooglePay=(0,_react.useCallback)(function(){var _ref18=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.presentGooglePay)(params);});return function(_x19){return _ref18.apply(this,arguments);};}(),[]);var _createGooglePayPaymentMethod=(0,_react.useCallback)(function(){var _ref19=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.createGooglePayPaymentMethod)(params);});return function(_x20){return _ref19.apply(this,arguments);};}(),[]);var _openApplePaySetup=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.openApplePaySetup)();}),[]);var _collectBankAccountForPayment=(0,_react.useCallback)(function(){var _ref21=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountForPayment)(clientSecret,params);});return function(_x21,_x22){return _ref21.apply(this,arguments);};}(),[]);var _collectBankAccountForSetup=(0,_react.useCallback)(function(){var _ref22=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountForSetup)(clientSecret,params);});return function(_x23,_x24){return _ref22.apply(this,arguments);};}(),[]);var _verifyMicrodepositsForPayment=(0,_react.useCallback)(function(){var _ref23=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.verifyMicrodepositsForPayment)(clientSecret,params);});return function(_x25,_x26){return _ref23.apply(this,arguments);};}(),[]);var _verifyMicrodepositsForSetup=(0,_react.useCallback)(function(){var _ref24=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.verifyMicrodepositsForSetup)(clientSecret,params);});return function(_x27,_x28){return _ref24.apply(this,arguments);};}(),[]);var _canAddCardToWallet=(0,_react.useCallback)(function(){var _ref25=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.canAddCardToWallet)(params);});return function(_x29){return _ref25.apply(this,arguments);};}(),[]);var _collectBankAccountToken=(0,_react.useCallback)(function(){var _ref26=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.collectBankAccountToken)(clientSecret);});return function(_x30){return _ref26.apply(this,arguments);};}(),[]);var _collectFinancialConnectionsAccounts=(0,_react.useCallback)(function(){var _ref27=(0,_asyncToGenerator2.default)(function*(clientSecret){return(0,_functions.collectFinancialConnectionsAccounts)(clientSecret);});return function(_x31){return _ref27.apply(this,arguments);};}(),[]);var _resetPaymentSheetCustomer=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.resetPaymentSheetCustomer)();}),[]);return{retrievePaymentIntent:_retrievePaymentIntent,retrieveSetupIntent:_retrieveSetupIntent,confirmPayment:_confirmPayment,createPaymentMethod:_createPaymentMethod,handleNextAction:_handleNextAction,isApplePaySupported:isApplePaySupported,presentApplePay:_presentApplePay,confirmApplePayPayment:_confirmApplePayPayment,confirmSetupIntent:_confirmSetupIntent,createTokenForCVCUpdate:_createTokenForCVCUpdate,updateApplePaySummaryItems:_updateApplePaySummaryItems,handleURLCallback:_handleURLCallback,confirmPaymentSheetPayment:_confirmPaymentSheetPayment,presentPaymentSheet:_presentPaymentSheet,initPaymentSheet:_initPaymentSheet,createToken:_createToken,isGooglePaySupported:_isGooglePaySupported,initGooglePay:_initGooglePay,presentGooglePay:_presentGooglePay,createGooglePayPaymentMethod:_createGooglePayPaymentMethod,openApplePaySetup:_openApplePaySetup,collectBankAccountForPayment:_collectBankAccountForPayment,collectBankAccountForSetup:_collectBankAccountForSetup,verifyMicrodepositsForPayment:_verifyMicrodepositsForPayment,verifyMicrodepositsForSetup:_verifyMicrodepositsForSetup,canAddCardToWallet:_canAddCardToWallet,collectBankAccountToken:_collectBankAccountToken,collectFinancialConnectionsAccounts:_collectFinancialConnectionsAccounts,resetPaymentSheetCustomer:_resetPaymentSheetCustomer};}
2
2
  //# sourceMappingURL=useStripe.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useStripe.tsx"],"names":["useStripe","isApplePaySupported","setApplePaySupported","checkApplePaySupport","isSupported","isiOS","NativeStripeSdk","_createPaymentMethod","data","options","_createToken","params","_retrievePaymentIntent","clientSecret","_retrieveSetupIntent","_confirmPayment","paymentIntentClientSecret","_presentApplePay","_updateApplePaySummaryItems","summaryItems","errorAddressFields","_confirmApplePayPayment","_handleNextAction","returnURL","_confirmSetupIntent","_createTokenForCVCUpdate","cvc","_initPaymentSheet","_presentPaymentSheet","_confirmPaymentSheetPayment","_handleURLCallback","url","_isGooglePaySupported","_initGooglePay","_presentGooglePay","_createGooglePayPaymentMethod","_openApplePaySetup","_collectBankAccountForPayment","_collectBankAccountForSetup","_verifyMicrodepositsForPayment","_verifyMicrodepositsForSetup","_canAddCardToWallet","_collectBankAccountToken","_collectFinancialConnectionsAccounts","retrievePaymentIntent","retrieveSetupIntent","confirmPayment","createPaymentMethod","handleNextAction","presentApplePay","confirmApplePayPayment","confirmSetupIntent","createTokenForCVCUpdate","updateApplePaySummaryItems","handleURLCallback","confirmPaymentSheetPayment","presentPaymentSheet","initPaymentSheet","createToken","isGooglePaySupported","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","openApplePaySetup","collectBankAccountForPayment","collectBankAccountForSetup","verifyMicrodepositsForPayment","verifyMicrodepositsForSetup","canAddCardToWallet","collectBankAccountToken","collectFinancialConnectionsAccounts"],"mappings":"sWAmCA,4BACA,mCACA,2EACA,uCAiCO,QAASA,CAAAA,SAAT,EAAqB,CAC1B,cAAoD,oBAClD,IADkD,CAApD,qDAAOC,mBAAP,eAA4BC,oBAA5B,eAIA,qBAAU,UAAM,SACCC,CAAAA,oBADD,6IACd,WAAsC,CACpC,GAAMC,CAAAA,WAAW,CACfC,sBAAgBC,0BAAgBL,mBAAhB,EAAhB,CADF,CAEAC,oBAAoB,CAACE,WAAD,CAApB,CACD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Result,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n ApplePayResult,\n ApplePayError,\n StripeError,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n CreateTokenResult,\n PayWithGooglePayResult,\n GooglePayInitResult,\n GooglePay,\n CreateGooglePayPaymentMethodResult,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForSetupResult,\n CollectBankAccountForPaymentResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n} from '../types';\nimport { useCallback, useEffect, useState } from 'react';\nimport { isiOS } from '../helpers';\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport {\n confirmPayment,\n createPaymentMethod,\n retrievePaymentIntent,\n retrieveSetupIntent,\n confirmApplePayPayment,\n confirmSetupIntent,\n createTokenForCVCUpdate,\n handleNextAction,\n handleURLCallback,\n presentApplePay,\n updateApplePaySummaryItems,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\n createToken,\n isGooglePaySupported,\n initGooglePay,\n createGooglePayPaymentMethod,\n presentGooglePay,\n openApplePaySetup,\n collectBankAccountForPayment,\n collectBankAccountForSetup,\n verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup,\n canAddCardToWallet,\n collectBankAccountToken,\n collectFinancialConnectionsAccounts,\n} from '../functions';\n\n/**\n * useStripe hook\n */\nexport function useStripe() {\n const [isApplePaySupported, setApplePaySupported] = useState<boolean | null>(\n null\n );\n\n useEffect(() => {\n async function checkApplePaySupport() {\n const isSupported =\n isiOS && (await NativeStripeSdk.isApplePaySupported());\n setApplePaySupported(isSupported);\n }\n\n checkApplePaySupport();\n }, []);\n\n const _createPaymentMethod = useCallback(\n async (\n data: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n ): Promise<CreatePaymentMethodResult> => {\n return createPaymentMethod(data, options);\n },\n []\n );\n\n const _createToken = useCallback(\n async (params: Token.CreateParams): Promise<CreateTokenResult> => {\n return createToken(params);\n },\n []\n );\n\n const _retrievePaymentIntent = useCallback(\n async (clientSecret: string): Promise<RetrievePaymentIntentResult> => {\n return retrievePaymentIntent(clientSecret);\n },\n []\n );\n\n const _retrieveSetupIntent = useCallback(\n async (clientSecret: string): Promise<RetrieveSetupIntentResult> => {\n return retrieveSetupIntent(clientSecret);\n },\n []\n );\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n ): Promise<ConfirmPaymentResult> => {\n return confirmPayment(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _presentApplePay = useCallback(\n async (params: ApplePay.PresentParams): Promise<ApplePayResult> => {\n return presentApplePay(params);\n },\n []\n );\n\n const _updateApplePaySummaryItems = useCallback(\n async (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }> = []\n ): Promise<{ error?: StripeError<ApplePayError> }> => {\n return updateApplePaySummaryItems(summaryItems, errorAddressFields);\n },\n []\n );\n\n const _confirmApplePayPayment = useCallback(\n async (\n clientSecret: string\n ): Promise<{ error?: StripeError<ApplePayError> }> => {\n return confirmApplePayPayment(clientSecret);\n },\n []\n );\n\n const _handleNextAction = useCallback(\n async (\n paymentIntentClientSecret: string,\n returnURL?: string\n ): Promise<HandleNextActionResult> => {\n return handleNextAction(paymentIntentClientSecret, returnURL);\n },\n []\n );\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n ): Promise<ConfirmSetupIntentResult> => {\n return confirmSetupIntent(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _createTokenForCVCUpdate = useCallback(\n async (cvc: string): Promise<CreateTokenForCVCUpdateResult> => {\n return createTokenForCVCUpdate(cvc);\n },\n []\n );\n\n const _initPaymentSheet = useCallback(\n async (\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult> => {\n return initPaymentSheet(params);\n },\n []\n );\n\n const _presentPaymentSheet =\n useCallback(async (): Promise<PresentPaymentSheetResult> => {\n return presentPaymentSheet();\n }, []);\n\n const _confirmPaymentSheetPayment =\n useCallback(async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n return confirmPaymentSheetPayment();\n }, []);\n\n const _handleURLCallback = useCallback(\n async (url: string): Promise<boolean> => {\n return handleURLCallback(url);\n },\n []\n );\n\n const _isGooglePaySupported = useCallback(\n async (params?: GooglePay.IsSupportedParams): Promise<boolean> => {\n return isGooglePaySupported(params);\n },\n []\n );\n\n const _initGooglePay = useCallback(\n async (params: GooglePay.InitParams): Promise<GooglePayInitResult> => {\n return initGooglePay(params);\n },\n []\n );\n\n const _presentGooglePay = useCallback(\n async (\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult> => {\n return presentGooglePay(params);\n },\n []\n );\n\n const _createGooglePayPaymentMethod = useCallback(\n async (\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult> => {\n return createGooglePayPaymentMethod(params);\n },\n []\n );\n\n const _openApplePaySetup =\n useCallback(async (): Promise<OpenApplePaySetupResult> => {\n return openApplePaySetup();\n }, []);\n\n const _collectBankAccountForPayment = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForPaymentResult> => {\n return collectBankAccountForPayment(clientSecret, params);\n },\n []\n );\n\n const _collectBankAccountForSetup = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForSetupResult> => {\n return collectBankAccountForSetup(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForPayment = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForPaymentResult> => {\n return verifyMicrodepositsForPayment(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForSetup = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForSetupResult> => {\n return verifyMicrodepositsForSetup(clientSecret, params);\n },\n []\n );\n\n const _canAddCardToWallet = useCallback(\n async (\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult> => {\n return canAddCardToWallet(params);\n },\n []\n );\n\n const _collectBankAccountToken = useCallback(\n async (clientSecret: string): Promise<FinancialConnections.TokenResult> => {\n return collectBankAccountToken(clientSecret);\n },\n []\n );\n\n const _collectFinancialConnectionsAccounts = useCallback(\n async (\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult> => {\n return collectFinancialConnectionsAccounts(clientSecret);\n },\n []\n );\n\n return {\n retrievePaymentIntent: _retrievePaymentIntent,\n retrieveSetupIntent: _retrieveSetupIntent,\n confirmPayment: _confirmPayment,\n createPaymentMethod: _createPaymentMethod,\n handleNextAction: _handleNextAction,\n isApplePaySupported: isApplePaySupported,\n presentApplePay: _presentApplePay,\n confirmApplePayPayment: _confirmApplePayPayment,\n confirmSetupIntent: _confirmSetupIntent,\n createTokenForCVCUpdate: _createTokenForCVCUpdate,\n updateApplePaySummaryItems: _updateApplePaySummaryItems,\n handleURLCallback: _handleURLCallback,\n confirmPaymentSheetPayment: _confirmPaymentSheetPayment,\n presentPaymentSheet: _presentPaymentSheet,\n initPaymentSheet: _initPaymentSheet,\n createToken: _createToken,\n isGooglePaySupported: _isGooglePaySupported,\n initGooglePay: _initGooglePay,\n presentGooglePay: _presentGooglePay,\n createGooglePayPaymentMethod: _createGooglePayPaymentMethod,\n openApplePaySetup: _openApplePaySetup,\n collectBankAccountForPayment: _collectBankAccountForPayment,\n collectBankAccountForSetup: _collectBankAccountForSetup,\n verifyMicrodepositsForPayment: _verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup: _verifyMicrodepositsForSetup,\n canAddCardToWallet: _canAddCardToWallet,\n collectBankAccountToken: _collectBankAccountToken,\n collectFinancialConnectionsAccounts: _collectFinancialConnectionsAccounts,\n };\n}\n"]}
1
+ {"version":3,"sources":["useStripe.tsx"],"names":["useStripe","isApplePaySupported","setApplePaySupported","checkApplePaySupport","isSupported","isiOS","NativeStripeSdk","_createPaymentMethod","data","options","_createToken","params","_retrievePaymentIntent","clientSecret","_retrieveSetupIntent","_confirmPayment","paymentIntentClientSecret","_presentApplePay","_updateApplePaySummaryItems","summaryItems","errorAddressFields","_confirmApplePayPayment","_handleNextAction","returnURL","_confirmSetupIntent","_createTokenForCVCUpdate","cvc","_initPaymentSheet","_presentPaymentSheet","_confirmPaymentSheetPayment","_handleURLCallback","url","_isGooglePaySupported","_initGooglePay","_presentGooglePay","_createGooglePayPaymentMethod","_openApplePaySetup","_collectBankAccountForPayment","_collectBankAccountForSetup","_verifyMicrodepositsForPayment","_verifyMicrodepositsForSetup","_canAddCardToWallet","_collectBankAccountToken","_collectFinancialConnectionsAccounts","_resetPaymentSheetCustomer","retrievePaymentIntent","retrieveSetupIntent","confirmPayment","createPaymentMethod","handleNextAction","presentApplePay","confirmApplePayPayment","confirmSetupIntent","createTokenForCVCUpdate","updateApplePaySummaryItems","handleURLCallback","confirmPaymentSheetPayment","presentPaymentSheet","initPaymentSheet","createToken","isGooglePaySupported","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","openApplePaySetup","collectBankAccountForPayment","collectBankAccountForSetup","verifyMicrodepositsForPayment","verifyMicrodepositsForSetup","canAddCardToWallet","collectBankAccountToken","collectFinancialConnectionsAccounts","resetPaymentSheetCustomer"],"mappings":"sWAmCA,4BACA,mCACA,2EACA,uCAkCO,QAASA,CAAAA,SAAT,EAAqB,CAC1B,cAAoD,oBAClD,IADkD,CAApD,qDAAOC,mBAAP,eAA4BC,oBAA5B,eAIA,qBAAU,UAAM,SACCC,CAAAA,oBAD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AE5B,4BAzBxB,CA0BL6B,kBAAkB,CAAE5B,mBA1Bf,CA2BL6B,uBAAuB,CAAE5B,wBA3BpB,CA4BL6B,mCAAmC,CAAE5B,oCA5BhC,CAkCL6B,yBAAyB,CAAE5B,0BAlCtB,CAAP,CAoCD","sourcesContent":["import type {\n PaymentMethod,\n PaymentIntent,\n ApplePay,\n PaymentSheet,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n ApplePayResult,\n ApplePayError,\n StripeError,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n CreateTokenResult,\n PayWithGooglePayResult,\n GooglePayInitResult,\n GooglePay,\n CreateGooglePayPaymentMethodResult,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForSetupResult,\n CollectBankAccountForPaymentResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n} from '../types';\nimport { useCallback, useEffect, useState } from 'react';\nimport { isiOS } from '../helpers';\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport {\n confirmPayment,\n createPaymentMethod,\n retrievePaymentIntent,\n retrieveSetupIntent,\n confirmApplePayPayment,\n confirmSetupIntent,\n createTokenForCVCUpdate,\n handleNextAction,\n handleURLCallback,\n presentApplePay,\n updateApplePaySummaryItems,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\n createToken,\n isGooglePaySupported,\n initGooglePay,\n createGooglePayPaymentMethod,\n presentGooglePay,\n openApplePaySetup,\n collectBankAccountForPayment,\n collectBankAccountForSetup,\n verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup,\n canAddCardToWallet,\n collectBankAccountToken,\n collectFinancialConnectionsAccounts,\n resetPaymentSheetCustomer,\n} from '../functions';\n\n/**\n * useStripe hook\n */\nexport function useStripe() {\n const [isApplePaySupported, setApplePaySupported] = useState<boolean | null>(\n null\n );\n\n useEffect(() => {\n async function checkApplePaySupport() {\n const isSupported =\n isiOS && (await NativeStripeSdk.isApplePaySupported());\n setApplePaySupported(isSupported);\n }\n\n checkApplePaySupport();\n }, []);\n\n const _createPaymentMethod = useCallback(\n async (\n data: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n ): Promise<CreatePaymentMethodResult> => {\n return createPaymentMethod(data, options);\n },\n []\n );\n\n const _createToken = useCallback(\n async (params: Token.CreateParams): Promise<CreateTokenResult> => {\n return createToken(params);\n },\n []\n );\n\n const _retrievePaymentIntent = useCallback(\n async (clientSecret: string): Promise<RetrievePaymentIntentResult> => {\n return retrievePaymentIntent(clientSecret);\n },\n []\n );\n\n const _retrieveSetupIntent = useCallback(\n async (clientSecret: string): Promise<RetrieveSetupIntentResult> => {\n return retrieveSetupIntent(clientSecret);\n },\n []\n );\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n ): Promise<ConfirmPaymentResult> => {\n return confirmPayment(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _presentApplePay = useCallback(\n async (params: ApplePay.PresentParams): Promise<ApplePayResult> => {\n return presentApplePay(params);\n },\n []\n );\n\n const _updateApplePaySummaryItems = useCallback(\n async (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }> = []\n ): Promise<{ error?: StripeError<ApplePayError> }> => {\n return updateApplePaySummaryItems(summaryItems, errorAddressFields);\n },\n []\n );\n\n const _confirmApplePayPayment = useCallback(\n async (\n clientSecret: string\n ): Promise<{ error?: StripeError<ApplePayError> }> => {\n return confirmApplePayPayment(clientSecret);\n },\n []\n );\n\n const _handleNextAction = useCallback(\n async (\n paymentIntentClientSecret: string,\n returnURL?: string\n ): Promise<HandleNextActionResult> => {\n return handleNextAction(paymentIntentClientSecret, returnURL);\n },\n []\n );\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n ): Promise<ConfirmSetupIntentResult> => {\n return confirmSetupIntent(paymentIntentClientSecret, data, options);\n },\n []\n );\n\n const _createTokenForCVCUpdate = useCallback(\n async (cvc: string): Promise<CreateTokenForCVCUpdateResult> => {\n return createTokenForCVCUpdate(cvc);\n },\n []\n );\n\n const _initPaymentSheet = useCallback(\n async (\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult> => {\n return initPaymentSheet(params);\n },\n []\n );\n\n const _presentPaymentSheet =\n useCallback(async (): Promise<PresentPaymentSheetResult> => {\n return presentPaymentSheet();\n }, []);\n\n const _confirmPaymentSheetPayment =\n useCallback(async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n return confirmPaymentSheetPayment();\n }, []);\n\n const _handleURLCallback = useCallback(\n async (url: string): Promise<boolean> => {\n return handleURLCallback(url);\n },\n []\n );\n\n const _isGooglePaySupported = useCallback(\n async (params?: GooglePay.IsSupportedParams): Promise<boolean> => {\n return isGooglePaySupported(params);\n },\n []\n );\n\n const _initGooglePay = useCallback(\n async (params: GooglePay.InitParams): Promise<GooglePayInitResult> => {\n return initGooglePay(params);\n },\n []\n );\n\n const _presentGooglePay = useCallback(\n async (\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult> => {\n return presentGooglePay(params);\n },\n []\n );\n\n const _createGooglePayPaymentMethod = useCallback(\n async (\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult> => {\n return createGooglePayPaymentMethod(params);\n },\n []\n );\n\n const _openApplePaySetup =\n useCallback(async (): Promise<OpenApplePaySetupResult> => {\n return openApplePaySetup();\n }, []);\n\n const _collectBankAccountForPayment = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForPaymentResult> => {\n return collectBankAccountForPayment(clientSecret, params);\n },\n []\n );\n\n const _collectBankAccountForSetup = useCallback(\n async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<CollectBankAccountForSetupResult> => {\n return collectBankAccountForSetup(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForPayment = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForPaymentResult> => {\n return verifyMicrodepositsForPayment(clientSecret, params);\n },\n []\n );\n\n const _verifyMicrodepositsForSetup = useCallback(\n async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<VerifyMicrodepositsForSetupResult> => {\n return verifyMicrodepositsForSetup(clientSecret, params);\n },\n []\n );\n\n const _canAddCardToWallet = useCallback(\n async (\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult> => {\n return canAddCardToWallet(params);\n },\n []\n );\n\n const _collectBankAccountToken = useCallback(\n async (clientSecret: string): Promise<FinancialConnections.TokenResult> => {\n return collectBankAccountToken(clientSecret);\n },\n []\n );\n\n const _collectFinancialConnectionsAccounts = useCallback(\n async (\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult> => {\n return collectFinancialConnectionsAccounts(clientSecret);\n },\n []\n );\n\n const _resetPaymentSheetCustomer = useCallback(async (): Promise<null> => {\n return resetPaymentSheetCustomer();\n }, []);\n\n return {\n retrievePaymentIntent: _retrievePaymentIntent,\n retrieveSetupIntent: _retrieveSetupIntent,\n confirmPayment: _confirmPayment,\n createPaymentMethod: _createPaymentMethod,\n handleNextAction: _handleNextAction,\n isApplePaySupported: isApplePaySupported,\n presentApplePay: _presentApplePay,\n confirmApplePayPayment: _confirmApplePayPayment,\n confirmSetupIntent: _confirmSetupIntent,\n createTokenForCVCUpdate: _createTokenForCVCUpdate,\n updateApplePaySummaryItems: _updateApplePaySummaryItems,\n handleURLCallback: _handleURLCallback,\n confirmPaymentSheetPayment: _confirmPaymentSheetPayment,\n presentPaymentSheet: _presentPaymentSheet,\n initPaymentSheet: _initPaymentSheet,\n createToken: _createToken,\n isGooglePaySupported: _isGooglePaySupported,\n initGooglePay: _initGooglePay,\n presentGooglePay: _presentGooglePay,\n createGooglePayPaymentMethod: _createGooglePayPaymentMethod,\n openApplePaySetup: _openApplePaySetup,\n collectBankAccountForPayment: _collectBankAccountForPayment,\n collectBankAccountForSetup: _collectBankAccountForSetup,\n verifyMicrodepositsForPayment: _verifyMicrodepositsForPayment,\n verifyMicrodepositsForSetup: _verifyMicrodepositsForSetup,\n canAddCardToWallet: _canAddCardToWallet,\n collectBankAccountToken: _collectBankAccountToken,\n collectFinancialConnectionsAccounts: _collectFinancialConnectionsAccounts,\n /**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\n resetPaymentSheetCustomer: _resetPaymentSheetCustomer,\n };\n}\n"]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={useConfirmPayment:true,useConfirmSetupIntent:true,useStripe:true,useApplePay:true,UseApplePayProps:true,usePaymentSheet:true,useGooglePay:true,useFinancialConnectionsSheet:true,initStripe:true,StripeProvider:true,StripeProviderProps:true,CardField:true,CardFieldProps:true,CardForm:true,CardFormProps:true,ApplePayButton:true,ApplePayButtonProps:true,AuBECSDebitForm:true,AuBECSDebitFormProps:true,StripeContainer:true,StripeContainerProps:true,GooglePayButton:true,GooglePayButtonProps:true,AddToWalletButton:true,AddToWalletButtonProps:true};Object.defineProperty(exports,"AddToWalletButton",{enumerable:true,get:function get(){return _AddToWalletButton.AddToWalletButton;}});Object.defineProperty(exports,"AddToWalletButtonProps",{enumerable:true,get:function get(){return _AddToWalletButton.Props;}});Object.defineProperty(exports,"ApplePayButton",{enumerable:true,get:function get(){return _ApplePayButton.ApplePayButton;}});Object.defineProperty(exports,"ApplePayButtonProps",{enumerable:true,get:function get(){return _ApplePayButton.Props;}});Object.defineProperty(exports,"AuBECSDebitForm",{enumerable:true,get:function get(){return _AuBECSDebitForm.AuBECSDebitForm;}});Object.defineProperty(exports,"AuBECSDebitFormProps",{enumerable:true,get:function get(){return _AuBECSDebitForm.Props;}});Object.defineProperty(exports,"CardField",{enumerable:true,get:function get(){return _CardField.CardField;}});Object.defineProperty(exports,"CardFieldProps",{enumerable:true,get:function get(){return _CardField.Props;}});Object.defineProperty(exports,"CardForm",{enumerable:true,get:function get(){return _CardForm.CardForm;}});Object.defineProperty(exports,"CardFormProps",{enumerable:true,get:function get(){return _CardForm.Props;}});Object.defineProperty(exports,"GooglePayButton",{enumerable:true,get:function get(){return _GooglePayButton.GooglePayButton;}});Object.defineProperty(exports,"GooglePayButtonProps",{enumerable:true,get:function get(){return _GooglePayButton.Props;}});Object.defineProperty(exports,"StripeContainer",{enumerable:true,get:function get(){return _StripeContainer.StripeContainer;}});Object.defineProperty(exports,"StripeContainerProps",{enumerable:true,get:function get(){return _StripeContainer.Props;}});Object.defineProperty(exports,"StripeProvider",{enumerable:true,get:function get(){return _StripeProvider.StripeProvider;}});Object.defineProperty(exports,"StripeProviderProps",{enumerable:true,get:function get(){return _StripeProvider.Props;}});Object.defineProperty(exports,"UseApplePayProps",{enumerable:true,get:function get(){return _useApplePay.Props;}});Object.defineProperty(exports,"initStripe",{enumerable:true,get:function get(){return _StripeProvider.initStripe;}});Object.defineProperty(exports,"useApplePay",{enumerable:true,get:function get(){return _useApplePay.useApplePay;}});Object.defineProperty(exports,"useConfirmPayment",{enumerable:true,get:function get(){return _useConfirmPayment.useConfirmPayment;}});Object.defineProperty(exports,"useConfirmSetupIntent",{enumerable:true,get:function get(){return _useConfirmSetupIntent.useConfirmSetupIntent;}});Object.defineProperty(exports,"useFinancialConnectionsSheet",{enumerable:true,get:function get(){return _useFinancialConnectionsSheet.useFinancialConnectionsSheet;}});Object.defineProperty(exports,"useGooglePay",{enumerable:true,get:function get(){return _useGooglePay.useGooglePay;}});Object.defineProperty(exports,"usePaymentSheet",{enumerable:true,get:function get(){return _usePaymentSheet.usePaymentSheet;}});Object.defineProperty(exports,"useStripe",{enumerable:true,get:function get(){return _useStripe.useStripe;}});var _useConfirmPayment=require("./hooks/useConfirmPayment");var _useConfirmSetupIntent=require("./hooks/useConfirmSetupIntent");var _useStripe=require("./hooks/useStripe");var _useApplePay=require("./hooks/useApplePay");var _usePaymentSheet=require("./hooks/usePaymentSheet");var _useGooglePay=require("./hooks/useGooglePay");var _useFinancialConnectionsSheet=require("./hooks/useFinancialConnectionsSheet");var _StripeProvider=require("./components/StripeProvider");var _CardField=require("./components/CardField");var _CardForm=require("./components/CardForm");var _ApplePayButton=require("./components/ApplePayButton");var _AuBECSDebitForm=require("./components/AuBECSDebitForm");var _StripeContainer=require("./components/StripeContainer");var _GooglePayButton=require("./components/GooglePayButton");var _AddToWalletButton=require("./components/AddToWalletButton");var _functions=require("./functions");Object.keys(_functions).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_functions[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _functions[key];}});});var _index=require("./types/index");Object.keys(_index).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_index[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _index[key];}});});
1
+ Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={useConfirmPayment:true,useConfirmSetupIntent:true,useStripe:true,useApplePay:true,UseApplePayProps:true,usePaymentSheet:true,useGooglePay:true,useFinancialConnectionsSheet:true,initStripe:true,StripeProvider:true,StripeProviderProps:true,CardField:true,CardFieldProps:true,CardForm:true,CardFormProps:true,ApplePayButton:true,ApplePayButtonProps:true,AuBECSDebitForm:true,AuBECSDebitFormProps:true,StripeContainer:true,StripeContainerProps:true,GooglePayButton:true,GooglePayButtonProps:true,AddToWalletButton:true,AddToWalletButtonProps:true,AddressSheet:true,AddressSheetProps:true};Object.defineProperty(exports,"AddToWalletButton",{enumerable:true,get:function get(){return _AddToWalletButton.AddToWalletButton;}});Object.defineProperty(exports,"AddToWalletButtonProps",{enumerable:true,get:function get(){return _AddToWalletButton.Props;}});Object.defineProperty(exports,"AddressSheet",{enumerable:true,get:function get(){return _AddressSheet.AddressSheet;}});Object.defineProperty(exports,"AddressSheetProps",{enumerable:true,get:function get(){return _AddressSheet.Props;}});Object.defineProperty(exports,"ApplePayButton",{enumerable:true,get:function get(){return _ApplePayButton.ApplePayButton;}});Object.defineProperty(exports,"ApplePayButtonProps",{enumerable:true,get:function get(){return _ApplePayButton.Props;}});Object.defineProperty(exports,"AuBECSDebitForm",{enumerable:true,get:function get(){return _AuBECSDebitForm.AuBECSDebitForm;}});Object.defineProperty(exports,"AuBECSDebitFormProps",{enumerable:true,get:function get(){return _AuBECSDebitForm.Props;}});Object.defineProperty(exports,"CardField",{enumerable:true,get:function get(){return _CardField.CardField;}});Object.defineProperty(exports,"CardFieldProps",{enumerable:true,get:function get(){return _CardField.Props;}});Object.defineProperty(exports,"CardForm",{enumerable:true,get:function get(){return _CardForm.CardForm;}});Object.defineProperty(exports,"CardFormProps",{enumerable:true,get:function get(){return _CardForm.Props;}});Object.defineProperty(exports,"GooglePayButton",{enumerable:true,get:function get(){return _GooglePayButton.GooglePayButton;}});Object.defineProperty(exports,"GooglePayButtonProps",{enumerable:true,get:function get(){return _GooglePayButton.Props;}});Object.defineProperty(exports,"StripeContainer",{enumerable:true,get:function get(){return _StripeContainer.StripeContainer;}});Object.defineProperty(exports,"StripeContainerProps",{enumerable:true,get:function get(){return _StripeContainer.Props;}});Object.defineProperty(exports,"StripeProvider",{enumerable:true,get:function get(){return _StripeProvider.StripeProvider;}});Object.defineProperty(exports,"StripeProviderProps",{enumerable:true,get:function get(){return _StripeProvider.Props;}});Object.defineProperty(exports,"UseApplePayProps",{enumerable:true,get:function get(){return _useApplePay.Props;}});Object.defineProperty(exports,"initStripe",{enumerable:true,get:function get(){return _StripeProvider.initStripe;}});Object.defineProperty(exports,"useApplePay",{enumerable:true,get:function get(){return _useApplePay.useApplePay;}});Object.defineProperty(exports,"useConfirmPayment",{enumerable:true,get:function get(){return _useConfirmPayment.useConfirmPayment;}});Object.defineProperty(exports,"useConfirmSetupIntent",{enumerable:true,get:function get(){return _useConfirmSetupIntent.useConfirmSetupIntent;}});Object.defineProperty(exports,"useFinancialConnectionsSheet",{enumerable:true,get:function get(){return _useFinancialConnectionsSheet.useFinancialConnectionsSheet;}});Object.defineProperty(exports,"useGooglePay",{enumerable:true,get:function get(){return _useGooglePay.useGooglePay;}});Object.defineProperty(exports,"usePaymentSheet",{enumerable:true,get:function get(){return _usePaymentSheet.usePaymentSheet;}});Object.defineProperty(exports,"useStripe",{enumerable:true,get:function get(){return _useStripe.useStripe;}});var _useConfirmPayment=require("./hooks/useConfirmPayment");var _useConfirmSetupIntent=require("./hooks/useConfirmSetupIntent");var _useStripe=require("./hooks/useStripe");var _useApplePay=require("./hooks/useApplePay");var _usePaymentSheet=require("./hooks/usePaymentSheet");var _useGooglePay=require("./hooks/useGooglePay");var _useFinancialConnectionsSheet=require("./hooks/useFinancialConnectionsSheet");var _StripeProvider=require("./components/StripeProvider");var _CardField=require("./components/CardField");var _CardForm=require("./components/CardForm");var _ApplePayButton=require("./components/ApplePayButton");var _AuBECSDebitForm=require("./components/AuBECSDebitForm");var _StripeContainer=require("./components/StripeContainer");var _GooglePayButton=require("./components/GooglePayButton");var _AddToWalletButton=require("./components/AddToWalletButton");var _AddressSheet=require("./components/AddressSheet");var _functions=require("./functions");Object.keys(_functions).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_functions[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _functions[key];}});});var _index=require("./types/index");Object.keys(_index).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_index[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _index[key];}});});
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":[],"mappings":"koHACA,4DACA,oEACA,4CACA,gDACA,wDACA,kDACA,kFAGA,2DAKA,iDACA,+CACA,2DAIA,6DAIA,6DAIA,6DAIA,iEAKA,gWAEA","sourcesContent":["// hooks\nexport { useConfirmPayment } from './hooks/useConfirmPayment';\nexport { useConfirmSetupIntent } from './hooks/useConfirmSetupIntent';\nexport { useStripe } from './hooks/useStripe';\nexport { useApplePay, Props as UseApplePayProps } from './hooks/useApplePay';\nexport { usePaymentSheet } from './hooks/usePaymentSheet';\nexport { useGooglePay } from './hooks/useGooglePay';\nexport { useFinancialConnectionsSheet } from './hooks/useFinancialConnectionsSheet';\n\n//components\nexport {\n initStripe,\n StripeProvider,\n Props as StripeProviderProps,\n} from './components/StripeProvider';\nexport { CardField, Props as CardFieldProps } from './components/CardField';\nexport { CardForm, Props as CardFormProps } from './components/CardForm';\nexport {\n ApplePayButton,\n Props as ApplePayButtonProps,\n} from './components/ApplePayButton';\nexport {\n AuBECSDebitForm,\n Props as AuBECSDebitFormProps,\n} from './components/AuBECSDebitForm';\nexport {\n StripeContainer,\n Props as StripeContainerProps,\n} from './components/StripeContainer';\nexport {\n GooglePayButton,\n Props as GooglePayButtonProps,\n} from './components/GooglePayButton';\nexport {\n AddToWalletButton,\n Props as AddToWalletButtonProps,\n} from './components/AddToWalletButton';\n\nexport * from './functions';\n\nexport * from './types/index';\n"]}
1
+ {"version":3,"sources":["index.tsx"],"names":[],"mappings":"u5HACA,4DACA,oEACA,4CACA,gDACA,wDACA,kDACA,kFAGA,2DAKA,iDACA,+CACA,2DAIA,6DAIA,6DAIA,6DAIA,iEAIA,uDAIA,gWAEA","sourcesContent":["// hooks\nexport { useConfirmPayment } from './hooks/useConfirmPayment';\nexport { useConfirmSetupIntent } from './hooks/useConfirmSetupIntent';\nexport { useStripe } from './hooks/useStripe';\nexport { useApplePay, Props as UseApplePayProps } from './hooks/useApplePay';\nexport { usePaymentSheet } from './hooks/usePaymentSheet';\nexport { useGooglePay } from './hooks/useGooglePay';\nexport { useFinancialConnectionsSheet } from './hooks/useFinancialConnectionsSheet';\n\n//components\nexport {\n initStripe,\n StripeProvider,\n Props as StripeProviderProps,\n} from './components/StripeProvider';\nexport { CardField, Props as CardFieldProps } from './components/CardField';\nexport { CardForm, Props as CardFormProps } from './components/CardForm';\nexport {\n ApplePayButton,\n Props as ApplePayButtonProps,\n} from './components/ApplePayButton';\nexport {\n AuBECSDebitForm,\n Props as AuBECSDebitFormProps,\n} from './components/AuBECSDebitForm';\nexport {\n StripeContainer,\n Props as StripeContainerProps,\n} from './components/StripeContainer';\nexport {\n GooglePayButton,\n Props as GooglePayButtonProps,\n} from './components/GooglePayButton';\nexport {\n AddToWalletButton,\n Props as AddToWalletButtonProps,\n} from './components/AddToWalletButton';\nexport {\n AddressSheet,\n Props as AddressSheetProps,\n} from './components/AddressSheet';\nexport * from './functions';\n\nexport * from './types/index';\n"]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.VerifyMicrodepositsError=exports.RetrieveSetupIntentError=exports.RetrievePaymentIntentError=exports.PaymentSheetError=exports.MissingRoutingNumber=exports.GooglePayError=exports.CreateTokenError=exports.CreatePaymentMethodError=exports.ConfirmSetupIntentError=exports.ConfirmPaymentError=exports.CollectBankAccountError=exports.CardActionError=exports.ApplePayError=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||(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={}));
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.VerifyMicrodepositsError=exports.RetrieveSetupIntentError=exports.RetrievePaymentIntentError=exports.PaymentSheetError=exports.MissingRoutingNumber=exports.GooglePayError=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||(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={}));
2
2
  //# sourceMappingURL=Errors.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Errors.ts"],"names":["ConfirmPaymentError","CardActionError","ConfirmSetupIntentError","CreatePaymentMethodError","CreateTokenError","RetrievePaymentIntentError","RetrieveSetupIntentError","ApplePayError","PaymentSheetError","GooglePayError","MissingRoutingNumber","code","Failed","message","VerifyMicrodepositsError","CollectBankAccountError"],"mappings":"0bAAYA,CAAAA,mB,2DAAAA,mB,EAAAA,mB,wBAAAA,mB,oBAAAA,mB,yBAAAA,mB,+BAAAA,mB,SAMAC,CAAAA,e,mDAAAA,e,EAAAA,e,wBAAAA,e,oBAAAA,e,yBAAAA,e,2BAAAA,e,SAMAC,CAAAA,uB,mEAAAA,uB,EAAAA,uB,wBAAAA,uB,oBAAAA,uB,yBAAAA,uB,mCAAAA,uB,SAMAC,CAAAA,wB,qEAAAA,wB,EAAAA,wB,uBAAAA,wB,oCAAAA,wB,SAIAC,CAAAA,gB,qDAAAA,gB,EAAAA,gB,uBAAAA,gB,4BAAAA,gB,SAIAC,CAAAA,0B,yEAAAA,0B,EAAAA,0B,yBAAAA,0B,sCAAAA,0B,SAIAC,CAAAA,wB,qEAAAA,wB,EAAAA,wB,yBAAAA,wB,oCAAAA,wB,SAIAC,CAAAA,a,+CAAAA,a,EAAAA,a,wBAAAA,a,oBAAAA,a,yBAAAA,a,yBAAAA,a,SAMAC,CAAAA,iB,uDAAAA,iB,EAAAA,iB,oBAAAA,iB,2BAAAA,iB,6BAAAA,iB,SAuBAC,CAAAA,c,iDAAAA,c,EAAAA,c,oBAAAA,c,wBAAAA,c,yBAAAA,c,0BAAAA,c,MAML,GAAMC,CAAAA,oBAAoB,CAAG,CAClCC,IAAI,CAAEP,gBAAgB,CAACQ,MADW,CAElCC,OAAO,CACL,gGAHgC,CAA7B,C,qDAMKC,CAAAA,wB,qEAAAA,wB,EAAAA,wB,wBAAAA,wB,oBAAAA,wB,yBAAAA,wB,oCAAAA,wB,SAMAC,CAAAA,uB,mEAAAA,uB,EAAAA,uB,wBAAAA,uB,oBAAAA,uB,yBAAAA,uB,mCAAAA,uB","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}\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"]}
1
+ {"version":3,"sources":["Errors.ts"],"names":["ConfirmPaymentError","CardActionError","ConfirmSetupIntentError","CreatePaymentMethodError","CreateTokenError","RetrievePaymentIntentError","RetrieveSetupIntentError","ApplePayError","PaymentSheetError","GooglePayError","MissingRoutingNumber","code","Failed","message","VerifyMicrodepositsError","CollectBankAccountError","AddressSheetError"],"mappings":"odAAYA,CAAAA,mB,2DAAAA,mB,EAAAA,mB,wBAAAA,mB,oBAAAA,mB,yBAAAA,mB,+BAAAA,mB,SAMAC,CAAAA,e,mDAAAA,e,EAAAA,e,wBAAAA,e,oBAAAA,e,yBAAAA,e,2BAAAA,e,SAMAC,CAAAA,uB,mEAAAA,uB,EAAAA,uB,wBAAAA,uB,oBAAAA,uB,yBAAAA,uB,mCAAAA,uB,SAMAC,CAAAA,wB,qEAAAA,wB,EAAAA,wB,uBAAAA,wB,oCAAAA,wB,SAIAC,CAAAA,gB,qDAAAA,gB,EAAAA,gB,uBAAAA,gB,4BAAAA,gB,SAIAC,CAAAA,0B,yEAAAA,0B,EAAAA,0B,yBAAAA,0B,sCAAAA,0B,SAIAC,CAAAA,wB,qEAAAA,wB,EAAAA,wB,yBAAAA,wB,oCAAAA,wB,SAIAC,CAAAA,a,+CAAAA,a,EAAAA,a,wBAAAA,a,oBAAAA,a,yBAAAA,a,yBAAAA,a,SAMAC,CAAAA,iB,uDAAAA,iB,EAAAA,iB,oBAAAA,iB,2BAAAA,iB,6BAAAA,iB,SAuBAC,CAAAA,c,iDAAAA,c,EAAAA,c,oBAAAA,c,wBAAAA,c,yBAAAA,c,0BAAAA,c,MAML,GAAMC,CAAAA,oBAAoB,CAAG,CAClCC,IAAI,CAAEP,gBAAgB,CAACQ,MADW,CAElCC,OAAO,CACL,gGAHgC,CAA7B,C,qDAMKC,CAAAA,wB,qEAAAA,wB,EAAAA,wB,wBAAAA,wB,oBAAAA,wB,yBAAAA,wB,oCAAAA,wB,SAMAC,CAAAA,uB,mEAAAA,uB,EAAAA,uB,wBAAAA,uB,oBAAAA,uB,yBAAAA,uB,mCAAAA,uB,SAMMC,CAAAA,iB,uDAAAA,iB,EAAAA,iB,oBAAAA,iB,2BAAAA,iB,6BAAAA,iB","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}\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 const enum AddressSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["FinancialConnections.ts"],"names":["FinancialConnectionsSheetError"],"mappings":"0GA0HYA,CAAAA,8B,iFAAAA,8B,EAAAA,8B,oBAAAA,8B,2BAAAA,8B,0CAAAA,8B","sourcesContent":["import type { BankAccount } from './Token';\nimport type { StripeError } from './Errors';\n\nexport type SessionResult =\n | {\n /** The updated Financial Connections Session object. */\n session: Session;\n error?: undefined;\n }\n | {\n session?: undefined;\n error: StripeError<FinancialConnectionsSheetError>;\n };\n\nexport type TokenResult =\n | {\n /** The updated Financial Connections Session object. */\n session: Session;\n /** The Stripe token object associated with the bank account. */\n token: BankAccountToken;\n error?: undefined;\n }\n | {\n session?: undefined;\n token?: undefined;\n error: StripeError<FinancialConnectionsSheetError>;\n };\n\nexport type Session = {\n /** A unique ID for this session. */\n id: string;\n /** The client secret for this session. */\n clientSecret: string;\n /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */\n livemode: boolean;\n /** The accounts that were collected as part of this Session. */\n accounts: Array<Account>;\n};\n\nexport type BankAccountToken = {\n /** Bank account details. */\n bankAccount: BankAccount | null;\n /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */\n livemode: boolean;\n /** A unique ID for this token. */\n id: string | null;\n used: boolean;\n type: 'BankAccount';\n /** The UNIX timestamp (in milliseconds) of the date this token was created. */\n created: number | null;\n};\n\nexport type Account = {\n /** A unique ID for this Financial Connections Account. */\n id: string;\n /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */\n livemode: boolean;\n displayName: string | null;\n /** The current status of the account. Either active, inactive, or disconnected. */\n status: AccountStatus;\n institutionName: string;\n last4: string | null;\n /** The UNIX timestamp (in milliseconds) of the date this account was created. */\n created: number;\n /** The balance of this account. */\n balance: Balance | null;\n /** The last balance refresh. Includes the timestamp and the status. */\n balanceRefresh: BalanceRefresh | null;\n /** The category of this account, either cash, credit, investment, or other. */\n category: Category;\n /** The subcategory of this account, either checking, credit_card, line_of_credit, mortgage, savings, or other. */\n subcategory: Subcategory;\n /** Permissions requested for accounts collected during this session. */\n permissions: Array<Permission> | null;\n /** The supported payment method types for this account. */\n supportedPaymentMethodTypes: Array<PaymentMethodType>;\n};\n\nexport type AccountStatus = 'active' | 'inactive' | 'disconnected';\n\nexport type Category = 'cash' | 'credit' | 'investment' | 'other';\n\nexport type PaymentMethodType = 'us_bank_account' | 'link';\n\nexport type Subcategory =\n | 'checking'\n | 'credit_card'\n | 'line_of_credit'\n | 'mortgage'\n | 'other'\n | 'savings';\n\nexport type Permission =\n | 'balances'\n | 'ownership'\n | 'payment_method'\n | 'transactions'\n | 'account_numbers';\n\nexport type Balance = {\n /** The UNIX timestamp (in milliseconds) of time that the external institution calculated this balance. */\n asOf: number;\n /** The type of this balance, either cash or credit. */\n type: BalanceType;\n /** The funds available to the account holder. Typically this is the current balance less any holds. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Each value is an integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. */\n cash: { available: Map<String, number> | null };\n /** The credit that has been used by the account holder. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. */\n credit: { used: Map<String, number> | null };\n /** The balances owed to (or by) the account holder. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. */\n current: Map<String, number>;\n};\n\nexport type BalanceRefresh = {\n status: BalanceRefreshStatus;\n /** The UNIX timestamp (in milliseconds) of the time at which the last refresh attempt was initiated. */\n lastAttemptedAt: number;\n};\n\nexport type BalanceType = 'cash' | 'credit';\n\nexport type BalanceRefreshStatus = 'failed' | 'pending' | 'succeeded';\n\nexport enum FinancialConnectionsSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n}\n"]}
1
+ {"version":3,"sources":["FinancialConnections.ts"],"names":["FinancialConnectionsSheetError"],"mappings":"0GA0HYA,CAAAA,8B,iFAAAA,8B,EAAAA,8B,oBAAAA,8B,2BAAAA,8B,0CAAAA,8B","sourcesContent":["import type { BankAccount } from './Token';\nimport type { StripeError } from './Errors';\n\nexport type SessionResult =\n | {\n /** The updated Financial Connections Session object. */\n session: Session;\n error?: undefined;\n }\n | {\n session?: undefined;\n error: StripeError<FinancialConnectionsSheetError>;\n };\n\nexport type TokenResult =\n | {\n /** The updated Financial Connections Session object. */\n session: Session;\n /** The Stripe token object associated with the bank account. */\n token: BankAccountToken;\n error?: undefined;\n }\n | {\n session?: undefined;\n token?: undefined;\n error: StripeError<FinancialConnectionsSheetError>;\n };\n\nexport type Session = {\n /** A unique ID for this session. */\n id: string;\n /** The client secret for this session. */\n clientSecret: string;\n /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */\n livemode: boolean;\n /** The accounts that were collected as part of this Session. */\n accounts: Array<Account>;\n};\n\nexport type BankAccountToken = {\n /** Bank account details. */\n bankAccount: BankAccount | null;\n /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */\n livemode: boolean;\n /** A unique ID for this token. */\n id: string | null;\n used: boolean;\n type: 'BankAccount';\n /** The UNIX timestamp (in milliseconds) of the date this token was created. */\n created: number | null;\n};\n\nexport type Account = {\n /** A unique ID for this Financial Connections Account. */\n id: string;\n /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */\n livemode: boolean;\n displayName: string | null;\n /** The current status of the account. Either active, inactive, or disconnected. */\n status: AccountStatus;\n institutionName: string;\n last4: string | null;\n /** The UNIX timestamp (in milliseconds) of the date this account was created. */\n created: number;\n /** The balance of this account. */\n balance: Balance | null;\n /** The last balance refresh. Includes the timestamp and the status. */\n balanceRefresh: BalanceRefresh | null;\n /** The category of this account, either cash, credit, investment, or other. */\n category: Category;\n /** The subcategory of this account, either checking, credit_card, line_of_credit, mortgage, savings, or other. */\n subcategory: Subcategory;\n /** Permissions requested for accounts collected during this session. */\n permissions: Array<Permission> | null;\n /** The supported payment method types for this account. */\n supportedPaymentMethodTypes: Array<PaymentMethodType>;\n};\n\nexport type AccountStatus = 'active' | 'inactive' | 'disconnected';\n\nexport type Category = 'cash' | 'credit' | 'investment' | 'other';\n\nexport type PaymentMethodType = 'us_bank_account' | 'link';\n\nexport type Subcategory =\n | 'checking'\n | 'creditCard'\n | 'lineOfCredit'\n | 'mortgage'\n | 'other'\n | 'savings';\n\nexport type Permission =\n | 'balances'\n | 'ownership'\n | 'paymentMethod'\n | 'transactions'\n | 'accountNumbers';\n\nexport type Balance = {\n /** The UNIX timestamp (in milliseconds) of time that the external institution calculated this balance. */\n asOf: number;\n /** The type of this balance, either cash or credit. */\n type: BalanceType;\n /** The funds available to the account holder. Typically this is the current balance less any holds. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Each value is an integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. */\n cash: { available: Map<String, number> | null };\n /** The credit that has been used by the account holder. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. */\n credit: { used: Map<String, number> | null };\n /** The balances owed to (or by) the account holder. Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. */\n current: Map<String, number>;\n};\n\nexport type BalanceRefresh = {\n status: BalanceRefreshStatus;\n /** The UNIX timestamp (in milliseconds) of the time at which the last refresh attempt was initiated. */\n lastAttemptedAt: number;\n};\n\nexport type BalanceType = 'cash' | 'credit';\n\nexport type BalanceRefreshStatus = 'failed' | 'pending' | 'succeeded';\n\nexport enum FinancialConnectionsSheetError {\n Failed = 'Failed',\n Canceled = 'Canceled',\n}\n"]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={ApplePay:true,PaymentIntent:true,PaymentMethod:true,PaymentSheet:true,SetupIntent:true,ThreeDSecure:true,GooglePay:true,ApplePayButtonComponent:true,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,Address:true,BillingDetails:true};Object.defineProperty(exports,"Address",{enumerable:true,get:function get(){return _Common.Address;}});exports.AuBECSDebitFormComponent=exports.ApplePayButtonComponent=exports.ApplePay=void 0;Object.defineProperty(exports,"BillingDetails",{enumerable:true,get:function get(){return _Common.BillingDetails;}});exports.Token=exports.ThreeDSecure=exports.SetupIntent=exports.PaymentSheet=exports.PaymentMethod=exports.PaymentIntent=exports.GooglePay=exports.FinancialConnections=exports.CardFormView=exports.CardFieldInput=void 0;var ApplePay=_interopRequireWildcard(require("./ApplePay"));exports.ApplePay=ApplePay;var PaymentIntent=_interopRequireWildcard(require("./PaymentIntent"));exports.PaymentIntent=PaymentIntent;var PaymentMethod=_interopRequireWildcard(require("./PaymentMethod"));exports.PaymentMethod=PaymentMethod;var PaymentSheet=_interopRequireWildcard(require("./PaymentSheet"));exports.PaymentSheet=PaymentSheet;var SetupIntent=_interopRequireWildcard(require("./SetupIntent"));exports.SetupIntent=SetupIntent;var ThreeDSecure=_interopRequireWildcard(require("./ThreeDSecure"));exports.ThreeDSecure=ThreeDSecure;var GooglePay=_interopRequireWildcard(require("./GooglePay"));exports.GooglePay=GooglePay;var ApplePayButtonComponent=_interopRequireWildcard(require("./components/ApplePayButtonComponent"));exports.ApplePayButtonComponent=ApplePayButtonComponent;var AuBECSDebitFormComponent=_interopRequireWildcard(require("./components/AuBECSDebitFormComponent"));exports.AuBECSDebitFormComponent=AuBECSDebitFormComponent;var CardFieldInput=_interopRequireWildcard(require("./components/CardFieldInput"));exports.CardFieldInput=CardFieldInput;var CardFormView=_interopRequireWildcard(require("./components/CardFormView"));exports.CardFormView=CardFormView;var Token=_interopRequireWildcard(require("./Token"));exports.Token=Token;var FinancialConnections=_interopRequireWildcard(require("./FinancialConnections"));exports.FinancialConnections=FinancialConnections;var _Errors=require("./Errors");Object.keys(_Errors).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_Errors[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _Errors[key];}});});var _Common=require("./Common");function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}
1
+ Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={ApplePay:true,PaymentIntent:true,PaymentMethod:true,PaymentSheet:true,SetupIntent:true,ThreeDSecure:true,GooglePay:true,ApplePayButtonComponent:true,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,Address:true,BillingDetails:true,AddressDetails:true};Object.defineProperty(exports,"Address",{enumerable:true,get:function get(){return _Common.Address;}});Object.defineProperty(exports,"AddressDetails",{enumerable:true,get:function get(){return _Common.AddressDetails;}});exports.AuBECSDebitFormComponent=exports.ApplePayButtonComponent=exports.ApplePay=void 0;Object.defineProperty(exports,"BillingDetails",{enumerable:true,get:function get(){return _Common.BillingDetails;}});exports.Token=exports.ThreeDSecure=exports.SetupIntent=exports.PaymentSheet=exports.PaymentMethod=exports.PaymentIntent=exports.GooglePay=exports.FinancialConnections=exports.CardFormView=exports.CardFieldInput=void 0;var ApplePay=_interopRequireWildcard(require("./ApplePay"));exports.ApplePay=ApplePay;var PaymentIntent=_interopRequireWildcard(require("./PaymentIntent"));exports.PaymentIntent=PaymentIntent;var PaymentMethod=_interopRequireWildcard(require("./PaymentMethod"));exports.PaymentMethod=PaymentMethod;var PaymentSheet=_interopRequireWildcard(require("./PaymentSheet"));exports.PaymentSheet=PaymentSheet;var SetupIntent=_interopRequireWildcard(require("./SetupIntent"));exports.SetupIntent=SetupIntent;var ThreeDSecure=_interopRequireWildcard(require("./ThreeDSecure"));exports.ThreeDSecure=ThreeDSecure;var GooglePay=_interopRequireWildcard(require("./GooglePay"));exports.GooglePay=GooglePay;var ApplePayButtonComponent=_interopRequireWildcard(require("./components/ApplePayButtonComponent"));exports.ApplePayButtonComponent=ApplePayButtonComponent;var AuBECSDebitFormComponent=_interopRequireWildcard(require("./components/AuBECSDebitFormComponent"));exports.AuBECSDebitFormComponent=AuBECSDebitFormComponent;var CardFieldInput=_interopRequireWildcard(require("./components/CardFieldInput"));exports.CardFieldInput=CardFieldInput;var CardFormView=_interopRequireWildcard(require("./components/CardFormView"));exports.CardFormView=CardFormView;var Token=_interopRequireWildcard(require("./Token"));exports.Token=Token;var FinancialConnections=_interopRequireWildcard(require("./FinancialConnections"));exports.FinancialConnections=FinancialConnections;var _Errors=require("./Errors");Object.keys(_Errors).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_Errors[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _Errors[key];}});});var _Common=require("./Common");function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"03BAeA,4D,0BACA,sE,oCACA,sE,oCACA,oE,kCACA,kE,gCACA,oE,kCACA,8D,4BACA,qG,wDACA,uG,0DACA,mF,sCACA,+E,kCACA,sD,oBACA,oF,kDAkBA,iVACA,gC","sourcesContent":["import type {\n ApplePayError,\n CardActionError,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n CreatePaymentMethodError,\n CreateTokenError,\n GooglePayError,\n PaymentSheetError,\n RetrievePaymentIntentError,\n RetrieveSetupIntentError,\n StripeError,\n VerifyMicrodepositsError,\n CollectBankAccountError,\n} from './Errors';\nimport * as ApplePay from './ApplePay';\nimport * as PaymentIntent from './PaymentIntent';\nimport * as PaymentMethod from './PaymentMethod';\nimport * as PaymentSheet from './PaymentSheet';\nimport * as SetupIntent from './SetupIntent';\nimport * as ThreeDSecure from './ThreeDSecure';\nimport * as GooglePay from './GooglePay';\nimport * as ApplePayButtonComponent from './components/ApplePayButtonComponent';\nimport * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';\nimport * as CardFieldInput from './components/CardFieldInput';\nimport * as CardFormView from './components/CardFormView';\nimport * as Token from './Token';\nimport * as FinancialConnections from './FinancialConnections';\n\nexport {\n ApplePay,\n PaymentIntent,\n PaymentMethod,\n PaymentSheet,\n SetupIntent,\n ThreeDSecure,\n GooglePay,\n ApplePayButtonComponent,\n AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n};\n\nexport * from './Errors';\nexport { Address, BillingDetails } from './Common';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\nexport interface AppInfo {\n name?: string;\n partnerId?: string;\n url?: string;\n version?: string;\n}\n\nexport type CreatePaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult =\n | {\n paymentOption: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type CreateTokenResult =\n | {\n token: Token.Result;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<CreateTokenError>;\n };\n\nexport type ConfirmPaymentSheetPaymentResult = {\n error?: StripeError<PaymentSheetError>;\n};\n\nexport type ApplePayResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n stripeAccountId?: string;\n threeDSecureParams?: ThreeDSecure.ConfigurationParams;\n merchantIdentifier?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n}\n\nexport interface InitialiseParams extends InitStripeParams {\n appInfo: AppInfo;\n}\n\nexport type GooglePayInitResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type PayWithGooglePayResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type CreateGooglePayPaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type OpenApplePaySetupResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<ApplePayError>;\n };\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type VerifyMicrodepositsForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type VerifyMicrodepositsForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type CollectBankAccountForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type CollectBankAccountForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type GooglePayCardToken = {\n id: string;\n cardLastFour: string;\n network: number;\n serviceProvider: number;\n issuer: string;\n status:\n | 'TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION'\n | 'TOKEN_STATE_PENDING'\n | 'TOKEN_STATE_SUSPENDED'\n | 'TOKEN_STATE_ACTIVE'\n | 'TOKEN_STATE_FELICA_PENDING_PROVISIONING'\n | 'TOKEN_STATE_UNTOKENIZED';\n};\n\nexport type IsCardInWalletResult =\n | {\n isInWallet: boolean;\n token?: GooglePayCardToken;\n error?: undefined;\n }\n | {\n isInWallet?: undefined;\n token?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type CanAddCardToWalletParams = {\n /** The `primary_account_identifier` value from the issued card. Can be an empty string. */\n primaryAccountIdentifier: string | null;\n /** Last 4 digits of the card number. */\n cardLastFour: string;\n /** iOS only. Set this to `true` until shipping through TestFlight || App Store. If true, you must be using live cards, and have the proper iOS entitlement set up. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#requesting-access-for-ios */\n testEnv?: boolean;\n};\n\nexport type CanAddCardToWalletResult =\n | {\n canAddCard: boolean;\n details?: {\n token?: GooglePayCardToken;\n status?:\n | 'MISSING_CONFIGURATION'\n | 'UNSUPPORTED_DEVICE'\n | 'CARD_ALREADY_EXISTS';\n };\n error?: undefined;\n }\n | {\n canAddCard?: undefined;\n details?: undefined;\n error: StripeError<GooglePayError>;\n };\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":"mgCAeA,4D,0BACA,sE,oCACA,sE,oCACA,oE,kCACA,kE,gCACA,oE,kCACA,8D,4BACA,qG,wDACA,uG,0DACA,mF,sCACA,+E,kCACA,sD,oBACA,oF,kDAkBA,iVACA,gC","sourcesContent":["import type {\n ApplePayError,\n CardActionError,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n CreatePaymentMethodError,\n CreateTokenError,\n GooglePayError,\n PaymentSheetError,\n RetrievePaymentIntentError,\n RetrieveSetupIntentError,\n StripeError,\n VerifyMicrodepositsError,\n CollectBankAccountError,\n} from './Errors';\nimport * as ApplePay from './ApplePay';\nimport * as PaymentIntent from './PaymentIntent';\nimport * as PaymentMethod from './PaymentMethod';\nimport * as PaymentSheet from './PaymentSheet';\nimport * as SetupIntent from './SetupIntent';\nimport * as ThreeDSecure from './ThreeDSecure';\nimport * as GooglePay from './GooglePay';\nimport * as ApplePayButtonComponent from './components/ApplePayButtonComponent';\nimport * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';\nimport * as CardFieldInput from './components/CardFieldInput';\nimport * as CardFormView from './components/CardFormView';\nimport * as Token from './Token';\nimport * as FinancialConnections from './FinancialConnections';\n\nexport {\n ApplePay,\n PaymentIntent,\n PaymentMethod,\n PaymentSheet,\n SetupIntent,\n ThreeDSecure,\n GooglePay,\n ApplePayButtonComponent,\n AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n};\n\nexport * from './Errors';\nexport { Address, BillingDetails, AddressDetails } from './Common';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\nexport interface AppInfo {\n name?: string;\n partnerId?: string;\n url?: string;\n version?: string;\n}\n\nexport type CreatePaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult = {\n paymentOption?: PaymentSheet.PaymentOption | undefined;\n error?: StripeError<PaymentSheetError> | undefined;\n};\n\nexport type CreateTokenResult =\n | {\n token: Token.Result;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<CreateTokenError>;\n };\n\nexport type ConfirmPaymentSheetPaymentResult = {\n error?: StripeError<PaymentSheetError>;\n};\n\nexport type ApplePayResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n stripeAccountId?: string;\n threeDSecureParams?: ThreeDSecure.ConfigurationParams;\n merchantIdentifier?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n}\n\nexport interface InitialiseParams extends InitStripeParams {\n appInfo: AppInfo;\n}\n\nexport type GooglePayInitResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type PayWithGooglePayResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type CreateGooglePayPaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type OpenApplePaySetupResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<ApplePayError>;\n };\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type VerifyMicrodepositsForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type VerifyMicrodepositsForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type CollectBankAccountForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type CollectBankAccountForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type GooglePayCardToken = {\n id: string;\n cardLastFour: string;\n network: number;\n serviceProvider: number;\n issuer: string;\n status:\n | 'TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION'\n | 'TOKEN_STATE_PENDING'\n | 'TOKEN_STATE_SUSPENDED'\n | 'TOKEN_STATE_ACTIVE'\n | 'TOKEN_STATE_FELICA_PENDING_PROVISIONING'\n | 'TOKEN_STATE_UNTOKENIZED';\n};\n\nexport type IsCardInWalletResult =\n | {\n isInWallet: boolean;\n token?: GooglePayCardToken;\n error?: undefined;\n }\n | {\n isInWallet?: undefined;\n token?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type CanAddCardToWalletParams = {\n /** The `primary_account_identifier` value from the issued card. Can be an empty string. */\n primaryAccountIdentifier: string | null;\n /** Last 4 digits of the card number. */\n cardLastFour: string;\n /** iOS only. Set this to `true` until shipping through TestFlight || App Store. If true, you must be using live cards, and have the proper iOS entitlement set up. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#requesting-access-for-ios */\n testEnv?: boolean;\n};\n\nexport type CanAddCardToWalletResult =\n | {\n canAddCard: boolean;\n details?: {\n token?: GooglePayCardToken;\n status?:\n | 'MISSING_CONFIGURATION'\n | 'UNSUPPORTED_DEVICE'\n | 'CARD_ALREADY_EXISTS';\n };\n error?: undefined;\n }\n | {\n canAddCard?: undefined;\n details?: undefined;\n error: StripeError<GooglePayError>;\n };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["NativeStripeSdk.tsx"],"names":["StripeSdk","NativeModules"],"mappings":"gFAAA,yCA6GA,GAAQA,CAAAA,SAAR,CAAsBC,0BAAtB,CAAQD,SAAR,C,aAEeA,S","sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n PaymentIntent,\n ApplePay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n ApplePayResult,\n CreateTokenResult,\n GooglePayInitResult,\n PayWithGooglePayResult,\n CreateGooglePayPaymentMethodResult,\n GooglePay,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options?: PaymentIntent.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n isApplePaySupported(): Promise<boolean>;\n presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;\n confirmApplePayPayment(clientSecret: string): Promise<void>;\n updateApplePaySummaryItems(\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ): Promise<void>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n presentPaymentSheet(): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n isGooglePaySupported(params: GooglePay.IsSupportedParams): Promise<boolean>;\n initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;\n presentGooglePay(\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult>;\n createGooglePayPaymentMethod(\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n getConstants(): { API_VERSIONS: { CORE: string; ISSUING: string } };\n canAddCardToWallet(\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult>;\n isCardInWallet(params: {\n cardLastFour: string;\n }): Promise<IsCardInWalletResult>;\n collectBankAccountToken(\n clientSecret: string\n ): Promise<FinancialConnections.TokenResult>;\n collectFinancialConnectionsAccounts(\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult>;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"]}
1
+ {"version":3,"sources":["NativeStripeSdk.tsx"],"names":["StripeSdk","NativeModules"],"mappings":"gFAAA,yCA8GA,GAAQA,CAAAA,SAAR,CAAsBC,0BAAtB,CAAQD,SAAR,C,aAEeA,S","sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n PaymentIntent,\n ApplePay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n ApplePayResult,\n CreateTokenResult,\n GooglePayInitResult,\n PayWithGooglePayResult,\n CreateGooglePayPaymentMethodResult,\n GooglePay,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string,\n returnURL?: string | null\n ): Promise<HandleNextActionResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options?: PaymentIntent.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n isApplePaySupported(): Promise<boolean>;\n presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;\n confirmApplePayPayment(clientSecret: string): Promise<void>;\n updateApplePaySummaryItems(\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ): Promise<void>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n presentPaymentSheet(): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n isGooglePaySupported(params: GooglePay.IsSupportedParams): Promise<boolean>;\n initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;\n presentGooglePay(\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult>;\n createGooglePayPaymentMethod(\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n getConstants(): { API_VERSIONS: { CORE: string; ISSUING: string } };\n canAddCardToWallet(\n params: CanAddCardToWalletParams\n ): Promise<CanAddCardToWalletResult>;\n isCardInWallet(params: {\n cardLastFour: string;\n }): Promise<IsCardInWalletResult>;\n collectBankAccountToken(\n clientSecret: string\n ): Promise<FinancialConnections.TokenResult>;\n collectFinancialConnectionsAccounts(\n clientSecret: string\n ): Promise<FinancialConnections.SessionResult>;\n resetPaymentSheetCustomer(): Promise<null>;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AddressSheet.tsx";var _excluded=["onSubmit","onError"];var AddressSheetNative=(0,_reactNative.requireNativeComponent)('AddressSheetView');function AddressSheet(_ref){var onSubmit=_ref.onSubmit,onError=_ref.onError,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return _react.default.createElement(AddressSheetNative,(0,_extends2.default)({},props,{onSubmitAction:function onSubmitAction(value){return onSubmit(value.nativeEvent);},onErrorAction:function onErrorAction(value){return onError(value.nativeEvent.error);},__self:this,__source:{fileName:_jsxFileName,lineNumber:70,columnNumber:5}}));}
2
+ //# sourceMappingURL=AddressSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AddressSheet.tsx"],"names":["AddressSheetNative","AddressSheet","onSubmit","onError","props","value","nativeEvent","error"],"mappings":"8WAAA,oDACA,yC,wIAYA,GAAMA,CAAAA,kBAAkB,CAAG,wCAA4B,kBAA5B,CAA3B,CAsDO,QAASC,CAAAA,YAAT,MAA8D,IAAtCC,CAAAA,QAAsC,MAAtCA,QAAsC,CAA5BC,OAA4B,MAA5BA,OAA4B,CAAhBC,KAAgB,uDACnE,MACE,8BAAC,kBAAD,0BACMA,KADN,EAEE,cAAc,CAAE,wBAACC,KAAD,QACdH,CAAAA,QAAQ,CAACG,KAAK,CAACC,WAAP,CADM,EAFlB,CAKE,aAAa,CAAE,uBACbD,KADa,QAIVF,CAAAA,OAAO,CAACE,KAAK,CAACC,WAAN,CAAkBC,KAAnB,CAJG,EALjB,6EADF,CAaD","sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n requireNativeComponent,\n NativeSyntheticEvent,\n} from 'react-native';\nimport type {\n PaymentSheet,\n AddressDetails,\n StripeError,\n AddressSheetError,\n} from '../types';\n\nconst AddressSheetNative = requireNativeComponent<any>('AddressSheetView');\n\n/**\n * Props\n */\nexport interface Props extends AccessibilityProps {\n /** Whether the sheet is visible. Defaults to false. */\n visible: boolean;\n /** Controls how the modal is presented (after animation). iOS only. Defaults to `popover`. */\n presentationStyle?: 'fullscreen' | 'popover';\n /** Controls how the modal animates. iOS only. */\n animationStyle?: 'flip' | 'curl' | 'slide' | 'dissolve';\n /** Configuration for the look and feel of the UI. */\n appearance?: PaymentSheet.AppearanceParams;\n /** The values to prepopulate the sheet's fields with. */\n defaultValues?: AddressDetails;\n /** Configuration for additional fields besides the physical address */\n additionalFields?: {\n /** Determines whether the phone number is hidden, required, or optional. Defaults to hidden. */\n phoneNumber?: 'hidden' | 'optional' | 'required';\n /** The label of a checkbox displayed below other fields. If null or undefined, the checkbox is not displayed. */\n checkboxLabel?: string;\n };\n /** A list of two-letter country codes representing countries the customers can select. If the list is empty (the default), we display all countries. */\n allowedCountries?: Array<string>;\n /** A list of two-letter country codes representing countries that support address autocomplete. Defaults to a list of countries that Stripe has audited to ensure a good autocomplete experience. */\n autocompleteCountries?: Array<string>;\n /** The title of the primary button displayed at the bottom of the screen. Defaults to \"Save Address\". */\n primaryButtonTitle?: string;\n /** Title displayed at the top of the sheet. Defaults to \"Address\". */\n sheetTitle?: string;\n /** Android only. Google Places api key used to provide autocomplete suggestions. When null, autocomplete is disabled on Android. */\n googlePlacesApiKey?: string;\n /** Called when the user submits their information */\n onSubmit: (result: CollectAddressResult) => void;\n /** Called when the user taps the button to close the sheet before submitting their information, or when an error occurs. */\n onError: (error: StripeError<AddressSheetError>) => void;\n}\n\nexport type CollectAddressResult = Required<AddressDetails>;\n\n/**\n *\n *\n * @example\n * ```ts\n * <AddressSheet\n *\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function AddressSheet({ onSubmit, onError, ...props }: Props) {\n return (\n <AddressSheetNative\n {...props}\n onSubmitAction={(value: NativeSyntheticEvent<CollectAddressResult>) =>\n onSubmit(value.nativeEvent)\n }\n onErrorAction={(\n value: NativeSyntheticEvent<{\n error: StripeError<AddressSheetError>;\n }>\n ) => onError(value.nativeEvent.error)}\n />\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updateApplePaySummaryItems=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.presentPaymentSheet=exports.presentGooglePay=exports.presentApplePay=exports.openApplePaySetup=exports.isGooglePaySupported=exports.isCardInWallet=exports.isApplePaySupported=exports.initPaymentSheet=exports.initGooglePay=exports.handleURLCallback=exports.handleNextAction=exports.createTokenForCVCUpdate=exports.createToken=exports.createPaymentMethod=exports.createGooglePayPaymentMethod=exports.confirmSetupIntent=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.confirmApplePayPayment=exports.collectFinancialConnectionsAccounts=exports.collectBankAccountToken=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=exports.canAddCardToWallet=exports.Constants=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _types=require("./types");var _reactNative=require("react-native");var APPLE_PAY_NOT_SUPPORTED_MESSAGE='Apple pay is not supported on this device';var createPaymentMethod=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.createPaymentMethod(params,options),paymentMethod=_yield$NativeStripeSd.paymentMethod,error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createPaymentMethod(_x){return _ref.apply(this,arguments);};}();exports.createPaymentMethod=createPaymentMethod;var createToken=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){var _params$country;if(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber){return{error:_Errors.MissingRoutingNumber};}try{var _yield$NativeStripeSd2=yield _NativeStripeSdk.default.createToken(params),token=_yield$NativeStripeSd2.token,error=_yield$NativeStripeSd2.error;if(error){return{error:error};}return{token:token};}catch(error){return{error:error};}});return function createToken(_x2){return _ref2.apply(this,arguments);};}();exports.createToken=createToken;var retrievePaymentIntent=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd3=yield _NativeStripeSdk.default.retrievePaymentIntent(clientSecret),paymentIntent=_yield$NativeStripeSd3.paymentIntent,error=_yield$NativeStripeSd3.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function retrievePaymentIntent(_x3){return _ref3.apply(this,arguments);};}();exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd4=yield _NativeStripeSdk.default.retrieveSetupIntent(clientSecret),setupIntent=_yield$NativeStripeSd4.setupIntent,error=_yield$NativeStripeSd4.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function retrieveSetupIntent(_x4){return _ref4.apply(this,arguments);};}();exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd5=yield _NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,params,options),paymentIntent=_yield$NativeStripeSd5.paymentIntent,error=_yield$NativeStripeSd5.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPayment(_x5,_x6){return _ref5.apply(this,arguments);};}();exports.confirmPayment=confirmPayment;var isApplePaySupported=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(){return _helpers.isiOS&&(yield _NativeStripeSdk.default.isApplePaySupported());});return function isApplePaySupported(){return _ref6.apply(this,arguments);};}();exports.isApplePaySupported=isApplePaySupported;var presentApplePay=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(params){if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{var _yield$NativeStripeSd6=yield _NativeStripeSdk.default.presentApplePay(params),paymentMethod=_yield$NativeStripeSd6.paymentMethod,error=_yield$NativeStripeSd6.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function presentApplePay(_x7){return _ref7.apply(this,arguments);};}();exports.presentApplePay=presentApplePay;var updateApplePaySummaryItems=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(summaryItems){var errorAddressFields=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{yield _NativeStripeSdk.default.updateApplePaySummaryItems(summaryItems,errorAddressFields);return{};}catch(error){return{error:error};}});return function updateApplePaySummaryItems(_x8){return _ref8.apply(this,arguments);};}();exports.updateApplePaySummaryItems=updateApplePaySummaryItems;var confirmApplePayPayment=function(){var _ref9=(0,_asyncToGenerator2.default)(function*(clientSecret){if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{yield _NativeStripeSdk.default.confirmApplePayPayment(clientSecret);return{};}catch(error){return{error:error};}});return function confirmApplePayPayment(_x9){return _ref9.apply(this,arguments);};}();exports.confirmApplePayPayment=confirmApplePayPayment;var handleNextAction=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){try{var _ref11=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret),paymentIntent=_ref11.paymentIntent,error=_ref11.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextAction(_x10,_x11){return _ref10.apply(this,arguments);};}();exports.handleNextAction=handleNextAction;var confirmSetupIntent=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd7=yield _NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,params,options),setupIntent=_yield$NativeStripeSd7.setupIntent,error=_yield$NativeStripeSd7.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmSetupIntent(_x12,_x13){return _ref12.apply(this,arguments);};}();exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function(){var _ref13=(0,_asyncToGenerator2.default)(function*(cvc){try{var _yield$NativeStripeSd8=yield _NativeStripeSdk.default.createTokenForCVCUpdate(cvc),tokenId=_yield$NativeStripeSd8.tokenId,error=_yield$NativeStripeSd8.error;if(error){return{error:error};}return{tokenId:tokenId};}catch(error){return{error:error};}});return function createTokenForCVCUpdate(_x14){return _ref13.apply(this,arguments);};}();exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function(){var _ref14=(0,_asyncToGenerator2.default)(function*(url){var stripeHandled=yield _NativeStripeSdk.default.handleURLCallback(url);return stripeHandled;});return function handleURLCallback(_x15){return _ref14.apply(this,arguments);};}();exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function(){var _ref15=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref16=yield _NativeStripeSdk.default.verifyMicrodeposits(true,clientSecret,params),paymentIntent=_ref16.paymentIntent,error=_ref16.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForPayment(_x16,_x17){return _ref15.apply(this,arguments);};}();exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function(){var _ref17=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref18=yield _NativeStripeSdk.default.verifyMicrodeposits(false,clientSecret,params),setupIntent=_ref18.setupIntent,error=_ref18.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForSetup(_x18,_x19){return _ref17.apply(this,arguments);};}();exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var initPaymentSheet=function(){var _ref19=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd9=yield _NativeStripeSdk.default.initPaymentSheet(params),paymentOption=_yield$NativeStripeSd9.paymentOption,error=_yield$NativeStripeSd9.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function initPaymentSheet(_x20){return _ref19.apply(this,arguments);};}();exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function(){var _ref20=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd10=yield _NativeStripeSdk.default.presentPaymentSheet(),paymentOption=_yield$NativeStripeSd10.paymentOption,error=_yield$NativeStripeSd10.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function presentPaymentSheet(){return _ref20.apply(this,arguments);};}();exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function(){var _ref21=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd11=yield _NativeStripeSdk.default.confirmPaymentSheetPayment(),error=_yield$NativeStripeSd11.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function confirmPaymentSheetPayment(){return _ref21.apply(this,arguments);};}();exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var isGooglePaySupported=function(){var _ref22=(0,_asyncToGenerator2.default)(function*(params){return _helpers.isAndroid&&(yield _NativeStripeSdk.default.isGooglePaySupported(params!=null?params:{}));});return function isGooglePaySupported(_x21){return _ref22.apply(this,arguments);};}();exports.isGooglePaySupported=isGooglePaySupported;var initGooglePay=function(){var _ref23=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd12=yield _NativeStripeSdk.default.initGooglePay(params),error=_yield$NativeStripeSd12.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initGooglePay(_x22){return _ref23.apply(this,arguments);};}();exports.initGooglePay=initGooglePay;var presentGooglePay=function(){var _ref24=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd13=yield _NativeStripeSdk.default.presentGooglePay(params),error=_yield$NativeStripeSd13.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function presentGooglePay(_x23){return _ref24.apply(this,arguments);};}();exports.presentGooglePay=presentGooglePay;var createGooglePayPaymentMethod=function(){var _ref25=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd14=yield _NativeStripeSdk.default.createGooglePayPaymentMethod(params),error=_yield$NativeStripeSd14.error,paymentMethod=_yield$NativeStripeSd14.paymentMethod;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createGooglePayPaymentMethod(_x24){return _ref25.apply(this,arguments);};}();exports.createGooglePayPaymentMethod=createGooglePayPaymentMethod;var openApplePaySetup=function(){var _ref26=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd15=yield _NativeStripeSdk.default.openApplePaySetup(),error=_yield$NativeStripeSd15.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function openApplePaySetup(){return _ref26.apply(this,arguments);};}();exports.openApplePaySetup=openApplePaySetup;var collectBankAccountForPayment=function(){var _ref27=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref28=yield _NativeStripeSdk.default.collectBankAccount(true,clientSecret,params),paymentIntent=_ref28.paymentIntent,error=_ref28.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForPayment(_x25,_x26){return _ref27.apply(this,arguments);};}();exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function(){var _ref29=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref30=yield _NativeStripeSdk.default.collectBankAccount(false,clientSecret,params),setupIntent=_ref30.setupIntent,error=_ref30.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForSetup(_x27,_x28){return _ref29.apply(this,arguments);};}();exports.collectBankAccountForSetup=collectBankAccountForSetup;var collectBankAccountToken=function(){var _ref31=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd16=yield _NativeStripeSdk.default.collectBankAccountToken(clientSecret),session=_yield$NativeStripeSd16.session,token=_yield$NativeStripeSd16.token,error=_yield$NativeStripeSd16.error;if(error){return{error:error};}return{session:session,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountToken(_x29){return _ref31.apply(this,arguments);};}();exports.collectBankAccountToken=collectBankAccountToken;var collectFinancialConnectionsAccounts=function(){var _ref32=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd17=yield _NativeStripeSdk.default.collectFinancialConnectionsAccounts(clientSecret),session=_yield$NativeStripeSd17.session,error=_yield$NativeStripeSd17.error;if(error){return{error:error};}return{session:session};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectFinancialConnectionsAccounts(_x30){return _ref32.apply(this,arguments);};}();exports.collectFinancialConnectionsAccounts=collectFinancialConnectionsAccounts;var canAddCardToWallet=function(){var _ref33=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd18=yield _NativeStripeSdk.default.canAddCardToWallet(params),canAddCard=_yield$NativeStripeSd18.canAddCard,details=_yield$NativeStripeSd18.details,error=_yield$NativeStripeSd18.error;if(error){return{error:error};}return{canAddCard:canAddCard,details:details};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function canAddCardToWallet(_x31){return _ref33.apply(this,arguments);};}();exports.canAddCardToWallet=canAddCardToWallet;var isCardInWallet=function(){var _ref34=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd19=yield _NativeStripeSdk.default.isCardInWallet(params),isInWallet=_yield$NativeStripeSd19.isInWallet,token=_yield$NativeStripeSd19.token,error=_yield$NativeStripeSd19.error;if(error){return{error:error};}return{isInWallet:isInWallet,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function isCardInWallet(_x32){return _ref34.apply(this,arguments);};}();exports.isCardInWallet=isCardInWallet;var Constants=_NativeStripeSdk.default.getConstants();exports.Constants=Constants;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updateApplePaySummaryItems=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.resetPaymentSheetCustomer=exports.presentPaymentSheet=exports.presentGooglePay=exports.presentApplePay=exports.openApplePaySetup=exports.isGooglePaySupported=exports.isCardInWallet=exports.isApplePaySupported=exports.initPaymentSheet=exports.initGooglePay=exports.handleURLCallback=exports.handleNextAction=exports.createTokenForCVCUpdate=exports.createToken=exports.createPaymentMethod=exports.createGooglePayPaymentMethod=exports.confirmSetupIntent=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.confirmApplePayPayment=exports.collectFinancialConnectionsAccounts=exports.collectBankAccountToken=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=exports.canAddCardToWallet=exports.Constants=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _types=require("./types");var _reactNative=require("react-native");var APPLE_PAY_NOT_SUPPORTED_MESSAGE='Apple pay is not supported on this device';var createPaymentMethod=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.createPaymentMethod(params,options),paymentMethod=_yield$NativeStripeSd.paymentMethod,error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createPaymentMethod(_x){return _ref.apply(this,arguments);};}();exports.createPaymentMethod=createPaymentMethod;var createToken=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){var _params$country;if(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber){return{error:_Errors.MissingRoutingNumber};}try{var _yield$NativeStripeSd2=yield _NativeStripeSdk.default.createToken(params),token=_yield$NativeStripeSd2.token,error=_yield$NativeStripeSd2.error;if(error){return{error:error};}return{token:token};}catch(error){return{error:error};}});return function createToken(_x2){return _ref2.apply(this,arguments);};}();exports.createToken=createToken;var retrievePaymentIntent=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd3=yield _NativeStripeSdk.default.retrievePaymentIntent(clientSecret),paymentIntent=_yield$NativeStripeSd3.paymentIntent,error=_yield$NativeStripeSd3.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function retrievePaymentIntent(_x3){return _ref3.apply(this,arguments);};}();exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd4=yield _NativeStripeSdk.default.retrieveSetupIntent(clientSecret),setupIntent=_yield$NativeStripeSd4.setupIntent,error=_yield$NativeStripeSd4.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function retrieveSetupIntent(_x4){return _ref4.apply(this,arguments);};}();exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd5=yield _NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,params,options),paymentIntent=_yield$NativeStripeSd5.paymentIntent,error=_yield$NativeStripeSd5.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPayment(_x5,_x6){return _ref5.apply(this,arguments);};}();exports.confirmPayment=confirmPayment;var isApplePaySupported=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(){return _helpers.isiOS&&(yield _NativeStripeSdk.default.isApplePaySupported());});return function isApplePaySupported(){return _ref6.apply(this,arguments);};}();exports.isApplePaySupported=isApplePaySupported;var presentApplePay=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(params){if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{var _yield$NativeStripeSd6=yield _NativeStripeSdk.default.presentApplePay(params),paymentMethod=_yield$NativeStripeSd6.paymentMethod,error=_yield$NativeStripeSd6.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function presentApplePay(_x7){return _ref7.apply(this,arguments);};}();exports.presentApplePay=presentApplePay;var updateApplePaySummaryItems=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(summaryItems){var errorAddressFields=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{yield _NativeStripeSdk.default.updateApplePaySummaryItems(summaryItems,errorAddressFields);return{};}catch(error){return{error:error};}});return function updateApplePaySummaryItems(_x8){return _ref8.apply(this,arguments);};}();exports.updateApplePaySummaryItems=updateApplePaySummaryItems;var confirmApplePayPayment=function(){var _ref9=(0,_asyncToGenerator2.default)(function*(clientSecret){if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{yield _NativeStripeSdk.default.confirmApplePayPayment(clientSecret);return{};}catch(error){return{error:error};}});return function confirmApplePayPayment(_x9){return _ref9.apply(this,arguments);};}();exports.confirmApplePayPayment=confirmApplePayPayment;var handleNextAction=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){try{var _ref11=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret),paymentIntent=_ref11.paymentIntent,error=_ref11.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextAction(_x10,_x11){return _ref10.apply(this,arguments);};}();exports.handleNextAction=handleNextAction;var confirmSetupIntent=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd7=yield _NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,params,options),setupIntent=_yield$NativeStripeSd7.setupIntent,error=_yield$NativeStripeSd7.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmSetupIntent(_x12,_x13){return _ref12.apply(this,arguments);};}();exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function(){var _ref13=(0,_asyncToGenerator2.default)(function*(cvc){try{var _yield$NativeStripeSd8=yield _NativeStripeSdk.default.createTokenForCVCUpdate(cvc),tokenId=_yield$NativeStripeSd8.tokenId,error=_yield$NativeStripeSd8.error;if(error){return{error:error};}return{tokenId:tokenId};}catch(error){return{error:error};}});return function createTokenForCVCUpdate(_x14){return _ref13.apply(this,arguments);};}();exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function(){var _ref14=(0,_asyncToGenerator2.default)(function*(url){var stripeHandled=yield _NativeStripeSdk.default.handleURLCallback(url);return stripeHandled;});return function handleURLCallback(_x15){return _ref14.apply(this,arguments);};}();exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function(){var _ref15=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref16=yield _NativeStripeSdk.default.verifyMicrodeposits(true,clientSecret,params),paymentIntent=_ref16.paymentIntent,error=_ref16.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForPayment(_x16,_x17){return _ref15.apply(this,arguments);};}();exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function(){var _ref17=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref18=yield _NativeStripeSdk.default.verifyMicrodeposits(false,clientSecret,params),setupIntent=_ref18.setupIntent,error=_ref18.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForSetup(_x18,_x19){return _ref17.apply(this,arguments);};}();exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var initPaymentSheet=function(){var _ref19=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd9=yield _NativeStripeSdk.default.initPaymentSheet(params),paymentOption=_yield$NativeStripeSd9.paymentOption,error=_yield$NativeStripeSd9.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function initPaymentSheet(_x20){return _ref19.apply(this,arguments);};}();exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function(){var _ref20=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd10=yield _NativeStripeSdk.default.presentPaymentSheet(),paymentOption=_yield$NativeStripeSd10.paymentOption,error=_yield$NativeStripeSd10.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function presentPaymentSheet(){return _ref20.apply(this,arguments);};}();exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function(){var _ref21=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd11=yield _NativeStripeSdk.default.confirmPaymentSheetPayment(),error=_yield$NativeStripeSd11.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function confirmPaymentSheetPayment(){return _ref21.apply(this,arguments);};}();exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var resetPaymentSheetCustomer=function(){var _ref22=(0,_asyncToGenerator2.default)(function*(){return yield _NativeStripeSdk.default.resetPaymentSheetCustomer();});return function resetPaymentSheetCustomer(){return _ref22.apply(this,arguments);};}();exports.resetPaymentSheetCustomer=resetPaymentSheetCustomer;var isGooglePaySupported=function(){var _ref23=(0,_asyncToGenerator2.default)(function*(params){return _helpers.isAndroid&&(yield _NativeStripeSdk.default.isGooglePaySupported(params!=null?params:{}));});return function isGooglePaySupported(_x21){return _ref23.apply(this,arguments);};}();exports.isGooglePaySupported=isGooglePaySupported;var initGooglePay=function(){var _ref24=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd12=yield _NativeStripeSdk.default.initGooglePay(params),error=_yield$NativeStripeSd12.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initGooglePay(_x22){return _ref24.apply(this,arguments);};}();exports.initGooglePay=initGooglePay;var presentGooglePay=function(){var _ref25=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd13=yield _NativeStripeSdk.default.presentGooglePay(params),error=_yield$NativeStripeSd13.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function presentGooglePay(_x23){return _ref25.apply(this,arguments);};}();exports.presentGooglePay=presentGooglePay;var createGooglePayPaymentMethod=function(){var _ref26=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd14=yield _NativeStripeSdk.default.createGooglePayPaymentMethod(params),error=_yield$NativeStripeSd14.error,paymentMethod=_yield$NativeStripeSd14.paymentMethod;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createGooglePayPaymentMethod(_x24){return _ref26.apply(this,arguments);};}();exports.createGooglePayPaymentMethod=createGooglePayPaymentMethod;var openApplePaySetup=function(){var _ref27=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd15=yield _NativeStripeSdk.default.openApplePaySetup(),error=_yield$NativeStripeSd15.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function openApplePaySetup(){return _ref27.apply(this,arguments);};}();exports.openApplePaySetup=openApplePaySetup;var collectBankAccountForPayment=function(){var _ref28=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref29=yield _NativeStripeSdk.default.collectBankAccount(true,clientSecret,params),paymentIntent=_ref29.paymentIntent,error=_ref29.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForPayment(_x25,_x26){return _ref28.apply(this,arguments);};}();exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function(){var _ref30=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref31=yield _NativeStripeSdk.default.collectBankAccount(false,clientSecret,params),setupIntent=_ref31.setupIntent,error=_ref31.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForSetup(_x27,_x28){return _ref30.apply(this,arguments);};}();exports.collectBankAccountForSetup=collectBankAccountForSetup;var collectBankAccountToken=function(){var _ref32=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd16=yield _NativeStripeSdk.default.collectBankAccountToken(clientSecret),session=_yield$NativeStripeSd16.session,token=_yield$NativeStripeSd16.token,error=_yield$NativeStripeSd16.error;if(error){return{error:error};}return{session:session,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountToken(_x29){return _ref32.apply(this,arguments);};}();exports.collectBankAccountToken=collectBankAccountToken;var collectFinancialConnectionsAccounts=function(){var _ref33=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd17=yield _NativeStripeSdk.default.collectFinancialConnectionsAccounts(clientSecret),session=_yield$NativeStripeSd17.session,error=_yield$NativeStripeSd17.error;if(error){return{error:error};}return{session:session};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectFinancialConnectionsAccounts(_x30){return _ref33.apply(this,arguments);};}();exports.collectFinancialConnectionsAccounts=collectFinancialConnectionsAccounts;var canAddCardToWallet=function(){var _ref34=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd18=yield _NativeStripeSdk.default.canAddCardToWallet(params),canAddCard=_yield$NativeStripeSd18.canAddCard,details=_yield$NativeStripeSd18.details,error=_yield$NativeStripeSd18.error;if(error){return{error:error};}return{canAddCard:canAddCard,details:details};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function canAddCardToWallet(_x31){return _ref34.apply(this,arguments);};}();exports.canAddCardToWallet=canAddCardToWallet;var isCardInWallet=function(){var _ref35=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd19=yield _NativeStripeSdk.default.isCardInWallet(params),isInWallet=_yield$NativeStripeSd19.isInWallet,token=_yield$NativeStripeSd19.token,error=_yield$NativeStripeSd19.error;if(error){return{error:error};}return{isInWallet:isInWallet,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function isCardInWallet(_x32){return _ref35.apply(this,arguments);};}();exports.isCardInWallet=isCardInWallet;var Constants=_NativeStripeSdk.default.getConstants();exports.Constants=Constants;
2
2
  //# sourceMappingURL=functions.js.map