@stripe/stripe-react-native 0.47.1 → 0.49.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 (47) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/android/gradle.properties +1 -1
  3. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +85 -65
  4. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +18 -2
  5. package/android/src/main/java/com/reactnativestripesdk/PaymentOptionDisplayDataMapper.kt +0 -2
  6. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +83 -3
  7. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +25 -0
  8. package/ios/PaymentSheetAppearance.swift +46 -1
  9. package/ios/StripeSdkImpl+PaymentSheet.swift +43 -5
  10. package/ios/StripeSdkImpl.swift +5 -1
  11. package/lib/commonjs/components/CustomerSheet.js +1 -1
  12. package/lib/commonjs/components/CustomerSheet.js.map +1 -1
  13. package/lib/commonjs/events.js.map +1 -1
  14. package/lib/commonjs/functions.js +1 -1
  15. package/lib/commonjs/functions.js.map +1 -1
  16. package/lib/commonjs/hooks/useStripe.js +1 -1
  17. package/lib/commonjs/hooks/useStripe.js.map +1 -1
  18. package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
  19. package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
  20. package/lib/commonjs/types/PaymentSheet.js +1 -1
  21. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  22. package/lib/module/components/CustomerSheet.js +1 -1
  23. package/lib/module/components/CustomerSheet.js.map +1 -1
  24. package/lib/module/events.js.map +1 -1
  25. package/lib/module/functions.js +1 -1
  26. package/lib/module/functions.js.map +1 -1
  27. package/lib/module/hooks/useStripe.js +1 -1
  28. package/lib/module/hooks/useStripe.js.map +1 -1
  29. package/lib/module/types/EmbeddedPaymentElement.js +1 -1
  30. package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
  31. package/lib/module/types/PaymentSheet.js +1 -1
  32. package/lib/module/types/PaymentSheet.js.map +1 -1
  33. package/lib/typescript/src/events.d.ts +1 -1
  34. package/lib/typescript/src/events.d.ts.map +1 -1
  35. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts +27 -0
  36. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts.map +1 -1
  37. package/lib/typescript/src/types/PaymentIntent.d.ts +1 -1
  38. package/lib/typescript/src/types/PaymentIntent.d.ts.map +1 -1
  39. package/lib/typescript/src/types/PaymentSheet.d.ts +30 -2
  40. package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
  41. package/package-lock.json +14114 -0
  42. package/package.json +1 -1
  43. package/src/events.ts +1 -0
  44. package/src/types/EmbeddedPaymentElement.tsx +47 -2
  45. package/src/types/PaymentIntent.ts +1 -1
  46. package/src/types/PaymentSheet.ts +35 -1
  47. package/stripe-react-native.podspec +1 -1
@@ -6,7 +6,7 @@
6
6
  //
7
7
 
8
8
  import Foundation
9
- @_spi(ExperimentalAllowsRemovalOfLastSavedPaymentMethodAPI) @_spi(CustomerSessionBetaAccess) @_spi(EmbeddedPaymentElementPrivateBeta) @_spi(STP) import StripePaymentSheet
9
+ @_spi(ExperimentalAllowsRemovalOfLastSavedPaymentMethodAPI) @_spi(CustomerSessionBetaAccess) @_spi(EmbeddedPaymentElementPrivateBeta) @_spi(STP) @_spi(PaymentMethodOptionsSetupFutureUsagePreview) import StripePaymentSheet
10
10
 
11
11
  extension StripeSdkImpl {
12
12
  internal func buildPaymentSheetConfiguration(
@@ -290,10 +290,9 @@ extension StripeSdkImpl {
290
290
  mode = PaymentSheet.IntentConfiguration.Mode.payment(
291
291
  amount: amount,
292
292
  currency: modeParams["currencyCode"] as? String ?? "",
293
- setupFutureUsage: modeParams["setupFutureUsage"] != nil
294
- ? (modeParams["setupFutureUsage"] as? String == "OffSession" ? .offSession : .onSession)
295
- : nil,
296
- captureMethod: captureMethod
293
+ setupFutureUsage: setupFutureUsageFromString(from: modeParams["setupFutureUsage"] as? String ?? ""),
294
+ captureMethod: captureMethod,
295
+ paymentMethodOptions: buildPaymentMethodOptions(paymentMethodOptionsParams: modeParams["paymentMethodOptions"] as? NSDictionary ?? [:])
297
296
  )
298
297
  } else {
299
298
  mode = PaymentSheet.IntentConfiguration.Mode.setup(
@@ -313,6 +312,45 @@ extension StripeSdkImpl {
313
312
  ])
314
313
  })
315
314
  }
315
+
316
+ func buildPaymentMethodOptions(paymentMethodOptionsParams: NSDictionary) -> PaymentSheet.IntentConfiguration.Mode.PaymentMethodOptions? {
317
+ if let sfuDictionary = paymentMethodOptionsParams["setupFutureUsageValues"] as? NSDictionary {
318
+ var setupFutureUsageValues: [STPPaymentMethodType: PaymentSheet.IntentConfiguration.SetupFutureUsage] = [:]
319
+
320
+ for (paymentMethodCode, sfuValue) in sfuDictionary {
321
+ if let paymentMethodCode = paymentMethodCode as? String,
322
+ let sfuString = sfuValue as? String {
323
+ let setupFutureUsage = setupFutureUsageFromString(from: sfuString)
324
+ let paymentMethodType = STPPaymentMethodType.fromIdentifier(paymentMethodCode)
325
+
326
+ if let setupFutureUsage = setupFutureUsage {
327
+ if paymentMethodType != .unknown {
328
+ setupFutureUsageValues[paymentMethodType] = setupFutureUsage
329
+ }
330
+ }
331
+ }
332
+ }
333
+
334
+ if !setupFutureUsageValues.isEmpty {
335
+ return PaymentSheet.IntentConfiguration.Mode.PaymentMethodOptions(setupFutureUsageValues: setupFutureUsageValues)
336
+ }
337
+ }
338
+
339
+ return nil
340
+ }
341
+
342
+ func setupFutureUsageFromString(from string: String) -> PaymentSheet.IntentConfiguration.SetupFutureUsage? {
343
+ switch string {
344
+ case "OnSession":
345
+ return PaymentSheet.IntentConfiguration.SetupFutureUsage.onSession
346
+ case "OffSession":
347
+ return PaymentSheet.IntentConfiguration.SetupFutureUsage.offSession
348
+ case "None":
349
+ return PaymentSheet.IntentConfiguration.SetupFutureUsage.none
350
+ default:
351
+ return nil
352
+ }
353
+ }
316
354
 
