@stripe/stripe-react-native 0.22.0 → 0.23.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 (164) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +1 -2
  3. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +2 -3
  4. package/android/src/main/java/com/reactnativestripesdk/GooglePayRequestHelper.kt +21 -9
  5. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +4 -2
  6. package/android/src/main/res/layout/googlepay_mark_button.xml +0 -2
  7. package/ios/ApplePayViewController.swift +23 -15
  8. package/ios/Mappers.swift +35 -16
  9. package/ios/PaymentMethodFactory.swift +1 -1
  10. package/ios/StripeSdk.m +1 -0
  11. package/ios/StripeSdk.swift +8 -5
  12. package/ios/Tests/ApplePayUtilsTests.swift +0 -1
  13. package/jest/mock.js +6 -0
  14. package/lib/commonjs/NativeStripeSdk.js.map +1 -1
  15. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  16. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  17. package/lib/commonjs/components/ApplePayButton.js +1 -1
  18. package/lib/commonjs/components/ApplePayButton.js.map +1 -1
  19. package/lib/commonjs/components/ApplePayButtonNative.js +2 -0
  20. package/lib/commonjs/components/ApplePayButtonNative.js.map +1 -0
  21. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  22. package/lib/commonjs/components/CardField.js.map +1 -1
  23. package/lib/commonjs/components/CardForm.js.map +1 -1
  24. package/lib/commonjs/components/GooglePayButton.js +1 -1
  25. package/lib/commonjs/components/GooglePayButton.js.map +1 -1
  26. package/lib/commonjs/components/GooglePayButtonNative.js +2 -0
  27. package/lib/commonjs/components/GooglePayButtonNative.js.map +1 -0
  28. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  29. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  30. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  31. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  32. package/lib/commonjs/functions.js +1 -1
  33. package/lib/commonjs/functions.js.map +1 -1
  34. package/lib/commonjs/helpers.js.map +1 -1
  35. package/lib/commonjs/hooks/useApplePay.js +1 -1
  36. package/lib/commonjs/hooks/useApplePay.js.map +1 -1
  37. package/lib/commonjs/hooks/useConfirmPayment.js.map +1 -1
  38. package/lib/commonjs/hooks/useConfirmSetupIntent.js.map +1 -1
  39. package/lib/commonjs/hooks/useFinancialConnectionsSheet.js.map +1 -1
  40. package/lib/commonjs/hooks/useGooglePay.js.map +1 -1
  41. package/lib/commonjs/hooks/usePaymentSheet.js.map +1 -1
  42. package/lib/commonjs/hooks/usePlatformPay.js +1 -1
  43. package/lib/commonjs/hooks/usePlatformPay.js.map +1 -1
  44. package/lib/commonjs/hooks/useStripe.js +1 -1
  45. package/lib/commonjs/hooks/useStripe.js.map +1 -1
  46. package/lib/commonjs/index.js +1 -1
  47. package/lib/commonjs/index.js.map +1 -1
  48. package/lib/commonjs/plugin/withStripe.js.map +1 -1
  49. package/lib/commonjs/types/ApplePay.js.map +1 -1
  50. package/lib/commonjs/types/Common.js.map +1 -1
  51. package/lib/commonjs/types/Errors.js.map +1 -1
  52. package/lib/commonjs/types/FinancialConnections.js.map +1 -1
  53. package/lib/commonjs/types/GooglePay.js.map +1 -1
  54. package/lib/commonjs/types/NextAction.js.map +1 -1
  55. package/lib/commonjs/types/PaymentIntent.js.map +1 -1
  56. package/lib/commonjs/types/PaymentMethod.js.map +1 -1
  57. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  58. package/lib/commonjs/types/PlatformPay.js.map +1 -1
  59. package/lib/commonjs/types/PushProvisioning.js.map +1 -1
  60. package/lib/commonjs/types/SetupIntent.js.map +1 -1
  61. package/lib/commonjs/types/ThreeDSecure.js.map +1 -1
  62. package/lib/commonjs/types/Token.js.map +1 -1
  63. package/lib/commonjs/types/components/ApplePayButtonComponent.js.map +1 -1
  64. package/lib/commonjs/types/components/AuBECSDebitFormComponent.js.map +1 -1
  65. package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
  66. package/lib/commonjs/types/components/CardFormView.js.map +1 -1
  67. package/lib/commonjs/types/components/GooglePayButtonComponent.js +2 -0
  68. package/lib/commonjs/types/components/GooglePayButtonComponent.js.map +1 -0
  69. package/lib/commonjs/types/index.js +1 -1
  70. package/lib/commonjs/types/index.js.map +1 -1
  71. package/lib/module/NativeStripeSdk.js.map +1 -1
  72. package/lib/module/components/AddToWalletButton.js.map +1 -1
  73. package/lib/module/components/AddressSheet.js.map +1 -1
  74. package/lib/module/components/ApplePayButton.js +1 -1
  75. package/lib/module/components/ApplePayButton.js.map +1 -1
  76. package/lib/module/components/ApplePayButtonNative.js +2 -0
  77. package/lib/module/components/ApplePayButtonNative.js.map +1 -0
  78. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  79. package/lib/module/components/CardField.js.map +1 -1
  80. package/lib/module/components/CardForm.js.map +1 -1
  81. package/lib/module/components/GooglePayButton.js +1 -1
  82. package/lib/module/components/GooglePayButton.js.map +1 -1
  83. package/lib/module/components/GooglePayButtonNative.js +2 -0
  84. package/lib/module/components/GooglePayButtonNative.js.map +1 -0
  85. package/lib/module/components/PlatformPayButton.js +1 -1
  86. package/lib/module/components/PlatformPayButton.js.map +1 -1
  87. package/lib/module/components/StripeContainer.js.map +1 -1
  88. package/lib/module/components/StripeProvider.js.map +1 -1
  89. package/lib/module/functions.js +1 -1
  90. package/lib/module/functions.js.map +1 -1
  91. package/lib/module/helpers.js.map +1 -1
  92. package/lib/module/hooks/useApplePay.js +1 -1
  93. package/lib/module/hooks/useApplePay.js.map +1 -1
  94. package/lib/module/hooks/useConfirmPayment.js.map +1 -1
  95. package/lib/module/hooks/useConfirmSetupIntent.js.map +1 -1
  96. package/lib/module/hooks/useFinancialConnectionsSheet.js.map +1 -1
  97. package/lib/module/hooks/useGooglePay.js.map +1 -1
  98. package/lib/module/hooks/usePaymentSheet.js.map +1 -1
  99. package/lib/module/hooks/usePlatformPay.js +1 -1
  100. package/lib/module/hooks/usePlatformPay.js.map +1 -1
  101. package/lib/module/hooks/useStripe.js +1 -1
  102. package/lib/module/hooks/useStripe.js.map +1 -1
  103. package/lib/module/index.js +1 -1
  104. package/lib/module/index.js.map +1 -1
  105. package/lib/module/plugin/withStripe.js.map +1 -1
  106. package/lib/module/types/ApplePay.js.map +1 -1
  107. package/lib/module/types/Common.js.map +1 -1
  108. package/lib/module/types/Errors.js.map +1 -1
  109. package/lib/module/types/FinancialConnections.js.map +1 -1
  110. package/lib/module/types/GooglePay.js.map +1 -1
  111. package/lib/module/types/NextAction.js.map +1 -1
  112. package/lib/module/types/PaymentIntent.js.map +1 -1
  113. package/lib/module/types/PaymentMethod.js.map +1 -1
  114. package/lib/module/types/PaymentSheet.js.map +1 -1
  115. package/lib/module/types/PlatformPay.js.map +1 -1
  116. package/lib/module/types/PushProvisioning.js.map +1 -1
  117. package/lib/module/types/SetupIntent.js.map +1 -1
  118. package/lib/module/types/ThreeDSecure.js.map +1 -1
  119. package/lib/module/types/Token.js.map +1 -1
  120. package/lib/module/types/components/ApplePayButtonComponent.js.map +1 -1
  121. package/lib/module/types/components/AuBECSDebitFormComponent.js.map +1 -1
  122. package/lib/module/types/components/CardFieldInput.js.map +1 -1
  123. package/lib/module/types/components/CardFormView.js.map +1 -1
  124. package/lib/module/types/components/GooglePayButtonComponent.js +2 -0
  125. package/lib/module/types/components/GooglePayButtonComponent.js.map +1 -0
  126. package/lib/module/types/index.js +1 -1
  127. package/lib/module/types/index.js.map +1 -1
  128. package/lib/typescript/src/NativeStripeSdk.d.ts +1 -1
  129. package/lib/typescript/src/components/AddToWalletButton.d.ts +1 -1
  130. package/lib/typescript/src/components/ApplePayButton.d.ts +1 -1
  131. package/lib/typescript/src/components/ApplePayButtonNative.d.ts +3 -0
  132. package/lib/typescript/src/components/GooglePayButtonNative.d.ts +3 -0
  133. package/lib/typescript/src/functions.d.ts +8 -2
  134. package/lib/typescript/src/hooks/usePlatformPay.d.ts +6 -0
  135. package/lib/typescript/src/hooks/useStripe.d.ts +1 -0
  136. package/lib/typescript/src/index.d.ts +22 -11
  137. package/lib/typescript/src/types/PaymentSheet.d.ts +1 -1
  138. package/lib/typescript/src/types/PlatformPay.d.ts +6 -1
  139. package/lib/typescript/src/types/PushProvisioning.d.ts +1 -1
  140. package/lib/typescript/src/types/Token.d.ts +1 -0
  141. package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts +12 -1
  142. package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts +6 -0
  143. package/lib/typescript/src/types/index.d.ts +3 -2
  144. package/package.json +4 -4
  145. package/src/NativeStripeSdk.tsx +3 -2
  146. package/src/components/AddToWalletButton.tsx +1 -1
  147. package/src/components/ApplePayButton.tsx +3 -10
  148. package/src/components/ApplePayButtonNative.tsx +5 -0
  149. package/src/components/GooglePayButton.tsx +1 -3
  150. package/src/components/GooglePayButtonNative.tsx +7 -0
  151. package/src/components/PlatformPayButton.tsx +2 -4
  152. package/src/functions.ts +35 -4
  153. package/src/hooks/useApplePay.tsx +1 -2
  154. package/src/hooks/usePlatformPay.tsx +19 -0
  155. package/src/hooks/useStripe.tsx +11 -0
  156. package/src/index.tsx +22 -36
  157. package/src/types/PaymentSheet.ts +1 -1
  158. package/src/types/PlatformPay.ts +9 -1
  159. package/src/types/PushProvisioning.ts +1 -1
  160. package/src/types/Token.ts +1 -0
  161. package/src/types/components/ApplePayButtonComponent.ts +18 -2
  162. package/src/types/components/GooglePayButtonComponent.ts +6 -0
  163. package/src/types/index.ts +3 -1
  164. package/stripe-react-native.podspec +1 -1
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _PlatformPay=require("../types/PlatformPay");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/PlatformPayButton.tsx";var _excluded=["type","appearance","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered"];var GooglePayButtonNative=(0,_reactNative.requireNativeComponent)('GooglePayButton');var ApplePayButtonNative=(0,_reactNative.requireNativeComponent)('ApplePayButton');function PlatformPayButton(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?_PlatformPay.ButtonType.Default:_ref$type,_ref$appearance=_ref.appearance,appearance=_ref$appearance===void 0?_PlatformPay.ButtonStyle.Automatic:_ref$appearance,onPress=_ref.onPress,disabled=_ref.disabled,borderRadius=_ref.borderRadius,onShippingMethodSelected=_ref.onShippingMethodSelected,onShippingContactSelected=_ref.onShippingContactSelected,onCouponCodeEntered=_ref.onCouponCodeEntered,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var shippingMethodCallback=onShippingMethodSelected?function(value){onShippingMethodSelected&&onShippingMethodSelected(value.nativeEvent);}:undefined;var shippingContactCallback=onShippingContactSelected?function(value){onShippingContactSelected(value.nativeEvent);}:undefined;var couponCodeCallback=onCouponCodeEntered?function(value){onCouponCodeEntered&&onCouponCodeEntered(value.nativeEvent);}:undefined;return _react.default.createElement(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:disabled?0.3:1,onPress:onPress,style:disabled?styles.disabled:styles.notDisabled,__self:this,__source:{fileName:_jsxFileName,lineNumber:125,columnNumber:5}},_reactNative.Platform.OS==='ios'?_react.default.createElement(ApplePayButtonNative,(0,_extends2.default)({type:type,buttonStyle:appearance,borderRadius:borderRadius,disabled:disabled,onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:132,columnNumber:9}})):_react.default.createElement(GooglePayButtonNative,(0,_extends2.default)({type:type},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:143,columnNumber:9}})));}var styles=_reactNative.StyleSheet.create({disabled:{flex:0,opacity:0.3},notDisabled:{flex:0}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PlatformPayButton=PlatformPayButton;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _PlatformPay=require("../types/PlatformPay");var _GooglePayButtonNative=_interopRequireDefault(require("./GooglePayButtonNative"));var _ApplePayButtonNative=_interopRequireDefault(require("./ApplePayButtonNative"));var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/PlatformPayButton.tsx";var _excluded=["type","appearance","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered"];function PlatformPayButton(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?_PlatformPay.ButtonType.Default:_ref$type,_ref$appearance=_ref.appearance,appearance=_ref$appearance===void 0?_PlatformPay.ButtonStyle.Automatic:_ref$appearance,onPress=_ref.onPress,disabled=_ref.disabled,borderRadius=_ref.borderRadius,onShippingMethodSelected=_ref.onShippingMethodSelected,onShippingContactSelected=_ref.onShippingContactSelected,onCouponCodeEntered=_ref.onCouponCodeEntered,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var shippingMethodCallback=onShippingMethodSelected?function(value){onShippingMethodSelected&&onShippingMethodSelected(value.nativeEvent);}:undefined;var shippingContactCallback=onShippingContactSelected?function(value){onShippingContactSelected(value.nativeEvent);}:undefined;var couponCodeCallback=onCouponCodeEntered?function(value){onCouponCodeEntered&&onCouponCodeEntered(value.nativeEvent);}:undefined;return _react.default.createElement(_reactNative.TouchableOpacity,{disabled:disabled,activeOpacity:disabled?0.3:1,onPress:onPress,style:disabled?styles.disabled:styles.notDisabled,__self:this,__source:{fileName:_jsxFileName,lineNumber:123,columnNumber:5}},_reactNative.Platform.OS==='ios'?_react.default.createElement(_ApplePayButtonNative.default,(0,_extends2.default)({type:type,buttonStyle:appearance,borderRadius:borderRadius,disabled:disabled,onShippingMethodSelectedAction:shippingMethodCallback,onShippingContactSelectedAction:shippingContactCallback,onCouponCodeEnteredAction:couponCodeCallback},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:130,columnNumber:9}})):_react.default.createElement(_GooglePayButtonNative.default,(0,_extends2.default)({type:type},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:141,columnNumber:9}})));}var styles=_reactNative.StyleSheet.create({disabled:{flex:0,opacity:0.3},notDisabled:{flex:0}});
2
2
  //# sourceMappingURL=PlatformPayButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PlatformPayButton.tsx"],"names":["GooglePayButtonNative","ApplePayButtonNative","PlatformPayButton","type","ButtonType","Default","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","props","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","styles","notDisabled","Platform","OS","StyleSheet","create","flex","opacity"],"mappings":"wXAAA,oDACA,yCAUA,iD,6PAOA,GAAMA,CAAAA,qBAAqB,CAAG,wCAA4B,iBAA5B,CAA9B,CACA,GAAMC,CAAAA,oBAAoB,CAAG,wCAA4B,gBAA5B,CAA7B,CA+DO,QAASC,CAAAA,iBAAT,MAUG,oBATRC,IASQ,CATRA,IASQ,oBATDC,wBAAWC,OASV,gCARRC,UAQQ,CARRA,UAQQ,0BARKC,yBAAYC,SAQjB,iBAPRC,OAOQ,MAPRA,OAOQ,CANRC,QAMQ,MANRA,QAMQ,CALRC,YAKQ,MALRA,YAKQ,CAJRC,wBAIQ,MAJRA,wBAIQ,CAHRC,yBAGQ,MAHRA,yBAGQ,CAFRC,mBAEQ,MAFRA,mBAEQ,CADLC,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{\n AccessibilityProps,\n StyleProp,\n ViewStyle,\n requireNativeComponent,\n TouchableOpacity,\n StyleSheet,\n Platform,\n NativeSyntheticEvent,\n} from 'react-native';\nimport {\n ButtonType,\n ButtonStyle,\n ShippingMethod,\n ShippingContact,\n} from '../types/PlatformPay';\n\nconst GooglePayButtonNative = requireNativeComponent<any>('GooglePayButton');\nconst ApplePayButtonNative = requireNativeComponent<any>('ApplePayButton');\n\n/**\n * PlatformPayButton Component Props\n */\nexport interface Props extends AccessibilityProps {\n /** Sets the text displayed by the button. */\n type?: ButtonType;\n /** iOS only. Sets the coloring of the button. */\n appearance?: ButtonStyle;\n /** iOS only. Sets the border radius of the button. */\n borderRadius?: number;\n /** Function called whenever the button is pressed. */\n onPress(): void;\n /** Set to `true` to disable the button from being pressed & apply a slight opacity to indicate that it is unpressable. Defaults to false. */\n disabled?: boolean;\n /**\n * This callback is triggered whenever the user selects a shipping method in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `shippingMethod` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onShippingMethodSelected?: (event: {\n shippingMethod: ShippingMethod;\n }) => void;\n /**\n * This callback is triggered whenever the user selects a shipping contact in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `shippingContact` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onShippingContactSelected?: (event: {\n shippingContact: ShippingContact;\n }) => void;\n /**\n * This callback is triggered whenever the user inputs a coupon code in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `couponCode` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onCouponCodeEntered?: (event: { couponCode: string }) => void;\n testID?: string;\n style?: StyleProp<ViewStyle>;\n}\n\n/**\n * PlatformPayButton Component. Display the platform-specific native wallet pay button: Apple Pay on iOS, and Google Pay on Android.\n *\n * @example\n * ```ts\n * <PlatformPayButton\n * onPress={pay}\n * type={PlatformPay.ButtonType.Subscribe}\n * appearance={PlatformPay.ButtonStyle.WhiteOutline}\n * borderRadius={4}\n * disabled={!isApplePaySupported}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function PlatformPayButton({\n type = ButtonType.Default,\n appearance = ButtonStyle.Automatic,\n onPress,\n disabled,\n borderRadius,\n onShippingMethodSelected,\n onShippingContactSelected,\n onCouponCodeEntered,\n ...props\n}: Props) {\n const shippingMethodCallback = onShippingMethodSelected\n ? (\n value: NativeSyntheticEvent<{\n shippingMethod: ShippingMethod;\n }>\n ) => {\n onShippingMethodSelected && onShippingMethodSelected(value.nativeEvent);\n }\n : undefined;\n\n const shippingContactCallback = onShippingContactSelected\n ? (\n value: NativeSyntheticEvent<{\n shippingContact: ShippingContact;\n }>\n ) => {\n onShippingContactSelected(value.nativeEvent);\n }\n : undefined;\n\n const couponCodeCallback = onCouponCodeEntered\n ? (\n value: NativeSyntheticEvent<{\n couponCode: string;\n }>\n ) => {\n onCouponCodeEntered && onCouponCodeEntered(value.nativeEvent);\n }\n : undefined;\n\n return (\n <TouchableOpacity\n disabled={disabled}\n activeOpacity={disabled ? 0.3 : 1}\n onPress={onPress}\n style={disabled ? styles.disabled : styles.notDisabled}\n >\n {Platform.OS === 'ios' ? (\n <ApplePayButtonNative\n type={type}\n buttonStyle={appearance}\n borderRadius={borderRadius}\n disabled={disabled}\n onShippingMethodSelectedAction={shippingMethodCallback}\n onShippingContactSelectedAction={shippingContactCallback}\n onCouponCodeEnteredAction={couponCodeCallback}\n {...props}\n />\n ) : (\n <GooglePayButtonNative type={type} {...props} />\n )}\n </TouchableOpacity>\n );\n}\n\nconst styles = StyleSheet.create({\n disabled: {\n flex: 0,\n opacity: 0.3,\n },\n notDisabled: {\n flex: 0,\n },\n});\n"]}
1
+ {"version":3,"names":["PlatformPayButton","type","ButtonType","Default","appearance","ButtonStyle","Automatic","onPress","disabled","borderRadius","onShippingMethodSelected","onShippingContactSelected","onCouponCodeEntered","props","shippingMethodCallback","value","nativeEvent","undefined","shippingContactCallback","couponCodeCallback","styles","notDisabled","Platform","OS","StyleSheet","create","flex","opacity"],"sources":["PlatformPayButton.tsx"],"sourcesContent":["import React from 'react';\nimport {\n AccessibilityProps,\n StyleProp,\n ViewStyle,\n TouchableOpacity,\n StyleSheet,\n Platform,\n NativeSyntheticEvent,\n} from 'react-native';\nimport {\n ButtonType,\n ButtonStyle,\n ShippingMethod,\n ShippingContact,\n} from '../types/PlatformPay';\nimport GooglePayButtonNative from './GooglePayButtonNative';\nimport ApplePayButtonNative from './ApplePayButtonNative';\n\n/**\n * PlatformPayButton Component Props\n */\nexport interface Props extends AccessibilityProps {\n /** Sets the text displayed by the button. */\n type?: ButtonType;\n /** iOS only. Sets the coloring of the button. */\n appearance?: ButtonStyle;\n /** iOS only. Sets the border radius of the button. */\n borderRadius?: number;\n /** Function called whenever the button is pressed. */\n onPress(): void;\n /** Set to `true` to disable the button from being pressed & apply a slight opacity to indicate that it is unpressable. Defaults to false. */\n disabled?: boolean;\n /**\n * This callback is triggered whenever the user selects a shipping method in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `shippingMethod` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onShippingMethodSelected?: (event: {\n shippingMethod: ShippingMethod;\n }) => void;\n /**\n * This callback is triggered whenever the user selects a shipping contact in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `shippingContact` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onShippingContactSelected?: (event: {\n shippingContact: ShippingContact;\n }) => void;\n /**\n * This callback is triggered whenever the user inputs a coupon code in the Apple Pay sheet.\n * It receives one parameter: an `event` object with a `couponCode` field. You MUST\n * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the\n * Apple Pay sheet will hang and the payment flow will automatically cancel.\n */\n onCouponCodeEntered?: (event: { couponCode: string }) => void;\n testID?: string;\n style?: StyleProp<ViewStyle>;\n}\n\n/**\n * PlatformPayButton Component. Display the platform-specific native wallet pay button: Apple Pay on iOS, and Google Pay on Android.\n *\n * @example\n * ```ts\n * <PlatformPayButton\n * onPress={pay}\n * type={PlatformPay.ButtonType.Subscribe}\n * appearance={PlatformPay.ButtonStyle.WhiteOutline}\n * borderRadius={4}\n * disabled={!isApplePaySupported}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function PlatformPayButton({\n type = ButtonType.Default,\n appearance = ButtonStyle.Automatic,\n onPress,\n disabled,\n borderRadius,\n onShippingMethodSelected,\n onShippingContactSelected,\n onCouponCodeEntered,\n ...props\n}: Props) {\n const shippingMethodCallback = onShippingMethodSelected\n ? (\n value: NativeSyntheticEvent<{\n shippingMethod: ShippingMethod;\n }>\n ) => {\n onShippingMethodSelected && onShippingMethodSelected(value.nativeEvent);\n }\n : undefined;\n\n const shippingContactCallback = onShippingContactSelected\n ? (\n value: NativeSyntheticEvent<{\n shippingContact: ShippingContact;\n }>\n ) => {\n onShippingContactSelected(value.nativeEvent);\n }\n : undefined;\n\n const couponCodeCallback = onCouponCodeEntered\n ? (\n value: NativeSyntheticEvent<{\n couponCode: string;\n }>\n ) => {\n onCouponCodeEntered && onCouponCodeEntered(value.nativeEvent);\n }\n : undefined;\n\n return (\n <TouchableOpacity\n disabled={disabled}\n activeOpacity={disabled ? 0.3 : 1}\n onPress={onPress}\n style={disabled ? styles.disabled : styles.notDisabled}\n >\n {Platform.OS === 'ios' ? (\n <ApplePayButtonNative\n type={type}\n buttonStyle={appearance}\n borderRadius={borderRadius}\n disabled={disabled}\n onShippingMethodSelectedAction={shippingMethodCallback}\n onShippingContactSelectedAction={shippingContactCallback}\n onCouponCodeEnteredAction={couponCodeCallback}\n {...props}\n />\n ) : (\n <GooglePayButtonNative type={type} {...props} />\n )}\n </TouchableOpacity>\n );\n}\n\nconst styles = StyleSheet.create({\n disabled: {\n flex: 0,\n opacity: 0.3,\n },\n notDisabled: {\n flex: 0,\n },\n});\n"],"mappings":"wXAAA,oDACA,yCASA,iDAMA,sFACA,oFAA0D,6PA+DnD,QAASA,kBAAiB,MAUvB,oBATRC,IAAI,CAAJA,IAAI,oBAAGC,uBAAU,CAACC,OAAO,gCACzBC,UAAU,CAAVA,UAAU,0BAAGC,wBAAW,CAACC,SAAS,iBAClCC,OAAO,MAAPA,OAAO,CACPC,QAAQ,MAARA,QAAQ,CACRC,YAAY,MAAZA,YAAY,CACZC,wBAAwB,MAAxBA,wBAAwB,CACxBC,yBAAyB,MAAzBA,yBAAyB,CACzBC,mBAAmB,MAAnBA,mBAAmB,CAChBC,KAAK,uDAER,GAAMC,uBAAsB,CAAGJ,wBAAwB,CACnD,SACEK,KAEE,CACC,CACHL,wBAAwB,EAAIA,wBAAwB,CAACK,KAAK,CAACC,WAAW,CAAC,CACzE,CAAC,CACDC,SAAS,CAEb,GAAMC,wBAAuB,CAAGP,yBAAyB,CACrD,SACEI,KAEE,CACC,CACHJ,yBAAyB,CAACI,KAAK,CAACC,WAAW,CAAC,CAC9C,CAAC,CACDC,SAAS,CAEb,GAAME,mBAAkB,CAAGP,mBAAmB,CAC1C,SACEG,KAEE,CACC,CACHH,mBAAmB,EAAIA,mBAAmB,CAACG,KAAK,CAACC,WAAW,CAAC,CAC/D,CAAC,CACDC,SAAS,CAEb,MACE,8BAAC,6BAAgB,EACf,QAAQ,CAAET,QAAS,CACnB,aAAa,CAAEA,QAAQ,CAAG,GAAG,CAAG,CAAE,CAClC,OAAO,CAAED,OAAQ,CACjB,KAAK,CAAEC,QAAQ,CAAGY,MAAM,CAACZ,QAAQ,CAAGY,MAAM,CAACC,WAAY,6EAEtDC,qBAAQ,CAACC,EAAE,GAAK,KAAK,CACpB,6BAAC,6BAAoB,wBACnB,IAAI,CAAEtB,IAAK,CACX,WAAW,CAAEG,UAAW,CACxB,YAAY,CAAEK,YAAa,CAC3B,QAAQ,CAAED,QAAS,CACnB,8BAA8B,CAAEM,sBAAuB,CACvD,+BAA+B,CAAEI,uBAAwB,CACzD,yBAAyB,CAAEC,kBAAmB,EAC1CN,KAAK,+EACT,CAEF,6BAAC,8BAAqB,wBAAC,IAAI,CAAEZ,IAAK,EAAKY,KAAK,+EAC7C,CACgB,CAEvB,CAEA,GAAMO,OAAM,CAAGI,uBAAU,CAACC,MAAM,CAAC,CAC/BjB,QAAQ,CAAE,CACRkB,IAAI,CAAE,CAAC,CACPC,OAAO,CAAE,GACX,CAAC,CACDN,WAAW,CAAE,CACXK,IAAI,CAAE,CACR,CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["StripeContainer.tsx"],"names":["StripeContainerNative","StripeContainer","keyboardShouldPersistTaps","children","styles","container","StyleSheet","create","flex"],"mappings":"oLAAA,oDAEA,yC,sGAQA,GAAMA,CAAAA,qBAAqB,CAAG,wCAA4B,iBAA5B,CAA9B,CAkBO,QAASC,CAAAA,eAAT,MAGG,IAFRC,CAAAA,yBAEQ,MAFRA,yBAEQ,CADRC,QACQ,MADRA,QACQ,CACR,MACE,8BAAC,qBAAD,EACE,yBAAyB,CAAED,yBAD7B,CAEE,KAAK,CAAEE,MAAM,CAACC,SAFhB,4EAIE,6BAAC,iBAAD,EAAM,KAAK,CAAED,MAAM,CAACC,SAApB,CAA+B,UAAU,CAAE,KAA3C,4EACGF,QADH,CAJF,CADF,CAUD,CAED,GAAMC,CAAAA,MAAM,CAAGE,wBAAWC,MAAX,CAAkB,CAC/BF,SAAS,CAAE,CACTG,IAAI,CAAE,CADG,CADoB,CAAlB,CAAf","sourcesContent":["import React from 'react';\n\nimport {\n requireNativeComponent,\n StyleProp,\n StyleSheet,\n ViewStyle,\n View,\n} from 'react-native';\n\nconst StripeContainerNative = requireNativeComponent<any>('StripeContainer');\n\n/**\n * Stripe Container Component Props\n */\nexport interface Props {\n children: React.ReactElement | React.ReactElement[];\n keyboardShouldPersistTaps?: boolean;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/**\n * StripeContainer Component\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeContainer({\n keyboardShouldPersistTaps,\n children,\n}: Props) {\n return (\n <StripeContainerNative\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n style={styles.container}\n >\n <View style={styles.container} accessible={false}>\n {children}\n </View>\n </StripeContainerNative>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"]}
1
+ {"version":3,"names":["StripeContainerNative","requireNativeComponent","StripeContainer","keyboardShouldPersistTaps","children","styles","container","StyleSheet","create","flex"],"sources":["StripeContainer.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n requireNativeComponent,\n StyleProp,\n StyleSheet,\n ViewStyle,\n View,\n} from 'react-native';\n\nconst StripeContainerNative = requireNativeComponent<any>('StripeContainer');\n\n/**\n * Stripe Container Component Props\n */\nexport interface Props {\n children: React.ReactElement | React.ReactElement[];\n keyboardShouldPersistTaps?: boolean;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/**\n * StripeContainer Component\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeContainer({\n keyboardShouldPersistTaps,\n children,\n}: Props) {\n return (\n <StripeContainerNative\n keyboardShouldPersistTaps={keyboardShouldPersistTaps}\n style={styles.container}\n >\n <View style={styles.container} accessible={false}>\n {children}\n </View>\n </StripeContainerNative>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":"oLAAA,oDAEA,yCAMsB,sGAEtB,GAAMA,sBAAqB,CAAG,GAAAC,mCAAsB,EAAM,iBAAiB,CAAC,CAkBrE,QAASC,gBAAe,MAGrB,IAFRC,0BAAyB,MAAzBA,yBAAyB,CACzBC,QAAQ,MAARA,QAAQ,CAER,MACE,8BAAC,qBAAqB,EACpB,yBAAyB,CAAED,yBAA0B,CACrD,KAAK,CAAEE,MAAM,CAACC,SAAU,4EAExB,6BAAC,iBAAI,EAAC,KAAK,CAAED,MAAM,CAACC,SAAU,CAAC,UAAU,CAAE,KAAM,4EAC9CF,QAAQ,CACJ,CACe,CAE5B,CAEA,GAAMC,OAAM,CAAGE,uBAAU,CAACC,MAAM,CAAC,CAC/BF,SAAS,CAAE,CACTG,IAAI,CAAE,CACR,CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["StripeProvider.tsx"],"names":["EXPO_PARTNER_ID","repository","pjson","appInfo","name","url","version","partnerId","undefined","initStripe","params","extendedParams","NativeStripeSdk","initialise","StripeProvider","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","isAndroid"],"mappings":"8SAAA,qDAEA,2EACA,mCAEA,sE,0/BAEA,GAAMA,CAAAA,eAAe,CAAG,2BAAxB,CASA,GAAMC,CAAAA,UAAe,CAAGC,iBAAMD,UAA9B,CAEA,GAAME,CAAAA,OAAgB,CAAG,CACvBC,IAAI,CAAE,mCAA2BF,iBAAME,IAAjC,SAA+CF,iBAAME,IADpC,CAKvBC,GAAG,CAAEJ,UAAU,CAACI,GAAX,EAAkBJ,UALA,CAMvBK,OAAO,CAAEJ,iBAAMI,OANQ,CAOvBC,SAAS,CAAE,mCAAwBP,eAAxB,CAA0CQ,SAP9B,CAAzB,CAUO,GAAMC,CAAAA,UAAU,oDAAG,UAAOC,MAAP,CAAmD,CAC3E,GAAMC,CAAAA,cAAgC,kBAAQD,MAAR,EAAgBP,OAAO,CAAPA,OAAhB,EAAtC,CACAS,yBAAgBC,UAAhB,CAA2BF,cAA3B,EACD,CAHsB,iBAAVF,CAAAA,UAAU,4CAAhB,C,8BAyBA,QAASK,CAAAA,cAAT,OAQG,IAPRC,CAAAA,QAOQ,OAPRA,QAOQ,CANRC,cAMQ,OANRA,cAMQ,CALRC,kBAKQ,OALRA,kBAKQ,CAJRC,kBAIQ,OAJRA,kBAIQ,CAHRC,eAGQ,OAHRA,eAGQ,CAFRC,SAEQ,OAFRA,SAEQ,CADRC,2BACQ,OADRA,2BACQ,CACR,qBAAU,UAAM,CACd,GAAI,CAACL,cAAL,CAAqB,CACnB,OACD,CACD,GAAIM,kBAAJ,CAAe,CACbV,yBAAgBC,UAAhB,CAA2B,CACzBG,cAAc,CAAdA,cADyB,CAEzBb,OAAO,CAAPA,OAFyB,CAGzBgB,eAAe,CAAfA,eAHyB,CAIzBD,kBAAkB,CAAlBA,kBAJyB,CAKzBE,SAAS,CAATA,SALyB,CAMzBC,2BAA2B,CAA3BA,2BANyB,CAA3B,EAQD,CATD,IASO,CACLT,yBAAgBC,UAAhB,CAA2B,CACzBG,cAAc,CAAdA,cADyB,CAEzBb,OAAO,CAAPA,OAFyB,CAGzBgB,eAAe,CAAfA,eAHyB,CAIzBD,kBAAkB,CAAlBA,kBAJyB,CAKzBD,kBAAkB,CAAlBA,kBALyB,CAMzBG,SAAS,CAATA,SANyB,CAA3B,EAQD,CACF,CAvBD,CAuBG,CACDJ,cADC,CAEDC,kBAFC,CAGDE,eAHC,CAIDD,kBAJC,CAKDE,SALC,CAMDC,2BANC,CAvBH,EAgCA,MAAO,2DAAGN,QAAH,CAAP,CACD","sourcesContent":["import React, { useEffect } from 'react';\n\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport { isAndroid, shouldAttributeExpo } from '../helpers';\nimport type { AppInfo, InitStripeParams, InitialiseParams } from '../types';\nimport pjson from '../../package.json';\n\nconst EXPO_PARTNER_ID = 'pp_partner_JBN7LkABco2yUu';\n\n/**\n * Stripe Provider Component Props\n */\nexport type Props = InitStripeParams & {\n children: React.ReactElement | React.ReactElement[];\n};\n\nconst repository: any = pjson.repository;\n\nconst appInfo: AppInfo = {\n name: shouldAttributeExpo() ? `${pjson.name}/expo` : pjson.name,\n // package.json output installed via npm is a bit different than from yarn\n // the repository field can be an object or string\n // for more context: https://github.com/stripe/stripe-react-native/issues/200\n url: repository.url || repository,\n version: pjson.version,\n partnerId: shouldAttributeExpo() ? EXPO_PARTNER_ID : undefined,\n};\n\nexport const initStripe = async (params: InitStripeParams): Promise<void> => {\n const extendedParams: InitialiseParams = { ...params, appInfo };\n NativeStripeSdk.initialise(extendedParams);\n};\n\n/**\n * StripeProvider Component\n *\n * @example\n * ```ts\n * <StripeProvider\n * publishableKey=\"_publishableKey\"\n * merchantIdentifier=\"merchant.com.stripe.react.native\"\n * threeDSecureParams={{\n * backgroundColor: \"#FFF\",\n * timeout: 5,\n * }}\n * >\n * <App />\n * </StripeProvider>\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeProvider({\n children,\n publishableKey,\n merchantIdentifier,\n threeDSecureParams,\n stripeAccountId,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n}: Props) {\n useEffect(() => {\n if (!publishableKey) {\n return;\n }\n if (isAndroid) {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n });\n } else {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n merchantIdentifier,\n urlScheme,\n });\n }\n }, [\n publishableKey,\n merchantIdentifier,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n ]);\n\n return <>{children}</>;\n}\n"]}
1
+ {"version":3,"names":["EXPO_PARTNER_ID","repository","pjson","appInfo","name","shouldAttributeExpo","url","version","partnerId","undefined","initStripe","params","extendedParams","NativeStripeSdk","initialise","StripeProvider","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","useEffect","isAndroid"],"sources":["StripeProvider.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport { isAndroid, shouldAttributeExpo } from '../helpers';\nimport type { AppInfo, InitStripeParams, InitialiseParams } from '../types';\nimport pjson from '../../package.json';\n\nconst EXPO_PARTNER_ID = 'pp_partner_JBN7LkABco2yUu';\n\n/**\n * Stripe Provider Component Props\n */\nexport type Props = InitStripeParams & {\n children: React.ReactElement | React.ReactElement[];\n};\n\nconst repository: any = pjson.repository;\n\nconst appInfo: AppInfo = {\n name: shouldAttributeExpo() ? `${pjson.name}/expo` : pjson.name,\n // package.json output installed via npm is a bit different than from yarn\n // the repository field can be an object or string\n // for more context: https://github.com/stripe/stripe-react-native/issues/200\n url: repository.url || repository,\n version: pjson.version,\n partnerId: shouldAttributeExpo() ? EXPO_PARTNER_ID : undefined,\n};\n\nexport const initStripe = async (params: InitStripeParams): Promise<void> => {\n const extendedParams: InitialiseParams = { ...params, appInfo };\n NativeStripeSdk.initialise(extendedParams);\n};\n\n/**\n * StripeProvider Component\n *\n * @example\n * ```ts\n * <StripeProvider\n * publishableKey=\"_publishableKey\"\n * merchantIdentifier=\"merchant.com.stripe.react.native\"\n * threeDSecureParams={{\n * backgroundColor: \"#FFF\",\n * timeout: 5,\n * }}\n * >\n * <App />\n * </StripeProvider>\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeProvider({\n children,\n publishableKey,\n merchantIdentifier,\n threeDSecureParams,\n stripeAccountId,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n}: Props) {\n useEffect(() => {\n if (!publishableKey) {\n return;\n }\n if (isAndroid) {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n });\n } else {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n merchantIdentifier,\n urlScheme,\n });\n }\n }, [\n publishableKey,\n merchantIdentifier,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n ]);\n\n return <>{children}</>;\n}\n"],"mappings":"8SAAA,qDAEA,2EACA,mCAEA,sEAAuC,0/BAEvC,GAAMA,gBAAe,CAAG,2BAA2B,CASnD,GAAMC,WAAe,CAAGC,gBAAK,CAACD,UAAU,CAExC,GAAME,QAAgB,CAAG,CACvBC,IAAI,CAAE,GAAAC,4BAAmB,GAAE,CAAMH,gBAAK,CAACE,IAAI,SAAUF,gBAAK,CAACE,IAAI,CAI/DE,GAAG,CAAEL,UAAU,CAACK,GAAG,EAAIL,UAAU,CACjCM,OAAO,CAAEL,gBAAK,CAACK,OAAO,CACtBC,SAAS,CAAE,GAAAH,4BAAmB,GAAE,CAAGL,eAAe,CAAGS,SACvD,CAAC,CAEM,GAAMC,WAAU,oDAAG,UAAOC,MAAwB,CAAoB,CAC3E,GAAMC,eAAgC,kBAAQD,MAAM,EAAER,OAAO,CAAPA,OAAO,EAAE,CAC/DU,wBAAe,CAACC,UAAU,CAACF,cAAc,CAAC,CAC5C,CAAC,iBAHYF,WAAU,4CAGtB,CAAC,8BAsBK,QAASK,eAAc,OAQpB,IAPRC,SAAQ,OAARA,QAAQ,CACRC,cAAc,OAAdA,cAAc,CACdC,kBAAkB,OAAlBA,kBAAkB,CAClBC,kBAAkB,OAAlBA,kBAAkB,CAClBC,eAAe,OAAfA,eAAe,CACfC,SAAS,OAATA,SAAS,CACTC,2BAA2B,OAA3BA,2BAA2B,CAE3B,GAAAC,gBAAS,EAAC,UAAM,CACd,GAAI,CAACN,cAAc,CAAE,CACnB,OACF,CACA,GAAIO,kBAAS,CAAE,CACbX,wBAAe,CAACC,UAAU,CAAC,CACzBG,cAAc,CAAdA,cAAc,CACdd,OAAO,CAAPA,OAAO,CACPiB,eAAe,CAAfA,eAAe,CACfD,kBAAkB,CAAlBA,kBAAkB,CAClBE,SAAS,CAATA,SAAS,CACTC,2BAA2B,CAA3BA,2BACF,CAAC,CAAC,CACJ,CAAC,IAAM,CACLT,wBAAe,CAACC,UAAU,CAAC,CACzBG,cAAc,CAAdA,cAAc,CACdd,OAAO,CAAPA,OAAO,CACPiB,eAAe,CAAfA,eAAe,CACfD,kBAAkB,CAAlBA,kBAAkB,CAClBD,kBAAkB,CAAlBA,kBAAkB,CAClBG,SAAS,CAATA,SACF,CAAC,CAAC,CACJ,CACF,CAAC,CAAE,CACDJ,cAAc,CACdC,kBAAkB,CAClBE,eAAe,CACfD,kBAAkB,CAClBE,SAAS,CACTC,2BAA2B,CAC5B,CAAC,CAEF,MAAO,2DAAGN,QAAQ,CAAI,CACxB"}
@@ -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.updateApplePaySummaryItems=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.resetPaymentSheetCustomer=exports.presentPaymentSheet=exports.presentGooglePay=exports.presentApplePay=exports.openPlatformPaySetup=exports.openApplePaySetup=exports.isPlatformPaySupported=exports.isGooglePaySupported=exports.isCardInWallet=exports.isApplePaySupported=exports.initPaymentSheet=exports.initGooglePay=exports.handleURLCallback=exports.handleNextAction=exports.dismissPlatformPay=exports.createTokenForCVCUpdate=exports.createToken=exports.createPlatformPayPaymentMethod=exports.createPaymentMethod=exports.createGooglePayPaymentMethod=exports.confirmSetupIntent=exports.confirmPlatformPaySetupIntent=exports.confirmPlatformPayPayment=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.confirmApplePayPayment=exports.collectFinancialConnectionsAccounts=exports.collectBankAccountToken=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=exports.canAddCardToWallet=exports.Constants=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _types=require("./types");var _reactNative=require("react-native");var APPLE_PAY_NOT_SUPPORTED_MESSAGE='Apple pay is not supported on this device';var createPaymentMethod=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.createPaymentMethod(params,options),paymentMethod=_yield$NativeStripeSd.paymentMethod,error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createPaymentMethod(_x){return _ref.apply(this,arguments);};}();exports.createPaymentMethod=createPaymentMethod;var createToken=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){var _params$country;if(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber){return{error:_Errors.MissingRoutingNumber};}try{var _yield$NativeStripeSd2=yield _NativeStripeSdk.default.createToken(params),token=_yield$NativeStripeSd2.token,error=_yield$NativeStripeSd2.error;if(error){return{error:error};}return{token:token};}catch(error){return{error:error};}});return function createToken(_x2){return _ref2.apply(this,arguments);};}();exports.createToken=createToken;var retrievePaymentIntent=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd3=yield _NativeStripeSdk.default.retrievePaymentIntent(clientSecret),paymentIntent=_yield$NativeStripeSd3.paymentIntent,error=_yield$NativeStripeSd3.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function retrievePaymentIntent(_x3){return _ref3.apply(this,arguments);};}();exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd4=yield _NativeStripeSdk.default.retrieveSetupIntent(clientSecret),setupIntent=_yield$NativeStripeSd4.setupIntent,error=_yield$NativeStripeSd4.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function retrieveSetupIntent(_x4){return _ref4.apply(this,arguments);};}();exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd5=yield _NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,params,options),paymentIntent=_yield$NativeStripeSd5.paymentIntent,error=_yield$NativeStripeSd5.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPayment(_x5,_x6){return _ref5.apply(this,arguments);};}();exports.confirmPayment=confirmPayment;var isApplePaySupported=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(){return _helpers.isiOS&&(yield _NativeStripeSdk.default.isApplePaySupported());});return function isApplePaySupported(){return _ref6.apply(this,arguments);};}();exports.isApplePaySupported=isApplePaySupported;var presentApplePay=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(params){if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{var _yield$NativeStripeSd6=yield _NativeStripeSdk.default.presentApplePay(params),paymentMethod=_yield$NativeStripeSd6.paymentMethod,error=_yield$NativeStripeSd6.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function presentApplePay(_x7){return _ref7.apply(this,arguments);};}();exports.presentApplePay=presentApplePay;var updateApplePaySummaryItems=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(summaryItems){var errorAddressFields=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{yield _NativeStripeSdk.default.updateApplePaySummaryItems(summaryItems,errorAddressFields);return{};}catch(error){return{error:error};}});return function updateApplePaySummaryItems(_x8){return _ref8.apply(this,arguments);};}();exports.updateApplePaySummaryItems=updateApplePaySummaryItems;var confirmApplePayPayment=function(){var _ref9=(0,_asyncToGenerator2.default)(function*(clientSecret){if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{yield _NativeStripeSdk.default.confirmApplePayPayment(clientSecret);return{};}catch(error){return{error:error};}});return function confirmApplePayPayment(_x9){return _ref9.apply(this,arguments);};}();exports.confirmApplePayPayment=confirmApplePayPayment;var handleNextAction=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){try{var _ref11=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret),paymentIntent=_ref11.paymentIntent,error=_ref11.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextAction(_x10,_x11){return _ref10.apply(this,arguments);};}();exports.handleNextAction=handleNextAction;var confirmSetupIntent=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd7=yield _NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,params,options),setupIntent=_yield$NativeStripeSd7.setupIntent,error=_yield$NativeStripeSd7.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmSetupIntent(_x12,_x13){return _ref12.apply(this,arguments);};}();exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function(){var _ref13=(0,_asyncToGenerator2.default)(function*(cvc){try{var _yield$NativeStripeSd8=yield _NativeStripeSdk.default.createTokenForCVCUpdate(cvc),tokenId=_yield$NativeStripeSd8.tokenId,error=_yield$NativeStripeSd8.error;if(error){return{error:error};}return{tokenId:tokenId};}catch(error){return{error:error};}});return function createTokenForCVCUpdate(_x14){return _ref13.apply(this,arguments);};}();exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function(){var _ref14=(0,_asyncToGenerator2.default)(function*(url){var stripeHandled=yield _NativeStripeSdk.default.handleURLCallback(url);return stripeHandled;});return function handleURLCallback(_x15){return _ref14.apply(this,arguments);};}();exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function(){var _ref15=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref16=yield _NativeStripeSdk.default.verifyMicrodeposits(true,clientSecret,params),paymentIntent=_ref16.paymentIntent,error=_ref16.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForPayment(_x16,_x17){return _ref15.apply(this,arguments);};}();exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function(){var _ref17=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref18=yield _NativeStripeSdk.default.verifyMicrodeposits(false,clientSecret,params),setupIntent=_ref18.setupIntent,error=_ref18.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForSetup(_x18,_x19){return _ref17.apply(this,arguments);};}();exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var initPaymentSheet=function(){var _ref19=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd9=yield _NativeStripeSdk.default.initPaymentSheet(params),paymentOption=_yield$NativeStripeSd9.paymentOption,error=_yield$NativeStripeSd9.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function initPaymentSheet(_x20){return _ref19.apply(this,arguments);};}();exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function(){var _ref20=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd10=yield _NativeStripeSdk.default.presentPaymentSheet(),paymentOption=_yield$NativeStripeSd10.paymentOption,error=_yield$NativeStripeSd10.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function presentPaymentSheet(){return _ref20.apply(this,arguments);};}();exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function(){var _ref21=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd11=yield _NativeStripeSdk.default.confirmPaymentSheetPayment(),error=_yield$NativeStripeSd11.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function confirmPaymentSheetPayment(){return _ref21.apply(this,arguments);};}();exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var resetPaymentSheetCustomer=function(){var _ref22=(0,_asyncToGenerator2.default)(function*(){return yield _NativeStripeSdk.default.resetPaymentSheetCustomer();});return function resetPaymentSheetCustomer(){return _ref22.apply(this,arguments);};}();exports.resetPaymentSheetCustomer=resetPaymentSheetCustomer;var isGooglePaySupported=function(){var _ref23=(0,_asyncToGenerator2.default)(function*(params){return _helpers.isAndroid&&(yield _NativeStripeSdk.default.isGooglePaySupported(params!=null?params:{}));});return function isGooglePaySupported(_x21){return _ref23.apply(this,arguments);};}();exports.isGooglePaySupported=isGooglePaySupported;var initGooglePay=function(){var _ref24=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd12=yield _NativeStripeSdk.default.initGooglePay(params),error=_yield$NativeStripeSd12.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initGooglePay(_x22){return _ref24.apply(this,arguments);};}();exports.initGooglePay=initGooglePay;var presentGooglePay=function(){var _ref25=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd13=yield _NativeStripeSdk.default.presentGooglePay(params),error=_yield$NativeStripeSd13.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function presentGooglePay(_x23){return _ref25.apply(this,arguments);};}();exports.presentGooglePay=presentGooglePay;var createGooglePayPaymentMethod=function(){var _ref26=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd14=yield _NativeStripeSdk.default.createGooglePayPaymentMethod(params),error=_yield$NativeStripeSd14.error,paymentMethod=_yield$NativeStripeSd14.paymentMethod;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createGooglePayPaymentMethod(_x24){return _ref26.apply(this,arguments);};}();exports.createGooglePayPaymentMethod=createGooglePayPaymentMethod;var openApplePaySetup=function(){var _ref27=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd15=yield _NativeStripeSdk.default.openApplePaySetup(),error=_yield$NativeStripeSd15.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function openApplePaySetup(){return _ref27.apply(this,arguments);};}();exports.openApplePaySetup=openApplePaySetup;var collectBankAccountForPayment=function(){var _ref28=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref29=yield _NativeStripeSdk.default.collectBankAccount(true,clientSecret,params),paymentIntent=_ref29.paymentIntent,error=_ref29.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForPayment(_x25,_x26){return _ref28.apply(this,arguments);};}();exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function(){var _ref30=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref31=yield _NativeStripeSdk.default.collectBankAccount(false,clientSecret,params),setupIntent=_ref31.setupIntent,error=_ref31.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForSetup(_x27,_x28){return _ref30.apply(this,arguments);};}();exports.collectBankAccountForSetup=collectBankAccountForSetup;var collectBankAccountToken=function(){var _ref32=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd16=yield _NativeStripeSdk.default.collectBankAccountToken(clientSecret),session=_yield$NativeStripeSd16.session,token=_yield$NativeStripeSd16.token,error=_yield$NativeStripeSd16.error;if(error){return{error:error};}return{session:session,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountToken(_x29){return _ref32.apply(this,arguments);};}();exports.collectBankAccountToken=collectBankAccountToken;var collectFinancialConnectionsAccounts=function(){var _ref33=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd17=yield _NativeStripeSdk.default.collectFinancialConnectionsAccounts(clientSecret),session=_yield$NativeStripeSd17.session,error=_yield$NativeStripeSd17.error;if(error){return{error:error};}return{session:session};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectFinancialConnectionsAccounts(_x30){return _ref33.apply(this,arguments);};}();exports.collectFinancialConnectionsAccounts=collectFinancialConnectionsAccounts;var canAddCardToWallet=function(){var _ref34=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd18=yield _NativeStripeSdk.default.canAddCardToWallet(params),canAddCard=_yield$NativeStripeSd18.canAddCard,details=_yield$NativeStripeSd18.details,error=_yield$NativeStripeSd18.error;if(error){return{error:error};}return{canAddCard:canAddCard,details:details};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function canAddCardToWallet(_x31){return _ref34.apply(this,arguments);};}();exports.canAddCardToWallet=canAddCardToWallet;var isCardInWallet=function(){var _ref35=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd19=yield _NativeStripeSdk.default.isCardInWallet(params),isInWallet=_yield$NativeStripeSd19.isInWallet,token=_yield$NativeStripeSd19.token,error=_yield$NativeStripeSd19.error;if(error){return{error:error};}return{isInWallet:isInWallet,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function isCardInWallet(_x32){return _ref35.apply(this,arguments);};}();exports.isCardInWallet=isCardInWallet;var Constants=_NativeStripeSdk.default.getConstants();exports.Constants=Constants;var isPlatformPaySupported=function(){var _ref36=(0,_asyncToGenerator2.default)(function*(params){return yield _NativeStripeSdk.default.isPlatformPaySupported(params!=null?params:{});});return function isPlatformPaySupported(_x33){return _ref36.apply(this,arguments);};}();exports.isPlatformPaySupported=isPlatformPaySupported;var confirmPlatformPaySetupIntent=function(){var _ref37=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref38=yield _NativeStripeSdk.default.confirmPlatformPay(clientSecret,params,false),error=_ref38.error,setupIntent=_ref38.setupIntent;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmPlatformPaySetupIntent(_x34,_x35){return _ref37.apply(this,arguments);};}();exports.confirmPlatformPaySetupIntent=confirmPlatformPaySetupIntent;var confirmPlatformPayPayment=function(){var _ref39=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref40=yield _NativeStripeSdk.default.confirmPlatformPay(clientSecret,params,true),error=_ref40.error,paymentIntent=_ref40.paymentIntent;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPlatformPayPayment(_x36,_x37){return _ref39.apply(this,arguments);};}();exports.confirmPlatformPayPayment=confirmPlatformPayPayment;var dismissPlatformPay=function(){var _ref41=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS!=='ios'){return false;}try{var didDismiss=yield _NativeStripeSdk.default.dismissPlatformPay();return didDismiss;}catch(error){return false;}});return function dismissPlatformPay(){return _ref41.apply(this,arguments);};}();exports.dismissPlatformPay=dismissPlatformPay;var createPlatformPayPaymentMethod=function(){var _ref42=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd20=yield _NativeStripeSdk.default.createPlatformPayPaymentMethod(params),error=_yield$NativeStripeSd20.error,paymentMethod=_yield$NativeStripeSd20.paymentMethod,token=_yield$NativeStripeSd20.token;if(error){return{error:error};}return{paymentMethod:paymentMethod,token:token};}catch(error){return{error:error};}});return function createPlatformPayPaymentMethod(_x38){return _ref42.apply(this,arguments);};}();exports.createPlatformPayPaymentMethod=createPlatformPayPaymentMethod;var updatePlatformPaySheet=function(){var _ref43=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS!=='ios'){return{};}try{yield _NativeStripeSdk.default.updatePlatformPaySheet(params.applePay.cartItems,params.applePay.shippingMethods,params.applePay.errors);return{};}catch(error){return{error:error};}});return function updatePlatformPaySheet(_x39){return _ref43.apply(this,arguments);};}();exports.updatePlatformPaySheet=updatePlatformPaySheet;var openPlatformPaySetup=function(){var _ref44=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS==='ios'){yield _NativeStripeSdk.default.openApplePaySetup();}});return function openPlatformPaySetup(){return _ref44.apply(this,arguments);};}();exports.openPlatformPaySetup=openPlatformPaySetup;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updatePlatformPaySheet=exports.updateApplePaySummaryItems=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.resetPaymentSheetCustomer=exports.presentPaymentSheet=exports.presentGooglePay=exports.presentApplePay=exports.openPlatformPaySetup=exports.openApplePaySetup=exports.isPlatformPaySupported=exports.isGooglePaySupported=exports.isCardInWallet=exports.isApplePaySupported=exports.initPaymentSheet=exports.initGooglePay=exports.handleURLCallback=exports.handleNextAction=exports.dismissPlatformPay=exports.createTokenForCVCUpdate=exports.createToken=exports.createPlatformPayToken=exports.createPlatformPayPaymentMethod=exports.createPaymentMethod=exports.createGooglePayPaymentMethod=exports.confirmSetupIntent=exports.confirmPlatformPaySetupIntent=exports.confirmPlatformPayPayment=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.confirmApplePayPayment=exports.collectFinancialConnectionsAccounts=exports.collectBankAccountToken=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=exports.canAddCardToWallet=exports.Constants=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _types=require("./types");var _reactNative=require("react-native");var APPLE_PAY_NOT_SUPPORTED_MESSAGE='Apple pay is not supported on this device';var createPaymentMethod=function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};try{var _yield$NativeStripeSd=yield _NativeStripeSdk.default.createPaymentMethod(params,options),paymentMethod=_yield$NativeStripeSd.paymentMethod,error=_yield$NativeStripeSd.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createPaymentMethod(_x){return _ref.apply(this,arguments);};}();exports.createPaymentMethod=createPaymentMethod;var createToken=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){var _params$country;if(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber){return{error:_Errors.MissingRoutingNumber};}try{var _yield$NativeStripeSd2=yield _NativeStripeSdk.default.createToken(params),token=_yield$NativeStripeSd2.token,error=_yield$NativeStripeSd2.error;if(error){return{error:error};}return{token:token};}catch(error){return{error:error};}});return function createToken(_x2){return _ref2.apply(this,arguments);};}();exports.createToken=createToken;var retrievePaymentIntent=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd3=yield _NativeStripeSdk.default.retrievePaymentIntent(clientSecret),paymentIntent=_yield$NativeStripeSd3.paymentIntent,error=_yield$NativeStripeSd3.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function retrievePaymentIntent(_x3){return _ref3.apply(this,arguments);};}();exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd4=yield _NativeStripeSdk.default.retrieveSetupIntent(clientSecret),setupIntent=_yield$NativeStripeSd4.setupIntent,error=_yield$NativeStripeSd4.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function retrieveSetupIntent(_x4){return _ref4.apply(this,arguments);};}();exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd5=yield _NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,params,options),paymentIntent=_yield$NativeStripeSd5.paymentIntent,error=_yield$NativeStripeSd5.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPayment(_x5,_x6){return _ref5.apply(this,arguments);};}();exports.confirmPayment=confirmPayment;var isApplePaySupported=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(){return _helpers.isiOS&&(yield _NativeStripeSdk.default.isApplePaySupported());});return function isApplePaySupported(){return _ref6.apply(this,arguments);};}();exports.isApplePaySupported=isApplePaySupported;var presentApplePay=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(params){if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{var _yield$NativeStripeSd6=yield _NativeStripeSdk.default.presentApplePay(params),paymentMethod=_yield$NativeStripeSd6.paymentMethod,error=_yield$NativeStripeSd6.error;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function presentApplePay(_x7){return _ref7.apply(this,arguments);};}();exports.presentApplePay=presentApplePay;var updateApplePaySummaryItems=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(summaryItems){var errorAddressFields=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{yield _NativeStripeSdk.default.updateApplePaySummaryItems(summaryItems,errorAddressFields);return{};}catch(error){return{error:error};}});return function updateApplePaySummaryItems(_x8){return _ref8.apply(this,arguments);};}();exports.updateApplePaySummaryItems=updateApplePaySummaryItems;var confirmApplePayPayment=function(){var _ref9=(0,_asyncToGenerator2.default)(function*(clientSecret){if(!(yield _NativeStripeSdk.default.isApplePaySupported())){return{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}};}try{yield _NativeStripeSdk.default.confirmApplePayPayment(clientSecret);return{};}catch(error){return{error:error};}});return function confirmApplePayPayment(_x9){return _ref9.apply(this,arguments);};}();exports.confirmApplePayPayment=confirmApplePayPayment;var handleNextAction=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,returnURL){try{var _ref11=_reactNative.Platform.OS==='ios'?yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret,returnURL!=null?returnURL:null):yield _NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret),paymentIntent=_ref11.paymentIntent,error=_ref11.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function handleNextAction(_x10,_x11){return _ref10.apply(this,arguments);};}();exports.handleNextAction=handleNextAction;var confirmSetupIntent=function(){var _ref12=(0,_asyncToGenerator2.default)(function*(paymentIntentClientSecret,params){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};try{var _yield$NativeStripeSd7=yield _NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,params,options),setupIntent=_yield$NativeStripeSd7.setupIntent,error=_yield$NativeStripeSd7.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmSetupIntent(_x12,_x13){return _ref12.apply(this,arguments);};}();exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function(){var _ref13=(0,_asyncToGenerator2.default)(function*(cvc){try{var _yield$NativeStripeSd8=yield _NativeStripeSdk.default.createTokenForCVCUpdate(cvc),tokenId=_yield$NativeStripeSd8.tokenId,error=_yield$NativeStripeSd8.error;if(error){return{error:error};}return{tokenId:tokenId};}catch(error){return{error:error};}});return function createTokenForCVCUpdate(_x14){return _ref13.apply(this,arguments);};}();exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function(){var _ref14=(0,_asyncToGenerator2.default)(function*(url){var stripeHandled=yield _NativeStripeSdk.default.handleURLCallback(url);return stripeHandled;});return function handleURLCallback(_x15){return _ref14.apply(this,arguments);};}();exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function(){var _ref15=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref16=yield _NativeStripeSdk.default.verifyMicrodeposits(true,clientSecret,params),paymentIntent=_ref16.paymentIntent,error=_ref16.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForPayment(_x16,_x17){return _ref15.apply(this,arguments);};}();exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function(){var _ref17=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref18=yield _NativeStripeSdk.default.verifyMicrodeposits(false,clientSecret,params),setupIntent=_ref18.setupIntent,error=_ref18.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function verifyMicrodepositsForSetup(_x18,_x19){return _ref17.apply(this,arguments);};}();exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var initPaymentSheet=function(){var _ref19=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd9=yield _NativeStripeSdk.default.initPaymentSheet(params),paymentOption=_yield$NativeStripeSd9.paymentOption,error=_yield$NativeStripeSd9.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function initPaymentSheet(_x20){return _ref19.apply(this,arguments);};}();exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function(){var _ref20=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd10=yield _NativeStripeSdk.default.presentPaymentSheet(),paymentOption=_yield$NativeStripeSd10.paymentOption,error=_yield$NativeStripeSd10.error;if(error){return{error:error};}return{paymentOption:paymentOption};}catch(error){return{error:error};}});return function presentPaymentSheet(){return _ref20.apply(this,arguments);};}();exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function(){var _ref21=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd11=yield _NativeStripeSdk.default.confirmPaymentSheetPayment(),error=_yield$NativeStripeSd11.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function confirmPaymentSheetPayment(){return _ref21.apply(this,arguments);};}();exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var resetPaymentSheetCustomer=function(){var _ref22=(0,_asyncToGenerator2.default)(function*(){return yield _NativeStripeSdk.default.resetPaymentSheetCustomer();});return function resetPaymentSheetCustomer(){return _ref22.apply(this,arguments);};}();exports.resetPaymentSheetCustomer=resetPaymentSheetCustomer;var isGooglePaySupported=function(){var _ref23=(0,_asyncToGenerator2.default)(function*(params){return _helpers.isAndroid&&(yield _NativeStripeSdk.default.isGooglePaySupported(params!=null?params:{}));});return function isGooglePaySupported(_x21){return _ref23.apply(this,arguments);};}();exports.isGooglePaySupported=isGooglePaySupported;var initGooglePay=function(){var _ref24=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd12=yield _NativeStripeSdk.default.initGooglePay(params),error=_yield$NativeStripeSd12.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function initGooglePay(_x22){return _ref24.apply(this,arguments);};}();exports.initGooglePay=initGooglePay;var presentGooglePay=function(){var _ref25=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd13=yield _NativeStripeSdk.default.presentGooglePay(params),error=_yield$NativeStripeSd13.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function presentGooglePay(_x23){return _ref25.apply(this,arguments);};}();exports.presentGooglePay=presentGooglePay;var createGooglePayPaymentMethod=function(){var _ref26=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd14=yield _NativeStripeSdk.default.createGooglePayPaymentMethod(params),error=_yield$NativeStripeSd14.error,paymentMethod=_yield$NativeStripeSd14.paymentMethod;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createGooglePayPaymentMethod(_x24){return _ref26.apply(this,arguments);};}();exports.createGooglePayPaymentMethod=createGooglePayPaymentMethod;var openApplePaySetup=function(){var _ref27=(0,_asyncToGenerator2.default)(function*(){try{var _yield$NativeStripeSd15=yield _NativeStripeSdk.default.openApplePaySetup(),error=_yield$NativeStripeSd15.error;if(error){return{error:error};}return{};}catch(error){return{error:error};}});return function openApplePaySetup(){return _ref27.apply(this,arguments);};}();exports.openApplePaySetup=openApplePaySetup;var collectBankAccountForPayment=function(){var _ref28=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref29=yield _NativeStripeSdk.default.collectBankAccount(true,clientSecret,params),paymentIntent=_ref29.paymentIntent,error=_ref29.error;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForPayment(_x25,_x26){return _ref28.apply(this,arguments);};}();exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function(){var _ref30=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref31=yield _NativeStripeSdk.default.collectBankAccount(false,clientSecret,params),setupIntent=_ref31.setupIntent,error=_ref31.error;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountForSetup(_x27,_x28){return _ref30.apply(this,arguments);};}();exports.collectBankAccountForSetup=collectBankAccountForSetup;var collectBankAccountToken=function(){var _ref32=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd16=yield _NativeStripeSdk.default.collectBankAccountToken(clientSecret),session=_yield$NativeStripeSd16.session,token=_yield$NativeStripeSd16.token,error=_yield$NativeStripeSd16.error;if(error){return{error:error};}return{session:session,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectBankAccountToken(_x29){return _ref32.apply(this,arguments);};}();exports.collectBankAccountToken=collectBankAccountToken;var collectFinancialConnectionsAccounts=function(){var _ref33=(0,_asyncToGenerator2.default)(function*(clientSecret){try{var _yield$NativeStripeSd17=yield _NativeStripeSdk.default.collectFinancialConnectionsAccounts(clientSecret),session=_yield$NativeStripeSd17.session,error=_yield$NativeStripeSd17.error;if(error){return{error:error};}return{session:session};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function collectFinancialConnectionsAccounts(_x30){return _ref33.apply(this,arguments);};}();exports.collectFinancialConnectionsAccounts=collectFinancialConnectionsAccounts;var canAddCardToWallet=function(){var _ref34=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd18=yield _NativeStripeSdk.default.canAddCardToWallet(params),canAddCard=_yield$NativeStripeSd18.canAddCard,details=_yield$NativeStripeSd18.details,error=_yield$NativeStripeSd18.error;if(error){return{error:error};}return{canAddCard:canAddCard,details:details};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function canAddCardToWallet(_x31){return _ref34.apply(this,arguments);};}();exports.canAddCardToWallet=canAddCardToWallet;var isCardInWallet=function(){var _ref35=(0,_asyncToGenerator2.default)(function*(params){try{var _yield$NativeStripeSd19=yield _NativeStripeSdk.default.isCardInWallet(params),isInWallet=_yield$NativeStripeSd19.isInWallet,token=_yield$NativeStripeSd19.token,error=_yield$NativeStripeSd19.error;if(error){return{error:error};}return{isInWallet:isInWallet,token:token};}catch(error){return{error:(0,_helpers.createError)(error)};}});return function isCardInWallet(_x32){return _ref35.apply(this,arguments);};}();exports.isCardInWallet=isCardInWallet;var Constants=_NativeStripeSdk.default.getConstants();exports.Constants=Constants;var isPlatformPaySupported=function(){var _ref36=(0,_asyncToGenerator2.default)(function*(params){return yield _NativeStripeSdk.default.isPlatformPaySupported(params!=null?params:{});});return function isPlatformPaySupported(_x33){return _ref36.apply(this,arguments);};}();exports.isPlatformPaySupported=isPlatformPaySupported;var confirmPlatformPaySetupIntent=function(){var _ref37=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref38=yield _NativeStripeSdk.default.confirmPlatformPay(clientSecret,params,false),error=_ref38.error,setupIntent=_ref38.setupIntent;if(error){return{error:error};}return{setupIntent:setupIntent};}catch(error){return{error:error};}});return function confirmPlatformPaySetupIntent(_x34,_x35){return _ref37.apply(this,arguments);};}();exports.confirmPlatformPaySetupIntent=confirmPlatformPaySetupIntent;var confirmPlatformPayPayment=function(){var _ref39=(0,_asyncToGenerator2.default)(function*(clientSecret,params){try{var _ref40=yield _NativeStripeSdk.default.confirmPlatformPay(clientSecret,params,true),error=_ref40.error,paymentIntent=_ref40.paymentIntent;if(error){return{error:error};}return{paymentIntent:paymentIntent};}catch(error){return{error:error};}});return function confirmPlatformPayPayment(_x36,_x37){return _ref39.apply(this,arguments);};}();exports.confirmPlatformPayPayment=confirmPlatformPayPayment;var dismissPlatformPay=function(){var _ref41=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS!=='ios'){return false;}try{var didDismiss=yield _NativeStripeSdk.default.dismissPlatformPay();return didDismiss;}catch(error){return false;}});return function dismissPlatformPay(){return _ref41.apply(this,arguments);};}();exports.dismissPlatformPay=dismissPlatformPay;var createPlatformPayPaymentMethod=function(){var _ref42=(0,_asyncToGenerator2.default)(function*(params){try{var _ref43=yield _NativeStripeSdk.default.createPlatformPayPaymentMethod(params,false),error=_ref43.error,paymentMethod=_ref43.paymentMethod;if(error){return{error:error};}return{paymentMethod:paymentMethod};}catch(error){return{error:error};}});return function createPlatformPayPaymentMethod(_x38){return _ref42.apply(this,arguments);};}();exports.createPlatformPayPaymentMethod=createPlatformPayPaymentMethod;var createPlatformPayToken=function(){var _ref44=(0,_asyncToGenerator2.default)(function*(params){try{var _ref45=yield _NativeStripeSdk.default.createPlatformPayPaymentMethod(params,true),error=_ref45.error,token=_ref45.token;if(error){return{error:error};}return{token:token};}catch(error){return{error:error};}});return function createPlatformPayToken(_x39){return _ref44.apply(this,arguments);};}();exports.createPlatformPayToken=createPlatformPayToken;var updatePlatformPaySheet=function(){var _ref46=(0,_asyncToGenerator2.default)(function*(params){if(_reactNative.Platform.OS!=='ios'){return{};}try{yield _NativeStripeSdk.default.updatePlatformPaySheet(params.applePay.cartItems,params.applePay.shippingMethods,params.applePay.errors);return{};}catch(error){return{error:error};}});return function updatePlatformPaySheet(_x40){return _ref46.apply(this,arguments);};}();exports.updatePlatformPaySheet=updatePlatformPaySheet;var openPlatformPaySetup=function(){var _ref47=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS==='ios'){yield _NativeStripeSdk.default.openApplePaySetup();}});return function openPlatformPaySetup(){return _ref47.apply(this,arguments);};}();exports.openPlatformPaySetup=openPlatformPaySetup;
2
2
  //# sourceMappingURL=functions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["functions.ts"],"names":["APPLE_PAY_NOT_SUPPORTED_MESSAGE","createPaymentMethod","params","options","NativeStripeSdk","paymentMethod","error","createToken","type","country","toLowerCase","routingNumber","MissingRoutingNumber","token","retrievePaymentIntent","clientSecret","paymentIntent","retrieveSetupIntent","setupIntent","confirmPayment","paymentIntentClientSecret","isApplePaySupported","isiOS","presentApplePay","code","ApplePayError","Canceled","message","updateApplePaySummaryItems","summaryItems","errorAddressFields","confirmApplePayPayment","handleNextAction","returnURL","Platform","OS","confirmSetupIntent","createTokenForCVCUpdate","cvc","tokenId","handleURLCallback","url","stripeHandled","verifyMicrodepositsForPayment","verifyMicrodeposits","verifyMicrodepositsForSetup","initPaymentSheet","paymentOption","presentPaymentSheet","confirmPaymentSheetPayment","resetPaymentSheetCustomer","isGooglePaySupported","isAndroid","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","openApplePaySetup","collectBankAccountForPayment","collectBankAccount","collectBankAccountForSetup","collectBankAccountToken","session","collectFinancialConnectionsAccounts","canAddCardToWallet","canAddCard","details","isCardInWallet","isInWallet","Constants","getConstants","isPlatformPaySupported","confirmPlatformPaySetupIntent","confirmPlatformPay","confirmPlatformPayPayment","dismissPlatformPay","didDismiss","createPlatformPayPaymentMethod","updatePlatformPaySheet","applePay","cartItems","shippingMethods","errors","openPlatformPaySetup"],"mappings":"s2CAAA,kCACA,sCACA,0EACA,8BAsCA,yCAEA,GAAMA,CAAAA,+BAA+B,CACnC,2CADF,CAGO,GAAMC,CAAAA,mBAAmB,oDAAG,UACjCC,MADiC,CAGM,IADvCC,CAAAA,OACuC,2DADA,EACA,CACvC,GAAI,CACF,+BAAuCC,0BAAgBH,mBAAhB,CACrCC,MADqC,CAErCC,OAFqC,CAAvC,CAAQE,aAAR,uBAAQA,aAAR,CAAuBC,KAAvB,uBAAuBA,KAAvB,CAIA,GAAIA,KAAJ,CAAW,CACT,MAAO,CACLA,KAAK,CAALA,KADK,CAAP,CAGD,CACD,MAAO,CACLD,aAAa,CAAEA,aADV,CAAP,CAGD,CAAC,MAAOC,KAAP,CAAmB,CACnB,MAAO,CACLA,KAAK,CAALA,KADK,CAAP,CAGD,CACF,CAtB+B,iBAAnBL,CAAAA,mBAAmB,4CAAzB,C,gDAwBA,GAAMM,CAAAA,WAAW,qDAAG,UACzBL,MADyB,CAEM,qBAC/B,GACEA,MAAM,CAACM,IAAP,GAAgB,aAAhB,EACA,kBAAAN,MAAM,CAACO,OAAP,+BAAgBC,WAAhB,MAAkC,IADlC,EAEA,CAACR,MAAM,CAACS,aAHV,CAIE,CACA,MAAO,CACLL,KAAK,CAAEM,4BADF,CAAP,CAGD,CAED,GAAI,CACF,gCAA+BR,0BAAgBG,WAAhB,CAA4BL,MAA5B,CAA/B,CAAQW,KAAR,wBAAQA,KAAR,CAAeP,KAAf,wBAAeA,KAAf,CAEA,GAAIA,KAAJ,CAAW,CACT,MAAO,CACLA,KAAK,CAALA,KADK,CAAP,CAGD,CACD,MAAO,CACLO,KAAK,CAAEA,KADF,CAAP,CAGD,CAAC,MAAOP,KAAP,CAAmB,CACnB,MAAO,CACLA,KAAK,CAALA,KADK,CAAP,CAGD,CACF,CA7BuB,iB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AAK,CAAEA,KAFF,CAAP,CAID,CAAC,MAAOP,KAAP,CAAmB,CACnB,MAAO,CACLA,KAAK,CAALA,KADK,CAAP,CAGD,CACF,CApB0C,iBAA9BsE,CAAAA,8BAA8B,gDAApC,C,sEA+BA,GAAMC,CAAAA,sBAAsB,sDAAG,UAAO3E,MAAP,CAQhC,CACJ,GAAIgC,sBAASC,EAAT,GAAgB,KAApB,CAA2B,CACzB,MAAO,EAAP,CACD,CAED,GAAI,CACF,KAAM/B,0BAAgByE,sBAAhB,CACJ3E,MAAM,CAAC4E,QAAP,CAAgBC,SADZ,CAEJ7E,MAAM,CAAC4E,QAAP,CAAgBE,eAFZ,CAGJ9E,MAAM,CAAC4E,QAAP,CAAgBG,MAHZ,CAAN,CAMA,MAAO,EAAP,CACD,CAAC,MAAO3E,KAAP,CAAmB,CACnB,MAAO,CACLA,KAAK,CAALA,KADK,CAAP,CAGD,CACF,CA1BkC,iBAAtBuE,CAAAA,sBAAsB,gDAA5B,C,sDAiCA,GAAMK,CAAAA,oBAAoB,sDAAG,WAA2B,CAC7D,GAAIhD,sBAASC,EAAT,GAAgB,KAApB,CAA2B,CACzB,KAAM/B,0BAAgBoD,iBAAhB,EAAN,CACD,CACF,CAJgC,iBAApB0B,CAAAA,oBAAoB,4CAA1B,C","sourcesContent":["import { isAndroid, isiOS, createError } from './helpers';\nimport { MissingRoutingNumber } from './types/Errors';\nimport NativeStripeSdk from './NativeStripeSdk';\nimport {\n ApplePay,\n ApplePayError,\n ApplePayResult,\n PlatformPayError,\n ConfirmPaymentResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n PaymentIntent,\n ConfirmSetupIntentResult,\n CreatePaymentMethodResult,\n CreateTokenForCVCUpdateResult,\n CreateTokenResult,\n GooglePayInitResult,\n HandleNextActionResult,\n InitPaymentSheetResult,\n PaymentMethod,\n PaymentSheet,\n PayWithGooglePayResult,\n PresentPaymentSheetResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n StripeError,\n GooglePay,\n CreateGooglePayPaymentMethodResult,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForPaymentResult,\n CollectBankAccountForSetupResult,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n PlatformPay,\n} from './types';\nimport { Platform } from 'react-native';\n\nconst APPLE_PAY_NOT_SUPPORTED_MESSAGE =\n 'Apple pay is not supported on this device';\n\nexport const createPaymentMethod = async (\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n): Promise<CreatePaymentMethodResult> => {\n try {\n const { paymentMethod, error } = await NativeStripeSdk.createPaymentMethod(\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createToken = async (\n params: Token.CreateParams\n): Promise<CreateTokenResult> => {\n if (\n params.type === 'BankAccount' &&\n params.country?.toLowerCase() === 'us' &&\n !params.routingNumber\n ) {\n return {\n error: MissingRoutingNumber,\n };\n }\n\n try {\n const { token, error } = await NativeStripeSdk.createToken(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrievePaymentIntent = async (\n clientSecret: string\n): Promise<RetrievePaymentIntentResult> => {\n try {\n const { paymentIntent, error } =\n await NativeStripeSdk.retrievePaymentIntent(clientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrieveSetupIntent = async (\n clientSecret: string\n): Promise<RetrieveSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.retrieveSetupIntent(\n clientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Confirm and, if necessary, authenticate a PaymentIntent.\n *\n * @param {string} paymentIntentClientSecret The client_secret of the associated [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param {object=} params An optional object that contains data related to the payment method used to confirm this payment. If no object is provided (undefined), then it is assumed that the payment method has already been [attached to the Payment Intent](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method).\n * @param {object=} options An optional object that contains options for this payment method.\n * @returns A promise that resolves to an object containing either a `paymentIntent` field, or an `error` field.\n */\nexport const confirmPayment = async (\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n): Promise<ConfirmPaymentResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.confirmPayment(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `isPlatformPaySupported` instead. */\nexport const isApplePaySupported = async (): Promise<boolean> => {\n return isiOS && (await NativeStripeSdk.isApplePaySupported());\n};\n\n/** @deprecated Use `confirmPlatformPaySetupIntent`, `confirmPlatformPayPayment`, or `createPlatformPayPaymentMethod` instead. */\nexport const presentApplePay = async (\n params: ApplePay.PresentParams\n): Promise<ApplePayResult> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: {\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n },\n };\n }\n\n try {\n const { paymentMethod, error } = await NativeStripeSdk.presentApplePay(\n params\n );\n if (error) {\n return {\n error,\n };\n }\n return { paymentMethod: paymentMethod! };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `updatePlatformPaySheet` instead. */\nexport const updateApplePaySummaryItems = async (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }> = []\n): Promise<{ error?: StripeError<ApplePayError> }> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: {\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n },\n };\n }\n\n try {\n await NativeStripeSdk.updateApplePaySummaryItems(\n summaryItems,\n errorAddressFields\n );\n\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `confirmPlatformPaySetupIntent` or `confirmPlatformPayPayment` instead. */\nexport const confirmApplePayPayment = async (\n clientSecret: string\n): Promise<{ error?: StripeError<ApplePayError> }> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: {\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n },\n };\n }\n try {\n await NativeStripeSdk.confirmApplePayPayment(clientSecret);\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** Handles any nextAction required to authenticate the PaymentIntent.\n * Call this method if you are using manual confirmation. See https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=custom\n *\n * @param {string} paymentIntentClientSecret The client secret associated with the PaymentIntent.\n * @param {string=} returnURL An optional return URL so the Stripe SDK can redirect back to your app after authentication. This should match the `return_url` you specified during PaymentIntent confirmation.\n * */\nexport const handleNextAction = async (\n paymentIntentClientSecret: string,\n returnURL?: string\n): Promise<HandleNextActionResult> => {\n try {\n const { paymentIntent, error } =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleNextAction(\n paymentIntentClientSecret,\n returnURL ?? null\n )\n : await NativeStripeSdk.handleNextAction(paymentIntentClientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const confirmSetupIntent = async (\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n): Promise<ConfirmSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.confirmSetupIntent(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createTokenForCVCUpdate = async (\n cvc: string\n): Promise<CreateTokenForCVCUpdateResult> => {\n try {\n const { tokenId, error } = await NativeStripeSdk.createTokenForCVCUpdate(\n cvc\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n tokenId: tokenId!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const handleURLCallback = async (url: string): Promise<boolean> => {\n const stripeHandled = await NativeStripeSdk.handleURLCallback(url);\n return stripeHandled;\n};\n\nexport const verifyMicrodepositsForPayment = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n true,\n clientSecret,\n params\n )) as VerifyMicrodepositsForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const verifyMicrodepositsForSetup = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n false,\n clientSecret,\n params\n )) as VerifyMicrodepositsForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const initPaymentSheet = async (\n params: PaymentSheet.SetupParams\n): Promise<InitPaymentSheetResult> => {\n try {\n const { paymentOption, error } = await NativeStripeSdk.initPaymentSheet(\n params\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const presentPaymentSheet =\n async (): Promise<PresentPaymentSheetResult> => {\n try {\n const { paymentOption, error } =\n await NativeStripeSdk.presentPaymentSheet();\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption: paymentOption!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\nexport const confirmPaymentSheetPayment =\n async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n try {\n const { error } = await NativeStripeSdk.confirmPaymentSheetPayment();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\n/**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\nexport const resetPaymentSheetCustomer = async (): Promise<null> => {\n return await NativeStripeSdk.resetPaymentSheetCustomer();\n};\n\n/** @deprecated Use `isPlatformPaySupported` instead. */\nexport const isGooglePaySupported = async (\n params?: GooglePay.IsSupportedParams\n): Promise<boolean> => {\n return (\n isAndroid && (await NativeStripeSdk.isGooglePaySupported(params ?? {}))\n );\n};\n\n/** @deprecated Use `confirmPlatformPaySetupIntent`, `confirmPlatformPayPayment`, or `createPlatformPayPaymentMethod` instead. */\nexport const initGooglePay = async (\n params: GooglePay.InitParams\n): Promise<GooglePayInitResult> => {\n try {\n const { error } = await NativeStripeSdk.initGooglePay(params);\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `confirmPlatformPaySetupIntent`, `confirmPlatformPayPayment`, or `createPlatformPayPaymentMethod` instead. */\nexport const presentGooglePay = async (\n params: GooglePay.PresentParams\n): Promise<PayWithGooglePayResult> => {\n try {\n const { error } = await NativeStripeSdk.presentGooglePay(params);\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `createPlatformPayPaymentMethod` instead. */\nexport const createGooglePayPaymentMethod = async (\n params: GooglePay.CreatePaymentMethodParams\n): Promise<CreateGooglePayPaymentMethodResult> => {\n try {\n const { error, paymentMethod } =\n await NativeStripeSdk.createGooglePayPaymentMethod(params);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `openNativePaySetup` instead. */\nexport const openApplePaySetup = async (): Promise<OpenApplePaySetupResult> => {\n try {\n const { error } = await NativeStripeSdk.openApplePaySetup();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const collectBankAccountForPayment = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.collectBankAccount(\n true,\n clientSecret,\n params\n )) as CollectBankAccountForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const collectBankAccountForSetup = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.collectBankAccount(\n false,\n clientSecret,\n params\n )) as CollectBankAccountForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectBankAccountToken in the [Add a Financial Connections Account to a US Custom Connect](https://stripe.com/docs/financial-connections/connect-payouts) account flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account for payouts.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @returns A promise that resolves to an object containing either `session` and `token` fields, or an error field.\n */\nexport const collectBankAccountToken = async (\n clientSecret: string\n): Promise<FinancialConnections.TokenResult> => {\n try {\n const { session, token, error } =\n await NativeStripeSdk.collectBankAccountToken(clientSecret);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n token: token!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectFinancialConnectionsAccounts in the [Collect an account to build data-powered products](https://stripe.com/docs/financial-connections/other-data-powered-products) flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @returns A promise that resolves to an object containing either a `session` field, or an error field.\n */\nexport const collectFinancialConnectionsAccounts = async (\n clientSecret: string\n): Promise<FinancialConnections.SessionResult> => {\n try {\n const { session, error } =\n await NativeStripeSdk.collectFinancialConnectionsAccounts(clientSecret);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Check if the app & device support adding this card to the native wallet.\n * @param params An object containing fields for `primaryAccountIdentifier`, `cardLastFour`, and `testEnv`.\n *\n * @returns A promise resolving to an object of type CanAddCardToWalletResult. Check the `canAddCard` field, if it's true, you should show the `<AddToWalletButton />`\n */\nexport const canAddCardToWallet = async (\n params: CanAddCardToWalletParams\n): Promise<CanAddCardToWalletResult> => {\n try {\n const { canAddCard, details, error } =\n await NativeStripeSdk.canAddCardToWallet(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n canAddCard: canAddCard as boolean,\n details: details,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/** @deprecated Please use `canAddCardToWallet` instead. */\nexport const isCardInWallet = async (params: {\n cardLastFour: string;\n}): Promise<IsCardInWalletResult> => {\n try {\n const { isInWallet, token, error } = await NativeStripeSdk.isCardInWallet(\n params\n );\n\n if (error) {\n return {\n error,\n };\n }\n return {\n isInWallet: isInWallet as boolean,\n token: token,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const Constants = NativeStripeSdk.getConstants();\n\n/**\n * Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.\n * @returns A boolean indicating whether or not the native wallet is supported.\n */\nexport const isPlatformPaySupported = async (params?: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n}): Promise<boolean> => {\n return await NativeStripeSdk.isPlatformPaySupported(params ?? {});\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [SetupIntent](https://stripe.com/docs/api/setup_intents).\n * @param clientSecret The client secret of the SetupIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `setupIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPaySetupIntent = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmSetupIntentResult> => {\n try {\n const { error, setupIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n false\n )) as PlatformPay.ConfirmSetupIntentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param clientSecret The client secret of the PaymentIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPayPayment = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmPaymentResult> => {\n try {\n const { error, paymentIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n true\n )) as PlatformPay.ConfirmPaymentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this will always return false on Android. Dismisses the Apple Pay sheet if it is open.\n * @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.\n */\nexport const dismissPlatformPay = async (): Promise<boolean> => {\n if (Platform.OS !== 'ios') {\n return false;\n }\n try {\n const didDismiss = await NativeStripeSdk.dismissPlatformPay();\n return didDismiss;\n } catch (error: any) {\n return false;\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [PaymentMethod](https://stripe.com/docs/api/payment_methods) and [token](https://stripe.com/docs/api/tokens).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentMethod` and `token` fields.\n */\nexport const createPlatformPayPaymentMethod = async (\n params: PlatformPay.PaymentMethodParams\n): Promise<PlatformPay.PaymentMethodResult> => {\n try {\n const { error, paymentMethod, token } =\n await NativeStripeSdk.createPlatformPayPaymentMethod(params);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only. Update different items on the Apple Pay sheet, including the summary items, the shipping methods, and any errors shown. iOS only, this is a no-op on Android.\n * @param params an object describing the Apple Pay configuration, with the following fields:\n * - cartItems An array of payment summary items to display in the Apple Pay sheet.\n * - shippingMethods An array of shipping methods to display in the Apple Pay sheet.\n * - errors An array of errors associated with the user's input that must be corrected to proceed with payment. These errors will be shown in the Apple Pay sheet.\n *\n * @returns An object with an optional 'error' field, which is only populated if something went wrong.\n */\nexport const updatePlatformPaySheet = async (params: {\n applePay: {\n cartItems: Array<PlatformPay.CartSummaryItem>;\n shippingMethods: Array<PlatformPay.ShippingMethod>;\n errors: Array<PlatformPay.ApplePaySheetError>;\n };\n}): Promise<{\n error?: StripeError<PlatformPayError>;\n}> => {\n if (Platform.OS !== 'ios') {\n return {};\n }\n\n try {\n await NativeStripeSdk.updatePlatformPaySheet(\n params.applePay.cartItems,\n params.applePay.shippingMethods,\n params.applePay.errors\n );\n\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards.\n * This method transfers control to the Wallet app on iPhone or to the Settings\n * app on iPad. For devices that don’t support Apple Pay, this method does nothing.\n */\nexport const openPlatformPaySetup = async (): Promise<void> => {\n if (Platform.OS === 'ios') {\n await NativeStripeSdk.openApplePaySetup();\n }\n};\n"]}