317
355
  func buildCustomerHandlersForPaymentSheet(applePayParams: NSDictionary) -> PaymentSheet.ApplePayConfiguration.Handlers? {
318
356
  if (applePayParams["request"] == nil) {
@@ -1,5 +1,5 @@
1
1
  import PassKit
2
- import Stripe
2
+ @_spi(DashboardOnly) @_spi(STP) import Stripe
3
3
  @_spi(EmbeddedPaymentElementPrivateBeta) import StripePaymentSheet
4
4
  import StripeFinancialConnections
5
5
  import Foundation
@@ -94,6 +94,10 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
94
94
  StripeAPI.defaultPublishableKey = publishableKey
95
95
  STPAPIClient.shared.stripeAccount = stripeAccountId
96
96
 
97
+ if STPAPIClient.shared.publishableKeyIsUserKey {
98
+ STPAPIClient.shared.userKeyLiveMode = UserDefaults.standard.object(forKey: "stripe_userKeyLiveMode") as? Bool ?? true
99
+ }
100
+
97
101
  let name = appInfo["name"] as? String ?? ""
98
102
  let partnerId = appInfo["partnerId"] as? String ?? ""
99
103
  let version = appInfo["version"] as? String ?? ""
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CustomerSheet=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireDefault(require("react"));var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _events=require("../events");var fetchPaymentMethodsCallback=null;var attachPaymentMethodCallback=null;var detachPaymentMethodCallback=null;var setSelectedPaymentOptionCallback=null;var fetchSelectedPaymentOptionCallback=null;var setupIntentClientSecretForCustomerAttachCallback=null;var initialize=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var customerAdapterOverrides={};if(params.customerAdapter){customerAdapterOverrides=configureCustomerAdapterEventListeners(params.customerAdapter);}try{var _yield$NativeStripeSd=yield _NativeStripeSdkModule.default.initCustomerSheet(params,customerAdapterOverrides),error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initialize(_x){return _ref.apply(this,arguments);};}();var configureCustomerAdapterEventListeners=function configureCustomerAdapterEventListeners(customerAdapter){if(customerAdapter.fetchPaymentMethods){var _fetchPaymentMethodsC;(_fetchPaymentMethodsC=fetchPaymentMethodsCallback)==null||_fetchPaymentMethodsC.remove();fetchPaymentMethodsCallback=(0,_events.addListener)('onCustomerAdapterFetchPaymentMethodsCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchPaymentMethods){var paymentMethods=yield customerAdapter.fetchPaymentMethods();yield _NativeStripeSdkModule.default.customerAdapterFetchPaymentMethodsCallback(paymentMethods);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchPaymentMethods` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.attachPaymentMethod){var _attachPaymentMethodC;(_attachPaymentMethodC=attachPaymentMethodCallback)==null||_attachPaymentMethodC.remove();attachPaymentMethodCallback=(0,_events.addListener)('onCustomerAdapterAttachPaymentMethodCallback',function(){var _ref4=(0,_asyncToGenerator2.default)(function*(_ref3){var paymentMethodId=_ref3.paymentMethodId;if(customerAdapter.attachPaymentMethod){var paymentMethod=yield customerAdapter.attachPaymentMethod(paymentMethodId);yield _NativeStripeSdkModule.default.customerAdapterAttachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `attachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x2){return _ref4.apply(this,arguments);};}());}if(customerAdapter.detachPaymentMethod){var _detachPaymentMethodC;(_detachPaymentMethodC=detachPaymentMethodCallback)==null||_detachPaymentMethodC.remove();detachPaymentMethodCallback=(0,_events.addListener)('onCustomerAdapterDetachPaymentMethodCallback',function(){var _ref6=(0,_asyncToGenerator2.default)(function*(_ref5){var paymentMethodId=_ref5.paymentMethodId;if(customerAdapter.detachPaymentMethod){var paymentMethod=yield customerAdapter.detachPaymentMethod(paymentMethodId);yield _NativeStripeSdkModule.default.customerAdapterDetachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `detachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x3){return _ref6.apply(this,arguments);};}());}if(customerAdapter.setSelectedPaymentOption){var _setSelectedPaymentOp;(_setSelectedPaymentOp=setSelectedPaymentOptionCallback)==null||_setSelectedPaymentOp.remove();setSelectedPaymentOptionCallback=(0,_events.addListener)('onCustomerAdapterSetSelectedPaymentOptionCallback',function(){var _ref8=(0,_asyncToGenerator2.default)(function*(_ref7){var paymentOption=_ref7.paymentOption;if(customerAdapter.setSelectedPaymentOption){yield customerAdapter.setSelectedPaymentOption(paymentOption);yield _NativeStripeSdkModule.default.customerAdapterSetSelectedPaymentOptionCallback();}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}});return function(_x4){return _ref8.apply(this,arguments);};}());}if(customerAdapter.fetchSelectedPaymentOption){var _fetchSelectedPayment;(_fetchSelectedPayment=fetchSelectedPaymentOptionCallback)==null||_fetchSelectedPayment.remove();fetchSelectedPaymentOptionCallback=(0,_events.addListener)('onCustomerAdapterFetchSelectedPaymentOptionCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchSelectedPaymentOption){var paymentOption=yield customerAdapter.fetchSelectedPaymentOption();yield _NativeStripeSdkModule.default.customerAdapterFetchSelectedPaymentOptionCallback(paymentOption);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.setupIntentClientSecretForCustomerAttach){var _setupIntentClientSec;(_setupIntentClientSec=setupIntentClientSecretForCustomerAttachCallback)==null||_setupIntentClientSec.remove();setupIntentClientSecretForCustomerAttachCallback=(0,_events.addListener)('onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.setupIntentClientSecretForCustomerAttach){var clientSecret=yield customerAdapter.setupIntentClientSecretForCustomerAttach();yield _NativeStripeSdkModule.default.customerAdapterSetupIntentClientSecretForCustomerAttachCallback(clientSecret);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setupIntentClientSecretForCustomerAttach` on your CustomerAdapter, but no matching method was found.');}}));}return{fetchPaymentMethods:!!customerAdapter.fetchPaymentMethods,attachPaymentMethod:!!customerAdapter.attachPaymentMethod,detachPaymentMethod:!!customerAdapter.detachPaymentMethod,setSelectedPaymentOption:!!customerAdapter.setSelectedPaymentOption,fetchSelectedPaymentOption:!!customerAdapter.fetchSelectedPaymentOption,setupIntentClientSecretForCustomerAttach:!!customerAdapter.setupIntentClientSecretForCustomerAttach};};var present=function(){var _ref11=(0,_asyncToGenerator2.default)(function*(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{return yield _NativeStripeSdkModule.default.presentCustomerSheet(params);}catch(error){return{error:error};}});return function present(){return _ref11.apply(this,arguments);};}();var retrievePaymentOptionSelection=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(){try{return yield _NativeStripeSdkModule.default.retrieveCustomerSheetPaymentOptionSelection();}catch(error){return{error:error};}});return function retrievePaymentOptionSelection(){return _ref12.apply(this,arguments);};}();function Component(_ref13){var visible=_ref13.visible,presentationStyle=_ref13.presentationStyle,animationStyle=_ref13.animationStyle,style=_ref13.style,appearance=_ref13.appearance,setupIntentClientSecret=_ref13.setupIntentClientSecret,customerId=_ref13.customerId,customerEphemeralKeySecret=_ref13.customerEphemeralKeySecret,merchantDisplayName=_ref13.merchantDisplayName,headerTextForSelectionScreen=_ref13.headerTextForSelectionScreen,defaultBillingDetails=_ref13.defaultBillingDetails,billingDetailsCollectionConfiguration=_ref13.billingDetailsCollectionConfiguration,returnURL=_ref13.returnURL,removeSavedPaymentMethodMessage=_ref13.removeSavedPaymentMethodMessage,applePayEnabled=_ref13.applePayEnabled,googlePayEnabled=_ref13.googlePayEnabled,timeout=_ref13.timeout,onResult=_ref13.onResult,customerAdapter=_ref13.customerAdapter;_react.default.useEffect(function(){if(visible){initialize({style:style,appearance:appearance,setupIntentClientSecret:setupIntentClientSecret,customerId:customerId,customerEphemeralKeySecret:customerEphemeralKeySecret,merchantDisplayName:merchantDisplayName,headerTextForSelectionScreen:headerTextForSelectionScreen,defaultBillingDetails:defaultBillingDetails,billingDetailsCollectionConfiguration:billingDetailsCollectionConfiguration,returnURL:returnURL,removeSavedPaymentMethodMessage:removeSavedPaymentMethodMessage,applePayEnabled:applePayEnabled,googlePayEnabled:googlePayEnabled,customerAdapter:customerAdapter}).then(function(initResult){if(initResult.error){onResult(initResult);}else{present({timeout:timeout,presentationStyle:presentationStyle,animationStyle:animationStyle}).then(function(presentResult){onResult(presentResult);});}});}},[visible]);return null;}var CustomerSheet=exports.CustomerSheet={Component:Component,initialize:initialize,present:present,retrievePaymentOptionSelection:retrievePaymentOptionSelection};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CustomerSheet=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _react=_interopRequireDefault(require("react"));var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _events=require("../events");var fetchPaymentMethodsCallback=null;var attachPaymentMethodCallback=null;var detachPaymentMethodCallback=null;var setSelectedPaymentOptionCallback=null;var fetchSelectedPaymentOptionCallback=null;var setupIntentClientSecretForCustomerAttachCallback=null;var initialize=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var customerAdapterOverrides={};if(params.customerAdapter){customerAdapterOverrides=configureCustomerAdapterEventListeners(params.customerAdapter);}try{var _yield$NativeStripeSd=yield _NativeStripeSdkModule.default.initCustomerSheet(params,customerAdapterOverrides),error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initialize(_x){return _ref.apply(this,arguments);};}();var configureCustomerAdapterEventListeners=function configureCustomerAdapterEventListeners(customerAdapter){if(customerAdapter.fetchPaymentMethods){var _fetchPaymentMethodsC;(_fetchPaymentMethodsC=fetchPaymentMethodsCallback)==null||_fetchPaymentMethodsC.remove();fetchPaymentMethodsCallback=(0,_events.addListener)('onCustomerAdapterFetchPaymentMethodsCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchPaymentMethods){var paymentMethods=yield customerAdapter.fetchPaymentMethods();yield _NativeStripeSdkModule.default.customerAdapterFetchPaymentMethodsCallback(paymentMethods);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchPaymentMethods` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.attachPaymentMethod){var _attachPaymentMethodC;(_attachPaymentMethodC=attachPaymentMethodCallback)==null||_attachPaymentMethodC.remove();attachPaymentMethodCallback=(0,_events.addListener)('onCustomerAdapterAttachPaymentMethodCallback',function(){var _ref4=(0,_asyncToGenerator2.default)(function*(_ref3){var paymentMethodId=_ref3.paymentMethodId;if(customerAdapter.attachPaymentMethod){var paymentMethod=yield customerAdapter.attachPaymentMethod(paymentMethodId);yield _NativeStripeSdkModule.default.customerAdapterAttachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `attachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x2){return _ref4.apply(this,arguments);};}());}if(customerAdapter.detachPaymentMethod){var _detachPaymentMethodC;(_detachPaymentMethodC=detachPaymentMethodCallback)==null||_detachPaymentMethodC.remove();detachPaymentMethodCallback=(0,_events.addListener)('onCustomerAdapterDetachPaymentMethodCallback',function(){var _ref6=(0,_asyncToGenerator2.default)(function*(_ref5){var paymentMethodId=_ref5.paymentMethodId;if(customerAdapter.detachPaymentMethod){var paymentMethod=yield customerAdapter.detachPaymentMethod(paymentMethodId);yield _NativeStripeSdkModule.default.customerAdapterDetachPaymentMethodCallback(paymentMethod);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `detachPaymentMethod` on your CustomerAdapter, but no matching method was found.');}});return function(_x3){return _ref6.apply(this,arguments);};}());}if(customerAdapter.setSelectedPaymentOption){var _setSelectedPaymentOp;(_setSelectedPaymentOp=setSelectedPaymentOptionCallback)==null||_setSelectedPaymentOp.remove();setSelectedPaymentOptionCallback=(0,_events.addListener)('onCustomerAdapterSetSelectedPaymentOptionCallback',function(){var _ref8=(0,_asyncToGenerator2.default)(function*(_ref7){var paymentOption=_ref7.paymentOption;if(customerAdapter.setSelectedPaymentOption){yield customerAdapter.setSelectedPaymentOption(paymentOption);yield _NativeStripeSdkModule.default.customerAdapterSetSelectedPaymentOptionCallback();}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}});return function(_x4){return _ref8.apply(this,arguments);};}());}if(customerAdapter.fetchSelectedPaymentOption){var _fetchSelectedPayment;(_fetchSelectedPayment=fetchSelectedPaymentOptionCallback)==null||_fetchSelectedPayment.remove();fetchSelectedPaymentOptionCallback=(0,_events.addListener)('onCustomerAdapterFetchSelectedPaymentOptionCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.fetchSelectedPaymentOption){var paymentOption=yield customerAdapter.fetchSelectedPaymentOption();yield _NativeStripeSdkModule.default.customerAdapterFetchSelectedPaymentOptionCallback(paymentOption);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `fetchSelectedPaymentOption` on your CustomerAdapter, but no matching method was found.');}}));}if(customerAdapter.setupIntentClientSecretForCustomerAttach){var _setupIntentClientSec;(_setupIntentClientSec=setupIntentClientSecretForCustomerAttachCallback)==null||_setupIntentClientSec.remove();setupIntentClientSecretForCustomerAttachCallback=(0,_events.addListener)('onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback',(0,_asyncToGenerator2.default)(function*(){if(customerAdapter.setupIntentClientSecretForCustomerAttach){var clientSecret=yield customerAdapter.setupIntentClientSecretForCustomerAttach();yield _NativeStripeSdkModule.default.customerAdapterSetupIntentClientSecretForCustomerAttachCallback(clientSecret);}else{throw new Error('[@stripe/stripe-react-native] Tried to call `setupIntentClientSecretForCustomerAttach` on your CustomerAdapter, but no matching method was found.');}}));}return{fetchPaymentMethods:!!customerAdapter.fetchPaymentMethods,attachPaymentMethod:!!customerAdapter.attachPaymentMethod,detachPaymentMethod:!!customerAdapter.detachPaymentMethod,setSelectedPaymentOption:!!customerAdapter.setSelectedPaymentOption,fetchSelectedPaymentOption:!!customerAdapter.fetchSelectedPaymentOption,setupIntentClientSecretForCustomerAttach:!!customerAdapter.setupIntentClientSecretForCustomerAttach};};var present=function(){var _ref1=(0,_asyncToGenerator2.default)(function*(){var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{return yield _NativeStripeSdkModule.default.presentCustomerSheet(params);}catch(error){return{error:error};}});return function present(){return _ref1.apply(this,arguments);};}();var retrievePaymentOptionSelection=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(){try{return yield _NativeStripeSdkModule.default.retrieveCustomerSheetPaymentOptionSelection();}catch(error){return{error:error};}});return function retrievePaymentOptionSelection(){return _ref10.apply(this,arguments);};}();function Component(_ref11){var visible=_ref11.visible,presentationStyle=_ref11.presentationStyle,animationStyle=_ref11.animationStyle,style=_ref11.style,appearance=_ref11.appearance,setupIntentClientSecret=_ref11.setupIntentClientSecret,customerId=_ref11.customerId,customerEphemeralKeySecret=_ref11.customerEphemeralKeySecret,merchantDisplayName=_ref11.merchantDisplayName,headerTextForSelectionScreen=_ref11.headerTextForSelectionScreen,defaultBillingDetails=_ref11.defaultBillingDetails,billingDetailsCollectionConfiguration=_ref11.billingDetailsCollectionConfiguration,returnURL=_ref11.returnURL,removeSavedPaymentMethodMessage=_ref11.removeSavedPaymentMethodMessage,applePayEnabled=_ref11.applePayEnabled,googlePayEnabled=_ref11.googlePayEnabled,timeout=_ref11.timeout,onResult=_ref11.onResult,customerAdapter=_ref11.customerAdapter;_react.default.useEffect(function(){if(visible){initialize({style:style,appearance:appearance,setupIntentClientSecret:setupIntentClientSecret,customerId:customerId,customerEphemeralKeySecret:customerEphemeralKeySecret,merchantDisplayName:merchantDisplayName,headerTextForSelectionScreen:headerTextForSelectionScreen,defaultBillingDetails:defaultBillingDetails,billingDetailsCollectionConfiguration:billingDetailsCollectionConfiguration,returnURL:returnURL,removeSavedPaymentMethodMessage:removeSavedPaymentMethodMessage,applePayEnabled:applePayEnabled,googlePayEnabled:googlePayEnabled,customerAdapter:customerAdapter}).then(function(initResult){if(initResult.error){onResult(initResult);}else{present({timeout:timeout,presentationStyle:presentationStyle,animationStyle:animationStyle}).then(function(presentResult){onResult(presentResult);});}});}},[visible]);return null;}var CustomerSheet=exports.CustomerSheet={Component:Component,initialize:initialize,present:present,retrievePaymentOptionSelection:retrievePaymentOptionSelection};
2
2
  //# sourceMappingURL=CustomerSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_NativeStripeSdkModule","_events","fetchPaymentMethodsCallback","attachPaymentMethodCallback","detachPaymentMethodCallback","setSelectedPaymentOptionCallback","fetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttachCallback","initialize","_ref","_asyncToGenerator2","default","params","customerAdapterOverrides","customerAdapter","configureCustomerAdapterEventListeners","_yield$NativeStripeSd","NativeStripeSdk","initCustomerSheet","error","_x","apply","arguments","fetchPaymentMethods","_fetchPaymentMethodsC","remove","addListener","paymentMethods","customerAdapterFetchPaymentMethodsCallback","Error","attachPaymentMethod","_attachPaymentMethodC","_ref4","_ref3","paymentMethodId","paymentMethod","customerAdapterAttachPaymentMethodCallback","_x2","detachPaymentMethod","_detachPaymentMethodC","_ref6","_ref5","customerAdapterDetachPaymentMethodCallback","_x3","setSelectedPaymentOption","_setSelectedPaymentOp","_ref8","_ref7","paymentOption","customerAdapterSetSelectedPaymentOptionCallback","_x4","fetchSelectedPaymentOption","_fetchSelectedPayment","customerAdapterFetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttach","_setupIntentClientSec","clientSecret","customerAdapterSetupIntentClientSecretForCustomerAttachCallback","present","_ref11","length","undefined","presentCustomerSheet","retrievePaymentOptionSelection","_ref12","retrieveCustomerSheetPaymentOptionSelection","Component","_ref13","visible","presentationStyle","animationStyle","style","appearance","setupIntentClientSecret","customerId","customerEphemeralKeySecret","merchantDisplayName","headerTextForSelectionScreen","defaultBillingDetails","billingDetailsCollectionConfiguration","returnURL","removeSavedPaymentMethodMessage","applePayEnabled","googlePayEnabled","timeout","onResult","React","useEffect","then","initResult","presentResult","CustomerSheet","exports"],"sourceRoot":"../../../src","sources":["components/CustomerSheet.tsx"],"mappings":"2QAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCASA,IAAAE,OAAA,CAAAF,OAAA,cAEA,GAAI,CAAAG,2BAAqD,CAAG,IAAI,CAChE,GAAI,CAAAC,2BAAqD,CAAG,IAAI,CAChE,GAAI,CAAAC,2BAAqD,CAAG,IAAI,CAChE,GAAI,CAAAC,gCAA0D,CAAG,IAAI,CACrE,GAAI,CAAAC,kCAA4D,CAAG,IAAI,CACvE,GAAI,CAAAC,gDAA0E,CAC5E,IAAI,CAGN,GAAM,CAAAC,UAAU,gBAAAC,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EAAG,UACjBC,MAA+B,CAG3B,CACJ,GAAI,CAAAC,wBAAwB,CAAG,CAAC,CAAC,CACjC,GAAID,MAAM,CAACE,eAAe,CAAE,CAC1BD,wBAAwB,CAAGE,sCAAsC,CAC/DH,MAAM,CAACE,eACT,CAAC,CACH,CAEA,GAAI,CACF,IAAAE,qBAAA,MAAwB,CAAAC,8BAAe,CAACC,iBAAiB,CACvDN,MAAM,CACNC,wBACF,CAAC,CAHOM,KAAK,CAAAH,qBAAA,CAALG,KAAK,CAIb,GAAIA,KAAK,CAAE,CACT,MAAO,CAAEA,KAAK,CAALA,KAAM,CAAC,CAClB,CACA,MAAO,CAAC,CAAC,CACX,CAAE,MAAOA,KAAU,CAAE,CACnB,MAAO,C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B,GAAIA,UAAU,CAACtE,KAAK,CAAE,CACpBkE,QAAQ,CAACI,UAAU,CAAC,CACtB,CAAC,IAAM,CACL/B,OAAO,CAAC,CACN0B,OAAO,CAAPA,OAAO,CACPf,iBAAiB,CAAjBA,iBAAiB,CACjBC,cAAc,CAAdA,cACF,CAAC,CAAC,CAACkB,IAAI,CAAC,SAACE,aAAa,CAAK,CACzBL,QAAQ,CAACK,aAAa,CAAC,CACzB,CAAC,CAAC,CACJ,CACF,CAAC,CAAC,CACJ,CAGF,CAAC,CAAE,CAACtB,OAAO,CAAC,CAAC,CAEb,MAAO,KAAI,CACb,CAKO,GAAM,CAAAuB,aAAa,CAAAC,OAAA,CAAAD,aAAA,CAAG,CAC3BzB,SAAS,CAATA,SAAS,CACT1D,UAAU,CAAVA,UAAU,CACVkD,OAAO,CAAPA,OAAO,CACPK,8BAA8B,CAA9BA,8BACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeStripeSdkModule","_events","fetchPaymentMethodsCallback","attachPaymentMethodCallback","detachPaymentMethodCallback","setSelectedPaymentOptionCallback","fetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttachCallback","initialize","_ref","_asyncToGenerator2","default","params","customerAdapterOverrides","customerAdapter","configureCustomerAdapterEventListeners","_yield$NativeStripeSd","NativeStripeSdk","initCustomerSheet","error","_x","apply","arguments","fetchPaymentMethods","_fetchPaymentMethodsC","remove","addListener","paymentMethods","customerAdapterFetchPaymentMethodsCallback","Error","attachPaymentMethod","_attachPaymentMethodC","_ref4","_ref3","paymentMethodId","paymentMethod","customerAdapterAttachPaymentMethodCallback","_x2","detachPaymentMethod","_detachPaymentMethodC","_ref6","_ref5","customerAdapterDetachPaymentMethodCallback","_x3","setSelectedPaymentOption","_setSelectedPaymentOp","_ref8","_ref7","paymentOption","customerAdapterSetSelectedPaymentOptionCallback","_x4","fetchSelectedPaymentOption","_fetchSelectedPayment","customerAdapterFetchSelectedPaymentOptionCallback","setupIntentClientSecretForCustomerAttach","_setupIntentClientSec","clientSecret","customerAdapterSetupIntentClientSecretForCustomerAttachCallback","present","_ref1","length","undefined","presentCustomerSheet","retrievePaymentOptionSelection","_ref10","retrieveCustomerSheetPaymentOptionSelection","Component","_ref11","visible","presentationStyle","animationStyle","style","appearance","setupIntentClientSecret","customerId","customerEphemeralKeySecret","merchantDisplayName","headerTextForSelectionScreen","defaultBillingDetails","billingDetailsCollectionConfiguration","returnURL","removeSavedPaymentMethodMessage","applePayEnabled","googlePayEnabled","timeout","onResult","React","useEffect","then","initResult","presentResult","CustomerSheet","exports"],"sourceRoot":"../../../src","sources":["components/CustomerSheet.tsx"],"mappings":"2QAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCASA,IAAAE,OAAA,CAAAF,OAAA,cAEA,GAAI,CAAAG,2BAAqD,CAAG,IAAI,CAChE,GAAI,CAAAC,2BAAqD,CAAG,IAAI,CAChE,GAAI,CAAAC,2BAAqD,CAAG,IAAI,CAChE,GAAI,CAAAC,gCAA0D,CAAG,IAAI,CACrE,GAAI,CAAAC,kCAA4D,CAAG,IAAI,CACvE,GAAI,CAAAC,gDAA0E,CAC5E,IAAI,CAGN,GAAM,CAAAC,UAAU,gBAAAC,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EAAG,UACjBC,MAA+B,CAG3B,CACJ,GAAI,CAAAC,wBAAwB,CAAG,CAAC,CAAC,CACjC,GAAID,MAAM,CAACE,eAAe,CAAE,CAC1BD,wBAAwB,CAAGE,sCAAsC,CAC/DH,MAAM,CAACE,eACT,CAAC,CACH,CAEA,GAAI,CACF,IAAAE,qBAAA,MAAwB,CAAAC,8BAAe,CAACC,iBAAiB,CACvDN,MAAM,CACNC,wBACF,CAAC,CAHOM,KAAK,CAAAH,qBAAA,CAALG,KAAK,CAIb,GAAIA,KAAK,CAAE,CACT,MAAO,CAAEA,KAAK,CAALA,KA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,CAChBrE,eAAe,CAAfA,eACF,CAAC,CAAC,CAAC0E,IAAI,CAAC,SAACC,UAAU,CAAK,CACtB,GAAIA,UAAU,CAACtE,KAAK,CAAE,CACpBkE,QAAQ,CAACI,UAAU,CAAC,CACtB,CAAC,IAAM,CACL/B,OAAO,CAAC,CACN0B,OAAO,CAAPA,OAAO,CACPf,iBAAiB,CAAjBA,iBAAiB,CACjBC,cAAc,CAAdA,cACF,CAAC,CAAC,CAACkB,IAAI,CAAC,SAACE,aAAa,CAAK,CACzBL,QAAQ,CAACK,aAAa,CAAC,CACzB,CAAC,CAAC,CACJ,CACF,CAAC,CAAC,CACJ,CAGF,CAAC,CAAE,CAACtB,OAAO,CAAC,CAAC,CAEb,MAAO,KAAI,CACb,CAKO,GAAM,CAAAuB,aAAa,CAAAC,OAAA,CAAAD,aAAA,CAAG,CAC3BzB,SAAS,CAATA,SAAS,CACT1D,UAAU,CAAVA,UAAU,CACVkD,OAAO,CAAPA,OAAO,CACPK,8BAA8B,CAA9BA,8BACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_NativeStripeSdkModule","_interopRequireDefault","compatEventEmitter","NativeStripeSdkModule","onConfirmHandlerCallback","Platform","OS","NativeEventEmitter","DeviceEventEmitter","addListener","event","handler"],"sourceRoot":"../../src","sources":["events.ts"],"mappings":"4KAQA,IAAAA,YAAA,CAAAC,OAAA,iBAMA,IAAAC,sBAAA,CAAAC,sBAAA,CAAAF,OAAA,mCAEA,GAAM,CAAAG,kBAAkB,CAGtBC,8BAAqB,CAACC,wBAAwB,EAAI,IAAI,CAClDC,qBAAQ,CAACC,EAAE,GAAK,KAAK,CACnB,GAAI,CAAAC,+BAAkB,CAACJ,8BAA4B,CAAC,CACpDK,+BAAkB,CACpB,IAAI,CAiBH,QAAS,CAAAC,WAAWA,CACzBC,KAAa,CACbC,OAA8D,CAC3C,CACnB,GAAIT,kBAAkB,EAAI,IAAI,CAAE,CAC9B,MAAO,CAAAA,kBAAkB,CAACO,WAAW,CAACC,KAAK,CAAEC,OAAO,CAAC,CACvD,CACA,MAAO,CAAAR,8BAAqB,CAACO,KAAK,CAAC,CAACC,OAAc,CAAC,CACrD","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_NativeStripeSdkModule","_interopRequireDefault","compatEventEmitter","NativeStripeSdkModule","onConfirmHandlerCallback","Platform","OS","NativeEventEmitter","DeviceEventEmitter","addListener","event","handler"],"sourceRoot":"../../src","sources":["events.ts"],"mappings":"4KAQA,IAAAA,YAAA,CAAAC,OAAA,iBAMA,IAAAC,sBAAA,CAAAC,sBAAA,CAAAF,OAAA,mCAEA,GAAM,CAAAG,kBAAkB,CAGtBC,8BAAqB,CAACC,wBAAwB,EAAI,IAAI,CAClDC,qBAAQ,CAACC,EAAE,GAAK,KAAK,CACnB,GAAI,CAAAC,+BAAkB,CAACJ,8BAA4B,CAAC,CACpDK,+BAAkB,CACpB,IAAI,CAkBH,QAAS,CAAAC,WAAWA,CACzBC,KAAa,CACbC,OAA8D,CAC3C,CACnB,GAAIT,kBAAkB,EAAI,IAAI,CAAE,CAC9B,MAAO,CAAAA,kBAAkB,CAACO,WAAW,CAACC,KAAK,CAAEC,OAAO,CAAC,CACvD,CACA,MAAO,CAAAR,8BAAqB,CAACO,KAAK,CAAC,CAACC,OAAc,CAAC,CACrD","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updatePlatformPaySheet=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.resetPaymentSheetCustomer=exports.presentPaymentSheet=exports.openPlatformPaySetup=exports.isPlatformPaySupported=exports.isCardInWallet=exports.initPaymentSheet=exports.handleURLCallback=exports.handleNextActionForSetup=exports.handleNextAction=exports.dismissPlatformPay=exports.createTokenForCVCUpdate=exports.createToken=exports.createPlatformPayToken=exports.createPlatformPayPaymentMethod=exports.createPaymentMethod=exports.confirmSetupIntent=exports.confirmPlatformPaySetupIntent=exports.confirmPlatformPayPayment=exports.confirmPaymentSheetPayment=exports.confirmPayment=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 _NativeStripeSdkModule=_interopRequireDefault(require("./specs/NativeStripeSdkModule"));var _reactNative=require("react-native");var _events=require("./events");var createPaymentMethod=exports.createPaymentMethod=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{var _yield$NativeStripeSd=yield _NativeStripeSdkModule.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);};}();var createToken=exports.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 _NativeStripeSdkModule.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);};}();var retrievePaymentIntent=exports.retrievePaymentIntent=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd3=yield _NativeStripeSdkModule.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);};}();var retrieveSetupIntent=exports.retrieveSetupIntent=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd4=yield _NativeStripeSdkModule.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);};}();var confirmPayment=exports.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 _NativeStripeSdkModule.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);};}();var handleNextAction=exports.handleNextAction=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){try{var _ref7=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdkModule.default.handleNextAction(paymentIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdkModule.default.handleNextAction(paymentIntentClientSecret),paymentIntent=_ref7.paymentIntent,error=_ref7.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextAction(_x7,_x8){return _ref6.apply(this,arguments);};}();var handleNextActionForSetup=exports.handleNextActionForSetup=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(setupIntentClientSecret,returnURL){try{var _ref9=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdkModule.default.handleNextActionForSetup(setupIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdkModule.default.handleNextActionForSetup(setupIntentClientSecret),setupIntent=_ref9.setupIntent,error=_ref9.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextActionForSetup(_x9,_x10){return _ref8.apply(this,arguments);};}();var confirmSetupIntent=exports.confirmSetupIntent=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd6=yield _NativeStripeSdkModule.default.confirmSetupIntent(paymentIntentClientSecret,params,options),setupIntent=_yield$NativeStripeSd6.setupIntent,error=_yield$NativeStripeSd6.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmSetupIntent(_x11,_x12){return _ref10.apply(this,arguments);};}();var createTokenForCVCUpdate=exports.createTokenForCVCUpdate=function(){var _ref11=(0,_asyncToGenerator2.default)(function*(cvc){try{var _yield$NativeStripeSd7=yield _NativeStripeSdkModule.default.createTokenForCVCUpdate(cvc),tokenId=_yield$NativeStripeSd7.tokenId,error=_yield$NativeStripeSd7.error;if(error){return{error:error};}return{tokenId:tokenId};}catch(error){return{error:error};}});return function createTokenForCVCUpdate(_x13){return _ref11.apply(this,arguments);};}();var handleURLCallback=exports.handleURLCallback=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(url){var stripeHandled=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdkModule.default.handleURLCallback(url):false;return stripeHandled;});return function handleURLCallback(_x14){return _ref12.apply(this,arguments);};}();var verifyMicrodepositsForPayment=exports.verifyMicrodepositsForPayment=function(){var _ref13=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref14=yield _NativeStripeSdkModule.default.verifyMicrodeposits(true,clientSecret,params),paymentIntent=_ref14.paymentIntent,error=_ref14.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForPayment(_x15,_x16){return _ref13.apply(this,arguments);};}();var verifyMicrodepositsForSetup=exports.verifyMicrodepositsForSetup=function(){var _ref15=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref16=yield _NativeStripeSdkModule.default.verifyMicrodeposits(false,clientSecret,params),setupIntent=_ref16.setupIntent,error=_ref16.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForSetup(_x17,_x18){return _ref15.apply(this,arguments);};}();var confirmHandlerCallback=null;var orderTrackingCallbackListener=null;var financialConnectionsEventListener=null;var initPaymentSheet=exports.initPaymentSheet=function(){var _ref17=(0,_asyncToGenerator2.default)(function*(params){var _params$intentConfigu,_params$applePay;var result;var confirmHandler=params==null||(_params$intentConfigu=params.intentConfiguration)==null?void 0:_params$intentConfigu.confirmHandler;if(confirmHandler){var _confirmHandlerCallba;(_confirmHandlerCallba=confirmHandlerCallback)==null||_confirmHandlerCallba.remove();confirmHandlerCallback=(0,_events.addListener)('onConfirmHandlerCallback',function(_ref18){var paymentMethod=_ref18.paymentMethod,shouldSavePaymentMethod=_ref18.shouldSavePaymentMethod;confirmHandler(paymentMethod,shouldSavePaymentMethod,_NativeStripeSdkModule.default.intentCreationCallback);});}var orderTrackingCallback=params==null||(_params$applePay=params.applePay)==null?void 0:_params$applePay.setOrderTracking;if(orderTrackingCallback){var _orderTrackingCallbac;(_orderTrackingCallbac=orderTrackingCallbackListener)==null||_orderTrackingCallbac.remove();orderTrackingCallbackListener=(0,_events.addListener)('onOrderTrackingCallback',function(){orderTrackingCallback(_NativeStripeSdkModule.default.configureOrderTracking);});}try{if(_reactNative.Platform.OS==='ios'&&!params.returnURL){console.warn(`[@stripe/stripe-react-native] You have not provided the 'returnURL' field to 'initPaymentSheet', so payment methods that require redirects will not be shown in your iOS Payment Sheet. Visit https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-set-up-return-url to learn more.`);}result=yield _NativeStripeSdkModule.default.initPaymentSheet(params);if(result.error){return{error:result.error};}return{paymentOption:result.paymentOption};}catch(error){return{error:error};}});return function initPaymentSheet(_x19){return _ref17.apply(this,arguments);};}();var presentPaymentSheet=exports.presentPaymentSheet=function(){var _ref19=(0,_asyncToGenerator2.default)(function*(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{var _yield$NativeStripeSd8=yield _NativeStripeSdkModule.default.presentPaymentSheet(options),paymentOption=_yield$NativeStripeSd8.paymentOption,error=_yield$NativeStripeSd8.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function presentPaymentSheet(){return _ref19.apply(this,arguments);};}();var confirmPaymentSheetPayment=exports.confirmPaymentSheetPayment=function(){var _ref20=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd9=yield _NativeStripeSdkModule.default.confirmPaymentSheetPayment(),error=_yield$NativeStripeSd9.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function confirmPaymentSheetPayment(){return _ref20.apply(this,arguments);};}();var resetPaymentSheetCustomer=exports.resetPaymentSheetCustomer=function(){var _ref21=(0,_asyncToGenerator2.default)(function*(){return yield _NativeStripeSdkModule.default.resetPaymentSheetCustomer();});return function resetPaymentSheetCustomer(){return _ref21.apply(this,arguments);};}();var collectBankAccountForPayment=exports.collectBankAccountForPayment=function(){var _ref22=(0,_asyncToGenerator2.default)(function*(clientSecret,params){var _financialConnections;(_financialConnections=financialConnectionsEventListener)==null||_financialConnections.remove();if(params.onEvent){financialConnectionsEventListener=(0,_events.addListener)('onFinancialConnectionsEvent',params.onEvent);}try{var _financialConnections2;var _ref23=yield _NativeStripeSdkModule.default.collectBankAccount(true,clientSecret,params),paymentIntent=_ref23.paymentIntent,error=_ref23.error;(_financialConnections2=financialConnectionsEventListener)==null||_financialConnections2.remove();if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){var _financialConnections3;(_financialConnections3=financialConnectionsEventListener)==null||_financialConnections3.remove();return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForPayment(_x20,_x21){return _ref22.apply(this,arguments);};}();var collectBankAccountForSetup=exports.collectBankAccountForSetup=function(){var _ref24=(0,_asyncToGenerator2.default)(function*(clientSecret,params){var _financialConnections4;(_financialConnections4=financialConnectionsEventListener)==null||_financialConnections4.remove();if(params.onEvent){financialConnectionsEventListener=(0,_events.addListener)('onFinancialConnectionsEvent',params.onEvent);}try{var _financialConnections5;var _ref25=yield _NativeStripeSdkModule.default.collectBankAccount(false,clientSecret,params),setupIntent=_ref25.setupIntent,error=_ref25.error;(_financialConnections5=financialConnectionsEventListener)==null||_financialConnections5.remove();if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){var _financialConnections6;(_financialConnections6=financialConnectionsEventListener)==null||_financialConnections6.remove();return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForSetup(_x22,_x23){return _ref24.apply(this,arguments);};}();var collectBankAccountToken=exports.collectBankAccountToken=function(){var _ref26=(0,_asyncToGenerator2.default)(function*(clientSecret){var _financialConnections7;var params=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(_financialConnections7=financialConnectionsEventListener)==null||_financialConnections7.remove();if(params.onEvent){financialConnectionsEventListener=(0,_events.addListener)('onFinancialConnectionsEvent',params.onEvent);}try{var _financialConnections8;var _yield$NativeStripeSd10=yield _NativeStripeSdkModule.default.collectBankAccountToken(clientSecret,params),session=_yield$NativeStripeSd10.session,token=_yield$NativeStripeSd10.token,error=_yield$NativeStripeSd10.error;(_financialConnections8=financialConnectionsEventListener)==null||_financialConnections8.remove();if(error){return{error:error};}return{session:session,token:token};}catch(error){var _financialConnections9;(_financialConnections9=financialConnectionsEventListener)==null||_financialConnections9.remove();return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountToken(_x24){return _ref26.apply(this,arguments);};}();var collectFinancialConnectionsAccounts=exports.collectFinancialConnectionsAccounts=function(){var _ref27=(0,_asyncToGenerator2.default)(function*(clientSecret){var _financialConnections10;var params=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(_financialConnections10=financialConnectionsEventListener)==null||_financialConnections10.remove();if(params.onEvent){financialConnectionsEventListener=(0,_events.addListener)('onFinancialConnectionsEvent',params.onEvent);}try{var _financialConnections11;var _yield$NativeStripeSd11=yield _NativeStripeSdkModule.default.collectFinancialConnectionsAccounts(clientSecret,params),session=_yield$NativeStripeSd11.session,error=_yield$NativeStripeSd11.error;(_financialConnections11=financialConnectionsEventListener)==null||_financialConnections11.remove();if(error){return{error:error};}return{session:session};}catch(error){var _financialConnections12;(_financialConnections12=financialConnectionsEventListener)==null||_financialConnections12.remove();return{error:(0,_helpers.createError)(error)};}});return function collectFinancialConnectionsAccounts(_x25){return _ref27.apply(this,arguments);};}();var canAddCardToWallet=exports.canAddCardToWallet=function(){var _ref28=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd12=yield _NativeStripeSdkModule.default.canAddCardToWallet(params),canAddCard=_yield$NativeStripeSd12.canAddCard,details=_yield$NativeStripeSd12.details,error=_yield$NativeStripeSd12.error;if(error){return{error:error};}return{canAddCard:canAddCard,details:details};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function canAddCardToWallet(_x26){return _ref28.apply(this,arguments);};}();var isCardInWallet=exports.isCardInWallet=function(){var _ref29=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd13=yield _NativeStripeSdkModule.default.isCardInWallet(params),isInWallet=_yield$NativeStripeSd13.isInWallet,token=_yield$NativeStripeSd13.token,error=_yield$NativeStripeSd13.error;if(error){return{error:error};}return{isInWallet:isInWallet,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function isCardInWallet(_x27){return _ref29.apply(this,arguments);};}();var Constants=exports.Constants=_NativeStripeSdkModule.default.getConstants();var isPlatformPaySupported=exports.isPlatformPaySupported=function(){var _ref30=(0,_asyncToGenerator2.default)(function*(params){return yield _NativeStripeSdkModule.default.isPlatformPaySupported(params!=null?params:{});});return function isPlatformPaySupported(_x28){return _ref30.apply(this,arguments);};}();var confirmPlatformPaySetupIntent=exports.confirmPlatformPaySetupIntent=function(){var _ref31=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref32=yield _NativeStripeSdkModule.default.confirmPlatformPay(clientSecret,params,false),error=_ref32.error,setupIntent=_ref32.setupIntent;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmPlatformPaySetupIntent(_x29,_x30){return _ref31.apply(this,arguments);};}();var confirmPlatformPayPayment=exports.confirmPlatformPayPayment=function(){var _ref33=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref34=yield _NativeStripeSdkModule.default.confirmPlatformPay(clientSecret,params,true),error=_ref34.error,paymentIntent=_ref34.paymentIntent;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPlatformPayPayment(_x31,_x32){return _ref33.apply(this,arguments);};}();var dismissPlatformPay=exports.dismissPlatformPay=function(){var _ref35=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS!=='ios'){return false;}try{var didDismiss=yield _NativeStripeSdkModule.default.dismissPlatformPay();return didDismiss;}catch(error){return false;}});return function dismissPlatformPay(){return _ref35.apply(this,arguments);};}();var createPlatformPayPaymentMethod=exports.createPlatformPayPaymentMethod=function(){var _ref36=(0,_asyncToGenerator2.default)(function*(params){try{var _ref37=yield _NativeStripeSdkModule.default.createPlatformPayPaymentMethod(params,false),error=_ref37.error,paymentMethod=_ref37.paymentMethod,shippingContact=_ref37.shippingContact;if(error){return{error:error};}return{paymentMethod:paymentMethod,shippingContact:shippingContact};}catch(error){return{error:error};}});return function createPlatformPayPaymentMethod(_x33){return _ref36.apply(this,arguments);};}();var createPlatformPayToken=exports.createPlatformPayToken=function(){var _ref38=(0,_asyncToGenerator2.default)(function*(params){try{var _ref39=yield _NativeStripeSdkModule.default.createPlatformPayPaymentMethod(params,true),error=_ref39.error,token=_ref39.token,shippingContact=_ref39.shippingContact;if(error){return{error:error};}return{token:token,shippingContact:shippingContact};}catch(error){return{error:error};}});return function createPlatformPayToken(_x34){return _ref38.apply(this,arguments);};}();var updatePlatformPaySheet=exports.updatePlatformPaySheet=function(){var _ref40=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS!=='ios'){return{};}try{yield _NativeStripeSdkModule.default.updatePlatformPaySheet(params.applePay.cartItems,params.applePay.shippingMethods,params.applePay.errors);return{};}catch(error){return{error:error};}});return function updatePlatformPaySheet(_x35){return _ref40.apply(this,arguments);};}();var openPlatformPaySetup=exports.openPlatformPaySetup=function(){var _ref41=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS==='ios'){yield _NativeStripeSdkModule.default.openApplePaySetup();}});return function openPlatformPaySetup(){return _ref41.apply(this,arguments);};}();
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updatePlatformPaySheet=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.resetPaymentSheetCustomer=exports.presentPaymentSheet=exports.openPlatformPaySetup=exports.isPlatformPaySupported=exports.isCardInWallet=exports.initPaymentSheet=exports.handleURLCallback=exports.handleNextActionForSetup=exports.handleNextAction=exports.dismissPlatformPay=exports.createTokenForCVCUpdate=exports.createToken=exports.createPlatformPayToken=exports.createPlatformPayPaymentMethod=exports.createPaymentMethod=exports.confirmSetupIntent=exports.confirmPlatformPaySetupIntent=exports.confirmPlatformPayPayment=exports.confirmPaymentSheetPayment=exports.confirmPayment=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 _NativeStripeSdkModule=_interopRequireDefault(require("./specs/NativeStripeSdkModule"));var _reactNative=require("react-native");var _events=require("./events");var createPaymentMethod=exports.createPaymentMethod=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{var _yield$NativeStripeSd=yield _NativeStripeSdkModule.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);};}();var createToken=exports.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 _NativeStripeSdkModule.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);};}();var retrievePaymentIntent=exports.retrievePaymentIntent=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd3=yield _NativeStripeSdkModule.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);};}();var retrieveSetupIntent=exports.retrieveSetupIntent=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd4=yield _NativeStripeSdkModule.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);};}();var confirmPayment=exports.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 _NativeStripeSdkModule.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);};}();var handleNextAction=exports.handleNextAction=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){try{var _ref7=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdkModule.default.handleNextAction(paymentIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdkModule.default.handleNextAction(paymentIntentClientSecret),paymentIntent=_ref7.paymentIntent,error=_ref7.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextAction(_x7,_x8){return _ref6.apply(this,arguments);};}();var handleNextActionForSetup=exports.handleNextActionForSetup=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(setupIntentClientSecret,returnURL){try{var _ref9=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdkModule.default.handleNextActionForSetup(setupIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdkModule.default.handleNextActionForSetup(setupIntentClientSecret),setupIntent=_ref9.setupIntent,error=_ref9.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextActionForSetup(_x9,_x0){return _ref8.apply(this,arguments);};}();var confirmSetupIntent=exports.confirmSetupIntent=function(){var _ref0=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd6=yield _NativeStripeSdkModule.default.confirmSetupIntent(paymentIntentClientSecret,params,options),setupIntent=_yield$NativeStripeSd6.setupIntent,error=_yield$NativeStripeSd6.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmSetupIntent(_x1,_x10){return _ref0.apply(this,arguments);};}();var createTokenForCVCUpdate=exports.createTokenForCVCUpdate=function(){var _ref1=(0,_asyncToGenerator2.default)(function*(cvc){try{var _yield$NativeStripeSd7=yield _NativeStripeSdkModule.default.createTokenForCVCUpdate(cvc),tokenId=_yield$NativeStripeSd7.tokenId,error=_yield$NativeStripeSd7.error;if(error){return{error:error};}return{tokenId:tokenId};}catch(error){return{error:error};}});return function createTokenForCVCUpdate(_x11){return _ref1.apply(this,arguments);};}();var handleURLCallback=exports.handleURLCallback=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(url){var stripeHandled=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdkModule.default.handleURLCallback(url):false;return stripeHandled;});return function handleURLCallback(_x12){return _ref10.apply(this,arguments);};}();var verifyMicrodepositsForPayment=exports.verifyMicrodepositsForPayment=function(){var _ref11=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref12=yield _NativeStripeSdkModule.default.verifyMicrodeposits(true,clientSecret,params),paymentIntent=_ref12.paymentIntent,error=_ref12.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForPayment(_x13,_x14){return _ref11.apply(this,arguments);};}();var verifyMicrodepositsForSetup=exports.verifyMicrodepositsForSetup=function(){var _ref13=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref14=yield _NativeStripeSdkModule.default.verifyMicrodeposits(false,clientSecret,params),setupIntent=_ref14.setupIntent,error=_ref14.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForSetup(_x15,_x16){return _ref13.apply(this,arguments);};}();var confirmHandlerCallback=null;var orderTrackingCallbackListener=null;var financialConnectionsEventListener=null;var initPaymentSheet=exports.initPaymentSheet=function(){var _ref15=(0,_asyncToGenerator2.default)(function*(params){var _params$intentConfigu,_params$applePay;var result;var confirmHandler=params==null||(_params$intentConfigu=params.intentConfiguration)==null?void 0:_params$intentConfigu.confirmHandler;if(confirmHandler){var _confirmHandlerCallba;(_confirmHandlerCallba=confirmHandlerCallback)==null||_confirmHandlerCallba.remove();confirmHandlerCallback=(0,_events.addListener)('onConfirmHandlerCallback',function(_ref16){var paymentMethod=_ref16.paymentMethod,shouldSavePaymentMethod=_ref16.shouldSavePaymentMethod;confirmHandler(paymentMethod,shouldSavePaymentMethod,_NativeStripeSdkModule.default.intentCreationCallback);});}var orderTrackingCallback=params==null||(_params$applePay=params.applePay)==null?void 0:_params$applePay.setOrderTracking;if(orderTrackingCallback){var _orderTrackingCallbac;(_orderTrackingCallbac=orderTrackingCallbackListener)==null||_orderTrackingCallbac.remove();orderTrackingCallbackListener=(0,_events.addListener)('onOrderTrackingCallback',function(){orderTrackingCallback(_NativeStripeSdkModule.default.configureOrderTracking);});}try{if(_reactNative.Platform.OS==='ios'&&!params.returnURL){console.warn(`[@stripe/stripe-react-native] You have not provided the 'returnURL' field to 'initPaymentSheet', so payment methods that require redirects will not be shown in your iOS Payment Sheet. Visit https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-set-up-return-url to learn more.`);}result=yield _NativeStripeSdkModule.default.initPaymentSheet(params);if(result.error){return{error:result.error};}return{paymentOption:result.paymentOption};}catch(error){return{error:error};}});return function initPaymentSheet(_x17){return _ref15.apply(this,arguments);};}();var presentPaymentSheet=exports.presentPaymentSheet=function(){var _ref17=(0,_asyncToGenerator2.default)(function*(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};try{var _yield$NativeStripeSd8=yield _NativeStripeSdkModule.default.presentPaymentSheet(options),paymentOption=_yield$NativeStripeSd8.paymentOption,error=_yield$NativeStripeSd8.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function presentPaymentSheet(){return _ref17.apply(this,arguments);};}();var confirmPaymentSheetPayment=exports.confirmPaymentSheetPayment=function(){var _ref18=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd9=yield _NativeStripeSdkModule.default.confirmPaymentSheetPayment(),error=_yield$NativeStripeSd9.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function confirmPaymentSheetPayment(){return _ref18.apply(this,arguments);};}();var resetPaymentSheetCustomer=exports.resetPaymentSheetCustomer=function(){var _ref19=(0,_asyncToGenerator2.default)(function*(){return yield _NativeStripeSdkModule.default.resetPaymentSheetCustomer();});return function resetPaymentSheetCustomer(){return _ref19.apply(this,arguments);};}();var collectBankAccountForPayment=exports.collectBankAccountForPayment=function(){var _ref20=(0,_asyncToGenerator2.default)(function*(clientSecret,params){var _financialConnections;(_financialConnections=financialConnectionsEventListener)==null||_financialConnections.remove();if(params.onEvent){financialConnectionsEventListener=(0,_events.addListener)('onFinancialConnectionsEvent',params.onEvent);}try{var _financialConnections2;var _ref21=yield _NativeStripeSdkModule.default.collectBankAccount(true,clientSecret,params),paymentIntent=_ref21.paymentIntent,error=_ref21.error;(_financialConnections2=financialConnectionsEventListener)==null||_financialConnections2.remove();if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){var _financialConnections3;(_financialConnections3=financialConnectionsEventListener)==null||_financialConnections3.remove();return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForPayment(_x18,_x19){return _ref20.apply(this,arguments);};}();var collectBankAccountForSetup=exports.collectBankAccountForSetup=function(){var _ref22=(0,_asyncToGenerator2.default)(function*(clientSecret,params){var _financialConnections4;(_financialConnections4=financialConnectionsEventListener)==null||_financialConnections4.remove();if(params.onEvent){financialConnectionsEventListener=(0,_events.addListener)('onFinancialConnectionsEvent',params.onEvent);}try{var _financialConnections5;var _ref23=yield _NativeStripeSdkModule.default.collectBankAccount(false,clientSecret,params),setupIntent=_ref23.setupIntent,error=_ref23.error;(_financialConnections5=financialConnectionsEventListener)==null||_financialConnections5.remove();if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){var _financialConnections6;(_financialConnections6=financialConnectionsEventListener)==null||_financialConnections6.remove();return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForSetup(_x20,_x21){return _ref22.apply(this,arguments);};}();var collectBankAccountToken=exports.collectBankAccountToken=function(){var _ref24=(0,_asyncToGenerator2.default)(function*(clientSecret){var _financialConnections7;var params=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(_financialConnections7=financialConnectionsEventListener)==null||_financialConnections7.remove();if(params.onEvent){financialConnectionsEventListener=(0,_events.addListener)('onFinancialConnectionsEvent',params.onEvent);}try{var _financialConnections8;var _yield$NativeStripeSd0=yield _NativeStripeSdkModule.default.collectBankAccountToken(clientSecret,params),session=_yield$NativeStripeSd0.session,token=_yield$NativeStripeSd0.token,error=_yield$NativeStripeSd0.error;(_financialConnections8=financialConnectionsEventListener)==null||_financialConnections8.remove();if(error){return{error:error};}return{session:session,token:token};}catch(error){var _financialConnections9;(_financialConnections9=financialConnectionsEventListener)==null||_financialConnections9.remove();return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountToken(_x22){return _ref24.apply(this,arguments);};}();var collectFinancialConnectionsAccounts=exports.collectFinancialConnectionsAccounts=function(){var _ref25=(0,_asyncToGenerator2.default)(function*(clientSecret){var _financialConnections0;var params=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(_financialConnections0=financialConnectionsEventListener)==null||_financialConnections0.remove();if(params.onEvent){financialConnectionsEventListener=(0,_events.addListener)('onFinancialConnectionsEvent',params.onEvent);}try{var _financialConnections1;var _yield$NativeStripeSd1=yield _NativeStripeSdkModule.default.collectFinancialConnectionsAccounts(clientSecret,params),session=_yield$NativeStripeSd1.session,error=_yield$NativeStripeSd1.error;(_financialConnections1=financialConnectionsEventListener)==null||_financialConnections1.remove();if(error){return{error:error};}return{session:session};}catch(error){var _financialConnections10;(_financialConnections10=financialConnectionsEventListener)==null||_financialConnections10.remove();return{error:(0,_helpers.createError)(error)};}});return function collectFinancialConnectionsAccounts(_x23){return _ref25.apply(this,arguments);};}();var canAddCardToWallet=exports.canAddCardToWallet=function(){var _ref26=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd10=yield _NativeStripeSdkModule.default.canAddCardToWallet(params),canAddCard=_yield$NativeStripeSd10.canAddCard,details=_yield$NativeStripeSd10.details,error=_yield$NativeStripeSd10.error;if(error){return{error:error};}return{canAddCard:canAddCard,details:details};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function canAddCardToWallet(_x24){return _ref26.apply(this,arguments);};}();var isCardInWallet=exports.isCardInWallet=function(){var _ref27=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd11=yield _NativeStripeSdkModule.default.isCardInWallet(params),isInWallet=_yield$NativeStripeSd11.isInWallet,token=_yield$NativeStripeSd11.token,error=_yield$NativeStripeSd11.error;if(error){return{error:error};}return{isInWallet:isInWallet,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function isCardInWallet(_x25){return _ref27.apply(this,arguments);};}();var Constants=exports.Constants=_NativeStripeSdkModule.default.getConstants();var isPlatformPaySupported=exports.isPlatformPaySupported=function(){var _ref28=(0,_asyncToGenerator2.default)(function*(params){return yield _NativeStripeSdkModule.default.isPlatformPaySupported(params!=null?params:{});});return function isPlatformPaySupported(_x26){return _ref28.apply(this,arguments);};}();var confirmPlatformPaySetupIntent=exports.confirmPlatformPaySetupIntent=function(){var _ref29=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref30=yield _NativeStripeSdkModule.default.confirmPlatformPay(clientSecret,params,false),error=_ref30.error,setupIntent=_ref30.setupIntent;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmPlatformPaySetupIntent(_x27,_x28){return _ref29.apply(this,arguments);};}();var confirmPlatformPayPayment=exports.confirmPlatformPayPayment=function(){var _ref31=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref32=yield _NativeStripeSdkModule.default.confirmPlatformPay(clientSecret,params,true),error=_ref32.error,paymentIntent=_ref32.paymentIntent;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPlatformPayPayment(_x29,_x30){return _ref31.apply(this,arguments);};}();var dismissPlatformPay=exports.dismissPlatformPay=function(){var _ref33=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS!=='ios'){return false;}try{var didDismiss=yield _NativeStripeSdkModule.default.dismissPlatformPay();return didDismiss;}catch(error){return false;}});return function dismissPlatformPay(){return _ref33.apply(this,arguments);};}();var createPlatformPayPaymentMethod=exports.createPlatformPayPaymentMethod=function(){var _ref34=(0,_asyncToGenerator2.default)(function*(params){try{var _ref35=yield _NativeStripeSdkModule.default.createPlatformPayPaymentMethod(params,false),error=_ref35.error,paymentMethod=_ref35.paymentMethod,shippingContact=_ref35.shippingContact;if(error){return{error:error};}return{paymentMethod:paymentMethod,shippingContact:shippingContact};}catch(error){return{error:error};}});return function createPlatformPayPaymentMethod(_x31){return _ref34.apply(this,arguments);};}();var createPlatformPayToken=exports.createPlatformPayToken=function(){var _ref36=(0,_asyncToGenerator2.default)(function*(params){try{var _ref37=yield _NativeStripeSdkModule.default.createPlatformPayPaymentMethod(params,true),error=_ref37.error,token=_ref37.token,shippingContact=_ref37.shippingContact;if(error){return{error:error};}return{token:token,shippingContact:shippingContact};}catch(error){return{error:error};}});return function createPlatformPayToken(_x32){return _ref36.apply(this,arguments);};}();var updatePlatformPaySheet=exports.updatePlatformPaySheet=function(){var _ref38=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS!=='ios'){return{};}try{yield _NativeStripeSdkModule.default.updatePlatformPaySheet(params.applePay.cartItems,params.applePay.shippingMethods,params.applePay.errors);return{};}catch(error){return{error:error};}});return function updatePlatformPaySheet(_x33){return _ref38.apply(this,arguments);};}();var openPlatformPaySetup=exports.openPlatformPaySetup=function(){var _ref39=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS==='ios'){yield _NativeStripeSdkModule.default.openApplePaySetup();}});return function openPlatformPaySetup(){return _ref39.apply(this,arguments);};}();
2
2
  //# sourceMappingURL=functions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_helpers","require","_Errors","_NativeStripeSdkModule","_interopRequireDefault","_reactNative","_events","createPaymentMethod","exports","_ref","_asyncToGenerator2","default","params","options","arguments","length","undefined","_yield$NativeStripeSd","NativeStripeSdk","paymentMethod","error","_x","apply","createToken","_ref2","_params$country","type","country","toLowerCase","routingNumber","MissingRoutingNumber","_yield$NativeStripeSd2","token","_x2","retrievePaymentIntent","_ref3","clientSecret","_yield$NativeStripeSd3","paymentIntent","_x3","retrieveSetupIntent","_ref4","_yield$NativeStripeSd4","setupIntent","_x4","confirmPayment","_ref5","paymentIntentClientSecret","_yield$NativeStripeSd5","_x5","_x6","handleNextAction","_ref6","returnURL","_ref7","Platform","OS","createError","_x7","_x8","handleNextActionForSetup","_ref8","setupIntentClientSecret","_ref9","_x9","_x10","confirmSetupIntent","_ref10","_yield$NativeStripeSd6","_x11","_x12","createTokenForCVCUpdate","_ref11","cvc","_yield$NativeStripeSd7","tokenId","_x13","handleURLCallback","_ref12","url","stripeHandled","_x14","verifyMicrodepositsForPayment","_ref13","_ref14","verifyMicrodeposits","_x15","_x16","verifyMicrodepositsForSetup","_ref15","_ref16","_x17","_x18","confirmHandlerCallback","orderTrackingCallbackListener","financialConnectionsEventListener","initPaymentSheet","_ref17","_params$intentConfigu","_params$applePay","result","confirmHandler","intentConfiguration","_confirmHandlerCallba","remove","addListener","_ref18","shouldSavePaymentMethod","intentCreationCallback","orderTrackingCallback","applePay","setOrderTracking","_orderTrackingCallbac","configureOrderTracking","console","warn","paymentOption","_x19","presentPaymentSheet","_ref19","_yield$NativeStripeSd8","confirmPaymentSheetPayment","_ref20","_yield$NativeStripeSd9","resetPaymentSheetCustomer","_ref21","collectBankAccountForPayment","_ref22","_financialConnections","onEvent","_financialConnections2","_ref23","collectBankAccount","_financialConnections3","_x20","_x21","collectBankAccountForSetup","_ref24","_financialConnections4","_financialConnections5","_ref25","_financialConnections6","_x22","_x23","collectBankAccountToken","_ref26","_financialConnections7","_financialConnections8","_yield$NativeStripeSd10","session","_financialConnections9","_x24","collectFinancialConnectionsAccounts","_ref27","_financialConnections10","_financialConnections11","_yield$NativeStripeSd11","_financialConnections12","_x25","canAddCardToWallet","_ref28","_yield$NativeStripeSd12","canAddCard","details","_x26","isCardInWallet","_ref29","_yield$NativeStripeSd13","isInWallet","_x27","Constants","getConstants","isPlatformPaySupported","_ref30","_x28","confirmPlatformPaySetupIntent","_ref31","_ref32","confirmPlatformPay","_x29","_x30","confirmPlatformPayPayment","_ref33","_ref34","_x31","_x32","dismissPlatformPay","_ref35","didDismiss","createPlatformPayPaymentMethod","_ref36","_ref37","shippingContact","_x33","createPlatformPayToken","_ref38","_ref39","_x34","updatePlatformPaySheet","_ref40","cartItems","shippingMethods","errors","_x35","openPlatformPaySetup","_ref41","openApplePaySetup"],"sourceRoot":"../../src","sources":["functions.ts"],"mappings":"qqCAAA,IAAAA,QAAA,CAAAC,OAAA,cACA,IAAAC,OAAA,CAAAD,OAAA,mBACA,IAAAE,sBAAA,CAAAC,sBAAA,CAAAH,OAAA,mCAgCA,IAAAI,YAAA,CAAAJ,OAAA,iBAGA,IAAAK,OAAA,CAAAL,OAAA,aAEO,GAAM,CAAAM,mBAAmB,CAAAC,OAAA,CAAAD,mBAAA,gBAAAE,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EAAG,UACjCC,MAAkC,CAEK,IADvC,CAAAC,OAAoC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAEzC,GAAI,CACF,IAAAG,qBAAA,MAAuC,CAAAC,8BAAe,CAACX,mBAAmB,CACxEK,MAAM,CACNC,OACF,CAAC,CAHOM,aAAa,CAAAF,qBAAA,CAAbE,aAAa,CAAEC,KAAK,CAAAH,qBAAA,CAALG,KAAK,CAI5B,GAAIA,KAAK,CAAE,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kL,sBAAsBA,CAAAK,IAAA,SAAAJ,MAAA,CAAAjL,KAAA,MAAAR,SAAA,OA0BlC,CAOM,GAAM,CAAA8L,oBAAoB,CAAApM,OAAA,CAAAoM,oBAAA,gBAAAC,MAAA,IAAAnM,kBAAA,CAAAC,OAAA,EAAG,WAA2B,CAC7D,GAAI4C,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAE,CACzB,KAAM,CAAAtC,8BAAe,CAAC4L,iBAAiB,CAAC,CAAC,CAC3C,CACF,CAAC,iBAJY,CAAAF,oBAAoBA,CAAA,SAAAC,MAAA,CAAAvL,KAAA,MAAAR,SAAA,OAIhC","ignoreList":[]}
1
+ {"version":3,"names":["_helpers","require","_Errors","_NativeStripeSdkModule","_interopRequireDefault","_reactNative","_events","createPaymentMethod","exports","_ref","_asyncToGenerator2","default","params","options","arguments","length","undefined","_yield$NativeStripeSd","NativeStripeSdk","paymentMethod","error","_x","apply","createToken","_ref2","_params$country","type","country","toLowerCase","routingNumber","MissingRoutingNumber","_yield$NativeStripeSd2","token","_x2","retrievePaymentIntent","_ref3","clientSecret","_yield$NativeStripeSd3","paymentIntent","_x3","retrieveSetupIntent","_ref4","_yield$NativeStripeSd4","setupIntent","_x4","confirmPayment","_ref5","paymentIntentClientSecret","_yield$NativeStripeSd5","_x5","_x6","handleNextAction","_ref6","returnURL","_ref7","Platform","OS","createError","_x7","_x8","handleNextActionForSetup","_ref8","setupIntentClientSecret","_ref9","_x9","_x0","confirmSetupIntent","_ref0","_yield$NativeStripeSd6","_x1","_x10","createTokenForCVCUpdate","_ref1","cvc","_yield$NativeStripeSd7","tokenId","_x11","handleURLCallback","_ref10","url","stripeHandled","_x12","verifyMicrodepositsForPayment","_ref11","_ref12","verifyMicrodeposits","_x13","_x14","verifyMicrodepositsForSetup","_ref13","_ref14","_x15","_x16","confirmHandlerCallback","orderTrackingCallbackListener","financialConnectionsEventListener","initPaymentSheet","_ref15","_params$intentConfigu","_params$applePay","result","confirmHandler","intentConfiguration","_confirmHandlerCallba","remove","addListener","_ref16","shouldSavePaymentMethod","intentCreationCallback","orderTrackingCallback","applePay","setOrderTracking","_orderTrackingCallbac","configureOrderTracking","console","warn","paymentOption","_x17","presentPaymentSheet","_ref17","_yield$NativeStripeSd8","confirmPaymentSheetPayment","_ref18","_yield$NativeStripeSd9","resetPaymentSheetCustomer","_ref19","collectBankAccountForPayment","_ref20","_financialConnections","onEvent","_financialConnections2","_ref21","collectBankAccount","_financialConnections3","_x18","_x19","collectBankAccountForSetup","_ref22","_financialConnections4","_financialConnections5","_ref23","_financialConnections6","_x20","_x21","collectBankAccountToken","_ref24","_financialConnections7","_financialConnections8","_yield$NativeStripeSd0","session","_financialConnections9","_x22","collectFinancialConnectionsAccounts","_ref25","_financialConnections0","_financialConnections1","_yield$NativeStripeSd1","_financialConnections10","_x23","canAddCardToWallet","_ref26","_yield$NativeStripeSd10","canAddCard","details","_x24","isCardInWallet","_ref27","_yield$NativeStripeSd11","isInWallet","_x25","Constants","getConstants","isPlatformPaySupported","_ref28","_x26","confirmPlatformPaySetupIntent","_ref29","_ref30","confirmPlatformPay","_x27","_x28","confirmPlatformPayPayment","_ref31","_ref32","_x29","_x30","dismissPlatformPay","_ref33","didDismiss","createPlatformPayPaymentMethod","_ref34","_ref35","shippingContact","_x31","createPlatformPayToken","_ref36","_ref37","_x32","updatePlatformPaySheet","_ref38","cartItems","shippingMethods","errors","_x33","openPlatformPaySetup","_ref39","openApplePaySetup"],"sourceRoot":"../../src","sources":["functions.ts"],"mappings":"qqCAAA,IAAAA,QAAA,CAAAC,OAAA,cACA,IAAAC,OAAA,CAAAD,OAAA,mBACA,IAAAE,sBAAA,CAAAC,sBAAA,CAAAH,OAAA,mCAgCA,IAAAI,YAAA,CAAAJ,OAAA,iBAGA,IAAAK,OAAA,CAAAL,OAAA,aAEO,GAAM,CAAAM,mBAAmB,CAAAC,OAAA,CAAAD,mBAAA,gBAAAE,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EAAG,UACjC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AAC,CACX,CAEA,GAAI,CACF,KAAM,CAAAtC,8BAAe,CAACoL,sBAAsB,CAC1C1L,MAAM,CAACkG,QAAQ,CAAC0F,SAAS,CACzB5L,MAAM,CAACkG,QAAQ,CAAC2F,eAAe,CAC/B7L,MAAM,CAACkG,QAAQ,CAAC4F,MAClB,CAAC,CAED,MAAO,CAAC,CAAC,CACX,CAAE,MAAOtL,KAAU,CAAE,CACnB,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBA1BY,CAAAkL,sBAAsBA,CAAAK,IAAA,SAAAJ,MAAA,CAAAjL,KAAA,MAAAR,SAAA,OA0BlC,CAOM,GAAM,CAAA8L,oBAAoB,CAAApM,OAAA,CAAAoM,oBAAA,gBAAAC,MAAA,IAAAnM,kBAAA,CAAAC,OAAA,EAAG,WAA2B,CAC7D,GAAI4C,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAE,CACzB,KAAM,CAAAtC,8BAAe,CAAC4L,iBAAiB,CAAC,CAAC,CAC3C,CACF,CAAC,iBAJY,CAAAF,oBAAoBA,CAAA,SAAAC,MAAA,CAAAvL,KAAA,MAAAR,SAAA,OAIhC","ignoreList":[]}
@@ -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 _react=require("react");var _functions=require("../functions");function useStripe(){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 _handleNextAction=(0,_react.useCallback)(function(){var _ref6=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){return(0,_functions.handleNextAction)(paymentIntentClientSecret,returnURL);});return function(_x7,_x8){return _ref6.apply(this,arguments);};}(),[]);var _handleNextActionForSetup=(0,_react.useCallback)(function(){var _ref7=(0,_asyncToGenerator2.default)(function*(setupIntentClientSecret,returnURL){return(0,_functions.handleNextActionForSetup)(setupIntentClientSecret,returnURL);});return function(_x9,_x10){return _ref7.apply(this,arguments);};}(),[]);var _confirmSetupIntent=(0,_react.useCallback)(function(){var _ref8=(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(_x11,_x12){return _ref8.apply(this,arguments);};}(),[]);var _createTokenForCVCUpdate=(0,_react.useCallback)(function(){var _ref9=(0,_asyncToGenerator2.default)(function*(cvc){return(0,_functions.createTokenForCVCUpdate)(cvc);});return function(_x13){return _ref9.apply(this,arguments);};}(),[]);var _initPaymentSheet=(0,_react.useCallback)(function(){var _ref10=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.initPaymentSheet)(params);});return function(_x14){return _ref10.apply(this,arguments);};}(),[]);var _presentPaymentSheet=(0,_react.useCallback)(function(){var _ref11=(0,_asyncToGenerator2.default)(function*(options){return(0,_functions.presentPaymentSheet)(options);});return function(_x15){return _ref11.apply(this,arguments);};}(),[]);var _confirmPaymentSheetPayment=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.confirmPaymentSheetPayment)();}),[]);var _handleURLCallback=(0,_react.useCallback)(function(){var _ref13=(0,_asyncToGenerator2.default)(function*(url){return(0,_functions.handleURLCallback)(url);});return function(_x16){return _ref13.apply(this,arguments);};}(),[]);var _collectBankAccountForPayment=(0,_react.useCallback)(function(){var _ref14=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountForPayment)(clientSecret,params);});return function(_x17,_x18){return _ref14.apply(this,arguments);};}(),[]);var _collectBankAccountForSetup=(0,_react.useCallback)(function(){var _ref15=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountForSetup)(clientSecret,params);});return function(_x19,_x20){return _ref15.apply(this,arguments);};}(),[]);var _verifyMicrodepositsForPayment=(0,_react.useCallback)(function(){var _ref16=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.verifyMicrodepositsForPayment)(clientSecret,params);});return function(_x21,_x22){return _ref16.apply(this,arguments);};}(),[]);var _verifyMicrodepositsForSetup=(0,_react.useCallback)(function(){var _ref17=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.verifyMicrodepositsForSetup)(clientSecret,params);});return function(_x23,_x24){return _ref17.apply(this,arguments);};}(),[]);var _canAddCardToWallet=(0,_react.useCallback)(function(){var _ref18=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.canAddCardToWallet)(params);});return function(_x25){return _ref18.apply(this,arguments);};}(),[]);var _collectBankAccountToken=(0,_react.useCallback)(function(){var _ref19=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountToken)(clientSecret,params);});return function(_x26,_x27){return _ref19.apply(this,arguments);};}(),[]);var _collectFinancialConnectionsAccounts=(0,_react.useCallback)(function(){var _ref20=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectFinancialConnectionsAccounts)(clientSecret,params);});return function(_x28,_x29){return _ref20.apply(this,arguments);};}(),[]);var _resetPaymentSheetCustomer=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.resetPaymentSheetCustomer)();}),[]);var _isPlatformPaySupported=(0,_react.useCallback)(function(){var _ref22=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.isPlatformPaySupported)(params);});return function(_x30){return _ref22.apply(this,arguments);};}(),[]);var _confirmPlatformPaySetupIntent=(0,_react.useCallback)(function(){var _ref23=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.confirmPlatformPaySetupIntent)(clientSecret,params);});return function(_x31,_x32){return _ref23.apply(this,arguments);};}(),[]);var _confirmPlatformPayPayment=(0,_react.useCallback)(function(){var _ref24=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.confirmPlatformPayPayment)(clientSecret,params);});return function(_x33,_x34){return _ref24.apply(this,arguments);};}(),[]);var _dismissPlatformPay=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.dismissPlatformPay)();}),[]);var _createPlatformPayPaymentMethod=(0,_react.useCallback)(function(){var _ref26=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.createPlatformPayPaymentMethod)(params);});return function(_x35){return _ref26.apply(this,arguments);};}(),[]);var _createPlatformPayToken=(0,_react.useCallback)(function(){var _ref27=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.createPlatformPayToken)(params);});return function(_x36){return _ref27.apply(this,arguments);};}(),[]);var _updatePlatformPaySheet=(0,_react.useCallback)(function(){var _ref28=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.updatePlatformPaySheet)(params);});return function(_x37){return _ref28.apply(this,arguments);};}(),[]);var _openPlatformPaySetup=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.openPlatformPaySetup)();}),[]);return{retrievePaymentIntent:_retrievePaymentIntent,retrieveSetupIntent:_retrieveSetupIntent,confirmPayment:_confirmPayment,createPaymentMethod:_createPaymentMethod,handleNextAction:_handleNextAction,handleNextActionForSetup:_handleNextActionForSetup,confirmSetupIntent:_confirmSetupIntent,createTokenForCVCUpdate:_createTokenForCVCUpdate,handleURLCallback:_handleURLCallback,confirmPaymentSheetPayment:_confirmPaymentSheetPayment,presentPaymentSheet:_presentPaymentSheet,initPaymentSheet:_initPaymentSheet,createToken:_createToken,collectBankAccountForPayment:_collectBankAccountForPayment,collectBankAccountForSetup:_collectBankAccountForSetup,verifyMicrodepositsForPayment:_verifyMicrodepositsForPayment,verifyMicrodepositsForSetup:_verifyMicrodepositsForSetup,canAddCardToWallet:_canAddCardToWallet,collectBankAccountToken:_collectBankAccountToken,collectFinancialConnectionsAccounts:_collectFinancialConnectionsAccounts,resetPaymentSheetCustomer:_resetPaymentSheetCustomer,isPlatformPaySupported:_isPlatformPaySupported,confirmPlatformPaySetupIntent:_confirmPlatformPaySetupIntent,confirmPlatformPayPayment:_confirmPlatformPayPayment,dismissPlatformPay:_dismissPlatformPay,createPlatformPayPaymentMethod:_createPlatformPayPaymentMethod,createPlatformPayToken:_createPlatformPayToken,updatePlatformPaySheet:_updatePlatformPaySheet,openPlatformPaySetup:_openPlatformPaySetup};}
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 _react=require("react");var _functions=require("../functions");function useStripe(){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 _handleNextAction=(0,_react.useCallback)(function(){var _ref6=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){return(0,_functions.handleNextAction)(paymentIntentClientSecret,returnURL);});return function(_x7,_x8){return _ref6.apply(this,arguments);};}(),[]);var _handleNextActionForSetup=(0,_react.useCallback)(function(){var _ref7=(0,_asyncToGenerator2.default)(function*(setupIntentClientSecret,returnURL){return(0,_functions.handleNextActionForSetup)(setupIntentClientSecret,returnURL);});return function(_x9,_x0){return _ref7.apply(this,arguments);};}(),[]);var _confirmSetupIntent=(0,_react.useCallback)(function(){var _ref8=(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(_x1,_x10){return _ref8.apply(this,arguments);};}(),[]);var _createTokenForCVCUpdate=(0,_react.useCallback)(function(){var _ref9=(0,_asyncToGenerator2.default)(function*(cvc){return(0,_functions.createTokenForCVCUpdate)(cvc);});return function(_x11){return _ref9.apply(this,arguments);};}(),[]);var _initPaymentSheet=(0,_react.useCallback)(function(){var _ref0=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.initPaymentSheet)(params);});return function(_x12){return _ref0.apply(this,arguments);};}(),[]);var _presentPaymentSheet=(0,_react.useCallback)(function(){var _ref1=(0,_asyncToGenerator2.default)(function*(options){return(0,_functions.presentPaymentSheet)(options);});return function(_x13){return _ref1.apply(this,arguments);};}(),[]);var _confirmPaymentSheetPayment=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.confirmPaymentSheetPayment)();}),[]);var _handleURLCallback=(0,_react.useCallback)(function(){var _ref11=(0,_asyncToGenerator2.default)(function*(url){return(0,_functions.handleURLCallback)(url);});return function(_x14){return _ref11.apply(this,arguments);};}(),[]);var _collectBankAccountForPayment=(0,_react.useCallback)(function(){var _ref12=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountForPayment)(clientSecret,params);});return function(_x15,_x16){return _ref12.apply(this,arguments);};}(),[]);var _collectBankAccountForSetup=(0,_react.useCallback)(function(){var _ref13=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountForSetup)(clientSecret,params);});return function(_x17,_x18){return _ref13.apply(this,arguments);};}(),[]);var _verifyMicrodepositsForPayment=(0,_react.useCallback)(function(){var _ref14=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.verifyMicrodepositsForPayment)(clientSecret,params);});return function(_x19,_x20){return _ref14.apply(this,arguments);};}(),[]);var _verifyMicrodepositsForSetup=(0,_react.useCallback)(function(){var _ref15=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.verifyMicrodepositsForSetup)(clientSecret,params);});return function(_x21,_x22){return _ref15.apply(this,arguments);};}(),[]);var _canAddCardToWallet=(0,_react.useCallback)(function(){var _ref16=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.canAddCardToWallet)(params);});return function(_x23){return _ref16.apply(this,arguments);};}(),[]);var _collectBankAccountToken=(0,_react.useCallback)(function(){var _ref17=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectBankAccountToken)(clientSecret,params);});return function(_x24,_x25){return _ref17.apply(this,arguments);};}(),[]);var _collectFinancialConnectionsAccounts=(0,_react.useCallback)(function(){var _ref18=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.collectFinancialConnectionsAccounts)(clientSecret,params);});return function(_x26,_x27){return _ref18.apply(this,arguments);};}(),[]);var _resetPaymentSheetCustomer=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.resetPaymentSheetCustomer)();}),[]);var _isPlatformPaySupported=(0,_react.useCallback)(function(){var _ref20=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.isPlatformPaySupported)(params);});return function(_x28){return _ref20.apply(this,arguments);};}(),[]);var _confirmPlatformPaySetupIntent=(0,_react.useCallback)(function(){var _ref21=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.confirmPlatformPaySetupIntent)(clientSecret,params);});return function(_x29,_x30){return _ref21.apply(this,arguments);};}(),[]);var _confirmPlatformPayPayment=(0,_react.useCallback)(function(){var _ref22=(0,_asyncToGenerator2.default)(function*(clientSecret,params){return(0,_functions.confirmPlatformPayPayment)(clientSecret,params);});return function(_x31,_x32){return _ref22.apply(this,arguments);};}(),[]);var _dismissPlatformPay=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.dismissPlatformPay)();}),[]);var _createPlatformPayPaymentMethod=(0,_react.useCallback)(function(){var _ref24=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.createPlatformPayPaymentMethod)(params);});return function(_x33){return _ref24.apply(this,arguments);};}(),[]);var _createPlatformPayToken=(0,_react.useCallback)(function(){var _ref25=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.createPlatformPayToken)(params);});return function(_x34){return _ref25.apply(this,arguments);};}(),[]);var _updatePlatformPaySheet=(0,_react.useCallback)(function(){var _ref26=(0,_asyncToGenerator2.default)(function*(params){return(0,_functions.updatePlatformPaySheet)(params);});return function(_x35){return _ref26.apply(this,arguments);};}(),[]);var _openPlatformPaySetup=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return(0,_functions.openPlatformPaySetup)();}),[]);return{retrievePaymentIntent:_retrievePaymentIntent,retrieveSetupIntent:_retrieveSetupIntent,confirmPayment:_confirmPayment,createPaymentMethod:_createPaymentMethod,handleNextAction:_handleNextAction,handleNextActionForSetup:_handleNextActionForSetup,confirmSetupIntent:_confirmSetupIntent,createTokenForCVCUpdate:_createTokenForCVCUpdate,handleURLCallback:_handleURLCallback,confirmPaymentSheetPayment:_confirmPaymentSheetPayment,presentPaymentSheet:_presentPaymentSheet,initPaymentSheet:_initPaymentSheet,createToken:_createToken,collectBankAccountForPayment:_collectBankAccountForPayment,collectBankAccountForSetup:_collectBankAccountForSetup,verifyMicrodepositsForPayment:_verifyMicrodepositsForPayment,verifyMicrodepositsForSetup:_verifyMicrodepositsForSetup,canAddCardToWallet:_canAddCardToWallet,collectBankAccountToken:_collectBankAccountToken,collectFinancialConnectionsAccounts:_collectFinancialConnectionsAccounts,resetPaymentSheetCustomer:_resetPaymentSheetCustomer,isPlatformPaySupported:_isPlatformPaySupported,confirmPlatformPaySetupIntent:_confirmPlatformPaySetupIntent,confirmPlatformPayPayment:_confirmPlatformPayPayment,dismissPlatformPay:_dismissPlatformPay,createPlatformPayPaymentMethod:_createPlatformPayPaymentMethod,createPlatformPayToken:_createPlatformPayToken,updatePlatformPaySheet:_updatePlatformPaySheet,openPlatformPaySetup:_openPlatformPaySetup};}
2
2
  //# sourceMappingURL=useStripe.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_functions","useStripe","_createPaymentMethod","useCallback","_ref","_asyncToGenerator2","default","data","options","arguments","length","undefined","createPaymentMethod","_x","apply","_createToken","_ref2","params","createToken","_x2","_retrievePaymentIntent","_ref3","clientSecret","retrievePaymentIntent","_x3","_retrieveSetupIntent","_ref4","retrieveSetupIntent","_x4","_confirmPayment","_ref5","paymentIntentClientSecret","confirmPayment","_x5","_x6","_handleNextAction","_ref6","returnURL","handleNextAction","_x7","_x8","_handleNextActionForSetup","_ref7","setupIntentClientSecret","handleNextActionForSetup","_x9","_x10","_confirmSetupIntent","_ref8","confirmSetupIntent","_x11","_x12","_createTokenForCVCUpdate","_ref9","cvc","createTokenForCVCUpdate","_x13","_initPaymentSheet","_ref10","initPaymentSheet","_x14","_presentPaymentSheet","_ref11","presentPaymentSheet","_x15","_confirmPaymentSheetPayment","confirmPaymentSheetPayment","_handleURLCallback","_ref13","url","handleURLCallback","_x16","_collectBankAccountForPayment","_ref14","collectBankAccountForPayment","_x17","_x18","_collectBankAccountForSetup","_ref15","collectBankAccountForSetup","_x19","_x20","_verifyMicrodepositsForPayment","_ref16","verifyMicrodepositsForPayment","_x21","_x22","_verifyMicrodepositsForSetup","_ref17","verifyMicrodepositsForSetup","_x23","_x24","_canAddCardToWallet","_ref18","canAddCardToWallet","_x25","_collectBankAccountToken","_ref19","collectBankAccountToken","_x26","_x27","_collectFinancialConnectionsAccounts","_ref20","collectFinancialConnectionsAccounts","_x28","_x29","_resetPaymentSheetCustomer","resetPaymentSheetCustomer","_isPlatformPaySupported","_ref22","isPlatformPaySupported","_x30","_confirmPlatformPaySetupIntent","_ref23","confirmPlatformPaySetupIntent","_x31","_x32","_confirmPlatformPayPayment","_ref24","confirmPlatformPayPayment","_x33","_x34","_dismissPlatformPay","dismissPlatformPay","_createPlatformPayPaymentMethod","_ref26","createPlatformPayPaymentMethod","_x35","_createPlatformPayToken","_ref27","createPlatformPayToken","_x36","_updatePlatformPaySheet","_ref28","updatePlatformPaySheet","_x37","_openPlatformPaySetup","openPlatformPaySetup"],"sourceRoot":"../../../src","sources":["hooks/useStripe.tsx"],"mappings":"0QA8BA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,UAAA,CAAAD,OAAA,iBAqCO,QAAS,CAAAE,SAASA,CAAA,CAAG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F,+BAA+B,CAC/DM,sBAAsB,CAAEF,uBAAuB,CAC/CM,sBAAsB,CAAEF,uBAAuB,CAC/CK,oBAAoB,CAAED,qBACxB,CAAC,CACH","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_functions","useStripe","_createPaymentMethod","useCallback","_ref","_asyncToGenerator2","default","data","options","arguments","length","undefined","createPaymentMethod","_x","apply","_createToken","_ref2","params","createToken","_x2","_retrievePaymentIntent","_ref3","clientSecret","retrievePaymentIntent","_x3","_retrieveSetupIntent","_ref4","retrieveSetupIntent","_x4","_confirmPayment","_ref5","paymentIntentClientSecret","confirmPayment","_x5","_x6","_handleNextAction","_ref6","returnURL","handleNextAction","_x7","_x8","_handleNextActionForSetup","_ref7","setupIntentClientSecret","handleNextActionForSetup","_x9","_x0","_confirmSetupIntent","_ref8","confirmSetupIntent","_x1","_x10","_createTokenForCVCUpdate","_ref9","cvc","createTokenForCVCUpdate","_x11","_initPaymentSheet","_ref0","initPaymentSheet","_x12","_presentPaymentSheet","_ref1","presentPaymentSheet","_x13","_confirmPaymentSheetPayment","confirmPaymentSheetPayment","_handleURLCallback","_ref11","url","handleURLCallback","_x14","_collectBankAccountForPayment","_ref12","collectBankAccountForPayment","_x15","_x16","_collectBankAccountForSetup","_ref13","collectBankAccountForSetup","_x17","_x18","_verifyMicrodepositsForPayment","_ref14","verifyMicrodepositsForPayment","_x19","_x20","_verifyMicrodepositsForSetup","_ref15","verifyMicrodepositsForSetup","_x21","_x22","_canAddCardToWallet","_ref16","canAddCardToWallet","_x23","_collectBankAccountToken","_ref17","collectBankAccountToken","_x24","_x25","_collectFinancialConnectionsAccounts","_ref18","collectFinancialConnectionsAccounts","_x26","_x27","_resetPaymentSheetCustomer","resetPaymentSheetCustomer","_isPlatformPaySupported","_ref20","isPlatformPaySupported","_x28","_confirmPlatformPaySetupIntent","_ref21","confirmPlatformPaySetupIntent","_x29","_x30","_confirmPlatformPayPayment","_ref22","confirmPlatformPayPayment","_x31","_x32","_dismissPlatformPay","dismissPlatformPay","_createPlatformPayPaymentMethod","_ref24","createPlatformPayPaymentMethod","_x33","_createPlatformPayToken","_ref25","createPlatformPayToken","_x34","_updatePlatformPaySheet","_ref26","updatePlatformPaySheet","_x35","_openPlatformPaySetup","openPlatformPaySetup"],"sourceRoot":"../../../src","sources":["hooks/useStripe.tsx"],"mappings":"0QA8BA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,UAAA,CAAAD,OAAA,iBAqCO,QAAS,CAAAE,SAASA,CAAA,CAAG,CAC1B,GAAM,CAAAC,oBAAoB,CAAG,GAAAC,kBAAW,iBAAAC,IAAA,IAAAC,kBAAA,CAAAC,OAAA,EACtC,UACEC,IAAgC,CAEO,IADvC,CAAAC,OAAoC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAEzC,MAAO,GAAAG,8BAAmB,EAACL,IAAI,CAAEC,OAAO,CAAC,CAC3C,CAAC,kBAAAK,EAAA,SAAAT,IAAA,CAAAU,KAAA,MAAAL,SAAA,QACD,EACF,CAAC,CAED,GAAM,CAAAM,YAAY,CAAG,GAAAZ,kBAAW,iBAAAa,KAAA,IAAAX,kBAAA,CAAAC,OAAA,EAC9B,UAAOW,MAA0B,CAAiC,CAChE,MAAO,GAAAC,sBAAW,EAACD,MAAM,CAAC,CAC5B,CAAC,kBAAAE,GAAA,SAAAH,KAAA,CAAAF,KAAA,MAAAL,SAAA,QACD,EACF,CAAC,CAED,GAAM,CAAAW,sBAAsB,CAAG,GAAAjB,kBAAW,iBAAAkB,KAAA,IAAAhB,kBAAA,CAAAC,OAAA,EACxC,UAAOgB,YAAoB,CAA2C,CACpE,MAAO,GAAAC,gCAAqB,EAACD,YAAY,CAAC,CAC5C,CAAC,kBAAAE,GAAA,SAAAH,KAAA,CAAAP,KAAA,MAAAL,SAAA,QACD,EACF,CAAC,CAED,GAAM,CAAAgB,oBAAoB,CAAG,GAAAtB,kBAAW,iB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CAAEF,8BAA8B,CAC7DO,2BAA2B,CAAEF,4BAA4B,CACzDO,kBAAkB,CAAEF,mBAAmB,CACvCM,uBAAuB,CAAEF,wBAAwB,CACjDO,mCAAmC,CAAEF,oCAAoC,CAMzEM,yBAAyB,CAAED,0BAA0B,CACrDI,sBAAsB,CAAEF,uBAAuB,CAC/CM,6BAA6B,CAAEF,8BAA8B,CAC7DO,yBAAyB,CAAEF,0BAA0B,CACrDM,kBAAkB,CAAED,mBAAmB,CACvCI,8BAA8B,CAAEF,+BAA+B,CAC/DM,sBAAsB,CAAEF,uBAAuB,CAC/CM,sBAAsB,CAAEF,uBAAuB,CAC/CK,oBAAoB,CAAED,qBACxB,CAAC,CACH","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useEmbeddedPaymentElement=useEmbeddedPaymentElement;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _reactNative=require("react-native");var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _react=_interopRequireWildcard(require("react"));var _events=require("../events");var _NativeEmbeddedPaymentElement=_interopRequireWildcard(require("../specs/NativeEmbeddedPaymentElement"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/wooj/stripe/stripe-react-native/src/types/EmbeddedPaymentElement.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var EmbeddedPaymentElement=function(){function EmbeddedPaymentElement(){(0,_classCallCheck2.default)(this,EmbeddedPaymentElement);}return(0,_createClass2.default)(EmbeddedPaymentElement,[{key:"update",value:(function(){var _update=(0,_asyncToGenerator2.default)(function*(intentConfig){var result=yield _NativeStripeSdkModule.default.updateEmbeddedPaymentElement(intentConfig);return result;});function update(_x){return _update.apply(this,arguments);}return update;}())},{key:"confirm",value:(function(){var _confirm=(0,_asyncToGenerator2.default)(function*(){var result=yield _NativeStripeSdkModule.default.confirmEmbeddedPaymentElement(-1);return result;});function confirm(){return _confirm.apply(this,arguments);}return confirm;}())},{key:"clearPaymentOption",value:function clearPaymentOption(){_NativeStripeSdkModule.default.clearEmbeddedPaymentOption(-1);}}]);}();var confirmHandlerCallback=null;var formSheetActionConfirmCallback=null;function createEmbeddedPaymentElement(_x2,_x3){return _createEmbeddedPaymentElement.apply(this,arguments);}function _createEmbeddedPaymentElement(){_createEmbeddedPaymentElement=(0,_asyncToGenerator2.default)(function*(intentConfig,configuration){setupConfirmHandlers(intentConfig,configuration);yield _NativeStripeSdkModule.default.createEmbeddedPaymentElement(intentConfig,configuration);return new EmbeddedPaymentElement();});return _createEmbeddedPaymentElement.apply(this,arguments);}function setupConfirmHandlers(intentConfig,configuration){var _configuration$formSh;var confirmHandler=intentConfig.confirmHandler;if(confirmHandler){var _confirmHandlerCallba;(_confirmHandlerCallba=confirmHandlerCallback)==null||_confirmHandlerCallba.remove();confirmHandlerCallback=(0,_events.addListener)('onConfirmHandlerCallback',function(_ref){var paymentMethod=_ref.paymentMethod,shouldSavePaymentMethod=_ref.shouldSavePaymentMethod;confirmHandler(paymentMethod,shouldSavePaymentMethod,_NativeStripeSdkModule.default.intentCreationCallback);});}if(((_configuration$formSh=configuration.formSheetAction)==null?void 0:_configuration$formSh.type)==='confirm'){var confirmFormSheetHandler=configuration.formSheetAction.onFormSheetConfirmComplete;if(confirmFormSheetHandler){var _formSheetActionConfi;(_formSheetActionConfi=formSheetActionConfirmCallback)==null||_formSheetActionConfi.remove();formSheetActionConfirmCallback=(0,_events.addListener)('embeddedPaymentElementFormSheetConfirmComplete',function(result){confirmFormSheetHandler(result);});}}}function useEmbeddedPaymentElement(intentConfig,configuration){var _this=this;var isAndroid=_reactNative.Platform.OS==='android';var elementRef=(0,_react.useRef)(null);var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),element=_useState2[0],setElement=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),paymentOption=_useState4[0],setPaymentOption=_useState4[1];var _useState5=(0,_react.useState)(),_useState6=(0,_slicedToArray2.default)(_useState5,2),height=_useState6[0],setHeight=_useState6[1];var viewRef=(0,_react.useRef)(null);var _useState7=(0,_react.useState)(null),_useState8=(0,_slicedToArray2.default)(_useState7,2),loadingError=_useState8[0],setLoadingError=_useState8[1];function getElementOrThrow(ref){if(!ref.current){throw new Error('EmbeddedPaymentElement is not ready yet – wait until it finishes loading before calling this API.');}return ref.current;}(0,_react.useEffect)(function(){var active=true;(0,_asyncToGenerator2.default)(function*(){var el=yield createEmbeddedPaymentElement(intentConfig,configuration);if(!active)return;elementRef.current=el;setElement(el);})();var getCurrentRef=function getCurrentRef(){return viewRef.current;};return function(){var _elementRef$current;active=false;(_elementRef$current=elementRef.current)==null||_elementRef$current.clearPaymentOption();elementRef.current=null;var currentRef=getCurrentRef();if(isAndroid&&currentRef){_NativeEmbeddedPaymentElement.Commands.clearPaymentOption(currentRef);}setElement(null);};},[intentConfig,configuration,viewRef,isAndroid]);(0,_react.useEffect)(function(){var sub=(0,_events.addListener)('embeddedPaymentElementDidUpdatePaymentOption',function(_ref3){var opt=_ref3.paymentOption;return setPaymentOption(opt!=null?opt:null);});return function(){return sub.remove();};});(0,_react.useEffect)(function(){var sub=(0,_events.addListener)('embeddedPaymentElementDidUpdateHeight',function(_ref4){var h=_ref4.height;if(h>0||isAndroid&&h===0){_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setHeight(h);}});return function(){return sub.remove();};},[isAndroid]);(0,_react.useEffect)(function(){var sub=(0,_events.addListener)('embeddedPaymentElementLoadingFailed',function(nativeError){setLoadingError(new Error(nativeError.message));});return function(){return sub.remove();};},[]);var embeddedPaymentElementView=(0,_react.useMemo)(function(){if(isAndroid&&configuration&&intentConfig){return(0,_jsxRuntime.jsx)(_NativeEmbeddedPaymentElement.default,{ref:viewRef,style:[{width:'100%',height:height}],configuration:configuration,intentConfiguration:intentConfig});}if(!element)return null;return(0,_jsxRuntime.jsx)(_NativeEmbeddedPaymentElement.default,{ref:viewRef,style:{width:'100%',height:height},configuration:configuration,intentConfiguration:intentConfig});},[configuration,element,height,intentConfig,isAndroid]);var confirm=(0,_react.useCallback)(function(){var currentRef=viewRef.current;if(isAndroid){if(currentRef){var promise=new Promise(function(resolve){var sub=(0,_events.addListener)('embeddedPaymentElementFormSheetConfirmComplete',function(result){sub.remove();resolve(result);});});_NativeEmbeddedPaymentElement.Commands.confirm(currentRef);return promise;}else{return Promise.reject(new Error('Unable to find Android embedded payment element view!'));}}return getElementOrThrow(elementRef).confirm();},[isAndroid]);var update=(0,_react.useCallback)(function(cfg){return getElementOrThrow(elementRef).update(cfg);},[]);var clearPaymentOption=(0,_react.useCallback)(function(){if(isAndroid){var tag=(0,_reactNative.findNodeHandle)(viewRef.current);if(tag==null){return Promise.reject(new Error('Unable to find Android view handle'));}return _NativeStripeSdkModule.default.clearEmbeddedPaymentOption(tag);}getElementOrThrow(elementRef).clearPaymentOption();return Promise.resolve();},[isAndroid]);return{embeddedPaymentElementView:embeddedPaymentElementView,paymentOption:paymentOption,confirm:confirm,update:update,clearPaymentOption:clearPaymentOption,loadingError:loadingError};}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useEmbeddedPaymentElement=useEmbeddedPaymentElement;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _reactNative=require("react-native");var _NativeStripeSdkModule=_interopRequireDefault(require("../specs/NativeStripeSdkModule"));var _react=_interopRequireWildcard(require("react"));var _events=require("../events");var _NativeEmbeddedPaymentElement=_interopRequireWildcard(require("../specs/NativeEmbeddedPaymentElement"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/wooj/stripe/stripe-react-native/src/types/EmbeddedPaymentElement.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var EmbeddedPaymentElement=function(){function EmbeddedPaymentElement(){(0,_classCallCheck2.default)(this,EmbeddedPaymentElement);}return(0,_createClass2.default)(EmbeddedPaymentElement,[{key:"update",value:(function(){var _update=(0,_asyncToGenerator2.default)(function*(intentConfig){var result=yield _NativeStripeSdkModule.default.updateEmbeddedPaymentElement(intentConfig);return result;});function update(_x){return _update.apply(this,arguments);}return update;}())},{key:"confirm",value:(function(){var _confirm=(0,_asyncToGenerator2.default)(function*(){var result=yield _NativeStripeSdkModule.default.confirmEmbeddedPaymentElement(-1);return result;});function confirm(){return _confirm.apply(this,arguments);}return confirm;}())},{key:"clearPaymentOption",value:function clearPaymentOption(){_NativeStripeSdkModule.default.clearEmbeddedPaymentOption(-1);}}]);}();var confirmHandlerCallback=null;var formSheetActionConfirmCallback=null;var rowSelectionCallback=null;function createEmbeddedPaymentElement(_x2,_x3){return _createEmbeddedPaymentElement.apply(this,arguments);}function _createEmbeddedPaymentElement(){_createEmbeddedPaymentElement=(0,_asyncToGenerator2.default)(function*(intentConfig,configuration){setupConfirmAndSelectionHandlers(intentConfig,configuration);yield _NativeStripeSdkModule.default.createEmbeddedPaymentElement(intentConfig,configuration);return new EmbeddedPaymentElement();});return _createEmbeddedPaymentElement.apply(this,arguments);}function setupConfirmAndSelectionHandlers(intentConfig,configuration){var _configuration$formSh,_configuration$rowSel;var confirmHandler=intentConfig.confirmHandler;if(confirmHandler){var _confirmHandlerCallba;(_confirmHandlerCallba=confirmHandlerCallback)==null||_confirmHandlerCallba.remove();confirmHandlerCallback=(0,_events.addListener)('onConfirmHandlerCallback',function(_ref){var paymentMethod=_ref.paymentMethod,shouldSavePaymentMethod=_ref.shouldSavePaymentMethod;confirmHandler(paymentMethod,shouldSavePaymentMethod,_NativeStripeSdkModule.default.intentCreationCallback);});}if(((_configuration$formSh=configuration.formSheetAction)==null?void 0:_configuration$formSh.type)==='confirm'){var confirmFormSheetHandler=configuration.formSheetAction.onFormSheetConfirmComplete;if(confirmFormSheetHandler){var _formSheetActionConfi;(_formSheetActionConfi=formSheetActionConfirmCallback)==null||_formSheetActionConfi.remove();formSheetActionConfirmCallback=(0,_events.addListener)('embeddedPaymentElementFormSheetConfirmComplete',function(result){confirmFormSheetHandler(result);});}}if(((_configuration$rowSel=configuration.rowSelectionBehavior)==null?void 0:_configuration$rowSel.type)==='immediateAction'){var rowSelectionHandler=configuration.rowSelectionBehavior.onSelectPaymentOption;if(rowSelectionHandler){var _rowSelectionCallback;(_rowSelectionCallback=rowSelectionCallback)==null||_rowSelectionCallback.remove();rowSelectionCallback=(0,_events.addListener)('embeddedPaymentElementRowSelectionImmediateAction',function(){rowSelectionHandler();});}}}function useEmbeddedPaymentElement(intentConfig,configuration){var _this=this;var isAndroid=_reactNative.Platform.OS==='android';var elementRef=(0,_react.useRef)(null);var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),element=_useState2[0],setElement=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),paymentOption=_useState4[0],setPaymentOption=_useState4[1];var _useState5=(0,_react.useState)(),_useState6=(0,_slicedToArray2.default)(_useState5,2),height=_useState6[0],setHeight=_useState6[1];var viewRef=(0,_react.useRef)(null);var _useState7=(0,_react.useState)(null),_useState8=(0,_slicedToArray2.default)(_useState7,2),loadingError=_useState8[0],setLoadingError=_useState8[1];function getElementOrThrow(ref){if(!ref.current){throw new Error('EmbeddedPaymentElement is not ready yet – wait until it finishes loading before calling this API.');}return ref.current;}(0,_react.useEffect)(function(){var active=true;(0,_asyncToGenerator2.default)(function*(){var el=yield createEmbeddedPaymentElement(intentConfig,configuration);if(!active)return;elementRef.current=el;setElement(el);})();var getCurrentRef=function getCurrentRef(){return viewRef.current;};return function(){var _elementRef$current;active=false;(_elementRef$current=elementRef.current)==null||_elementRef$current.clearPaymentOption();elementRef.current=null;var currentRef=getCurrentRef();if(isAndroid&&currentRef){_NativeEmbeddedPaymentElement.Commands.clearPaymentOption(currentRef);}setElement(null);};},[intentConfig,configuration,viewRef,isAndroid]);(0,_react.useEffect)(function(){var sub=(0,_events.addListener)('embeddedPaymentElementDidUpdatePaymentOption',function(_ref3){var opt=_ref3.paymentOption;return setPaymentOption(opt!=null?opt:null);});return function(){return sub.remove();};});(0,_react.useEffect)(function(){var sub=(0,_events.addListener)('embeddedPaymentElementDidUpdateHeight',function(_ref4){var h=_ref4.height;if(h>0||isAndroid&&h===0){_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setHeight(h);}});return function(){return sub.remove();};},[isAndroid]);(0,_react.useEffect)(function(){var sub=(0,_events.addListener)('embeddedPaymentElementLoadingFailed',function(nativeError){setLoadingError(new Error(nativeError.message));});return function(){return sub.remove();};},[]);var embeddedPaymentElementView=(0,_react.useMemo)(function(){if(isAndroid&&configuration&&intentConfig){return(0,_jsxRuntime.jsx)(_NativeEmbeddedPaymentElement.default,{ref:viewRef,style:[{width:'100%',height:height}],configuration:configuration,intentConfiguration:intentConfig});}if(!element)return null;return(0,_jsxRuntime.jsx)(_NativeEmbeddedPaymentElement.default,{ref:viewRef,style:{width:'100%',height:height},configuration:configuration,intentConfiguration:intentConfig});},[configuration,element,height,intentConfig,isAndroid]);var confirm=(0,_react.useCallback)(function(){var currentRef=viewRef.current;if(isAndroid){if(currentRef){var promise=new Promise(function(resolve){var sub=(0,_events.addListener)('embeddedPaymentElementFormSheetConfirmComplete',function(result){sub.remove();resolve(result);});});_NativeEmbeddedPaymentElement.Commands.confirm(currentRef);return promise;}else{return Promise.reject(new Error('Unable to find Android embedded payment element view!'));}}return getElementOrThrow(elementRef).confirm();},[isAndroid]);var update=(0,_react.useCallback)(function(cfg){return getElementOrThrow(elementRef).update(cfg);},[]);var clearPaymentOption=(0,_react.useCallback)(function(){if(isAndroid){var tag=(0,_reactNative.findNodeHandle)(viewRef.current);if(tag==null){return Promise.reject(new Error('Unable to find Android view handle'));}return _NativeStripeSdkModule.default.clearEmbeddedPaymentOption(tag);}getElementOrThrow(elementRef).clearPaymentOption();return Promise.resolve();},[isAndroid]);return{embeddedPaymentElementView:embeddedPaymentElementView,paymentOption:paymentOption,confirm:confirm,update:update,clearPaymentOption:clearPaymentOption,loadingError:loadingError};}
2
2
  //# sourceMappingURL=EmbeddedPaymentElement.js.map