1
+ {"version":3,"names":["APPLE_PAY_NOT_SUPPORTED_MESSAGE","createPaymentMethod","params","options","NativeStripeSdk","paymentMethod","error","createToken","type","country","toLowerCase","routingNumber","MissingRoutingNumber","token","retrievePaymentIntent","clientSecret","paymentIntent","retrieveSetupIntent","setupIntent","confirmPayment","paymentIntentClientSecret","isApplePaySupported","isiOS","presentApplePay","code","ApplePayError","Canceled","message","updateApplePaySummaryItems","summaryItems","errorAddressFields","confirmApplePayPayment","handleNextAction","returnURL","Platform","OS","createError","confirmSetupIntent","createTokenForCVCUpdate","cvc","tokenId","handleURLCallback","url","stripeHandled","verifyMicrodepositsForPayment","verifyMicrodeposits","verifyMicrodepositsForSetup","initPaymentSheet","paymentOption","presentPaymentSheet","confirmPaymentSheetPayment","resetPaymentSheetCustomer","isGooglePaySupported","isAndroid","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","openApplePaySetup","collectBankAccountForPayment","collectBankAccount","collectBankAccountForSetup","collectBankAccountToken","session","collectFinancialConnectionsAccounts","canAddCardToWallet","canAddCard","details","isCardInWallet","isInWallet","Constants","getConstants","isPlatformPaySupported","confirmPlatformPaySetupIntent","confirmPlatformPay","confirmPlatformPayPayment","dismissPlatformPay","didDismiss","createPlatformPayPaymentMethod","createPlatformPayToken","updatePlatformPaySheet","applePay","cartItems","shippingMethods","errors","openPlatformPaySetup"],"sources":["functions.ts"],"sourcesContent":["import { isAndroid, isiOS, createError } from './helpers';\nimport { MissingRoutingNumber } from './types/Errors';\nimport NativeStripeSdk from './NativeStripeSdk';\nimport {\n ApplePay,\n ApplePayError,\n ApplePayResult,\n PlatformPayError,\n ConfirmPaymentResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n PaymentIntent,\n ConfirmSetupIntentResult,\n CreatePaymentMethodResult,\n CreateTokenForCVCUpdateResult,\n CreateTokenResult,\n GooglePayInitResult,\n HandleNextActionResult,\n InitPaymentSheetResult,\n PaymentMethod,\n PaymentSheet,\n PayWithGooglePayResult,\n PresentPaymentSheetResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n StripeError,\n GooglePay,\n CreateGooglePayPaymentMethodResult,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForPaymentResult,\n CollectBankAccountForSetupResult,\n IsCardInWalletResult,\n CanAddCardToWalletParams,\n CanAddCardToWalletResult,\n FinancialConnections,\n PlatformPay,\n} from './types';\nimport { Platform } from 'react-native';\n\nconst APPLE_PAY_NOT_SUPPORTED_MESSAGE =\n 'Apple pay is not supported on this device';\n\nexport const createPaymentMethod = async (\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n): Promise<CreatePaymentMethodResult> => {\n try {\n const { paymentMethod, error } = await NativeStripeSdk.createPaymentMethod(\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createToken = async (\n params: Token.CreateParams\n): Promise<CreateTokenResult> => {\n if (\n params.type === 'BankAccount' &&\n params.country?.toLowerCase() === 'us' &&\n !params.routingNumber\n ) {\n return {\n error: MissingRoutingNumber,\n };\n }\n\n try {\n const { token, error } = await NativeStripeSdk.createToken(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrievePaymentIntent = async (\n clientSecret: string\n): Promise<RetrievePaymentIntentResult> => {\n try {\n const { paymentIntent, error } =\n await NativeStripeSdk.retrievePaymentIntent(clientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrieveSetupIntent = async (\n clientSecret: string\n): Promise<RetrieveSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.retrieveSetupIntent(\n clientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Confirm and, if necessary, authenticate a PaymentIntent.\n *\n * @param {string} paymentIntentClientSecret The client_secret of the associated [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param {object=} params An optional object that contains data related to the payment method used to confirm this payment. If no object is provided (undefined), then it is assumed that the payment method has already been [attached to the Payment Intent](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method).\n * @param {object=} options An optional object that contains options for this payment method.\n * @returns A promise that resolves to an object containing either a `paymentIntent` field, or an `error` field.\n */\nexport const confirmPayment = async (\n paymentIntentClientSecret: string,\n params?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n): Promise<ConfirmPaymentResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.confirmPayment(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `isPlatformPaySupported` instead. */\nexport const isApplePaySupported = async (): Promise<boolean> => {\n return isiOS && (await NativeStripeSdk.isApplePaySupported());\n};\n\n/** @deprecated Use `confirmPlatformPaySetupIntent`, `confirmPlatformPayPayment`, or `createPlatformPayPaymentMethod` instead. */\nexport const presentApplePay = async (\n params: ApplePay.PresentParams\n): Promise<ApplePayResult> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: {\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n },\n };\n }\n\n try {\n const { paymentMethod, error } = await NativeStripeSdk.presentApplePay(\n params\n );\n if (error) {\n return {\n error,\n };\n }\n return { paymentMethod: paymentMethod! };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `updatePlatformPaySheet` instead. */\nexport const updateApplePaySummaryItems = async (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }> = []\n): Promise<{ error?: StripeError<ApplePayError> }> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: {\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n },\n };\n }\n\n try {\n await NativeStripeSdk.updateApplePaySummaryItems(\n summaryItems,\n errorAddressFields\n );\n\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `confirmPlatformPaySetupIntent` or `confirmPlatformPayPayment` instead. */\nexport const confirmApplePayPayment = async (\n clientSecret: string\n): Promise<{ error?: StripeError<ApplePayError> }> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: {\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n },\n };\n }\n try {\n await NativeStripeSdk.confirmApplePayPayment(clientSecret);\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** Handles any nextAction required to authenticate the PaymentIntent.\n * Call this method if you are using manual confirmation. See https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=custom\n *\n * @param {string} paymentIntentClientSecret The client secret associated with the PaymentIntent.\n * @param {string=} returnURL An optional return URL so the Stripe SDK can redirect back to your app after authentication. This should match the `return_url` you specified during PaymentIntent confirmation.\n * */\nexport const handleNextAction = async (\n paymentIntentClientSecret: string,\n returnURL?: string\n): Promise<HandleNextActionResult> => {\n try {\n const { paymentIntent, error } =\n Platform.OS === 'ios'\n ? await NativeStripeSdk.handleNextAction(\n paymentIntentClientSecret,\n returnURL ?? null\n )\n : await NativeStripeSdk.handleNextAction(paymentIntentClientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const confirmSetupIntent = async (\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n): Promise<ConfirmSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.confirmSetupIntent(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createTokenForCVCUpdate = async (\n cvc: string\n): Promise<CreateTokenForCVCUpdateResult> => {\n try {\n const { tokenId, error } = await NativeStripeSdk.createTokenForCVCUpdate(\n cvc\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n tokenId: tokenId!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const handleURLCallback = async (url: string): Promise<boolean> => {\n const stripeHandled = await NativeStripeSdk.handleURLCallback(url);\n return stripeHandled;\n};\n\nexport const verifyMicrodepositsForPayment = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n true,\n clientSecret,\n params\n )) as VerifyMicrodepositsForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const verifyMicrodepositsForSetup = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n false,\n clientSecret,\n params\n )) as VerifyMicrodepositsForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const initPaymentSheet = async (\n params: PaymentSheet.SetupParams\n): Promise<InitPaymentSheetResult> => {\n try {\n const { paymentOption, error } = await NativeStripeSdk.initPaymentSheet(\n params\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const presentPaymentSheet =\n async (): Promise<PresentPaymentSheetResult> => {\n try {\n const { paymentOption, error } =\n await NativeStripeSdk.presentPaymentSheet();\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption: paymentOption!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\nexport const confirmPaymentSheetPayment =\n async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n try {\n const { error } = await NativeStripeSdk.confirmPaymentSheetPayment();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\n/**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\nexport const resetPaymentSheetCustomer = async (): Promise<null> => {\n return await NativeStripeSdk.resetPaymentSheetCustomer();\n};\n\n/** @deprecated Use `isPlatformPaySupported` instead. */\nexport const isGooglePaySupported = async (\n params?: GooglePay.IsSupportedParams\n): Promise<boolean> => {\n return (\n isAndroid && (await NativeStripeSdk.isGooglePaySupported(params ?? {}))\n );\n};\n\n/** @deprecated Use `confirmPlatformPaySetupIntent`, `confirmPlatformPayPayment`, or `createPlatformPayPaymentMethod` instead. */\nexport const initGooglePay = async (\n params: GooglePay.InitParams\n): Promise<GooglePayInitResult> => {\n try {\n const { error } = await NativeStripeSdk.initGooglePay(params);\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `confirmPlatformPaySetupIntent`, `confirmPlatformPayPayment`, or `createPlatformPayPaymentMethod` instead. */\nexport const presentGooglePay = async (\n params: GooglePay.PresentParams\n): Promise<PayWithGooglePayResult> => {\n try {\n const { error } = await NativeStripeSdk.presentGooglePay(params);\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `createPlatformPayPaymentMethod` instead. */\nexport const createGooglePayPaymentMethod = async (\n params: GooglePay.CreatePaymentMethodParams\n): Promise<CreateGooglePayPaymentMethodResult> => {\n try {\n const { error, paymentMethod } =\n await NativeStripeSdk.createGooglePayPaymentMethod(params);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/** @deprecated Use `openNativePaySetup` instead. */\nexport const openApplePaySetup = async (): Promise<OpenApplePaySetupResult> => {\n try {\n const { error } = await NativeStripeSdk.openApplePaySetup();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const collectBankAccountForPayment = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.collectBankAccount(\n true,\n clientSecret,\n params\n )) as CollectBankAccountForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const collectBankAccountForSetup = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.collectBankAccount(\n false,\n clientSecret,\n params\n )) as CollectBankAccountForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectBankAccountToken in the [Add a Financial Connections Account to a US Custom Connect](https://stripe.com/docs/financial-connections/connect-payouts) account flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account for payouts.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @returns A promise that resolves to an object containing either `session` and `token` fields, or an error field.\n */\nexport const collectBankAccountToken = async (\n clientSecret: string\n): Promise<FinancialConnections.TokenResult> => {\n try {\n const { session, token, error } =\n await NativeStripeSdk.collectBankAccountToken(clientSecret);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n token: token!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Use collectFinancialConnectionsAccounts in the [Collect an account to build data-powered products](https://stripe.com/docs/financial-connections/other-data-powered-products) flow.\n * When called, it will load the Authentication Flow, an on-page modal UI which allows your user to securely link their external financial account.\n * @param {string} clientSecret The client_secret of the [Financial Connections Session](https://stripe.com/docs/api/financial_connections/session).\n * @returns A promise that resolves to an object containing either a `session` field, or an error field.\n */\nexport const collectFinancialConnectionsAccounts = async (\n clientSecret: string\n): Promise<FinancialConnections.SessionResult> => {\n try {\n const { session, error } =\n await NativeStripeSdk.collectFinancialConnectionsAccounts(clientSecret);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n session: session!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * Check if the app & device support adding this card to the native wallet.\n * @param params An object containing fields for `primaryAccountIdentifier`, `cardLastFour`, and `testEnv`.\n *\n * @returns A promise resolving to an object of type CanAddCardToWalletResult. Check the `canAddCard` field, if it's true, you should show the `<AddToWalletButton />`\n */\nexport const canAddCardToWallet = async (\n params: CanAddCardToWalletParams\n): Promise<CanAddCardToWalletResult> => {\n try {\n const { canAddCard, details, error } =\n await NativeStripeSdk.canAddCardToWallet(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n canAddCard: canAddCard as boolean,\n details: details,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\n/** @deprecated Please use `canAddCardToWallet` instead. */\nexport const isCardInWallet = async (params: {\n cardLastFour: string;\n}): Promise<IsCardInWalletResult> => {\n try {\n const { isInWallet, token, error } = await NativeStripeSdk.isCardInWallet(\n params\n );\n\n if (error) {\n return {\n error,\n };\n }\n return {\n isInWallet: isInWallet as boolean,\n token: token,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const Constants = NativeStripeSdk.getConstants();\n\n/**\n * Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.\n * @returns A boolean indicating whether or not the native wallet is supported.\n */\nexport const isPlatformPaySupported = async (params?: {\n googlePay?: PlatformPay.IsGooglePaySupportedParams;\n}): Promise<boolean> => {\n return await NativeStripeSdk.isPlatformPaySupported(params ?? {});\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [SetupIntent](https://stripe.com/docs/api/setup_intents).\n * @param clientSecret The client secret of the SetupIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `setupIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPaySetupIntent = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmSetupIntentResult> => {\n try {\n const { error, setupIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n false\n )) as PlatformPay.ConfirmSetupIntentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to confirm a Stripe [PaymentIntent](https://stripe.com/docs/api/payment_intents).\n * @param clientSecret The client secret of the PaymentIntent.\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with both `paymentIntent` and `paymentMethod` fields.\n */\nexport const confirmPlatformPayPayment = async (\n clientSecret: string,\n params: PlatformPay.ConfirmParams\n): Promise<PlatformPay.ConfirmPaymentResult> => {\n try {\n const { error, paymentIntent } = (await NativeStripeSdk.confirmPlatformPay(\n clientSecret,\n params,\n true\n )) as PlatformPay.ConfirmPaymentResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this will always return false on Android. Dismisses the Apple Pay sheet if it is open.\n * @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.\n */\nexport const dismissPlatformPay = async (): Promise<boolean> => {\n if (Platform.OS !== 'ios') {\n return false;\n }\n try {\n const didDismiss = await NativeStripeSdk.dismissPlatformPay();\n return didDismiss;\n } catch (error: any) {\n return false;\n }\n};\n\n/**\n * Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [PaymentMethod](https://stripe.com/docs/api/payment_methods).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `paymentMethod` field.\n */\nexport const createPlatformPayPaymentMethod = async (\n params: PlatformPay.PaymentMethodParams\n): Promise<PlatformPay.PaymentMethodResult> => {\n try {\n const { error, paymentMethod } =\n (await NativeStripeSdk.createPlatformPayPaymentMethod(\n params,\n false\n )) as PlatformPay.PaymentMethodResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * @deprecated The Tokens API is deprecated, you should use Payment Methods and `createPlatformPayPaymentMethod` instead. Launches the relevant native wallet sheet (Apple Pay on iOS, Google Pay on Android) in order to create a Stripe [token](https://stripe.com/docs/api/tokens).\n * @param params an object describing the Apple Pay and Google Pay configurations.\n * @returns An object with an error field if something went wrong or the flow was cancelled, otherwise an object with a `token` field.\n */\nexport const createPlatformPayToken = async (\n params: PlatformPay.PaymentMethodParams\n): Promise<PlatformPay.TokenResult> => {\n try {\n const { error, token } =\n (await NativeStripeSdk.createPlatformPayPaymentMethod(\n params,\n true\n )) as PlatformPay.TokenResult;\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only. Update different items on the Apple Pay sheet, including the summary items, the shipping methods, and any errors shown. iOS only, this is a no-op on Android.\n * @param params an object describing the Apple Pay configuration, with the following fields:\n * - cartItems An array of payment summary items to display in the Apple Pay sheet.\n * - shippingMethods An array of shipping methods to display in the Apple Pay sheet.\n * - errors An array of errors associated with the user's input that must be corrected to proceed with payment. These errors will be shown in the Apple Pay sheet.\n *\n * @returns An object with an optional 'error' field, which is only populated if something went wrong.\n */\nexport const updatePlatformPaySheet = async (params: {\n applePay: {\n cartItems: Array<PlatformPay.CartSummaryItem>;\n shippingMethods: Array<PlatformPay.ShippingMethod>;\n errors: Array<PlatformPay.ApplePaySheetError>;\n };\n}): Promise<{\n error?: StripeError<PlatformPayError>;\n}> => {\n if (Platform.OS !== 'ios') {\n return {};\n }\n\n try {\n await NativeStripeSdk.updatePlatformPaySheet(\n params.applePay.cartItems,\n params.applePay.shippingMethods,\n params.applePay.errors\n );\n\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\n/**\n * iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards.\n * This method transfers control to the Wallet app on iPhone or to the Settings\n * app on iPad. For devices that don’t support Apple Pay, this method does nothing.\n */\nexport const openPlatformPaySetup = async (): Promise<void> => {\n if (Platform.OS === 'ios') {\n await NativeStripeSdk.openApplePaySetup();\n }\n};\n"],"mappings":"q4CAAA,kCACA,sCACA,0EACA,8BAsCA,yCAEA,GAAMA,gCAA+B,CACn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,MAAO,CAAC,CAAC,CACX,CAEA,GAAI,CACF,KAAM/B,yBAAe,CAAC2E,sBAAsB,CAC1C7E,MAAM,CAAC8E,QAAQ,CAACC,SAAS,CACzB/E,MAAM,CAAC8E,QAAQ,CAACE,eAAe,CAC/BhF,MAAM,CAAC8E,QAAQ,CAACG,MAAM,CACvB,CAED,MAAO,CAAC,CAAC,CACX,CAAE,MAAO7E,KAAU,CAAE,CACnB,MAAO,CACLA,KAAK,CAALA,KACF,CAAC,CACH,CACF,CAAC,iBA1BYyE,uBAAsB,gDA0BlC,CAAC,sDAOK,GAAMK,qBAAoB,sDAAG,WAA2B,CAC7D,GAAIlD,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAE,CACzB,KAAM/B,yBAAe,CAACqD,iBAAiB,EAAE,CAC3C,CACF,CAAC,iBAJY2B,qBAAoB,4CAIhC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["helpers.ts"],"names":["TextInputState","require","shouldAttributeExpo","NativeModules","NativeUnimoduleProxy","isiOS","Platform","OS","isAndroid","createError","error","code","message","localizedMessage","declineCode","stripeErrorCode","type","unsupportedMethodMessage","field","focusInput","ref","__DEV__","console","log","registerInput","unregisterInput","currentlyFocusedInput"],"mappings":"4RAGA,yCACA,GAAMA,CAAAA,cAAc,CAAGC,OAAO,CAAC,4DAAD,CAA9B,CAOO,GAAMC,CAAAA,mBAAmB,CAAG,QAAtBA,CAAAA,mBAAsB,EAAM,CACvC,GAAI,CACF,MAAO,CAAC,CAACC,2BAAcC,oBAAvB,CACD,CAAC,cAAM,CACN,MAAO,MAAP,CACD,CACF,CANM,C,gDAQA,GAAMC,CAAAA,KAAK,CAAGC,sBAASC,EAAT,GAAgB,KAA9B,C,oBACA,GAAMC,CAAAA,SAAS,CAAGF,sBAASC,EAAT,GAAgB,SAAlC,C,4BAEA,QAASE,CAAAA,WAAT,CAAwBC,KAAxB,CAA+C,CACpD,MAAO,CACLC,IAAI,CAAED,KAAK,CAACC,IADP,CAELC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AI,yBAA2B1B,CAAAA,cAA/B,CAA+C,CAC7C,MAAOA,CAAAA,cAAc,CAAC0B,qBAAf,EAAP,CACD,CAFD,IAEO,CACL,GAAIL,OAAJ,CAAa,CACXC,OAAO,CAACC,GAAR,CAAYN,wBAAwB,CAAC,uBAAD,CAApC,EACD,CACF,CACF,CARM,C","sourcesContent":["import type React from 'react';\nimport type { StripeError } from './types';\n\nimport { Platform, NativeModules } from 'react-native';\nconst TextInputState = require('react-native/Libraries/Components/TextInput/TextInputState');\n\n/**\n * Determines whether or not this library is being used inside of\n * an \"Expo\" project by identifying if Expo's native module\n * infrastructure (react-native-unimodules AKA expo-modules) is available.\n */\nexport const shouldAttributeExpo = () => {\n try {\n return !!NativeModules.NativeUnimoduleProxy;\n } catch {\n return false;\n }\n};\n\nexport const isiOS = Platform.OS === 'ios';\nexport const isAndroid = Platform.OS === 'android';\n\nexport function createError<T>(error: StripeError<T>) {\n return {\n code: error.code,\n message: error.message,\n localizedMessage: error.localizedMessage,\n declineCode: error.declineCode,\n stripeErrorCode: error.stripeErrorCode,\n type: error.type,\n };\n}\n\nexport const unsupportedMethodMessage = (field: string) =>\n `${field} method is not supported. Consider to upgrade react-native version to 0.63.x or higher`;\n\nexport const focusInput = (ref: React.MutableRefObject<any>) => {\n if ('focusInput' in TextInputState) {\n TextInputState.focusInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('focusInput'));\n }\n }\n};\n\nexport const registerInput = (ref: React.MutableRefObject<any>) => {\n if ('registerInput' in TextInputState) {\n TextInputState.registerInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('registerInput'));\n }\n }\n};\n\nexport const unregisterInput = (ref: React.MutableRefObject<any>) => {\n if ('unregisterInput' in TextInputState) {\n TextInputState.unregisterInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('unregisterInput'));\n }\n }\n};\n\nexport const currentlyFocusedInput = () => {\n if ('currentlyFocusedInput' in TextInputState) {\n return TextInputState.currentlyFocusedInput();\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('currentlyFocusedInput'));\n }\n }\n};\n"]}
1
+ {"version":3,"names":["TextInputState","require","shouldAttributeExpo","NativeModules","NativeUnimoduleProxy","isiOS","Platform","OS","isAndroid","createError","error","code","message","localizedMessage","declineCode","stripeErrorCode","type","unsupportedMethodMessage","field","focusInput","ref","__DEV__","console","log","registerInput","unregisterInput","currentlyFocusedInput"],"sources":["helpers.ts"],"sourcesContent":["import type React from 'react';\nimport type { StripeError } from './types';\n\nimport { Platform, NativeModules } from 'react-native';\nconst TextInputState = require('react-native/Libraries/Components/TextInput/TextInputState');\n\n/**\n * Determines whether or not this library is being used inside of\n * an \"Expo\" project by identifying if Expo's native module\n * infrastructure (react-native-unimodules AKA expo-modules) is available.\n */\nexport const shouldAttributeExpo = () => {\n try {\n return !!NativeModules.NativeUnimoduleProxy;\n } catch {\n return false;\n }\n};\n\nexport const isiOS = Platform.OS === 'ios';\nexport const isAndroid = Platform.OS === 'android';\n\nexport function createError<T>(error: StripeError<T>) {\n return {\n code: error.code,\n message: error.message,\n localizedMessage: error.localizedMessage,\n declineCode: error.declineCode,\n stripeErrorCode: error.stripeErrorCode,\n type: error.type,\n };\n}\n\nexport const unsupportedMethodMessage = (field: string) =>\n `${field} method is not supported. Consider to upgrade react-native version to 0.63.x or higher`;\n\nexport const focusInput = (ref: React.MutableRefObject<any>) => {\n if ('focusInput' in TextInputState) {\n TextInputState.focusInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('focusInput'));\n }\n }\n};\n\nexport const registerInput = (ref: React.MutableRefObject<any>) => {\n if ('registerInput' in TextInputState) {\n TextInputState.registerInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('registerInput'));\n }\n }\n};\n\nexport const unregisterInput = (ref: React.MutableRefObject<any>) => {\n if ('unregisterInput' in TextInputState) {\n TextInputState.unregisterInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('unregisterInput'));\n }\n }\n};\n\nexport const currentlyFocusedInput = () => {\n if ('currentlyFocusedInput' in TextInputState) {\n return TextInputState.currentlyFocusedInput();\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('currentlyFocusedInput'));\n }\n }\n};\n"],"mappings":"4RAGA,yCACA,GAAMA,eAAc,CAAGC,OAAO,CAAC,4DAA4D,CAAC,CAOrF,GAAMC,oBAAmB,CAAG,QAAtBA,oBAAmB,EAAS,CACvC,GAAI,CACF,MAAO,CAAC,CAACC,0BAAa,CAACC,oBAAoB,CAC7C,CAAE,cAAM,CACN,MAAO,MAAK,CACd,CACF,CAAC,CAAC,gDAEK,GAAMC,MAAK,CAAGC,qBAAQ,CAACC,EAAE,GAAK,KAAK,CAAC,oBACpC,GAAMC,UAAS,CAAGF,qBAAQ,CAACC,EAAE,GAAK,SAAS,CAAC,4BAE5C,QAASE,YAAW,CAAIC,KAAqB,CAAE,CACpD,MAAO,CACLC,IAAI,CAAED,KAAK,CAACC,IAAI,CAChBC,OAAO,CAAEF,KAAK,CAACE,OAAO,CACtBC,gBAAgB,CAAEH,KAAK,CAACG,gBAAgB,CACxCC,WAAW,CAAEJ,KAAK,CAACI,WAAW,CAC9BC,eAAe,CAAEL,KAAK,CAACK,eAAe,CACtCC,IAAI,CAAEN,KAAK,CAACM,IACd,CAAC,CACH,CAEO,GAAMC,yBAAwB,CAAG,QAA3BA,yBAAwB,CAAIC,KAAa,QACjDA,MAAK,2FAAwF,CAAC,0DAE5F,GAAMC,WAAU,CAAG,QAAbA,WAAU,CAAIC,GAAgC,CAAK,CAC9D,GAAI,YAAY,EAAIpB,eAAc,CAAE,CAClCA,cAAc,CAACmB,UAAU,CAACC,GAAG,CAAC,CAChC,CAAC,IAAM,CACL,GAAIC,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACN,wBAAwB,CAAC,YAAY,CAAC,CAAC,CACrD,CACF,CACF,CAAC,CAAC,8BAEK,GAAMO,cAAa,CAAG,QAAhBA,cAAa,CAAIJ,GAAgC,CAAK,CACjE,GAAI,eAAe,EAAIpB,eAAc,CAAE,CACrCA,cAAc,CAACwB,aAAa,CAACJ,GAAG,CAAC,CACnC,CAAC,IAAM,CACL,GAAIC,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACN,wBAAwB,CAAC,eAAe,CAAC,CAAC,CACxD,CACF,CACF,CAAC,CAAC,oCAEK,GAAMQ,gBAAe,CAAG,QAAlBA,gBAAe,CAAIL,GAAgC,CAAK,CACnE,GAAI,iBAAiB,EAAIpB,eAAc,CAAE,CACvCA,cAAc,CAACyB,eAAe,CAACL,GAAG,CAAC,CACrC,CAAC,IAAM,CACL,GAAIC,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACN,wBAAwB,CAAC,iBAAiB,CAAC,CAAC,CAC1D,CACF,CACF,CAAC,CAAC,wCAEK,GAAMS,sBAAqB,CAAG,QAAxBA,sBAAqB,EAAS,CACzC,GAAI,uBAAuB,EAAI1B,eAAc,CAAE,CAC7C,MAAOA,eAAc,CAAC0B,qBAAqB,EAAE,CAC/C,CAAC,IAAM,CACL,GAAIL,OAAO,CAAE,CACXC,OAAO,CAACC,GAAG,CAACN,wBAAwB,CAAC,uBAAuB,CAAC,CAAC,CAChE,CACF,CACF,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useApplePay=useApplePay;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _useStripe2=require("./useStripe");var _reactNative=require("react-native");var eventEmitter=new _reactNative.NativeEventEmitter(_reactNative.NativeModules.StripeSdk);var SET_SHIPPING_METHOD_CALLBACK_NAME='onDidSetShippingMethod';var SET_SHIPPING_CONTACT_CALLBACK_NAME='onDidSetShippingContact';function useApplePay(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},onShippingMethodSelected=_ref.onShippingMethodSelected,onShippingContactSelected=_ref.onShippingContactSelected;var _useStripe=(0,_useStripe2.useStripe)(),isApplePaySupported=_useStripe.isApplePaySupported,_presentApplePay=_useStripe.presentApplePay,_confirmApplePayPayment=_useStripe.confirmApplePayPayment,updateApplePaySummaryItems=_useStripe.updateApplePaySummaryItems,_openApplePaySetup=_useStripe.openApplePaySetup;var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),items=_useState2[0],setItems=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),loading=_useState4[0],setLoading=_useState4[1];var onDidSetShippingMethod=(0,_react.useCallback)(function(result){if(onShippingMethodSelected){onShippingMethodSelected(result.shippingMethod,updateApplePaySummaryItems);}else{updateApplePaySummaryItems(items);}},[items,onShippingMethodSelected,updateApplePaySummaryItems]);var onDidSetShippingContact=(0,_react.useCallback)(function(result){if(onShippingContactSelected){onShippingContactSelected(result.shippingContact,updateApplePaySummaryItems);}else{updateApplePaySummaryItems(items);}},[items,onShippingContactSelected,updateApplePaySummaryItems]);(0,_react.useEffect)(function(){var didSetShippingMethodListener=eventEmitter.addListener(SET_SHIPPING_METHOD_CALLBACK_NAME,onDidSetShippingMethod);var didSetShippingContactListener=eventEmitter.addListener(SET_SHIPPING_CONTACT_CALLBACK_NAME,onDidSetShippingContact);return function(){didSetShippingMethodListener.remove();didSetShippingContactListener.remove();};},[onDidSetShippingContact,onDidSetShippingMethod]);var presentApplePay=(0,_react.useCallback)(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);setItems(params.cartItems);var result=yield _presentApplePay(params);if(result.error){setItems(null);}setLoading(false);return result;});return function(_x){return _ref2.apply(this,arguments);};}(),[_presentApplePay]);var openApplePaySetup=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){setLoading(true);var result=yield _openApplePaySetup();setLoading(false);return result;}),[_openApplePaySetup]);var confirmApplePayPayment=(0,_react.useCallback)(function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){setLoading(true);var result=yield _confirmApplePayPayment(clientSecret);setItems(null);setLoading(false);return result;});return function(_x2){return _ref4.apply(this,arguments);};}(),[_confirmApplePayPayment]);return{loading:loading,presentApplePay:presentApplePay,confirmApplePayPayment:confirmApplePayPayment,isApplePaySupported:isApplePaySupported,openApplePaySetup:openApplePaySetup};}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useApplePay=useApplePay;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _useStripe2=require("./useStripe");var _reactNative=require("react-native");var SET_SHIPPING_METHOD_CALLBACK_NAME='onDidSetShippingMethod';var SET_SHIPPING_CONTACT_CALLBACK_NAME='onDidSetShippingContact';function useApplePay(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},onShippingMethodSelected=_ref.onShippingMethodSelected,onShippingContactSelected=_ref.onShippingContactSelected;var _useStripe=(0,_useStripe2.useStripe)(),isApplePaySupported=_useStripe.isApplePaySupported,_presentApplePay=_useStripe.presentApplePay,_confirmApplePayPayment=_useStripe.confirmApplePayPayment,updateApplePaySummaryItems=_useStripe.updateApplePaySummaryItems,_openApplePaySetup=_useStripe.openApplePaySetup;var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),items=_useState2[0],setItems=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),loading=_useState4[0],setLoading=_useState4[1];var onDidSetShippingMethod=(0,_react.useCallback)(function(result){if(onShippingMethodSelected){onShippingMethodSelected(result.shippingMethod,updateApplePaySummaryItems);}else{updateApplePaySummaryItems(items);}},[items,onShippingMethodSelected,updateApplePaySummaryItems]);var onDidSetShippingContact=(0,_react.useCallback)(function(result){if(onShippingContactSelected){onShippingContactSelected(result.shippingContact,updateApplePaySummaryItems);}else{updateApplePaySummaryItems(items);}},[items,onShippingContactSelected,updateApplePaySummaryItems]);(0,_react.useEffect)(function(){var eventEmitter=new _reactNative.NativeEventEmitter(_reactNative.NativeModules.StripeSdk);var didSetShippingMethodListener=eventEmitter.addListener(SET_SHIPPING_METHOD_CALLBACK_NAME,onDidSetShippingMethod);var didSetShippingContactListener=eventEmitter.addListener(SET_SHIPPING_CONTACT_CALLBACK_NAME,onDidSetShippingContact);return function(){didSetShippingMethodListener.remove();didSetShippingContactListener.remove();};},[onDidSetShippingContact,onDidSetShippingMethod]);var presentApplePay=(0,_react.useCallback)(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);setItems(params.cartItems);var result=yield _presentApplePay(params);if(result.error){setItems(null);}setLoading(false);return result;});return function(_x){return _ref2.apply(this,arguments);};}(),[_presentApplePay]);var openApplePaySetup=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){setLoading(true);var result=yield _openApplePaySetup();setLoading(false);return result;}),[_openApplePaySetup]);var confirmApplePayPayment=(0,_react.useCallback)(function(){var _ref4=(0,_asyncToGenerator2.default)(function*(clientSecret){setLoading(true);var result=yield _confirmApplePayPayment(clientSecret);setItems(null);setLoading(false);return result;});return function(_x2){return _ref4.apply(this,arguments);};}(),[_confirmApplePayPayment]);return{loading:loading,presentApplePay:presentApplePay,confirmApplePayPayment:confirmApplePayPayment,isApplePaySupported:isApplePaySupported,openApplePaySetup:openApplePaySetup};}
2
2
  //# sourceMappingURL=useApplePay.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useApplePay.tsx"],"names":["eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","SET_SHIPPING_METHOD_CALLBACK_NAME","SET_SHIPPING_CONTACT_CALLBACK_NAME","useApplePay","onShippingMethodSelected","onShippingContactSelected","isApplePaySupported","_presentApplePay","presentApplePay","_confirmApplePayPayment","confirmApplePayPayment","updateApplePaySummaryItems","_openApplePaySetup","openApplePaySetup","items","setItems","loading","setLoading","onDidSetShippingMethod","result","shippingMethod","onDidSetShippingContact","shippingContact","didSetShippingMethodListener","addListener","didSetShippingContactListener","remove","params","cartItems","error","clientSecret"],"mappings":"0WACA,4BACA,uCACA,yCAEA,GAAMA,CAAAA,YAAY,CAAG,GAAIC,gCAAJ,CAAuBC,2BAAcC,SAArC,CAArB,CAqDA,GAAMC,CAAAA,iCAAiC,CAAG,wBAA1C,CACA,GAAMC,CAAAA,kCAAkC,CAAG,yBAA3C,CAKO,QAASC,CAAAA,WAAT,EAGQ,oEAAJ,EAAI,CAFbC,wBAEa,MAFbA,wBAEa,CADbC,yBACa,MADbA,yBACa,CACb,eAMI,2BANJ,CACEC,mBADF,YACEA,mBADF,CAEmBC,gBAFnB,YAEEC,eAFF,CAG0BC,uBAH1B,YAGEC,sBAHF,CAIEC,0BAJF,YAIEA,0BAJF,CAKqBC,kBALrB,YAKEC,iBALF,CAOA,cAA0B,oBAA4C,IAA5C,CAA1B,qDAAOC,KAAP,eAAcC,QAAd,eACA,eAA8B,oBAAS,KAAT,CAA9B,sDAAOC,OAAP,eAAgBC,UAAhB,eAEA,GAAMC,CAAAA,sBAAsB,CAAG,uBAC7B,SAACC,MAAD,CAAyD,CACvD,GAAIf,wBAAJ,CAA8B,CAC5BA,wBAAwB,CACtBe,MAAM,CAACC,cADe,CAEtBT,0BAFsB,CAAxB,CAID,CALD,IAKO,CACLA,0BAA0B,CAACG,KAAD,CAA1B,CACD,CACF,CAV4B,CAW7B,CAACA,KAAD,CAAQV,wBAAR,CAAkCO,0BAAlC,CAX6B,CAA/B,CAcA,GAAMU,CAAAA,uBAAuB,CAAG,uBAC9B,SAACF,MAAD,CAA2D,CACzD,GAAId,yBAAJ,CAA+B,CAC7BA,yBAAyB,CACvBc,MAAM,CAACG,eADgB,CAEvBX,0BAFuB,CAAzB,CAID,CALD,IAKO,CACLA,0BAA0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5C,CACAf,QAAQ,CAAC,IAAD,CAAR,CACAE,UAAU,CAAC,KAAD,CAAV,CACA,MAAOE,CAAAA,MAAP,CACD,CAP4B,gEAQ7B,CAACV,uBAAD,CAR6B,CAA/B,CAWA,MAAO,CACLO,OAAO,CAAPA,OADK,CAELR,eAAe,CAAfA,eAFK,CAGLE,sBAAsB,CAAtBA,sBAHK,CAILJ,mBAAmB,CAAnBA,mBAJK,CAKLO,iBAAiB,CAAjBA,iBALK,CAAP,CAOD","sourcesContent":["import type { ApplePay, ApplePayError, StripeError } from '../types';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useStripe } from './useStripe';\nimport { NativeEventEmitter, NativeModules } from 'react-native';\n\nconst eventEmitter = new NativeEventEmitter(NativeModules.StripeSdk);\n\nexport interface Props {\n /**\n *\n * @example\n * ```ts\n * const { presentApplePay } = useApplePay({\n * onShippingMethodSelected: (shippingMethod, handler) => {\n * handler([\n * { label: 'Example item name 1', amount: '11.00' },\n * { label: 'Example item name 2', amount: '25.00' },\n * ]);\n * }\n * })\n * ```\n */\n onShippingMethodSelected?: (\n shippingMethod: ApplePay.ShippingMethod,\n handler: (summaryItems: ApplePay.CartSummaryItem[]) => Promise<{\n error?: StripeError<ApplePayError>;\n }>\n ) => void;\n /**\n *\n * @example\n * ```ts\n * const { presentApplePay } = useApplePay({\n * onShippingContactSelected: (shippingContact, handler) => {\n * handler([\n * { label: 'Example item name 1', amount: '11.00' },\n * { label: 'Example item name 2', amount: '25.00' },\n * ], [\n * { field: 'city', message: 'city error' },\n * ]);\n * }\n * })\n * ```\n */\n onShippingContactSelected?: (\n shippingContact: ApplePay.ShippingContact,\n handler: (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields?: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ) => Promise<{\n error?: StripeError<ApplePayError>;\n }>\n ) => void;\n}\n\nconst SET_SHIPPING_METHOD_CALLBACK_NAME = 'onDidSetShippingMethod';\nconst SET_SHIPPING_CONTACT_CALLBACK_NAME = 'onDidSetShippingContact';\n\n/**\n * useApplePay hook\n */\nexport function useApplePay({\n onShippingMethodSelected,\n onShippingContactSelected,\n}: Props = {}) {\n const {\n isApplePaySupported,\n presentApplePay: _presentApplePay,\n confirmApplePayPayment: _confirmApplePayPayment,\n updateApplePaySummaryItems,\n openApplePaySetup: _openApplePaySetup,\n } = useStripe();\n const [items, setItems] = useState<ApplePay.CartSummaryItem[] | null>(null);\n const [loading, setLoading] = useState(false);\n\n const onDidSetShippingMethod = useCallback(\n (result: { shippingMethod: ApplePay.ShippingMethod }) => {\n if (onShippingMethodSelected) {\n onShippingMethodSelected(\n result.shippingMethod,\n updateApplePaySummaryItems\n );\n } else {\n updateApplePaySummaryItems(items as ApplePay.CartSummaryItem[]);\n }\n },\n [items, onShippingMethodSelected, updateApplePaySummaryItems]\n );\n\n const onDidSetShippingContact = useCallback(\n (result: { shippingContact: ApplePay.ShippingContact }) => {\n if (onShippingContactSelected) {\n onShippingContactSelected(\n result.shippingContact,\n updateApplePaySummaryItems\n );\n } else {\n updateApplePaySummaryItems(items as ApplePay.CartSummaryItem[]);\n }\n },\n [items, onShippingContactSelected, updateApplePaySummaryItems]\n );\n\n useEffect(() => {\n const didSetShippingMethodListener = eventEmitter.addListener(\n SET_SHIPPING_METHOD_CALLBACK_NAME,\n onDidSetShippingMethod\n );\n const didSetShippingContactListener = eventEmitter.addListener(\n SET_SHIPPING_CONTACT_CALLBACK_NAME,\n onDidSetShippingContact\n );\n\n return () => {\n didSetShippingMethodListener.remove();\n didSetShippingContactListener.remove();\n };\n }, [onDidSetShippingContact, onDidSetShippingMethod]);\n\n const presentApplePay = useCallback(\n async (params: ApplePay.PresentParams) => {\n setLoading(true);\n setItems(params.cartItems);\n const result = await _presentApplePay(params);\n if (result.error) {\n setItems(null);\n }\n setLoading(false);\n return result;\n },\n [_presentApplePay]\n );\n\n const openApplePaySetup = useCallback(async () => {\n setLoading(true);\n const result = await _openApplePaySetup();\n setLoading(false);\n return result;\n }, [_openApplePaySetup]);\n\n const confirmApplePayPayment = useCallback(\n async (clientSecret: string) => {\n setLoading(true);\n const result = await _confirmApplePayPayment(clientSecret);\n setItems(null);\n setLoading(false);\n return result;\n },\n [_confirmApplePayPayment]\n );\n\n return {\n loading,\n presentApplePay,\n confirmApplePayPayment,\n isApplePaySupported,\n openApplePaySetup,\n };\n}\n"]}
1
+ {"version":3,"names":["SET_SHIPPING_METHOD_CALLBACK_NAME","SET_SHIPPING_CONTACT_CALLBACK_NAME","useApplePay","onShippingMethodSelected","onShippingContactSelected","useStripe","isApplePaySupported","_presentApplePay","presentApplePay","_confirmApplePayPayment","confirmApplePayPayment","updateApplePaySummaryItems","_openApplePaySetup","openApplePaySetup","useState","items","setItems","loading","setLoading","onDidSetShippingMethod","useCallback","result","shippingMethod","onDidSetShippingContact","shippingContact","useEffect","eventEmitter","NativeEventEmitter","NativeModules","StripeSdk","didSetShippingMethodListener","addListener","didSetShippingContactListener","remove","params","cartItems","error","clientSecret"],"sources":["useApplePay.tsx"],"sourcesContent":["import type { ApplePay, ApplePayError, StripeError } from '../types';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useStripe } from './useStripe';\nimport { NativeEventEmitter, NativeModules } from 'react-native';\n\nexport interface Props {\n /**\n *\n * @example\n * ```ts\n * const { presentApplePay } = useApplePay({\n * onShippingMethodSelected: (shippingMethod, handler) => {\n * handler([\n * { label: 'Example item name 1', amount: '11.00' },\n * { label: 'Example item name 2', amount: '25.00' },\n * ]);\n * }\n * })\n * ```\n */\n onShippingMethodSelected?: (\n shippingMethod: ApplePay.ShippingMethod,\n handler: (summaryItems: ApplePay.CartSummaryItem[]) => Promise<{\n error?: StripeError<ApplePayError>;\n }>\n ) => void;\n /**\n *\n * @example\n * ```ts\n * const { presentApplePay } = useApplePay({\n * onShippingContactSelected: (shippingContact, handler) => {\n * handler([\n * { label: 'Example item name 1', amount: '11.00' },\n * { label: 'Example item name 2', amount: '25.00' },\n * ], [\n * { field: 'city', message: 'city error' },\n * ]);\n * }\n * })\n * ```\n */\n onShippingContactSelected?: (\n shippingContact: ApplePay.ShippingContact,\n handler: (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields?: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ) => Promise<{\n error?: StripeError<ApplePayError>;\n }>\n ) => void;\n}\n\nconst SET_SHIPPING_METHOD_CALLBACK_NAME = 'onDidSetShippingMethod';\nconst SET_SHIPPING_CONTACT_CALLBACK_NAME = 'onDidSetShippingContact';\n\n/**\n * useApplePay hook\n */\nexport function useApplePay({\n onShippingMethodSelected,\n onShippingContactSelected,\n}: Props = {}) {\n const {\n isApplePaySupported,\n presentApplePay: _presentApplePay,\n confirmApplePayPayment: _confirmApplePayPayment,\n updateApplePaySummaryItems,\n openApplePaySetup: _openApplePaySetup,\n } = useStripe();\n const [items, setItems] = useState<ApplePay.CartSummaryItem[] | null>(null);\n const [loading, setLoading] = useState(false);\n\n const onDidSetShippingMethod = useCallback(\n (result: { shippingMethod: ApplePay.ShippingMethod }) => {\n if (onShippingMethodSelected) {\n onShippingMethodSelected(\n result.shippingMethod,\n updateApplePaySummaryItems\n );\n } else {\n updateApplePaySummaryItems(items as ApplePay.CartSummaryItem[]);\n }\n },\n [items, onShippingMethodSelected, updateApplePaySummaryItems]\n );\n\n const onDidSetShippingContact = useCallback(\n (result: { shippingContact: ApplePay.ShippingContact }) => {\n if (onShippingContactSelected) {\n onShippingContactSelected(\n result.shippingContact,\n updateApplePaySummaryItems\n );\n } else {\n updateApplePaySummaryItems(items as ApplePay.CartSummaryItem[]);\n }\n },\n [items, onShippingContactSelected, updateApplePaySummaryItems]\n );\n\n useEffect(() => {\n const eventEmitter = new NativeEventEmitter(NativeModules.StripeSdk);\n const didSetShippingMethodListener = eventEmitter.addListener(\n SET_SHIPPING_METHOD_CALLBACK_NAME,\n onDidSetShippingMethod\n );\n const didSetShippingContactListener = eventEmitter.addListener(\n SET_SHIPPING_CONTACT_CALLBACK_NAME,\n onDidSetShippingContact\n );\n\n return () => {\n didSetShippingMethodListener.remove();\n didSetShippingContactListener.remove();\n };\n }, [onDidSetShippingContact, onDidSetShippingMethod]);\n\n const presentApplePay = useCallback(\n async (params: ApplePay.PresentParams) => {\n setLoading(true);\n setItems(params.cartItems);\n const result = await _presentApplePay(params);\n if (result.error) {\n setItems(null);\n }\n setLoading(false);\n return result;\n },\n [_presentApplePay]\n );\n\n const openApplePaySetup = useCallback(async () => {\n setLoading(true);\n const result = await _openApplePaySetup();\n setLoading(false);\n return result;\n }, [_openApplePaySetup]);\n\n const confirmApplePayPayment = useCallback(\n async (clientSecret: string) => {\n setLoading(true);\n const result = await _confirmApplePayPayment(clientSecret);\n setItems(null);\n setLoading(false);\n return result;\n },\n [_confirmApplePayPayment]\n );\n\n return {\n loading,\n presentApplePay,\n confirmApplePayPayment,\n isApplePaySupported,\n openApplePaySetup,\n };\n}\n"],"mappings":"0WACA,4BACA,uCACA,yCAqDA,GAAMA,kCAAiC,CAAG,wBAAwB,CAClE,GAAMC,mCAAkC,CAAG,yBAAyB,CAK7D,QAASC,YAAW,EAGZ,oEAAJ,CAAC,CAAC,CAFXC,wBAAwB,MAAxBA,wBAAwB,CACxBC,yBAAyB,MAAzBA,yBAAyB,CAEzB,eAMI,GAAAC,qBAAS,GAAE,CALbC,mBAAmB,YAAnBA,mBAAmB,CACFC,gBAAgB,YAAjCC,eAAe,CACSC,uBAAuB,YAA/CC,sBAAsB,CACtBC,0BAA0B,YAA1BA,0BAA0B,CACPC,kBAAkB,YAArCC,iBAAiB,CAEnB,cAA0B,GAAAC,eAAQ,EAAoC,IAAI,CAAC,qDAApEC,KAAK,eAAEC,QAAQ,eACtB,eAA8B,GAAAF,eAAQ,EAAC,KAAK,CAAC,sDAAtCG,OAAO,eAAEC,UAAU,eAE1B,GAAMC,uBAAsB,CAAG,GAAAC,kBAAW,EACxC,SAACC,MAAmD,CAAK,CACvD,GAAIlB,wBAAwB,CAAE,CAC5BA,wBAAwB,CACtBkB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AC,+DACD,CAACd,gBAAgB,CAAC,CACnB,CAED,GAAMM,kBAAiB,CAAG,GAAAO,kBAAW,iCAAC,WAAY,CAChDF,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMG,OAAM,MAAST,mBAAkB,EAAE,CACzCM,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOG,OAAM,CACf,CAAC,EAAE,CAACT,kBAAkB,CAAC,CAAC,CAExB,GAAMF,uBAAsB,CAAG,GAAAU,kBAAW,sDACxC,UAAOiB,YAAoB,CAAK,CAC9BnB,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMG,OAAM,MAASZ,wBAAuB,CAAC4B,YAAY,CAAC,CAC1DrB,QAAQ,CAAC,IAAI,CAAC,CACdE,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOG,OAAM,CACf,CAAC,gEACD,CAACZ,uBAAuB,CAAC,CAC1B,CAED,MAAO,CACLQ,OAAO,CAAPA,OAAO,CACPT,eAAe,CAAfA,eAAe,CACfE,sBAAsB,CAAtBA,sBAAsB,CACtBJ,mBAAmB,CAAnBA,mBAAmB,CACnBO,iBAAiB,CAAjBA,iBACF,CAAC,CACH"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useConfirmPayment.tsx"],"names":["useConfirmPayment","loading","setLoading","confirmPayment","_confirmPayment","paymentIntentClientSecret","data","options","result"],"mappings":"sXAAA,4BAEA,uCAKO,QAASA,CAAAA,iBAAT,EAA6B,CAClC,cAA8B,oBAAS,KAAT,CAA9B,qDAAOC,OAAP,eAAgBC,UAAhB,eACA,eAA2B,2BAA3B,CAAQC,cAAR,YAAQA,cAAR,CAEA,GAAMC,CAAAA,eAAe,CAAG,0EACtB,UACEC,yBADF,CAEEC,IAFF,CAIK,IADHC,CAAAA,OACG,2DADqC,EACrC,CACHL,UAAU,CAAC,IAAD,CAAV,CAEA,GAAMM,CAAAA,MAAM,MAASL,CAAAA,cAAc,CACjCE,yBADiC,CAEjCC,IAFiC,CAGjCC,OAHiC,CAAnC,CAMAL,UAAU,CAAC,KAAD,CAAV,CAEA,MAAOM,CAAAA,MAAP,CACD,CAjBqB,kEAkBtB,CAACL,cAAD,CAlBsB,CAAxB,CAqBA,MAAO,CACLA,cAAc,CAAEC,eADX,CAELH,OAAO,CAAPA,OAFK,CAAP,CAID","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { PaymentIntent } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmPayment hook\n */\nexport function useConfirmPayment() {\n const [loading, setLoading] = useState(false);\n const { confirmPayment } = useStripe();\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n ) => {\n setLoading(true);\n\n const result = await confirmPayment(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmPayment]\n );\n\n return {\n confirmPayment: _confirmPayment,\n loading,\n };\n}\n"]}
1
+ {"version":3,"names":["useConfirmPayment","useState","loading","setLoading","useStripe","confirmPayment","_confirmPayment","useCallback","paymentIntentClientSecret","data","options","result"],"sources":["useConfirmPayment.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport type { PaymentIntent } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmPayment hook\n */\nexport function useConfirmPayment() {\n const [loading, setLoading] = useState(false);\n const { confirmPayment } = useStripe();\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data?: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n ) => {\n setLoading(true);\n\n const result = await confirmPayment(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmPayment]\n );\n\n return {\n confirmPayment: _confirmPayment,\n loading,\n };\n}\n"],"mappings":"sXAAA,4BAEA,uCAKO,QAASA,kBAAiB,EAAG,CAClC,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAC1B,eAA2B,GAAAC,qBAAS,GAAE,CAA9BC,cAAc,YAAdA,cAAc,CAEtB,GAAMC,gBAAe,CAAG,GAAAC,kBAAW,qDACjC,UACEC,yBAAiC,CACjCC,IAAkC,CAE/B,IADHC,QAAqC,2DAAG,CAAC,CAAC,CAE1CP,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMQ,OAAM,MAASN,eAAc,CACjCG,yBAAyB,CACzBC,IAAI,CACJC,OAAO,CACR,CAEDP,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOQ,OAAM,CACf,CAAC,kEACD,CAACN,cAAc,CAAC,CACjB,CAED,MAAO,CACLA,cAAc,CAAEC,eAAe,CAC/BJ,OAAO,CAAPA,OACF,CAAC,CACH"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useConfirmSetupIntent.tsx"],"names":["useConfirmSetupIntent","loading","setLoading","confirmSetupIntent","_confirmSetupIntent","paymentIntentClientSecret","data","options","result"],"mappings":"8XAAA,4BAEA,uCAKO,QAASA,CAAAA,qBAAT,EAAiC,CACtC,cAA8B,oBAAS,KAAT,CAA9B,qDAAOC,OAAP,eAAgBC,UAAhB,eACA,eAAmD,2BAAnD,CAA4BC,kBAA5B,YAAQA,kBAAR,CAEA,GAAMC,CAAAA,mBAAmB,CAAG,0EAC1B,UACEC,yBADF,CAEEC,IAFF,CAIK,IADHC,CAAAA,OACG,2DADmC,EACnC,CACHL,UAAU,CAAC,IAAD,CAAV,CAEA,GAAMM,CAAAA,MAAM,MAASL,CAAAA,kBAAkB,CACrCE,yBADqC,CAErCC,IAFqC,CAGrCC,OAHqC,CAAvC,CAMAL,UAAU,CAAC,KAAD,CAAV,CAEA,MAAOM,CAAAA,MAAP,CACD,CAjByB,kEAkB1B,CAACL,kBAAD,CAlB0B,CAA5B,CAqBA,MAAO,CACLA,kBAAkB,CAAEC,mBADf,CAELH,OAAO,CAAPA,OAFK,CAAP,CAID","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { SetupIntent } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmSetupIntent hook\n */\nexport function useConfirmSetupIntent() {\n const [loading, setLoading] = useState(false);\n const { confirmSetupIntent: confirmSetupIntent } = useStripe();\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n ) => {\n setLoading(true);\n\n const result = await confirmSetupIntent(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmSetupIntent]\n );\n\n return {\n confirmSetupIntent: _confirmSetupIntent,\n loading,\n };\n}\n"]}
1
+ {"version":3,"names":["useConfirmSetupIntent","useState","loading","setLoading","useStripe","confirmSetupIntent","_confirmSetupIntent","useCallback","paymentIntentClientSecret","data","options","result"],"sources":["useConfirmSetupIntent.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport type { SetupIntent } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmSetupIntent hook\n */\nexport function useConfirmSetupIntent() {\n const [loading, setLoading] = useState(false);\n const { confirmSetupIntent: confirmSetupIntent } = useStripe();\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n ) => {\n setLoading(true);\n\n const result = await confirmSetupIntent(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmSetupIntent]\n );\n\n return {\n confirmSetupIntent: _confirmSetupIntent,\n loading,\n };\n}\n"],"mappings":"8XAAA,4BAEA,uCAKO,QAASA,sBAAqB,EAAG,CACtC,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAC1B,eAAmD,GAAAC,qBAAS,GAAE,CAAlCC,kBAAkB,YAAtCA,kBAAkB,CAE1B,GAAMC,oBAAmB,CAAG,GAAAC,kBAAW,qDACrC,UACEC,yBAAiC,CACjCC,IAA+B,CAE5B,IADHC,QAAmC,2DAAG,CAAC,CAAC,CAExCP,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMQ,OAAM,MAASN,mBAAkB,CACrCG,yBAAyB,CACzBC,IAAI,CACJC,OAAO,CACR,CAEDP,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOQ,OAAM,CACf,CAAC,kEACD,CAACN,kBAAkB,CAAC,CACrB,CAED,MAAO,CACLA,kBAAkB,CAAEC,mBAAmB,CACvCJ,OAAO,CAAPA,OACF,CAAC,CACH"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useFinancialConnectionsSheet.tsx"],"names":["useFinancialConnectionsSheet","loading","setLoading","collectBankAccountToken","collectFinancialConnectionsAccounts","_collectBankAccountToken","clientSecret","result","_collectFinancialConnectionsAccounts"],"mappings":"4YAAA,4BACA,uCAQO,QAASA,CAAAA,4BAAT,EAAwC,CAC7C,cAA8B,oBAAS,KAAT,CAA9B,qDAAOC,OAAP,eAAgBC,UAAhB,eACA,eACE,2BADF,CAAQC,uBAAR,YAAQA,uBAAR,CAAiCC,mCAAjC,YAAiCA,mCAAjC,CAGA,GAAMC,CAAAA,wBAAwB,oDAAG,UAAOC,YAAP,CAAgC,CAC/DJ,UAAU,CAAC,IAAD,CAAV,CACA,GAAMK,CAAAA,MAAM,MAASJ,CAAAA,uBAAuB,CAACG,YAAD,CAA5C,CACAJ,UAAU,CAAC,KAAD,CAAV,CACA,MAAOK,CAAAA,MAAP,CACD,CAL6B,iBAAxBF,CAAAA,wBAAwB,4CAA9B,CAOA,GAAMG,CAAAA,oCAAoC,qDAAG,UAAOF,YAAP,CAAgC,CAC3EJ,UAAU,CAAC,IAAD,CAAV,CACA,GAAMK,CAAAA,MAAM,MAASH,CAAAA,mCAAmC,CAACE,YAAD,CAAxD,CACAJ,UAAU,CAAC,KAAD,CAAV,CACA,MAAOK,CAAAA,MAAP,CACD,CALyC,iBAApCC,CAAAA,oCAAoC,8CAA1C,CAOA,MAAO,CACLL,uBAAuB,CAAEE,wBADpB,CAELD,mCAAmC,CAAEI,oCAFhC,CAGLP,OAAO,CAAPA,OAHK,CAAP,CAKD","sourcesContent":["import { useState } from 'react';\nimport { useStripe } from './useStripe';\n\n/**\n * React hook for accessing functions on the Financial Connections sheet.\n *\n * Retuns the `collectBankAccountToken` and `collectFinancialConnectionsAccounts` functions, and a `loading` boolean that you can use\n * to display loading state (like showing a spinner).\n */\nexport function useFinancialConnectionsSheet() {\n const [loading, setLoading] = useState(false);\n const { collectBankAccountToken, collectFinancialConnectionsAccounts } =\n useStripe();\n\n const _collectBankAccountToken = async (clientSecret: string) => {\n setLoading(true);\n const result = await collectBankAccountToken(clientSecret);\n setLoading(false);\n return result;\n };\n\n const _collectFinancialConnectionsAccounts = async (clientSecret: string) => {\n setLoading(true);\n const result = await collectFinancialConnectionsAccounts(clientSecret);\n setLoading(false);\n return result;\n };\n\n return {\n collectBankAccountToken: _collectBankAccountToken,\n collectFinancialConnectionsAccounts: _collectFinancialConnectionsAccounts,\n loading,\n };\n}\n"]}
1
+ {"version":3,"names":["useFinancialConnectionsSheet","useState","loading","setLoading","useStripe","collectBankAccountToken","collectFinancialConnectionsAccounts","_collectBankAccountToken","clientSecret","result","_collectFinancialConnectionsAccounts"],"sources":["useFinancialConnectionsSheet.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useStripe } from './useStripe';\n\n/**\n * React hook for accessing functions on the Financial Connections sheet.\n *\n * Retuns the `collectBankAccountToken` and `collectFinancialConnectionsAccounts` functions, and a `loading` boolean that you can use\n * to display loading state (like showing a spinner).\n */\nexport function useFinancialConnectionsSheet() {\n const [loading, setLoading] = useState(false);\n const { collectBankAccountToken, collectFinancialConnectionsAccounts } =\n useStripe();\n\n const _collectBankAccountToken = async (clientSecret: string) => {\n setLoading(true);\n const result = await collectBankAccountToken(clientSecret);\n setLoading(false);\n return result;\n };\n\n const _collectFinancialConnectionsAccounts = async (clientSecret: string) => {\n setLoading(true);\n const result = await collectFinancialConnectionsAccounts(clientSecret);\n setLoading(false);\n return result;\n };\n\n return {\n collectBankAccountToken: _collectBankAccountToken,\n collectFinancialConnectionsAccounts: _collectFinancialConnectionsAccounts,\n loading,\n };\n}\n"],"mappings":"4YAAA,4BACA,uCAQO,QAASA,6BAA4B,EAAG,CAC7C,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAC1B,eACE,GAAAC,qBAAS,GAAE,CADLC,uBAAuB,YAAvBA,uBAAuB,CAAEC,mCAAmC,YAAnCA,mCAAmC,CAGpE,GAAMC,yBAAwB,oDAAG,UAAOC,YAAoB,CAAK,CAC/DL,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMM,OAAM,MAASJ,wBAAuB,CAACG,YAAY,CAAC,CAC1DL,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOM,OAAM,CACf,CAAC,iBALKF,yBAAwB,4CAK7B,CAED,GAAMG,qCAAoC,qDAAG,UAAOF,YAAoB,CAAK,CAC3EL,UAAU,CAAC,IAAI,CAAC,CAChB,GAAMM,OAAM,MAASH,oCAAmC,CAACE,YAAY,CAAC,CACtEL,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOM,OAAM,CACf,CAAC,iBALKC,qCAAoC,8CAKzC,CAED,MAAO,CACLL,uBAAuB,CAAEE,wBAAwB,CACjDD,mCAAmC,CAAEI,oCAAoC,CACzER,OAAO,CAAPA,OACF,CAAC,CACH"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useGooglePay.tsx"],"names":["useGooglePay","isGooglePaySupported","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","loading","setLoading","_isGooglePaySupported","params","result","_initGooglePay","_presentGooglePay","_createGooglePayPaymentMethod"],"mappings":"4WAAA,4BAEA,uCAKO,QAASA,CAAAA,YAAT,EAAwB,CAC7B,eAKI,2BALJ,CACEC,oBADF,YACEA,oBADF,CAEEC,aAFF,YAEEA,aAFF,CAGEC,gBAHF,YAGEA,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AEQ,cAHV,CAILP,gBAAgB,CAAEQ,iBAJb,CAKLP,4BAA4B,CAAEQ,6BALzB,CAAP,CAOD","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { GooglePay } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useGooglePay hook\n */\nexport function useGooglePay() {\n const {\n isGooglePaySupported,\n initGooglePay,\n presentGooglePay,\n createGooglePayPaymentMethod,\n } = useStripe();\n const [loading, setLoading] = useState(false);\n\n const _isGooglePaySupported = useCallback(\n async (params?: GooglePay.IsSupportedParams) => {\n setLoading(true);\n\n const result = await isGooglePaySupported(params);\n setLoading(false);\n\n return result;\n },\n [isGooglePaySupported]\n );\n\n const _initGooglePay = useCallback(\n async (params: GooglePay.InitParams) => {\n setLoading(true);\n\n const result = await initGooglePay(params);\n setLoading(false);\n\n return result;\n },\n [initGooglePay]\n );\n\n const _presentGooglePay = useCallback(\n async (params: GooglePay.PresentParams) => {\n setLoading(true);\n\n const result = await presentGooglePay(params);\n setLoading(false);\n\n return result;\n },\n [presentGooglePay]\n );\n\n const _createGooglePayPaymentMethod = useCallback(\n async (params: GooglePay.CreatePaymentMethodParams) => {\n setLoading(true);\n\n const result = await createGooglePayPaymentMethod(params);\n setLoading(false);\n\n return result;\n },\n [createGooglePayPaymentMethod]\n );\n\n return {\n loading,\n isGooglePaySupported: _isGooglePaySupported,\n initGooglePay: _initGooglePay,\n presentGooglePay: _presentGooglePay,\n createGooglePayPaymentMethod: _createGooglePayPaymentMethod,\n };\n}\n"]}
1
+ {"version":3,"names":["useGooglePay","useStripe","isGooglePaySupported","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","useState","loading","setLoading","_isGooglePaySupported","useCallback","params","result","_initGooglePay","_presentGooglePay","_createGooglePayPaymentMethod"],"sources":["useGooglePay.tsx"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport type { GooglePay } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useGooglePay hook\n */\nexport function useGooglePay() {\n const {\n isGooglePaySupported,\n initGooglePay,\n presentGooglePay,\n createGooglePayPaymentMethod,\n } = useStripe();\n const [loading, setLoading] = useState(false);\n\n const _isGooglePaySupported = useCallback(\n async (params?: GooglePay.IsSupportedParams) => {\n setLoading(true);\n\n const result = await isGooglePaySupported(params);\n setLoading(false);\n\n return result;\n },\n [isGooglePaySupported]\n );\n\n const _initGooglePay = useCallback(\n async (params: GooglePay.InitParams) => {\n setLoading(true);\n\n const result = await initGooglePay(params);\n setLoading(false);\n\n return result;\n },\n [initGooglePay]\n );\n\n const _presentGooglePay = useCallback(\n async (params: GooglePay.PresentParams) => {\n setLoading(true);\n\n const result = await presentGooglePay(params);\n setLoading(false);\n\n return result;\n },\n [presentGooglePay]\n );\n\n const _createGooglePayPaymentMethod = useCallback(\n async (params: GooglePay.CreatePaymentMethodParams) => {\n setLoading(true);\n\n const result = await createGooglePayPaymentMethod(params);\n setLoading(false);\n\n return result;\n },\n [createGooglePayPaymentMethod]\n );\n\n return {\n loading,\n isGooglePaySupported: _isGooglePaySupported,\n initGooglePay: _initGooglePay,\n presentGooglePay: _presentGooglePay,\n createGooglePayPaymentMethod: _createGooglePayPaymentMethod,\n };\n}\n"],"mappings":"4WAAA,4BAEA,uCAKO,QAASA,aAAY,EAAG,CAC7B,eAKI,GAAAC,qBAAS,GAAE,CAJbC,oBAAoB,YAApBA,oBAAoB,CACpBC,aAAa,YAAbA,aAAa,CACbC,gBAAgB,YAAhBA,gBAAgB,CAChBC,4BAA4B,YAA5BA,4BAA4B,CAE9B,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAE1B,GAAMC,sBAAqB,CAAG,GAAAC,kBAAW,qDACvC,UAAOC,MAAoC,CAAK,CAC9CH,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMI,OAAM,MAASV,qBAAoB,CAACS,MAAM,CAAC,CACjDH,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOI,OAAM,CACf,CAAC,8DACD,CAACV,oBAAoB,CAAC,CACvB,CAED,GAAMW,eAAc,CAAG,GAAAH,kBAAW,sDAChC,UAAOC,MAA4B,CAAK,CACtCH,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMI,OAAM,MAAST,cAAa,CAACQ,MAAM,CAAC,CAC1CH,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOI,OAAM,CACf,CAAC,gEACD,CAACT,aAAa,CAAC,CAChB,CAED,GAAMW,kBAAiB,CAAG,GAAAJ,kBAAW,sDACnC,UAAOC,MAA+B,CAAK,CACzCH,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMI,OAAM,MAASR,iBAAgB,CAACO,MAAM,CAAC,CAC7CH,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOI,OAAM,CACf,CAAC,gEACD,CAACR,gBAAgB,CAAC,CACnB,CAED,GAAMW,8BAA6B,CAAG,GAAAL,kBAAW,sDAC/C,UAAOC,MAA2C,CAAK,CACrDH,UAAU,CAAC,IAAI,CAAC,CAEhB,GAAMI,OAAM,MAASP,6BAA4B,CAACM,MAAM,CAAC,CACzDH,UAAU,CAAC,KAAK,CAAC,CAEjB,MAAOI,OAAM,CACf,CAAC,gEACD,CAACP,4BAA4B,CAAC,CAC/B,CAED,MAAO,CACLE,OAAO,CAAPA,OAAO,CACPL,oBAAoB,CAAEO,qBAAqB,CAC3CN,aAAa,CAAEU,cAAc,CAC7BT,gBAAgB,CAAEU,iBAAiB,CACnCT,4BAA4B,CAAEU,6BAChC,CAAC,CACH"}
@@ -1 +1 @@
1
- {"version":3,"sources":["usePaymentSheet.tsx"],"names":["usePaymentSheet","initPaymentSheetNative","initPaymentSheet","presentPaymentSheetNative","presentPaymentSheet","confirmPaymentSheetPaymentNative","confirmPaymentSheetPayment","resetPaymentSheetCustomerNative","resetPaymentSheetCustomer","loading","setLoading","params","result"],"mappings":"kXACA,4BACA,uCAKO,QAASA,CAAAA,eAAT,EAA2B,CAChC,eAKI,2BALJ,CACoBC,sBADpB,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E,yBAAyB,CAAzBA,yBAVK,CAAP,CAYD","sourcesContent":["import type { PaymentSheet } from '../types';\nimport { useState } from 'react';\nimport { useStripe } from './useStripe';\n\n/**\n * usePaymentSheet hook\n */\nexport function usePaymentSheet() {\n const {\n initPaymentSheet: initPaymentSheetNative,\n presentPaymentSheet: presentPaymentSheetNative,\n confirmPaymentSheetPayment: confirmPaymentSheetPaymentNative,\n resetPaymentSheetCustomer: resetPaymentSheetCustomerNative,\n } = useStripe();\n const [loading, setLoading] = useState(false);\n\n const initPaymentSheet = async (params: PaymentSheet.SetupParams) => {\n setLoading(true);\n const result = await initPaymentSheetNative(params);\n setLoading(false);\n return result;\n };\n\n const presentPaymentSheet = async () => {\n setLoading(true);\n const result = await presentPaymentSheetNative();\n setLoading(false);\n return result;\n };\n\n const confirmPaymentSheetPayment = async () => {\n setLoading(true);\n const result = await confirmPaymentSheetPaymentNative();\n setLoading(false);\n return result;\n };\n\n const resetPaymentSheetCustomer = async () => {\n setLoading(true);\n const result = await resetPaymentSheetCustomerNative();\n setLoading(false);\n return result;\n };\n\n return {\n loading,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\n /**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\n resetPaymentSheetCustomer,\n };\n}\n"]}
1
+ {"version":3,"names":["usePaymentSheet","useStripe","initPaymentSheetNative","initPaymentSheet","presentPaymentSheetNative","presentPaymentSheet","confirmPaymentSheetPaymentNative","confirmPaymentSheetPayment","resetPaymentSheetCustomerNative","resetPaymentSheetCustomer","useState","loading","setLoading","params","result"],"sources":["usePaymentSheet.tsx"],"sourcesContent":["import type { PaymentSheet } from '../types';\nimport { useState } from 'react';\nimport { useStripe } from './useStripe';\n\n/**\n * usePaymentSheet hook\n */\nexport function usePaymentSheet() {\n const {\n initPaymentSheet: initPaymentSheetNative,\n presentPaymentSheet: presentPaymentSheetNative,\n confirmPaymentSheetPayment: confirmPaymentSheetPaymentNative,\n resetPaymentSheetCustomer: resetPaymentSheetCustomerNative,\n } = useStripe();\n const [loading, setLoading] = useState(false);\n\n const initPaymentSheet = async (params: PaymentSheet.SetupParams) => {\n setLoading(true);\n const result = await initPaymentSheetNative(params);\n setLoading(false);\n return result;\n };\n\n const presentPaymentSheet = async () => {\n setLoading(true);\n const result = await presentPaymentSheetNative();\n setLoading(false);\n return result;\n };\n\n const confirmPaymentSheetPayment = async () => {\n setLoading(true);\n const result = await confirmPaymentSheetPaymentNative();\n setLoading(false);\n return result;\n };\n\n const resetPaymentSheetCustomer = async () => {\n setLoading(true);\n const result = await resetPaymentSheetCustomerNative();\n setLoading(false);\n return result;\n };\n\n return {\n loading,\n initPaymentSheet,\n presentPaymentSheet,\n confirmPaymentSheetPayment,\n /**\n * You must call this method when the user logs out from your app. This will ensure that\n * any persisted authentication state in the PaymentSheet, such as authentication cookies,\n * is also cleared during logout.\n */\n resetPaymentSheetCustomer,\n };\n}\n"],"mappings":"kXACA,4BACA,uCAKO,QAASA,gBAAe,EAAG,CAChC,eAKI,GAAAC,qBAAS,GAAE,CAJKC,sBAAsB,YAAxCC,gBAAgB,CACKC,yBAAyB,YAA9CC,mBAAmB,CACSC,gCAAgC,YAA5DC,0BAA0B,CACCC,+BAA+B,YAA1DC,yBAAyB,CAE3B,cAA8B,GAAAC,eAAQ,EAAC,KAAK,CAAC,qDAAtCC,OAAO,eAAEC,UAAU,eAE1B,GAAMT,iBAAgB,oDAAG,UAAOU,MAAgC,CAAK,CACnED,UAAU,CAAC,IAAI,CAAC,CAChB,GAAME,OAAM,MAASZ,uBAAsB,CAACW,MAAM,CAAC,CACnDD,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOE,OAAM,CACf,CAAC,iBALKX,iBAAgB,4CAKrB,CAED,GAAME,oBAAmB,qDAAG,WAAY,CACtCO,UAAU,CAAC,IAAI,CAAC,CAChB,GAAME,OAAM,MAASV,0BAAyB,EAAE,CAChDQ,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOE,OAAM,CACf,CAAC,iBALKT,oBAAmB,2CAKxB,CAED,GAAME,2BAA0B,qDAAG,WAAY,CAC7CK,UAAU,CAAC,IAAI,CAAC,CAChB,GAAME,OAAM,MAASR,iCAAgC,EAAE,CACvDM,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOE,OAAM,CACf,CAAC,iBALKP,2BAA0B,2CAK/B,CAED,GAAME,0BAAyB,qDAAG,WAAY,CAC5CG,UAAU,CAAC,IAAI,CAAC,CAChB,GAAME,OAAM,MAASN,gCAA+B,EAAE,CACtDI,UAAU,CAAC,KAAK,CAAC,CACjB,MAAOE,OAAM,CACf,CAAC,iBALKL,0BAAyB,2CAK9B,CAED,MAAO,CACLE,OAAO,CAAPA,OAAO,CACPR,gBAAgB,CAAhBA,gBAAgB,CAChBE,mBAAmB,CAAnBA,mBAAmB,CACnBE,0BAA0B,CAA1BA,0BAA0B,CAM1BE,yBAAyB,CAAzBA,yBACF,CAAC,CACH"}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.usePlatformPay=usePlatformPay;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _useStripe2=require("./useStripe");function usePlatformPay(){var _useStripe=(0,_useStripe2.useStripe)(),isPlatformPaySupported=_useStripe.isPlatformPaySupported,confirmPlatformPaySetupIntent=_useStripe.confirmPlatformPaySetupIntent,confirmPlatformPayPayment=_useStripe.confirmPlatformPayPayment,createPlatformPayPaymentMethod=_useStripe.createPlatformPayPaymentMethod,dismissPlatformPay=_useStripe.dismissPlatformPay,updatePlatformPaySheet=_useStripe.updatePlatformPaySheet,canAddCardToWallet=_useStripe.canAddCardToWallet,openPlatformPaySetup=_useStripe.openPlatformPaySetup;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),loading=_useState2[0],setLoading=_useState2[1];var _isPlatformPaySupported=(0,_react.useCallback)(function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);var result=yield isPlatformPaySupported(params);setLoading(false);return result;});return function(_x){return _ref.apply(this,arguments);};}(),[isPlatformPaySupported]);var _confirmPlatformPaySetupIntent=(0,_react.useCallback)(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(clientSecret,params){setLoading(true);var result=yield confirmPlatformPaySetupIntent(clientSecret,params);setLoading(false);return result;});return function(_x2,_x3){return _ref2.apply(this,arguments);};}(),[confirmPlatformPaySetupIntent]);var _confirmPlatformPayPayment=(0,_react.useCallback)(function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret,params){setLoading(true);var result=yield confirmPlatformPayPayment(clientSecret,params);setLoading(false);return result;});return function(_x4,_x5){return _ref3.apply(this,arguments);};}(),[confirmPlatformPayPayment]);var _createPlatformPayPaymentMethod=(0,_react.useCallback)(function(){var _ref4=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);var result=yield createPlatformPayPaymentMethod(params);setLoading(false);return result;});return function(_x6){return _ref4.apply(this,arguments);};}(),[createPlatformPayPaymentMethod]);var _dismissPlatformPay=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){setLoading(true);var result=yield dismissPlatformPay();setLoading(false);return result;}),[dismissPlatformPay]);var _updatePlatformPaySheet=(0,_react.useCallback)(function(){var _ref6=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);var result=yield updatePlatformPaySheet(params);setLoading(false);return result;});return function(_x7){return _ref6.apply(this,arguments);};}(),[updatePlatformPaySheet]);var _canAddCardToWallet=(0,_react.useCallback)(function(){var _ref7=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);var result=yield canAddCardToWallet(params);setLoading(false);return result;});return function(_x8){return _ref7.apply(this,arguments);};}(),[canAddCardToWallet]);var _openPlatformPaySetup=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return openPlatformPaySetup();}),[openPlatformPaySetup]);return{loading:loading,isPlatformPaySupported:_isPlatformPaySupported,confirmPlatformPaySetupIntent:_confirmPlatformPaySetupIntent,confirmPlatformPayPayment:_confirmPlatformPayPayment,createPlatformPayPaymentMethod:_createPlatformPayPaymentMethod,dismissPlatformPay:_dismissPlatformPay,updatePlatformPaySheet:_updatePlatformPaySheet,canAddCardToWallet:_canAddCardToWallet,openPlatformPaySetup:_openPlatformPaySetup};}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.usePlatformPay=usePlatformPay;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _useStripe2=require("./useStripe");function usePlatformPay(){var _useStripe=(0,_useStripe2.useStripe)(),isPlatformPaySupported=_useStripe.isPlatformPaySupported,confirmPlatformPaySetupIntent=_useStripe.confirmPlatformPaySetupIntent,confirmPlatformPayPayment=_useStripe.confirmPlatformPayPayment,createPlatformPayPaymentMethod=_useStripe.createPlatformPayPaymentMethod,createPlatformPayToken=_useStripe.createPlatformPayToken,dismissPlatformPay=_useStripe.dismissPlatformPay,updatePlatformPaySheet=_useStripe.updatePlatformPaySheet,canAddCardToWallet=_useStripe.canAddCardToWallet,openPlatformPaySetup=_useStripe.openPlatformPaySetup;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),loading=_useState2[0],setLoading=_useState2[1];var _isPlatformPaySupported=(0,_react.useCallback)(function(){var _ref=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);var result=yield isPlatformPaySupported(params);setLoading(false);return result;});return function(_x){return _ref.apply(this,arguments);};}(),[isPlatformPaySupported]);var _confirmPlatformPaySetupIntent=(0,_react.useCallback)(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(clientSecret,params){setLoading(true);var result=yield confirmPlatformPaySetupIntent(clientSecret,params);setLoading(false);return result;});return function(_x2,_x3){return _ref2.apply(this,arguments);};}(),[confirmPlatformPaySetupIntent]);var _confirmPlatformPayPayment=(0,_react.useCallback)(function(){var _ref3=(0,_asyncToGenerator2.default)(function*(clientSecret,params){setLoading(true);var result=yield confirmPlatformPayPayment(clientSecret,params);setLoading(false);return result;});return function(_x4,_x5){return _ref3.apply(this,arguments);};}(),[confirmPlatformPayPayment]);var _createPlatformPayPaymentMethod=(0,_react.useCallback)(function(){var _ref4=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);var result=yield createPlatformPayPaymentMethod(params);setLoading(false);return result;});return function(_x6){return _ref4.apply(this,arguments);};}(),[createPlatformPayPaymentMethod]);var _createPlatformPayToken=(0,_react.useCallback)(function(){var _ref5=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);var result=yield createPlatformPayToken(params);setLoading(false);return result;});return function(_x7){return _ref5.apply(this,arguments);};}(),[createPlatformPayToken]);var _dismissPlatformPay=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){setLoading(true);var result=yield dismissPlatformPay();setLoading(false);return result;}),[dismissPlatformPay]);var _updatePlatformPaySheet=(0,_react.useCallback)(function(){var _ref7=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);var result=yield updatePlatformPaySheet(params);setLoading(false);return result;});return function(_x8){return _ref7.apply(this,arguments);};}(),[updatePlatformPaySheet]);var _canAddCardToWallet=(0,_react.useCallback)(function(){var _ref8=(0,_asyncToGenerator2.default)(function*(params){setLoading(true);var result=yield canAddCardToWallet(params);setLoading(false);return result;});return function(_x9){return _ref8.apply(this,arguments);};}(),[canAddCardToWallet]);var _openPlatformPaySetup=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){return openPlatformPaySetup();}),[openPlatformPaySetup]);return{loading:loading,isPlatformPaySupported:_isPlatformPaySupported,confirmPlatformPaySetupIntent:_confirmPlatformPaySetupIntent,confirmPlatformPayPayment:_confirmPlatformPayPayment,createPlatformPayPaymentMethod:_createPlatformPayPaymentMethod,createPlatformPayToken:_createPlatformPayToken,dismissPlatformPay:_dismissPlatformPay,updatePlatformPaySheet:_updatePlatformPaySheet,canAddCardToWallet:_canAddCardToWallet,openPlatformPaySetup:_openPlatformPaySetup};}
2
2
  //# sourceMappingURL=usePlatformPay.js.map