@stripe/stripe-react-native 0.21.0 → 0.22.1

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 (453) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/android/build.gradle +1 -0
  3. package/android/proguard-rules.txt +7 -0
  4. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +4 -2
  5. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +2 -3
  6. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +5 -0
  7. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +46 -8
  8. package/android/src/main/java/com/reactnativestripesdk/GooglePayLauncherFragment.kt +132 -0
  9. package/android/src/main/java/com/reactnativestripesdk/GooglePayRequestHelper.kt +144 -0
  10. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +123 -8
  11. package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +5 -0
  12. package/android/src/main/res/drawable/book_with_googlepay_button_content.xml +14 -0
  13. package/android/src/main/res/drawable/buy_with_googlepay_button_content.xml +14 -0
  14. package/android/src/main/res/drawable/checkout_with_googlepay_button_content.xml +14 -0
  15. package/android/src/main/res/drawable/donate_with_googlepay_button_content.xml +14 -0
  16. package/android/src/main/res/drawable/googlepay_button_background_shape.xml +11 -0
  17. package/android/src/main/res/drawable/googlepay_mark_background.xml +12 -0
  18. package/android/src/main/res/drawable/googlepay_mark_content.xml +27 -0
  19. package/android/src/main/res/drawable/order_with_googlepay_button_content.xml +14 -0
  20. package/android/src/main/res/drawable/pay_with_googlepay_button_content.xml +6 -6
  21. package/android/src/main/res/drawable/subscribe_with_googlepay_button_content.xml +14 -0
  22. package/android/src/main/res/drawable-ar/book_with_googlepay_button_content.xml +14 -0
  23. package/android/src/main/res/drawable-ar/buy_with_googlepay_button_content.xml +14 -0
  24. package/android/src/main/res/drawable-ar/checkout_with_googlepay_button_content.xml +14 -0
  25. package/android/src/main/res/drawable-ar/donate_with_googlepay_button_content.xml +14 -0
  26. package/android/src/main/res/drawable-ar/order_with_googlepay_button_content.xml +14 -0
  27. package/android/src/main/res/drawable-ar/pay_with_googlepay_button_content.xml +6 -6
  28. package/android/src/main/res/drawable-ar/subscribe_with_googlepay_button_content.xml +14 -0
  29. package/android/src/main/res/drawable-bg/book_with_googlepay_button_content.xml +14 -0
  30. package/android/src/main/res/drawable-bg/buy_with_googlepay_button_content.xml +14 -0
  31. package/android/src/main/res/drawable-bg/checkout_with_googlepay_button_content.xml +14 -0
  32. package/android/src/main/res/drawable-bg/donate_with_googlepay_button_content.xml +14 -0
  33. package/android/src/main/res/drawable-bg/order_with_googlepay_button_content.xml +14 -0
  34. package/android/src/main/res/drawable-bg/pay_with_googlepay_button_content.xml +4 -4
  35. package/android/src/main/res/drawable-bg/subscribe_with_googlepay_button_content.xml +14 -0
  36. package/android/src/main/res/drawable-ca/book_with_googlepay_button_content.xml +14 -0
  37. package/android/src/main/res/drawable-ca/buy_with_googlepay_button_content.xml +14 -0
  38. package/android/src/main/res/drawable-ca/checkout_with_googlepay_button_content.xml +14 -0
  39. package/android/src/main/res/drawable-ca/donate_with_googlepay_button_content.xml +14 -0
  40. package/android/src/main/res/drawable-ca/order_with_googlepay_button_content.xml +14 -0
  41. package/android/src/main/res/drawable-ca/pay_with_googlepay_button_content.xml +6 -6
  42. package/android/src/main/res/drawable-ca/subscribe_with_googlepay_button_content.xml +14 -0
  43. package/android/src/main/res/drawable-cs/book_with_googlepay_button_content.xml +14 -0
  44. package/android/src/main/res/drawable-cs/buy_with_googlepay_button_content.xml +14 -0
  45. package/android/src/main/res/drawable-cs/checkout_with_googlepay_button_content.xml +14 -0
  46. package/android/src/main/res/drawable-cs/donate_with_googlepay_button_content.xml +14 -0
  47. package/android/src/main/res/drawable-cs/order_with_googlepay_button_content.xml +14 -0
  48. package/android/src/main/res/drawable-cs/pay_with_googlepay_button_content.xml +6 -6
  49. package/android/src/main/res/drawable-cs/subscribe_with_googlepay_button_content.xml +14 -0
  50. package/android/src/main/res/drawable-da/book_with_googlepay_button_content.xml +14 -0
  51. package/android/src/main/res/drawable-da/buy_with_googlepay_button_content.xml +14 -0
  52. package/android/src/main/res/drawable-da/checkout_with_googlepay_button_content.xml +14 -0
  53. package/android/src/main/res/drawable-da/donate_with_googlepay_button_content.xml +14 -0
  54. package/android/src/main/res/drawable-da/order_with_googlepay_button_content.xml +14 -0
  55. package/android/src/main/res/drawable-da/pay_with_googlepay_button_content.xml +6 -6
  56. package/android/src/main/res/drawable-da/subscribe_with_googlepay_button_content.xml +14 -0
  57. package/android/src/main/res/drawable-de/book_with_googlepay_button_content.xml +15 -0
  58. package/android/src/main/res/drawable-de/buy_with_googlepay_button_content.xml +15 -0
  59. package/android/src/main/res/drawable-de/checkout_with_googlepay_button_content.xml +15 -0
  60. package/android/src/main/res/drawable-de/donate_with_googlepay_button_content.xml +15 -0
  61. package/android/src/main/res/drawable-de/order_with_googlepay_button_content.xml +15 -0
  62. package/android/src/main/res/drawable-de/pay_with_googlepay_button_content.xml +7 -7
  63. package/android/src/main/res/drawable-de/subscribe_with_googlepay_button_content.xml +15 -0
  64. package/android/src/main/res/drawable-el/book_with_googlepay_button_content.xml +14 -0
  65. package/android/src/main/res/drawable-el/buy_with_googlepay_button_content.xml +14 -0
  66. package/android/src/main/res/drawable-el/checkout_with_googlepay_button_content.xml +14 -0
  67. package/android/src/main/res/drawable-el/donate_with_googlepay_button_content.xml +14 -0
  68. package/android/src/main/res/drawable-el/order_with_googlepay_button_content.xml +14 -0
  69. package/android/src/main/res/drawable-el/pay_with_googlepay_button_content.xml +4 -4
  70. package/android/src/main/res/drawable-el/subscribe_with_googlepay_button_content.xml +14 -0
  71. package/android/src/main/res/drawable-et/book_with_googlepay_button_content.xml +15 -0
  72. package/android/src/main/res/drawable-et/buy_with_googlepay_button_content.xml +15 -0
  73. package/android/src/main/res/drawable-et/checkout_with_googlepay_button_content.xml +15 -0
  74. package/android/src/main/res/drawable-et/donate_with_googlepay_button_content.xml +15 -0
  75. package/android/src/main/res/drawable-et/order_with_googlepay_button_content.xml +15 -0
  76. package/android/src/main/res/drawable-et/pay_with_googlepay_button_content.xml +8 -8
  77. package/android/src/main/res/drawable-et/subscribe_with_googlepay_button_content.xml +15 -0
  78. package/android/src/main/res/drawable-fi/book_with_googlepay_button_content.xml +15 -0
  79. package/android/src/main/res/drawable-fi/buy_with_googlepay_button_content.xml +15 -0
  80. package/android/src/main/res/drawable-fi/checkout_with_googlepay_button_content.xml +15 -0
  81. package/android/src/main/res/drawable-fi/donate_with_googlepay_button_content.xml +15 -0
  82. package/android/src/main/res/drawable-fi/order_with_googlepay_button_content.xml +15 -0
  83. package/android/src/main/res/drawable-fi/pay_with_googlepay_button_content.xml +8 -8
  84. package/android/src/main/res/drawable-fi/subscribe_with_googlepay_button_content.xml +15 -0
  85. package/android/src/main/res/drawable-fr/book_with_googlepay_button_content.xml +14 -0
  86. package/android/src/main/res/drawable-fr/buy_with_googlepay_button_content.xml +14 -0
  87. package/android/src/main/res/drawable-fr/checkout_with_googlepay_button_content.xml +14 -0
  88. package/android/src/main/res/drawable-fr/donate_with_googlepay_button_content.xml +14 -0
  89. package/android/src/main/res/drawable-fr/order_with_googlepay_button_content.xml +14 -0
  90. package/android/src/main/res/drawable-fr/pay_with_googlepay_button_content.xml +5 -5
  91. package/android/src/main/res/drawable-fr/subscribe_with_googlepay_button_content.xml +14 -0
  92. package/android/src/main/res/drawable-hr/book_with_googlepay_button_content.xml +14 -0
  93. package/android/src/main/res/drawable-hr/buy_with_googlepay_button_content.xml +14 -0
  94. package/android/src/main/res/drawable-hr/checkout_with_googlepay_button_content.xml +14 -0
  95. package/android/src/main/res/drawable-hr/donate_with_googlepay_button_content.xml +14 -0
  96. package/android/src/main/res/drawable-hr/order_with_googlepay_button_content.xml +14 -0
  97. package/android/src/main/res/drawable-hr/pay_with_googlepay_button_content.xml +4 -4
  98. package/android/src/main/res/drawable-hr/subscribe_with_googlepay_button_content.xml +14 -0
  99. package/android/src/main/res/drawable-id/book_with_googlepay_button_content.xml +14 -0
  100. package/android/src/main/res/drawable-id/buy_with_googlepay_button_content.xml +14 -0
  101. package/android/src/main/res/drawable-id/checkout_with_googlepay_button_content.xml +14 -0
  102. package/android/src/main/res/drawable-id/donate_with_googlepay_button_content.xml +14 -0
  103. package/android/src/main/res/drawable-id/order_with_googlepay_button_content.xml +14 -0
  104. package/android/src/main/res/drawable-id/pay_with_googlepay_button_content.xml +4 -4
  105. package/android/src/main/res/drawable-id/subscribe_with_googlepay_button_content.xml +14 -0
  106. package/android/src/main/res/drawable-it/book_with_googlepay_button_content.xml +14 -0
  107. package/android/src/main/res/drawable-it/buy_with_googlepay_button_content.xml +14 -0
  108. package/android/src/main/res/drawable-it/checkout_with_googlepay_button_content.xml +14 -0
  109. package/android/src/main/res/drawable-it/donate_with_googlepay_button_content.xml +14 -0
  110. package/android/src/main/res/drawable-it/order_with_googlepay_button_content.xml +14 -0
  111. package/android/src/main/res/drawable-it/pay_with_googlepay_button_content.xml +6 -6
  112. package/android/src/main/res/drawable-it/subscribe_with_googlepay_button_content.xml +14 -0
  113. package/android/src/main/res/drawable-ja/book_with_googlepay_button_content.xml +14 -0
  114. package/android/src/main/res/drawable-ja/buy_with_googlepay_button_content.xml +14 -0
  115. package/android/src/main/res/drawable-ja/checkout_with_googlepay_button_content.xml +14 -0
  116. package/android/src/main/res/drawable-ja/donate_with_googlepay_button_content.xml +14 -0
  117. package/android/src/main/res/drawable-ja/order_with_googlepay_button_content.xml +14 -0
  118. package/android/src/main/res/drawable-ja/pay_with_googlepay_button_content.xml +5 -5
  119. package/android/src/main/res/drawable-ja/subscribe_with_googlepay_button_content.xml +14 -0
  120. package/android/src/main/res/drawable-ko/book_with_googlepay_button_content.xml +14 -0
  121. package/android/src/main/res/drawable-ko/buy_with_googlepay_button_content.xml +14 -0
  122. package/android/src/main/res/drawable-ko/checkout_with_googlepay_button_content.xml +14 -0
  123. package/android/src/main/res/drawable-ko/donate_with_googlepay_button_content.xml +14 -0
  124. package/android/src/main/res/drawable-ko/order_with_googlepay_button_content.xml +14 -0
  125. package/android/src/main/res/drawable-ko/pay_with_googlepay_button_content.xml +7 -7
  126. package/android/src/main/res/drawable-ko/subscribe_with_googlepay_button_content.xml +14 -0
  127. package/android/src/main/res/drawable-ms/book_with_googlepay_button_content.xml +14 -0
  128. package/android/src/main/res/drawable-ms/buy_with_googlepay_button_content.xml +14 -0
  129. package/android/src/main/res/drawable-ms/checkout_with_googlepay_button_content.xml +14 -0
  130. package/android/src/main/res/drawable-ms/donate_with_googlepay_button_content.xml +14 -0
  131. package/android/src/main/res/drawable-ms/order_with_googlepay_button_content.xml +14 -0
  132. package/android/src/main/res/drawable-ms/pay_with_googlepay_button_content.xml +4 -4
  133. package/android/src/main/res/drawable-ms/subscribe_with_googlepay_button_content.xml +14 -0
  134. package/android/src/main/res/drawable-nl/book_with_googlepay_button_content.xml +14 -0
  135. package/android/src/main/res/drawable-nl/buy_with_googlepay_button_content.xml +14 -0
  136. package/android/src/main/res/drawable-nl/checkout_with_googlepay_button_content.xml +14 -0
  137. package/android/src/main/res/drawable-nl/donate_with_googlepay_button_content.xml +14 -0
  138. package/android/src/main/res/drawable-nl/order_with_googlepay_button_content.xml +14 -0
  139. package/android/src/main/res/drawable-nl/pay_with_googlepay_button_content.xml +4 -4
  140. package/android/src/main/res/drawable-nl/subscribe_with_googlepay_button_content.xml +14 -0
  141. package/android/src/main/res/drawable-no/book_with_googlepay_button_content.xml +14 -0
  142. package/android/src/main/res/drawable-no/buy_with_googlepay_button_content.xml +14 -0
  143. package/android/src/main/res/drawable-no/checkout_with_googlepay_button_content.xml +14 -0
  144. package/android/src/main/res/drawable-no/donate_with_googlepay_button_content.xml +14 -0
  145. package/android/src/main/res/drawable-no/order_with_googlepay_button_content.xml +14 -0
  146. package/android/src/main/res/drawable-no/pay_with_googlepay_button_content.xml +6 -6
  147. package/android/src/main/res/drawable-no/subscribe_with_googlepay_button_content.xml +14 -0
  148. package/android/src/main/res/drawable-pl/book_with_googlepay_button_content.xml +14 -0
  149. package/android/src/main/res/drawable-pl/buy_with_googlepay_button_content.xml +14 -0
  150. package/android/src/main/res/drawable-pl/checkout_with_googlepay_button_content.xml +14 -0
  151. package/android/src/main/res/drawable-pl/donate_with_googlepay_button_content.xml +14 -0
  152. package/android/src/main/res/drawable-pl/order_with_googlepay_button_content.xml +14 -0
  153. package/android/src/main/res/drawable-pl/pay_with_googlepay_button_content.xml +7 -7
  154. package/android/src/main/res/drawable-pl/subscribe_with_googlepay_button_content.xml +14 -0
  155. package/android/src/main/res/drawable-ru/book_with_googlepay_button_content.xml +14 -0
  156. package/android/src/main/res/drawable-ru/buy_with_googlepay_button_content.xml +14 -0
  157. package/android/src/main/res/drawable-ru/checkout_with_googlepay_button_content.xml +14 -0
  158. package/android/src/main/res/drawable-ru/donate_with_googlepay_button_content.xml +14 -0
  159. package/android/src/main/res/drawable-ru/order_with_googlepay_button_content.xml +14 -0
  160. package/android/src/main/res/drawable-ru/pay_with_googlepay_button_content.xml +7 -7
  161. package/android/src/main/res/drawable-ru/subscribe_with_googlepay_button_content.xml +14 -0
  162. package/android/src/main/res/drawable-sk/book_with_googlepay_button_content.xml +14 -0
  163. package/android/src/main/res/drawable-sk/buy_with_googlepay_button_content.xml +14 -0
  164. package/android/src/main/res/drawable-sk/checkout_with_googlepay_button_content.xml +14 -0
  165. package/android/src/main/res/drawable-sk/donate_with_googlepay_button_content.xml +14 -0
  166. package/android/src/main/res/drawable-sk/order_with_googlepay_button_content.xml +14 -0
  167. package/android/src/main/res/drawable-sk/pay_with_googlepay_button_content.xml +4 -4
  168. package/android/src/main/res/drawable-sk/subscribe_with_googlepay_button_content.xml +14 -0
  169. package/android/src/main/res/drawable-sl/book_with_googlepay_button_content.xml +14 -0
  170. package/android/src/main/res/drawable-sl/buy_with_googlepay_button_content.xml +14 -0
  171. package/android/src/main/res/drawable-sl/checkout_with_googlepay_button_content.xml +14 -0
  172. package/android/src/main/res/drawable-sl/donate_with_googlepay_button_content.xml +14 -0
  173. package/android/src/main/res/drawable-sl/order_with_googlepay_button_content.xml +14 -0
  174. package/android/src/main/res/drawable-sl/pay_with_googlepay_button_content.xml +4 -4
  175. package/android/src/main/res/drawable-sl/subscribe_with_googlepay_button_content.xml +14 -0
  176. package/android/src/main/res/drawable-sr/book_with_googlepay_button_content.xml +14 -0
  177. package/android/src/main/res/drawable-sr/buy_with_googlepay_button_content.xml +14 -0
  178. package/android/src/main/res/drawable-sr/checkout_with_googlepay_button_content.xml +14 -0
  179. package/android/src/main/res/drawable-sr/donate_with_googlepay_button_content.xml +14 -0
  180. package/android/src/main/res/drawable-sr/order_with_googlepay_button_content.xml +14 -0
  181. package/android/src/main/res/drawable-sr/pay_with_googlepay_button_content.xml +7 -7
  182. package/android/src/main/res/drawable-sr/subscribe_with_googlepay_button_content.xml +14 -0
  183. package/android/src/main/res/drawable-sv/book_with_googlepay_button_content.xml +14 -0
  184. package/android/src/main/res/drawable-sv/buy_with_googlepay_button_content.xml +14 -0
  185. package/android/src/main/res/drawable-sv/checkout_with_googlepay_button_content.xml +14 -0
  186. package/android/src/main/res/drawable-sv/donate_with_googlepay_button_content.xml +14 -0
  187. package/android/src/main/res/drawable-sv/order_with_googlepay_button_content.xml +14 -0
  188. package/android/src/main/res/drawable-sv/pay_with_googlepay_button_content.xml +4 -4
  189. package/android/src/main/res/drawable-sv/subscribe_with_googlepay_button_content.xml +14 -0
  190. package/android/src/main/res/drawable-th/book_with_googlepay_button_content.xml +14 -0
  191. package/android/src/main/res/drawable-th/buy_with_googlepay_button_content.xml +14 -0
  192. package/android/src/main/res/drawable-th/checkout_with_googlepay_button_content.xml +14 -0
  193. package/android/src/main/res/drawable-th/donate_with_googlepay_button_content.xml +14 -0
  194. package/android/src/main/res/drawable-th/order_with_googlepay_button_content.xml +14 -0
  195. package/android/src/main/res/drawable-th/pay_with_googlepay_button_content.xml +6 -6
  196. package/android/src/main/res/drawable-th/subscribe_with_googlepay_button_content.xml +14 -0
  197. package/android/src/main/res/drawable-tr/book_with_googlepay_button_content.xml +14 -0
  198. package/android/src/main/res/drawable-tr/buy_with_googlepay_button_content.xml +14 -0
  199. package/android/src/main/res/drawable-tr/checkout_with_googlepay_button_content.xml +14 -0
  200. package/android/src/main/res/drawable-tr/donate_with_googlepay_button_content.xml +14 -0
  201. package/android/src/main/res/drawable-tr/order_with_googlepay_button_content.xml +14 -0
  202. package/android/src/main/res/drawable-tr/pay_with_googlepay_button_content.xml +7 -7
  203. package/android/src/main/res/drawable-tr/subscribe_with_googlepay_button_content.xml +14 -0
  204. package/android/src/main/res/drawable-uk/book_with_googlepay_button_content.xml +14 -0
  205. package/android/src/main/res/drawable-uk/buy_with_googlepay_button_content.xml +14 -0
  206. package/android/src/main/res/drawable-uk/checkout_with_googlepay_button_content.xml +14 -0
  207. package/android/src/main/res/drawable-uk/donate_with_googlepay_button_content.xml +14 -0
  208. package/android/src/main/res/drawable-uk/order_with_googlepay_button_content.xml +14 -0
  209. package/android/src/main/res/drawable-uk/pay_with_googlepay_button_content.xml +5 -5
  210. package/android/src/main/res/drawable-uk/subscribe_with_googlepay_button_content.xml +14 -0
  211. package/android/src/main/res/layout/book_with_googlepay_button.xml +20 -0
  212. package/android/src/main/res/layout/buy_with_googlepay_button.xml +20 -0
  213. package/android/src/main/res/layout/checkout_with_googlepay_button.xml +20 -0
  214. package/android/src/main/res/layout/donate_with_googlepay_button.xml +20 -0
  215. package/android/src/main/res/layout/googlepay_mark_button.xml +18 -0
  216. package/android/src/main/res/layout/order_with_googlepay_button.xml +20 -0
  217. package/android/src/main/res/layout/pay_with_googlepay_button.xml +10 -24
  218. package/android/src/main/res/layout/plain_googlepay_button.xml +17 -0
  219. package/android/src/main/res/layout/subscribe_with_googlepay_button.xml +20 -0
  220. package/android/src/main/res/values/googlepay_strings.xml +3 -2
  221. package/ios/ApplePayButtonManager.m +5 -0
  222. package/ios/ApplePayButtonManager.swift +3 -1
  223. package/ios/ApplePayButtonView.swift +21 -0
  224. package/ios/ApplePayUtils.swift +187 -0
  225. package/ios/ApplePayViewController.swift +279 -0
  226. package/ios/Mappers.swift +26 -7
  227. package/ios/PaymentPassFinder.swift +61 -0
  228. package/ios/PushProvisioning/AddToWalletButtonView.swift +10 -10
  229. package/ios/PushProvisioning/PushProvisioningUtils.swift +39 -16
  230. package/ios/StripeSdk.m +29 -0
  231. package/ios/StripeSdk.swift +193 -129
  232. package/ios/Tests/AddressSheetUtilsTests.swift +1 -7
  233. package/ios/Tests/PushProvisioningTests.swift +14 -11
  234. package/jest/mock.js +44 -0
  235. package/lib/commonjs/NativeStripeSdk.js.map +1 -1
  236. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  237. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  238. package/lib/commonjs/components/ApplePayButton.js +1 -1
  239. package/lib/commonjs/components/ApplePayButton.js.map +1 -1
  240. package/lib/commonjs/components/ApplePayButtonNative.js +2 -0
  241. package/lib/commonjs/components/ApplePayButtonNative.js.map +1 -0
  242. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  243. package/lib/commonjs/components/CardField.js.map +1 -1
  244. package/lib/commonjs/components/CardForm.js.map +1 -1
  245. package/lib/commonjs/components/GooglePayButton.js +1 -1
  246. package/lib/commonjs/components/GooglePayButton.js.map +1 -1
  247. package/lib/commonjs/components/GooglePayButtonNative.js +2 -0
  248. package/lib/commonjs/components/GooglePayButtonNative.js.map +1 -0
  249. package/lib/commonjs/components/PlatformPayButton.js +2 -0
  250. package/lib/commonjs/components/PlatformPayButton.js.map +1 -0
  251. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  252. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  253. package/lib/commonjs/functions.js +1 -1
  254. package/lib/commonjs/functions.js.map +1 -1
  255. package/lib/commonjs/helpers.js.map +1 -1
  256. package/lib/commonjs/hooks/useApplePay.js.map +1 -1
  257. package/lib/commonjs/hooks/useConfirmPayment.js.map +1 -1
  258. package/lib/commonjs/hooks/useConfirmSetupIntent.js.map +1 -1
  259. package/lib/commonjs/hooks/useFinancialConnectionsSheet.js.map +1 -1
  260. package/lib/commonjs/hooks/useGooglePay.js.map +1 -1
  261. package/lib/commonjs/hooks/usePaymentSheet.js.map +1 -1
  262. package/lib/commonjs/hooks/usePlatformPay.js +2 -0
  263. package/lib/commonjs/hooks/usePlatformPay.js.map +1 -0
  264. package/lib/commonjs/hooks/useStripe.js +1 -1
  265. package/lib/commonjs/hooks/useStripe.js.map +1 -1
  266. package/lib/commonjs/index.js +1 -1
  267. package/lib/commonjs/index.js.map +1 -1
  268. package/lib/commonjs/plugin/withStripe.js.map +1 -1
  269. package/lib/commonjs/types/ApplePay.js.map +1 -1
  270. package/lib/commonjs/types/Common.js.map +1 -1
  271. package/lib/commonjs/types/Errors.js +1 -1
  272. package/lib/commonjs/types/Errors.js.map +1 -1
  273. package/lib/commonjs/types/FinancialConnections.js.map +1 -1
  274. package/lib/commonjs/types/GooglePay.js.map +1 -1
  275. package/lib/commonjs/types/NextAction.js.map +1 -1
  276. package/lib/commonjs/types/PaymentIntent.js.map +1 -1
  277. package/lib/commonjs/types/PaymentMethod.js.map +1 -1
  278. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  279. package/lib/commonjs/types/PlatformPay.js +2 -0
  280. package/lib/commonjs/types/PlatformPay.js.map +1 -0
  281. package/lib/commonjs/types/PushProvisioning.js +2 -0
  282. package/lib/commonjs/types/PushProvisioning.js.map +1 -0
  283. package/lib/commonjs/types/SetupIntent.js.map +1 -1
  284. package/lib/commonjs/types/ThreeDSecure.js.map +1 -1
  285. package/lib/commonjs/types/Token.js.map +1 -1
  286. package/lib/commonjs/types/components/ApplePayButtonComponent.js.map +1 -1
  287. package/lib/commonjs/types/components/AuBECSDebitFormComponent.js.map +1 -1
  288. package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
  289. package/lib/commonjs/types/components/CardFormView.js.map +1 -1
  290. package/lib/commonjs/types/components/GooglePayButtonComponent.js +2 -0
  291. package/lib/commonjs/types/components/GooglePayButtonComponent.js.map +1 -0
  292. package/lib/commonjs/types/index.js +1 -1
  293. package/lib/commonjs/types/index.js.map +1 -1
  294. package/lib/module/NativeStripeSdk.js.map +1 -1
  295. package/lib/module/components/AddToWalletButton.js.map +1 -1
  296. package/lib/module/components/AddressSheet.js.map +1 -1
  297. package/lib/module/components/ApplePayButton.js +1 -1
  298. package/lib/module/components/ApplePayButton.js.map +1 -1
  299. package/lib/module/components/ApplePayButtonNative.js +2 -0
  300. package/lib/module/components/ApplePayButtonNative.js.map +1 -0
  301. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  302. package/lib/module/components/CardField.js.map +1 -1
  303. package/lib/module/components/CardForm.js.map +1 -1
  304. package/lib/module/components/GooglePayButton.js +1 -1
  305. package/lib/module/components/GooglePayButton.js.map +1 -1
  306. package/lib/module/components/GooglePayButtonNative.js +2 -0
  307. package/lib/module/components/GooglePayButtonNative.js.map +1 -0
  308. package/lib/module/components/PlatformPayButton.js +2 -0
  309. package/lib/module/components/PlatformPayButton.js.map +1 -0
  310. package/lib/module/components/StripeContainer.js.map +1 -1
  311. package/lib/module/components/StripeProvider.js.map +1 -1
  312. package/lib/module/functions.js +1 -1
  313. package/lib/module/functions.js.map +1 -1
  314. package/lib/module/helpers.js.map +1 -1
  315. package/lib/module/hooks/useApplePay.js.map +1 -1
  316. package/lib/module/hooks/useConfirmPayment.js.map +1 -1
  317. package/lib/module/hooks/useConfirmSetupIntent.js.map +1 -1
  318. package/lib/module/hooks/useFinancialConnectionsSheet.js.map +1 -1
  319. package/lib/module/hooks/useGooglePay.js.map +1 -1
  320. package/lib/module/hooks/usePaymentSheet.js.map +1 -1
  321. package/lib/module/hooks/usePlatformPay.js +2 -0
  322. package/lib/module/hooks/usePlatformPay.js.map +1 -0
  323. package/lib/module/hooks/useStripe.js +1 -1
  324. package/lib/module/hooks/useStripe.js.map +1 -1
  325. package/lib/module/index.js +1 -1
  326. package/lib/module/index.js.map +1 -1
  327. package/lib/module/plugin/withStripe.js.map +1 -1
  328. package/lib/module/types/ApplePay.js.map +1 -1
  329. package/lib/module/types/Common.js.map +1 -1
  330. package/lib/module/types/Errors.js +1 -1
  331. package/lib/module/types/Errors.js.map +1 -1
  332. package/lib/module/types/FinancialConnections.js.map +1 -1
  333. package/lib/module/types/GooglePay.js.map +1 -1
  334. package/lib/module/types/NextAction.js.map +1 -1
  335. package/lib/module/types/PaymentIntent.js.map +1 -1
  336. package/lib/module/types/PaymentMethod.js.map +1 -1
  337. package/lib/module/types/PaymentSheet.js.map +1 -1
  338. package/lib/module/types/PlatformPay.js +2 -0
  339. package/lib/module/types/PlatformPay.js.map +1 -0
  340. package/lib/module/types/PushProvisioning.js +2 -0
  341. package/lib/module/types/PushProvisioning.js.map +1 -0
  342. package/lib/module/types/SetupIntent.js.map +1 -1
  343. package/lib/module/types/ThreeDSecure.js.map +1 -1
  344. package/lib/module/types/Token.js.map +1 -1
  345. package/lib/module/types/components/ApplePayButtonComponent.js.map +1 -1
  346. package/lib/module/types/components/AuBECSDebitFormComponent.js.map +1 -1
  347. package/lib/module/types/components/CardFieldInput.js.map +1 -1
  348. package/lib/module/types/components/CardFormView.js.map +1 -1
  349. package/lib/module/types/components/GooglePayButtonComponent.js +2 -0
  350. package/lib/module/types/components/GooglePayButtonComponent.js.map +1 -0
  351. package/lib/module/types/index.js +1 -1
  352. package/lib/module/types/index.js.map +1 -1
  353. package/lib/typescript/src/NativeStripeSdk.d.ts +8 -1
  354. package/lib/typescript/src/components/ApplePayButton.d.ts +1 -1
  355. package/lib/typescript/src/components/ApplePayButtonNative.d.ts +3 -0
  356. package/lib/typescript/src/components/GooglePayButtonNative.d.ts +3 -0
  357. package/lib/typescript/src/components/PlatformPayButton.d.ts +65 -0
  358. package/lib/typescript/src/functions.d.ts +73 -1
  359. package/lib/typescript/src/hooks/usePlatformPay.d.ts +70 -0
  360. package/lib/typescript/src/hooks/useStripe.d.ts +18 -1
  361. package/lib/typescript/src/index.d.ts +2 -0
  362. package/lib/typescript/src/types/ApplePay.d.ts +9 -0
  363. package/lib/typescript/src/types/Errors.d.ts +6 -1
  364. package/lib/typescript/src/types/GooglePay.d.ts +2 -1
  365. package/lib/typescript/src/types/PlatformPay.d.ts +285 -0
  366. package/lib/typescript/src/types/PushProvisioning.d.ts +66 -0
  367. package/lib/typescript/src/types/Token.d.ts +1 -0
  368. package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts +14 -3
  369. package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts +6 -0
  370. package/lib/typescript/src/types/index.d.ts +4 -38
  371. package/package.json +10 -3
  372. package/src/NativeStripeSdk.tsx +20 -0
  373. package/src/components/ApplePayButton.tsx +3 -10
  374. package/src/components/ApplePayButtonNative.tsx +5 -0
  375. package/src/components/GooglePayButton.tsx +1 -3
  376. package/src/components/GooglePayButtonNative.tsx +7 -0
  377. package/src/components/PlatformPayButton.tsx +155 -0
  378. package/src/functions.ts +181 -0
  379. package/src/hooks/usePlatformPay.tsx +174 -0
  380. package/src/hooks/useStripe.tsx +77 -0
  381. package/src/index.tsx +6 -0
  382. package/src/types/ApplePay.ts +9 -0
  383. package/src/types/Errors.ts +7 -1
  384. package/src/types/GooglePay.ts +2 -1
  385. package/src/types/PlatformPay.ts +326 -0
  386. package/src/types/PushProvisioning.ts +76 -0
  387. package/src/types/Token.ts +1 -0
  388. package/src/types/components/ApplePayButtonComponent.ts +21 -4
  389. package/src/types/components/GooglePayButtonComponent.ts +6 -0
  390. package/src/types/index.ts +5 -54
  391. package/stripe-react-native.podspec +1 -1
  392. package/android/src/main/res/drawable/googlepay_button_background.xml +0 -6
  393. package/android/src/main/res/drawable/googlepay_button_content.xml +0 -48
  394. package/android/src/main/res/drawable/googlepay_button_overlay.xml +0 -12
  395. package/android/src/main/res/drawable-af/pay_with_googlepay_button_content.xml +0 -14
  396. package/android/src/main/res/drawable-am/pay_with_googlepay_button_content.xml +0 -15
  397. package/android/src/main/res/drawable-as/pay_with_googlepay_button_content.xml +0 -14
  398. package/android/src/main/res/drawable-az/pay_with_googlepay_button_content.xml +0 -14
  399. package/android/src/main/res/drawable-be/pay_with_googlepay_button_content.xml +0 -14
  400. package/android/src/main/res/drawable-bn/pay_with_googlepay_button_content.xml +0 -14
  401. package/android/src/main/res/drawable-bs/pay_with_googlepay_button_content.xml +0 -14
  402. package/android/src/main/res/drawable-cy/pay_with_googlepay_button_content.xml +0 -14
  403. package/android/src/main/res/drawable-en-rau/pay_with_googlepay_button_content.xml +0 -14
  404. package/android/src/main/res/drawable-en-rca/pay_with_googlepay_button_content.xml +0 -14
  405. package/android/src/main/res/drawable-en-rgb/pay_with_googlepay_button_content.xml +0 -14
  406. package/android/src/main/res/drawable-en-rin/pay_with_googlepay_button_content.xml +0 -14
  407. package/android/src/main/res/drawable-es/pay_with_googlepay_button_content.xml +0 -14
  408. package/android/src/main/res/drawable-es-res/pay_with_googlepay_button_content.xml +0 -14
  409. package/android/src/main/res/drawable-eu/pay_with_googlepay_button_content.xml +0 -15
  410. package/android/src/main/res/drawable-fa/pay_with_googlepay_button_content.xml +0 -14
  411. package/android/src/main/res/drawable-fil/pay_with_googlepay_button_content.xml +0 -14
  412. package/android/src/main/res/drawable-fr-rca/pay_with_googlepay_button_content.xml +0 -14
  413. package/android/src/main/res/drawable-ga/pay_with_googlepay_button_content.xml +0 -14
  414. package/android/src/main/res/drawable-gl/pay_with_googlepay_button_content.xml +0 -14
  415. package/android/src/main/res/drawable-gu/pay_with_googlepay_button_content.xml +0 -14
  416. package/android/src/main/res/drawable-hdpi/googlepay_button_background_image.9.png +0 -0
  417. package/android/src/main/res/drawable-hu/pay_with_googlepay_button_content.xml +0 -15
  418. package/android/src/main/res/drawable-hy/pay_with_googlepay_button_content.xml +0 -15
  419. package/android/src/main/res/drawable-is/pay_with_googlepay_button_content.xml +0 -14
  420. package/android/src/main/res/drawable-iw/pay_with_googlepay_button_content.xml +0 -14
  421. package/android/src/main/res/drawable-ka/pay_with_googlepay_button_content.xml +0 -15
  422. package/android/src/main/res/drawable-kk/pay_with_googlepay_button_content.xml +0 -14
  423. package/android/src/main/res/drawable-km/pay_with_googlepay_button_content.xml +0 -14
  424. package/android/src/main/res/drawable-kn/pay_with_googlepay_button_content.xml +0 -14
  425. package/android/src/main/res/drawable-ky/pay_with_googlepay_button_content.xml +0 -14
  426. package/android/src/main/res/drawable-lo/pay_with_googlepay_button_content.xml +0 -14
  427. package/android/src/main/res/drawable-lt/pay_with_googlepay_button_content.xml +0 -14
  428. package/android/src/main/res/drawable-lv/pay_with_googlepay_button_content.xml +0 -14
  429. package/android/src/main/res/drawable-mdpi/googlepay_button_background_image.9.png +0 -0
  430. package/android/src/main/res/drawable-mk/pay_with_googlepay_button_content.xml +0 -14
  431. package/android/src/main/res/drawable-ml/pay_with_googlepay_button_content.xml +0 -14
  432. package/android/src/main/res/drawable-mn/pay_with_googlepay_button_content.xml +0 -14
  433. package/android/src/main/res/drawable-mr/pay_with_googlepay_button_content.xml +0 -14
  434. package/android/src/main/res/drawable-ne/pay_with_googlepay_button_content.xml +0 -14
  435. package/android/src/main/res/drawable-pt-rbr/pay_with_googlepay_button_content.xml +0 -14
  436. package/android/src/main/res/drawable-pt-rpt/pay_with_googlepay_button_content.xml +0 -14
  437. package/android/src/main/res/drawable-ro/pay_with_googlepay_button_content.xml +0 -14
  438. package/android/src/main/res/drawable-sq/pay_with_googlepay_button_content.xml +0 -14
  439. package/android/src/main/res/drawable-sw/pay_with_googlepay_button_content.xml +0 -14
  440. package/android/src/main/res/drawable-ta/pay_with_googlepay_button_content.xml +0 -14
  441. package/android/src/main/res/drawable-te/pay_with_googlepay_button_content.xml +0 -14
  442. package/android/src/main/res/drawable-ur/pay_with_googlepay_button_content.xml +0 -14
  443. package/android/src/main/res/drawable-uz/pay_with_googlepay_button_content.xml +0 -14
  444. package/android/src/main/res/drawable-v21/googlepay_button_background.xml +0 -7
  445. package/android/src/main/res/drawable-vi/pay_with_googlepay_button_content.xml +0 -14
  446. package/android/src/main/res/drawable-xhdpi/googlepay_button_background_image.9.png +0 -0
  447. package/android/src/main/res/drawable-xxhdpi/googlepay_button_background_image.9.png +0 -0
  448. package/android/src/main/res/drawable-xxxhdpi/googlepay_button_background_image.9.png +0 -0
  449. package/android/src/main/res/drawable-zh-rcn/pay_with_googlepay_button_content.xml +0 -15
  450. package/android/src/main/res/drawable-zh-rhk/pay_with_googlepay_button_content.xml +0 -15
  451. package/android/src/main/res/drawable-zh-rtw/pay_with_googlepay_button_content.xml +0 -15
  452. package/android/src/main/res/drawable-zu/pay_with_googlepay_button_content.xml +0 -14
  453. package/android/src/main/res/layout/googlepay_button.xml +0 -39
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["PaymentSheet.ts"],"sourcesContent":["import type { BillingDetails, AddressDetails } from './Common';\nimport type { CartSummaryItem } from './ApplePay';\n\nexport type SetupParams = ClientSecretParams & {\n /** Your customer-facing business name. On Android, this is required and cannot be an empty string. */\n merchantDisplayName: string;\n /** The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id */\n customerId?: string;\n /** A short-lived token that allows the SDK to access a Customer’s payment methods. */\n customerEphemeralKeySecret?: string;\n /** When set to true, separates out the payment method selection & confirmation steps.\n * If true, you must call `confirmPaymentSheetPayment` on your own. Defaults to false. */\n customFlow?: boolean;\n /** iOS only. Enable Apple Pay in the Payment Sheet by passing an ApplePayParams object. */\n applePay?: ApplePayParams;\n /** Android only. Enable Google Pay in the Payment Sheet by passing a GooglePayParams object. */\n googlePay?: GooglePayParams;\n /** The color styling to use for PaymentSheet UI. Defaults to 'automatic'. */\n style?: 'alwaysLight' | 'alwaysDark' | 'automatic';\n /** A URL that redirects back to your app that PaymentSheet can use to auto-dismiss web views used for additional authentication, e.g. 3DS2 */\n returnURL?: string;\n /** PaymentSheet pre-populates the billing fields with the values provided. */\n defaultBillingDetails?: BillingDetails;\n /**\n * The shipping information for the customer. If set, PaymentSheet will pre-populate the form fields with the values provided.\n * This is used to display a \"Billing address is same as shipping\" checkbox if `defaultBillingDetails` is not provided.\n * If `name` and `line1` are populated, it's also [attached to the PaymentIntent](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-shipping) during payment.\n */\n defaultShippingDetails?: AddressDetails;\n /** If true, allows payment methods that do not move money at the end of the checkout. Defaults to false.\n *\n * Some payment methods can’t guarantee you will receive funds from your customer at the end of the checkout\n * because they take time to settle (eg. most bank debits, like SEPA or ACH) or require customer action to\n * complete (e.g. OXXO, Konbini, Boleto). If this is set to true, make sure your integration listens to webhooks\n * for notifications on whether a payment has succeeded or not.\n */\n allowsDelayedPaymentMethods?: boolean;\n /** Customizes the appearance of PaymentSheet */\n appearance?: AppearanceParams;\n /** The label to use for the primary button. If not set, Payment Sheet will display suitable default labels for payment and setup intents. */\n primaryButtonLabel?: string;\n};\n\nexport type ClientSecretParams =\n | {\n paymentIntentClientSecret: string;\n setupIntentClientSecret?: undefined;\n }\n | {\n setupIntentClientSecret: string;\n paymentIntentClientSecret?: undefined;\n };\n\nexport type ApplePayParams = {\n /** The two-letter ISO 3166 code of the country of your business, e.g. \"US\" */\n merchantCountryCode: string;\n /**\n * An array of CartSummaryItem item objects that summarize the amount of the payment. If you're using a SetupIntent\n * for a recurring payment, you should set this to display the amount you intend to charge. */\n paymentSummaryItems?: CartSummaryItem[];\n // TODO: Uncomment when https://github.com/stripe/stripe-react-native/pull/1164 lands\n // buttonType: ButtonType\n};\n\nexport type GooglePayParams = {\n /** The two-letter ISO 3166 code of the country of your business, e.g. \"US\" */\n merchantCountryCode: string;\n /** The three-letter ISO 4217 alphabetic currency code, e.g. \"USD\" or \"EUR\". Required in order to support Google Pay when processing a Setup Intent. */\n currencyCode?: string;\n /** Whether or not to use the Google Pay test environment. Set to `true` until you have applied for and been granted access to the Production environment. */\n testEnv?: boolean;\n};\n\n/**\n * Used to customize the appearance of your PaymentSheet\n */\nexport type AppearanceParams = RecursivePartial<{\n /** Describes the appearance of fonts in your PaymentSheet */\n font: FontConfig;\n /** Describes the colors in your PaymentSheet. Provide either a base config, or both `light` and `dark` configs, which will be useed based on whether the user is in Light or Dark mode. */\n colors:\n | GlobalColorConfig\n | { light: GlobalColorConfig; dark: GlobalColorConfig };\n /** Describes the appearance of shapes in the PaymentSheet, such as buttons, inputs, and tabs. */\n shapes: {\n /** The border radius used for buttons, inputs, and tabs in your PaymentSheet.\n * @default 6.0\n */\n borderRadius: number;\n /** The border width used for inputs and tabs in your PaymentSheet.\n * @default 1.0\n */\n borderWidth: number;\n /** iOS only. The shadow used for buttons, inputs, and tabs in your PaymentSheet */\n shadow: ShadowConfig;\n };\n /** Describes the appearance of the primary \"Pay\" button at the bottom of your Payment Sheet */\n primaryButton: PrimaryButtonConfig;\n}>;\n\nexport type FontConfig = {\n /**\n * The font used for regular text. PaymentSheet will attempt to use medium and bold versions of this font if they exist.\n *\n * On iOS, this should be the \"PostScript name\" found in Font Book after installing the font.\n * On Android, this should be the name of the font file (containing only lowercase alphanumeric characters) in android/app/src/main/res/font\n *\n * @default The OS's system font\n */\n family: string;\n /** The scale factor for all fonts in your PaymentSheet. This value is required to be greater than 0. Font sizes are multiplied by this value before being displayed. For example, setting this to 1.2 increases the size of all text by 20%.\n * @default 1.0\n */\n scale: number;\n};\n\nexport type ShadowConfig = {\n /** The color of the shadow.\n * @default \"#000000\"\n * */\n color: string;\n /** The alpha or opacity of the shadow.\n * @default 0.05\n */\n opacity: number;\n /** The positioning of the shadow relative to the component. For example, a negative x and y will result in a shadow placed below and to the left of the component.\n * @default {x: 0, y: 2}\n */\n offset: { x: number; y: number };\n /** The blur radius of the shadow.\n * @default 4\n */\n blurRadius: number;\n};\n\nexport type GlobalColorConfig = {\n /** A primary color used throughout your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System blue color on iOS, and \"#007AFF\" (light) / \"#0074D4\" (dark) on Android.\n */\n primary: string;\n /** The color used for the background of your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System background color on iOS, and \"#ffffff\" (light) / \"#2e2e2e\" (dark) on Android.\n */\n background: string;\n /** The color used for the background of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System background color (light) / System secondary background color (dark) on iOS, and \"#ffffff\" (light) / \"#a9a9a9\" (dark) on Android.\n */\n componentBackground: string;\n /** The color used for the external border of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System gray (3) color on iOS, and \"#33787880\" (light) / \"#787880\" (dark) on Android.\n */\n componentBorder: string;\n /** The color used for the internal border (meaning the border is shared with another component) of inputs, tabs, and other components in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System gray (3) color on iOS, and \"#33787880\" (light) / \"#787880\" (dark) on Android.\n */\n componentDivider: string;\n /** The color of the header text in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System label color on iOS, and \"#000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n primaryText: string;\n /** The color of the label text of input fields, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System seconday label color on iOS, and \"#000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n secondaryText: string;\n /** The color of the input text in your PaymentSheet components, such as the user's card number or zip code, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default \"#000000\"\n */\n componentText: string;\n /** The color of the placeholder text of input fields, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System label color on iOS, and \"#99000000\" (light) / \"#99ffffff\" (dark) on Android.\n */\n placeholderText: string;\n /** The color used for icons in your Payment Sheet, such as the close or back icons, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System seconday label color on iOS, and \"#99000000\" (light) / \"#ffffff\" (dark) on Android.\n */\n icon: string;\n /** The color used to indicate errors or destructive actions in your Payment Sheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System red color on iOS, and \"#ff0000\" (light) / \"#ff0000\" (dark) on Android.\n */\n error: string;\n};\n\nexport type PrimaryButtonConfig = {\n /** The font family used specifically for the primary button.\n * @default The root `appearance.font.family`\n */\n font: Pick<FontConfig, 'family'>;\n /** The colors used specifically for the primary button. Provide either a base config, or both `light` and `dark` configs, which will be useed based on whether the user is in Light or Dark mode. */\n colors:\n | PrimaryButtonColorConfig\n | { light: PrimaryButtonColorConfig; dark: PrimaryButtonColorConfig };\n /** Describes the border and shadow of the primary button. */\n shapes: {\n /** The border radius used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.borderRadius`\n */\n borderRadius: number;\n /** The border width used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.borderWidth`\n */\n borderWidth: number;\n /** iOS only. The shadow used for the primary button in your PaymentSheet\n * @default The root `appearance.shapes.shadow`\n */\n shadow: ShadowConfig;\n };\n};\n\nexport type PrimaryButtonColorConfig = {\n /** The background color used for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The root `appearance.colors.primary`\n */\n background: string;\n /** The color of the text for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default White or black, depending on the color of the button.\n */\n text: string;\n /** The border color used for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.\n * @default The System quaternary label on iOS, transparent on Android.\n */\n border: string;\n};\n\ntype RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? RecursivePartial<U>[]\n : T[P] extends object\n ? RecursivePartial<T[P]>\n : T[P];\n};\nexport interface PaymentOption {\n label: string;\n image: string;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.PaymentType=exports.InvalidShippingField=exports.IntervalUnit=exports.ContactField=exports.ButtonType=exports.ButtonStyle=exports.BillingAddressFormat=exports.ApplePayShippingType=exports.ApplePaySheetErrorType=exports.ApplePayMerchantCapability=void 0;var ApplePaySheetErrorType;exports.ApplePaySheetErrorType=ApplePaySheetErrorType;(function(ApplePaySheetErrorType){ApplePaySheetErrorType["InvalidShippingAddress"]="InvalidShippingAddress";ApplePaySheetErrorType["UnserviceableShippingAddress"]="UnserviceableShippingAddress";ApplePaySheetErrorType["InvalidCouponCode"]="InvalidCouponCode";ApplePaySheetErrorType["ExpiredCouponCode"]="ExpiredCouponCode";})(ApplePaySheetErrorType||(exports.ApplePaySheetErrorType=ApplePaySheetErrorType={}));var ContactField;exports.ContactField=ContactField;(function(ContactField){ContactField["EmailAddress"]="emailAddress";ContactField["Name"]="name";ContactField["PhoneNumber"]="phoneNumber";ContactField["PhoneticName"]="phoneticName";ContactField["PostalAddress"]="postalAddress";})(ContactField||(exports.ContactField=ContactField={}));var InvalidShippingField;exports.InvalidShippingField=InvalidShippingField;(function(InvalidShippingField){InvalidShippingField["Street"]="street";InvalidShippingField["City"]="city";InvalidShippingField["SubAdministrativeArea"]="subAdministrativeArea";InvalidShippingField["State"]="state";InvalidShippingField["PostalCode"]="postalCode";InvalidShippingField["Country"]="country";InvalidShippingField["CountryCode"]="countryCode";InvalidShippingField["SubLocality"]="subLocality";})(InvalidShippingField||(exports.InvalidShippingField=InvalidShippingField={}));var ApplePayMerchantCapability;exports.ApplePayMerchantCapability=ApplePayMerchantCapability;(function(ApplePayMerchantCapability){ApplePayMerchantCapability["Supports3DS"]="supports3DS";ApplePayMerchantCapability["SupportsCredit"]="supportsCredit";ApplePayMerchantCapability["SupportsDebit"]="supportsDebit";})(ApplePayMerchantCapability||(exports.ApplePayMerchantCapability=ApplePayMerchantCapability={}));var ApplePayShippingType;exports.ApplePayShippingType=ApplePayShippingType;(function(ApplePayShippingType){ApplePayShippingType["Shipping"]="shipping";ApplePayShippingType["Delivery"]="delivery";ApplePayShippingType["StorePickup"]="storePickup";ApplePayShippingType["ServicePickup"]="servicePickup";})(ApplePayShippingType||(exports.ApplePayShippingType=ApplePayShippingType={}));var BillingAddressFormat;exports.BillingAddressFormat=BillingAddressFormat;(function(BillingAddressFormat){BillingAddressFormat["Full"]="FULL";BillingAddressFormat["Min"]="MIN";})(BillingAddressFormat||(exports.BillingAddressFormat=BillingAddressFormat={}));var ButtonType;exports.ButtonType=ButtonType;(function(ButtonType){ButtonType[ButtonType["Default"]=0]="Default";ButtonType[ButtonType["Buy"]=1]="Buy";ButtonType[ButtonType["Book"]=6]="Book";ButtonType[ButtonType["Checkout"]=5]="Checkout";ButtonType[ButtonType["Donate"]=4]="Donate";ButtonType[ButtonType["Order"]=11]="Order";ButtonType[ButtonType["Subscribe"]=7]="Subscribe";ButtonType[ButtonType["SetUp"]=2]="SetUp";ButtonType[ButtonType["InStore"]=3]="InStore";ButtonType[ButtonType["Reload"]=8]="Reload";ButtonType[ButtonType["AddMoney"]=9]="AddMoney";ButtonType[ButtonType["TopUp"]=10]="TopUp";ButtonType[ButtonType["Rent"]=12]="Rent";ButtonType[ButtonType["Support"]=13]="Support";ButtonType[ButtonType["Contribute"]=14]="Contribute";ButtonType[ButtonType["Tip"]=15]="Tip";ButtonType[ButtonType["Continue"]=16]="Continue";ButtonType[ButtonType["Pay"]=1000]="Pay";ButtonType[ButtonType["GooglePayMark"]=1001]="GooglePayMark";})(ButtonType||(exports.ButtonType=ButtonType={}));var ButtonStyle;exports.ButtonStyle=ButtonStyle;(function(ButtonStyle){ButtonStyle[ButtonStyle["White"]=0]="White";ButtonStyle[ButtonStyle["WhiteOutline"]=1]="WhiteOutline";ButtonStyle[ButtonStyle["Black"]=2]="Black";ButtonStyle[ButtonStyle["Automatic"]=3]="Automatic";})(ButtonStyle||(exports.ButtonStyle=ButtonStyle={}));var PaymentType;exports.PaymentType=PaymentType;(function(PaymentType){PaymentType["Deferred"]="Deferred";PaymentType["Immediate"]="Immediate";PaymentType["Recurring"]="Recurring";})(PaymentType||(exports.PaymentType=PaymentType={}));var IntervalUnit;exports.IntervalUnit=IntervalUnit;(function(IntervalUnit){IntervalUnit["Minute"]="minute";IntervalUnit["Hour"]="hour";IntervalUnit["Day"]="day";IntervalUnit["Month"]="month";IntervalUnit["Year"]="year";})(IntervalUnit||(exports.IntervalUnit=IntervalUnit={}));
2
+ //# sourceMappingURL=PlatformPay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ApplePaySheetErrorType","ContactField","InvalidShippingField","ApplePayMerchantCapability","ApplePayShippingType","BillingAddressFormat","ButtonType","ButtonStyle","PaymentType","IntervalUnit"],"sources":["PlatformPay.ts"],"sourcesContent":["import type { Result as Token } from './Token';\nimport type { Result as PaymentMethod } from './PaymentMethod';\nimport type { Result as PaymentIntent } from './PaymentIntent';\nimport type { Result as SetupIntent } from './SetupIntent';\nimport type { StripeError, PlatformPayError } from './Errors';\nimport type { ShippingContact as ApplePayShippingContact } from './ApplePay';\nimport type { IsSupportedParams } from './GooglePay';\n\nexport type ApplePaySheetError =\n | {\n errorType: ApplePaySheetErrorType.InvalidShippingAddress;\n field: InvalidShippingField;\n message?: string;\n }\n | {\n errorType:\n | ApplePaySheetErrorType.UnserviceableShippingAddress\n | ApplePaySheetErrorType.InvalidCouponCode\n | ApplePaySheetErrorType.ExpiredCouponCode;\n message?: string;\n };\n\nexport enum ApplePaySheetErrorType {\n InvalidShippingAddress = 'InvalidShippingAddress',\n UnserviceableShippingAddress = 'UnserviceableShippingAddress',\n InvalidCouponCode = 'InvalidCouponCode',\n ExpiredCouponCode = 'ExpiredCouponCode',\n}\n\nexport enum ContactField {\n EmailAddress = 'emailAddress',\n Name = 'name',\n PhoneNumber = 'phoneNumber',\n PhoneticName = 'phoneticName',\n PostalAddress = 'postalAddress',\n}\n\nexport enum InvalidShippingField {\n Street = 'street',\n City = 'city',\n SubAdministrativeArea = 'subAdministrativeArea',\n State = 'state',\n PostalCode = 'postalCode',\n Country = 'country',\n CountryCode = 'countryCode',\n SubLocality = 'subLocality',\n}\n\nexport type ApplePayBaseParams = {\n /** ISO 3166-1 alpha-2 country code where the transaction is processed. */\n merchantCountryCode: string;\n /** ISO 4217 alphabetic currency code. */\n currencyCode: string;\n /** The SDK accepts Amex, Mastercard, Visa, and Discover for Apple Pay by default. Set this property to enable other card networks, for example: [\"JCB\", \"barcode\", \"chinaUnionPay\"]. A full list of possible networks can be found at https://developer.apple.com/documentation/passkit/pkpaymentnetwork. */\n additionalEnabledNetworks?: Array<string>;\n /** The list of items that describe a purchase. For example: total, tax, discount, and grand total. */\n cartItems: Array<CartSummaryItem>;\n /** The list of fields that you need for a shipping contact in order to process the transaction. If provided, you must implement the PlatformPayButton component's `onShippingContactSelected` callback and call `updatePlatformPaySheet` from there.*/\n requiredShippingAddressFields?: Array<ContactField>;\n /** The list of fields that you need for a billing contact in order to process the transaction. */\n requiredBillingContactFields?: Array<ContactField>;\n /** An array of shipping method objects that describe the supported shipping methods. If provided, you must implement the PlatformPayButton component's `onShippingMethodSelected` callback and call `updatePlatformPaySheet` from there. */\n shippingMethods?: Array<ShippingMethod>;\n /** Set the payment capabilities you support. If set, 3DS is required. */\n merchantCapabilities?: Array<ApplePayMerchantCapability>;\n /** An optional value that indicates how to ship purchased items. Defaults to 'Shipping'.*/\n shippingType?: ApplePayShippingType;\n /** A list of two-letter ISO 3166 country codes for limiting payment to cards from specific countries or regions. */\n supportedCountries?: Array<string>;\n};\n\nexport type ApplePayPaymentMethodParams = {\n /** Set this value to true to display the coupon code field, or pass the 'couponCode' field to autofill with a coupon code. Defaults to false. If true, you must implement the PlatformPayButton component's `onCouponCodeEntered` callback and call `updatePlatformPaySheet` from there. */\n supportsCouponCode?: boolean;\n /** Set this value to autofill with a coupon code. If provided, you must implement the PlatformPayButton component's `onCouponCodeEntered` callback and call `updatePlatformPaySheet` from there. */\n couponCode?: string;\n};\n\nexport enum ApplePayMerchantCapability {\n /** Required. This value must be supplied. */\n Supports3DS = 'supports3DS',\n /** Optional. If present, only transactions that are categorized as credit cards are allowed. */\n SupportsCredit = 'supportsCredit',\n /** Optional. If present, only transactions that are categorized as debit cards are allowed. */\n SupportsDebit = 'supportsDebit',\n}\n\n/** A type that indicates how to ship purchased items. */\nexport enum ApplePayShippingType {\n /** Default. */\n Shipping = 'shipping',\n Delivery = 'delivery',\n StorePickup = 'storePickup',\n ServicePickup = 'servicePickup',\n}\n\nexport type GooglePayBaseParams = {\n /**\n * Set to true to run in a test environment with relaxed application / merchant requirements. This environment is suggested for early development and for easily testing SDK.\n - Does not require the application to be uploaded to the Google Play Store.\n - Does not require a Google Pay Developer Profile.\n - It uses production data, but at the end of the transaction you will receive a fake and non chargeable payment credential.\n - The user will see a warning message that the app is not recognized/verified.\n */\n testEnv: boolean;\n /** ISO 3166-1 alpha-2 country code where the transaction is processed. */\n merchantCountryCode: string;\n /** ISO 4217 alphabetic currency code. */\n currencyCode: string;\n /** Your merchant name, displayed in the Google Pay sheet. */\n merchantName?: string;\n /** Set to true to request an email address. Defaults to false. */\n isEmailRequired?: boolean;\n /** Set to false if you don't support credit cards. Defaults to true. */\n allowCreditCards?: boolean;\n /** If true, Google Pay is considered \"available\" if the customer's Google Pay wallet has an existing payment method. Defaults to false. */\n existingPaymentMethodRequired?: boolean;\n /** Describes the configuration for billing address collection in the Google Pay sheet. */\n billingAddressConfig?: {\n /** Set to true if billing address is required for payment. Defaults to false. */\n isRequired?: boolean;\n /** Set to true if phone number is required for payment. Defaults to false. */\n isPhoneNumberRequired?: boolean;\n /** Defines what address fields to collect. Defaults to BillingAddressFormat.Min */\n format?: BillingAddressFormat;\n };\n};\n\nexport type GooglePayPaymentMethodParams = {\n /** Total monetary value of the transaction. */\n amount: number;\n /** Describes the configuration for shipping address collection in the Google Pay sheet. */\n shippingAddressConfig?: {\n /** Set to true if shipping address is required for payment. Defaults to false. */\n isRequired?: boolean;\n /** Set to true if phone number is required for payment. Defaults to false. */\n isPhoneNumberRequired?: boolean;\n /** Set of ISO 3166-1 alpha-2 country code values of the countries where shipping is allowed. Defaults to all shipping address countries. */\n allowedCountryCodes?: Array<string>;\n };\n};\n\nexport enum BillingAddressFormat {\n /** Collect name, street address, locality, region, country code, and postal code. */\n Full = 'FULL',\n /** Collect name, country code, and postal code (default). */\n Min = 'MIN',\n}\n\nexport type PaymentMethodParams = {\n /** Defines Google Pay behavior. Android only. */\n googlePay?: GooglePayBaseParams & GooglePayPaymentMethodParams;\n /** Defines Apple Pay behavior. iOS only. */\n applePay?: ApplePayBaseParams & ApplePayPaymentMethodParams;\n};\n\nexport type ConfirmParams = {\n /** Defines Google Pay behavior. Android only. */\n googlePay?: GooglePayBaseParams;\n /** Defines Apple Pay behavior. iOS only. */\n applePay?: ApplePayBaseParams;\n};\n\nexport enum ButtonType {\n /** A button with the Apple Pay or Google Pay logo only, useful when an additional call to action isn't needed. */\n Default = 0,\n /** A button useful for product purchases. */\n Buy = 1,\n /** A button useful for booking trips, flights, or other experiences. */\n Book = 6,\n /** A button useful for purchase experiences that include other payment buttons that start with “Check out”. */\n Checkout = 5,\n /** A button used by approved nonprofit organization that lets people make donations. */\n Donate = 4,\n /** A button useful for placing orders for such as like meals or flowers. */\n Order = 11,\n /** A button useful for purchasing a subscription such as a gym membership or meal-kit delivery service. */\n Subscribe = 7,\n /** iOS only. A button useful for prompting the user to set up a card. */\n SetUp = 2,\n /** iOS only. A button useful for paying bills or invoices. */\n InStore = 3,\n /** iOS only. A button useful for adding money to a card, account, or payment system.*/\n Reload = 8,\n /** iOS only. A button useful for adding money to a card, account, or payment system. */\n AddMoney = 9,\n /** iOS only. A button useful for adding money to a card, account, or payment system. */\n TopUp = 10,\n /** iOS only. A button useful for renting items such as cars or scooters. */\n Rent = 12,\n /** iOS only. A button useful supporting people give money to projects, causes, organizations, and other entities.*/\n Support = 13,\n /** iOS only. A button useful to help people contribute money to projects, causes, organizations, and other entities. */\n Contribute = 14,\n /** iOS only. A button useful useful for letting people tip for goods or services. */\n Tip = 15,\n /** iOS only. A button useful for general purchases. */\n Continue = 16,\n /** Android only. A button useful for general payments. */\n Pay = 1000,\n /** Android only. A plain white button with the Google Pay logo. Use when you show Google Pay as a payment option in your payment flows. */\n GooglePayMark = 1001,\n}\n\n/** iOS only. */\nexport enum ButtonStyle {\n /** A white button with black lettering. */\n White = 0,\n /** A white button with black lettering and a black outline. */\n WhiteOutline = 1,\n /** A black button with white lettering. */\n Black = 2,\n /** Default. A button that automatically changes its appearance when the user switches between Light Mode and Dark Mode. */\n Automatic = 3,\n}\n\n/** iOS only. */\nexport type CartSummaryItem =\n | DeferredCartSummaryItem\n | ImmediateCartSummaryItem\n | RecurringCartSummaryItem;\n\n/** iOS only. */\nexport enum PaymentType {\n Deferred = 'Deferred',\n Immediate = 'Immediate',\n Recurring = 'Recurring',\n}\n\n/** iOS only. Use this type for a payment that occurs in the future, such as a pre-order. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem. */\nexport type DeferredCartSummaryItem = {\n paymentType: PaymentType.Deferred;\n /** The unix timestamp of the date, in the future, of the payment. Measured in seconds. */\n deferredDate: number;\n label: string;\n amount: string;\n};\n\n/** iOS only. Use this type for payments that will occur immediately. */\nexport type ImmediateCartSummaryItem = {\n paymentType: PaymentType.Immediate;\n /** When creating items for estimates or charges whose final value is not yet known, set this to true. */\n isPending?: boolean;\n label: string;\n amount: string;\n};\n\n/** iOS only. Use this type for payments that occur more than once, such as a subscription. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem.*/\nexport type RecurringCartSummaryItem = {\n paymentType: PaymentType.Recurring;\n /** The amount of time – in calendar units such as Day, Month, or Year – that represents a fraction of the total payment interval. For example, if you set the intervalUnit to 'Month' and intervalCount to 3, then the payment interval is three months.*/\n intervalUnit: IntervalUnit;\n /** The number of interval units that make up the total payment interval. For example, if you set the intervalUnit to 'Month' and intervalCount to 3, then the payment interval is three months.*/\n intervalCount: number;\n /** The unix timestamp of the start date. Measured in seconds. */\n startDate?: number;\n /** The unix timestamp of the end date. Measured in seconds. */\n endDate?: number;\n label: string;\n amount: string;\n};\n\n/** iOS only. */\nexport enum IntervalUnit {\n Minute = 'minute',\n Hour = 'hour',\n Day = 'day',\n Month = 'month',\n Year = 'year',\n}\n\n/** iOS only. */\nexport type ShippingMethod = {\n /** A short, localized description. */\n label: string;\n /** The cost associated with this shipping option. */\n amount: string;\n /** When creating items for estimates or charges whose final value is not yet known, set this to true. */\n isPending?: boolean;\n /** A unique identifier for the shipping method. */\n identifier: string;\n /** A user-readable description of the shipping method. For example “Ships in 24 hours.” Don't repeat the content of the 'label' property. */\n detail?: string;\n /** The unix timestamp of the start date of the expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup. Measured in seconds. */\n startDate?: number;\n /** The unix timestamp of the end date of the expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup. Measured in seconds. */\n endDate?: number;\n};\n\n/** iOS only. */\nexport type ShippingContact = ApplePayShippingContact;\n\n/** Android only. */\nexport type IsGooglePaySupportedParams = IsSupportedParams;\n\nexport type PaymentMethodResult =\n | {\n paymentMethod: PaymentMethod;\n token: Token;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n token?: undefined;\n error: StripeError<PlatformPayError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent;\n error?: StripeError<PlatformPayError>;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<PlatformPayError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent;\n error?: StripeError<PlatformPayError>;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<PlatformPayError>;\n };\n"],"mappings":"iUAsBYA,uBAAsB,iEAAtBA,sBAAsB,EAAtBA,sBAAsB,oDAAtBA,sBAAsB,gEAAtBA,sBAAsB,0CAAtBA,sBAAsB,6CAAtBA,sBAAsB,kCAAtBA,sBAAsB,SAOtBC,aAAY,6CAAZA,YAAY,EAAZA,YAAY,gCAAZA,YAAY,gBAAZA,YAAY,8BAAZA,YAAY,gCAAZA,YAAY,qCAAZA,YAAY,wBAAZA,YAAY,SAQZC,qBAAoB,6DAApBA,oBAAoB,EAApBA,oBAAoB,oBAApBA,oBAAoB,gBAApBA,oBAAoB,kDAApBA,oBAAoB,kBAApBA,oBAAoB,4BAApBA,oBAAoB,sBAApBA,oBAAoB,8BAApBA,oBAAoB,iCAApBA,oBAAoB,gCAApBA,oBAAoB,SAyCpBC,2BAA0B,yEAA1BA,0BAA0B,EAA1BA,0BAA0B,8BAA1BA,0BAA0B,oCAA1BA,0BAA0B,qCAA1BA,0BAA0B,sCAA1BA,0BAA0B,SAU1BC,qBAAoB,6DAApBA,oBAAoB,EAApBA,oBAAoB,wBAApBA,oBAAoB,wBAApBA,oBAAoB,8BAApBA,oBAAoB,qCAApBA,oBAAoB,gCAApBA,oBAAoB,SAsDpBC,qBAAoB,6DAApBA,oBAAoB,EAApBA,oBAAoB,gBAApBA,oBAAoB,iBAApBA,oBAAoB,gCAApBA,oBAAoB,SAqBpBC,WAAU,yCAAVA,UAAU,EAAVA,UAAU,CAAVA,UAAU,yBAAVA,UAAU,CAAVA,UAAU,iBAAVA,UAAU,CAAVA,UAAU,mBAAVA,UAAU,CAAVA,UAAU,2BAAVA,UAAU,CAAVA,UAAU,uBAAVA,UAAU,CAAVA,UAAU,sBAAVA,UAAU,CAAVA,UAAU,6BAAVA,UAAU,CAAVA,UAAU,qBAAVA,UAAU,CAAVA,UAAU,yBAAVA,UAAU,CAAVA,UAAU,uBAAVA,UAAU,CAAVA,UAAU,2BAAVA,UAAU,CAAVA,UAAU,sBAAVA,UAAU,CAAVA,UAAU,oBAAVA,UAAU,CAAVA,UAAU,0BAAVA,UAAU,CAAVA,UAAU,gCAAVA,UAAU,CAAVA,UAAU,kBAAVA,UAAU,CAAVA,UAAU,4BAAVA,UAAU,CAAVA,UAAU,oBAAVA,UAAU,CAAVA,UAAU,2CAAVA,UAAU,sBAAVA,UAAU,SA0CVC,YAAW,2CAAXA,WAAW,EAAXA,WAAW,CAAXA,WAAW,qBAAXA,WAAW,CAAXA,WAAW,mCAAXA,WAAW,CAAXA,WAAW,qBAAXA,WAAW,CAAXA,WAAW,gCAAXA,WAAW,uBAAXA,WAAW,SAkBXC,YAAW,2CAAXA,WAAW,EAAXA,WAAW,wBAAXA,WAAW,0BAAXA,WAAW,6BAAXA,WAAW,uBAAXA,WAAW,SAwCXC,aAAY,6CAAZA,YAAY,EAAZA,YAAY,oBAAZA,YAAY,gBAAZA,YAAY,cAAZA,YAAY,kBAAZA,YAAY,mBAAZA,YAAY,wBAAZA,YAAY"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.GooglePayCardTokenStatus=exports.CanAddCardToWalletStatus=void 0;var GooglePayCardTokenStatus;exports.GooglePayCardTokenStatus=GooglePayCardTokenStatus;(function(GooglePayCardTokenStatus){GooglePayCardTokenStatus["TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION"]="TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION";GooglePayCardTokenStatus["TOKEN_STATE_PENDING"]="TOKEN_STATE_PENDING";GooglePayCardTokenStatus["TOKEN_STATE_SUSPENDED"]="TOKEN_STATE_SUSPENDED";GooglePayCardTokenStatus["TOKEN_STATE_ACTIVE"]="TOKEN_STATE_ACTIVE";GooglePayCardTokenStatus["TOKEN_STATE_FELICA_PENDING_PROVISIONING"]="TOKEN_STATE_FELICA_PENDING_PROVISIONING";GooglePayCardTokenStatus["TOKEN_STATE_UNTOKENIZED"]="TOKEN_STATE_UNTOKENIZED";})(GooglePayCardTokenStatus||(exports.GooglePayCardTokenStatus=GooglePayCardTokenStatus={}));var CanAddCardToWalletStatus;exports.CanAddCardToWalletStatus=CanAddCardToWalletStatus;(function(CanAddCardToWalletStatus){CanAddCardToWalletStatus["MISSING_CONFIGURATION"]="MISSING_CONFIGURATION";CanAddCardToWalletStatus["UNSUPPORTED_DEVICE"]="UNSUPPORTED_DEVICE";CanAddCardToWalletStatus["CARD_ALREADY_EXISTS"]="CARD_ALREADY_EXISTS";CanAddCardToWalletStatus["CARD_EXISTS_ON_CURRENT_DEVICE"]="CARD_EXISTS_ON_CURRENT_DEVICE";CanAddCardToWalletStatus["CARD_EXISTS_ON_PAIRED_DEVICE"]="CARD_EXISTS_ON_PAIRED_DEVICE";})(CanAddCardToWalletStatus||(exports.CanAddCardToWalletStatus=CanAddCardToWalletStatus={}));
2
+ //# sourceMappingURL=PushProvisioning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GooglePayCardTokenStatus","CanAddCardToWalletStatus"],"sources":["PushProvisioning.ts"],"sourcesContent":["import type { StripeError, GooglePayError } from './Errors';\n\nexport type GooglePayCardToken = {\n id: string;\n cardLastFour: string;\n network: number;\n serviceProvider: number;\n issuer: string;\n status: GooglePayCardTokenStatus;\n};\n\nexport enum GooglePayCardTokenStatus {\n /** */\n TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION = 'TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION',\n /** */\n TOKEN_STATE_PENDING = 'TOKEN_STATE_PENDING',\n /** */\n TOKEN_STATE_SUSPENDED = 'TOKEN_STATE_SUSPENDED',\n /** */\n TOKEN_STATE_ACTIVE = 'TOKEN_STATE_ACTIVE',\n /** */\n TOKEN_STATE_FELICA_PENDING_PROVISIONING = 'TOKEN_STATE_FELICA_PENDING_PROVISIONING',\n /** */\n TOKEN_STATE_UNTOKENIZED = 'TOKEN_STATE_UNTOKENIZED',\n}\n\nexport type IsCardInWalletResult =\n | {\n isInWallet: boolean;\n token?: GooglePayCardToken;\n error?: undefined;\n }\n | {\n isInWallet?: undefined;\n token?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type CanAddCardToWalletParams = {\n /** The `primary_account_identifier` value from the issued card. Can be an empty string. */\n primaryAccountIdentifier: string | null;\n /** Last 4 digits of the card number. */\n cardLastFour: string;\n /** iOS only. Set this to `true` until shipping through TestFlight || App Store. If true, you must be using live cards, and have the proper iOS entitlement set up. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#requesting-access-for-ios */\n testEnv?: boolean;\n /** iOS only. Set this to `true` if: your user has an Apple Watch device currently paired, and you want to check that device for the presence of the specified card. */\n hasPairedAppleWatch?: boolean;\n};\n\nexport type CanAddCardToWalletResult =\n | {\n canAddCard: boolean;\n details?: {\n token?: GooglePayCardToken;\n status?: CanAddCardToWalletStatus;\n };\n error?: undefined;\n }\n | {\n canAddCard?: undefined;\n details?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport enum CanAddCardToWalletStatus {\n /** You are missing configuration required for Push Provisioning. Make sure you've completed all steps at https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native. */\n MISSING_CONFIGURATION = 'MISSING_CONFIGURATION',\n /** This device doesn't support adding a card to the native wallet. */\n UNSUPPORTED_DEVICE = 'UNSUPPORTED_DEVICE',\n /** This card already exists on this device and any paired devices. */\n CARD_ALREADY_EXISTS = 'CARD_ALREADY_EXISTS',\n /** This card already exists on this device, but not on the paired device. */\n CARD_EXISTS_ON_CURRENT_DEVICE = 'CARD_EXISTS_ON_CURRENT_DEVICE',\n /** This card already exists on the paired device, but not on this device. */\n CARD_EXISTS_ON_PAIRED_DEVICE = 'CARD_EXISTS_ON_PAIRED_DEVICE',\n}\n"],"mappings":"qIAWYA,yBAAwB,qEAAxBA,wBAAwB,EAAxBA,wBAAwB,sFAAxBA,wBAAwB,8CAAxBA,wBAAwB,kDAAxBA,wBAAwB,4CAAxBA,wBAAwB,sFAAxBA,wBAAwB,yDAAxBA,wBAAwB,oCAAxBA,wBAAwB,SAqDxBC,yBAAwB,qEAAxBA,wBAAwB,EAAxBA,wBAAwB,kDAAxBA,wBAAwB,4CAAxBA,wBAAwB,8CAAxBA,wBAAwB,kEAAxBA,wBAAwB,mEAAxBA,wBAAwB,oCAAxBA,wBAAwB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["SetupIntent.ts"],"names":["Status"],"mappings":"kFA+CYA,CAAAA,M,iCAAAA,M,EAAAA,M,0BAAAA,M,kDAAAA,M,gDAAAA,M,wBAAAA,M,4BAAAA,M,oCAAAA,M,yBAAAA,M,kBAAAA,M","sourcesContent":["import type { Type } from './PaymentMethod';\nimport type { LastPaymentError } from './PaymentIntent';\nimport type { NextAction } from './NextAction';\nimport type * as PaymentMethod from './PaymentMethod';\nexport interface Result {\n id: string;\n clientSecret: string;\n lastSetupError: LastPaymentError | null;\n /** The UNIX timestamp (in milliseconds) of the date this Setup Intent was created. */\n created: string | null;\n livemode: boolean;\n paymentMethodId: string | null;\n status: Status;\n paymentMethodTypes: Type[];\n usage: FutureUsage;\n description: string | null;\n nextAction: NextAction | null;\n}\n\nexport type ConfirmParams =\n | PaymentMethod.CardParams\n | PaymentMethod.IdealParams\n | PaymentMethod.OxxoParams\n | PaymentMethod.P24Params\n | PaymentMethod.AlipayParams\n | PaymentMethod.GiropayParams\n | PaymentMethod.SepaParams\n | PaymentMethod.EpsParams\n | PaymentMethod.AuBecsDebitParams\n | PaymentMethod.SofortParams\n | PaymentMethod.GrabPayParams\n | PaymentMethod.FPXParams\n | PaymentMethod.AfterpayClearpayParams\n | PaymentMethod.KlarnaParams\n | PaymentMethod.BancontactParams\n | PaymentMethod.USBankAccountParams;\n// TODO: Change the above back to PaymentMethod.CreateParams when PayPal is supported through SetupIntents\n\nexport type ConfirmOptions = {};\n\nexport type FutureUsage =\n | 'Unknown'\n | 'None'\n | 'OnSession'\n | 'OffSession'\n | 'OneTime';\n\nexport enum Status {\n Succeeded = 'Succeeded',\n RequiresPaymentMethod = 'RequiresPaymentMethod',\n RequiresConfirmation = 'RequiresConfirmation',\n Canceled = 'Canceled',\n Processing = 'Processing',\n RequiresAction = 'RequiresAction',\n Unknown = 'Unknown',\n}\n"]}
1
+ {"version":3,"names":["Status"],"sources":["SetupIntent.ts"],"sourcesContent":["import type { Type } from './PaymentMethod';\nimport type { LastPaymentError } from './PaymentIntent';\nimport type { NextAction } from './NextAction';\nimport type * as PaymentMethod from './PaymentMethod';\nexport interface Result {\n id: string;\n clientSecret: string;\n lastSetupError: LastPaymentError | null;\n /** The UNIX timestamp (in milliseconds) of the date this Setup Intent was created. */\n created: string | null;\n livemode: boolean;\n paymentMethodId: string | null;\n status: Status;\n paymentMethodTypes: Type[];\n usage: FutureUsage;\n description: string | null;\n nextAction: NextAction | null;\n}\n\nexport type ConfirmParams =\n | PaymentMethod.CardParams\n | PaymentMethod.IdealParams\n | PaymentMethod.OxxoParams\n | PaymentMethod.P24Params\n | PaymentMethod.AlipayParams\n | PaymentMethod.GiropayParams\n | PaymentMethod.SepaParams\n | PaymentMethod.EpsParams\n | PaymentMethod.AuBecsDebitParams\n | PaymentMethod.SofortParams\n | PaymentMethod.GrabPayParams\n | PaymentMethod.FPXParams\n | PaymentMethod.AfterpayClearpayParams\n | PaymentMethod.KlarnaParams\n | PaymentMethod.BancontactParams\n | PaymentMethod.USBankAccountParams;\n// TODO: Change the above back to PaymentMethod.CreateParams when PayPal is supported through SetupIntents\n\nexport type ConfirmOptions = {};\n\nexport type FutureUsage =\n | 'Unknown'\n | 'None'\n | 'OnSession'\n | 'OffSession'\n | 'OneTime';\n\nexport enum Status {\n Succeeded = 'Succeeded',\n RequiresPaymentMethod = 'RequiresPaymentMethod',\n RequiresConfirmation = 'RequiresConfirmation',\n Canceled = 'Canceled',\n Processing = 'Processing',\n RequiresAction = 'RequiresAction',\n Unknown = 'Unknown',\n}\n"],"mappings":"kFA+CYA,OAAM,iCAANA,MAAM,EAANA,MAAM,0BAANA,MAAM,kDAANA,MAAM,gDAANA,MAAM,wBAANA,MAAM,4BAANA,MAAM,oCAANA,MAAM,yBAANA,MAAM,kBAANA,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["ThreeDSecure.ts"],"names":["NavigationBarStyle"],"mappings":"8FAcYA,CAAAA,kB,yDAAAA,kB,EAAAA,kB,CAAAA,kB,yBAAAA,kB,CAAAA,kB,qBAAAA,kB,CAAAA,kB,8CAAAA,kB,8BAAAA,kB","sourcesContent":["export interface ConfigurationParams extends Props {\n timeout?: number;\n label?: LabelProps;\n navigationBar?: NavigationBarProps;\n textField?: TextFieldProps;\n submitButton?: ButtonProps;\n cancelButton?: ButtonProps;\n continueButton?: ButtonProps;\n nextButton?: ButtonProps;\n resendButton?: ButtonProps;\n}\n\nexport interface Props extends IOSProps, AndroidProps {}\n\nexport enum NavigationBarStyle {\n default = 0,\n black = 1,\n blackTranslucent = 2,\n}\n\nexport interface IOSProps {\n backgroundColor?: string;\n footer?: FooterProps;\n}\nexport interface IOSNavigationBarProps {\n barStyle?: NavigationBarStyle;\n translucent?: boolean;\n barTintColor?: string;\n}\n\nexport interface AndroidProps {\n accentColor?: string;\n}\nexport interface AndroidNavigationBarProps {\n statusBarColor?: string;\n backgroundColor?: string;\n}\n\nexport interface NavigationBarProps\n extends IOSNavigationBarProps,\n AndroidNavigationBarProps {\n headerText?: string;\n buttonText?: string;\n textColor?: string;\n textFontSize?: number;\n}\n\nexport interface FooterProps {\n backgroundColor?: string;\n chevronColor?: string;\n headingTextColor?: string;\n textColor?: string;\n}\n\nexport interface LabelProps {\n headingTextColor?: string;\n textColor?: string;\n textFontSize?: number;\n headingFontSize?: number;\n}\n\nexport interface TextFieldProps {\n borderColor?: string;\n borderWidth?: number;\n borderRadius?: number;\n textColor?: string;\n textFontSize?: number;\n}\n\nexport interface ButtonProps {\n backgroundColor?: string;\n borderRadius?: number;\n textColor?: string;\n textFontSize?: number;\n}\n"]}
1
+ {"version":3,"names":["NavigationBarStyle"],"sources":["ThreeDSecure.ts"],"sourcesContent":["export interface ConfigurationParams extends Props {\n timeout?: number;\n label?: LabelProps;\n navigationBar?: NavigationBarProps;\n textField?: TextFieldProps;\n submitButton?: ButtonProps;\n cancelButton?: ButtonProps;\n continueButton?: ButtonProps;\n nextButton?: ButtonProps;\n resendButton?: ButtonProps;\n}\n\nexport interface Props extends IOSProps, AndroidProps {}\n\nexport enum NavigationBarStyle {\n default = 0,\n black = 1,\n blackTranslucent = 2,\n}\n\nexport interface IOSProps {\n backgroundColor?: string;\n footer?: FooterProps;\n}\nexport interface IOSNavigationBarProps {\n barStyle?: NavigationBarStyle;\n translucent?: boolean;\n barTintColor?: string;\n}\n\nexport interface AndroidProps {\n accentColor?: string;\n}\nexport interface AndroidNavigationBarProps {\n statusBarColor?: string;\n backgroundColor?: string;\n}\n\nexport interface NavigationBarProps\n extends IOSNavigationBarProps,\n AndroidNavigationBarProps {\n headerText?: string;\n buttonText?: string;\n textColor?: string;\n textFontSize?: number;\n}\n\nexport interface FooterProps {\n backgroundColor?: string;\n chevronColor?: string;\n headingTextColor?: string;\n textColor?: string;\n}\n\nexport interface LabelProps {\n headingTextColor?: string;\n textColor?: string;\n textFontSize?: number;\n headingFontSize?: number;\n}\n\nexport interface TextFieldProps {\n borderColor?: string;\n borderWidth?: number;\n borderRadius?: number;\n textColor?: string;\n textFontSize?: number;\n}\n\nexport interface ButtonProps {\n backgroundColor?: string;\n borderRadius?: number;\n textColor?: string;\n textFontSize?: number;\n}\n"],"mappings":"8FAcYA,mBAAkB,yDAAlBA,kBAAkB,EAAlBA,kBAAkB,CAAlBA,kBAAkB,yBAAlBA,kBAAkB,CAAlBA,kBAAkB,qBAAlBA,kBAAkB,CAAlBA,kBAAkB,8CAAlBA,kBAAkB,8BAAlBA,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["Token.ts"],"sourcesContent":["import type { Address } from './Common';\n\nexport type CardBrand =\n | 'AmericanExpress'\n | 'DinersClub'\n | 'Discover'\n | 'JCB'\n | 'MasterCard'\n | 'UnionPay'\n | 'Visa'\n | 'Unknown';\n\nexport type Type =\n | 'Account'\n | 'BankAccount'\n | 'Card'\n | 'CvcUpdate'\n | 'Person'\n | 'Pii';\n\nexport interface Result {\n id: string;\n /** The UNIX timestamp (in milliseconds) of the date this token was created. */\n created: string;\n type: Type;\n used: boolean;\n livemode: boolean;\n card?: Card;\n bankAccount?: BankAccount;\n}\n\nexport interface BankAccount {\n /** A unique ID for this bank account. */\n id: string;\n /** The name of the associated bank. */\n bankName: string | null;\n /** The name of the person or business that owns the bank account. This field is required when attaching the bank account to a Customer object. */\n accountHolderName: string | null;\n /** The type of entity that holds the account. */\n accountHolderType: BankAcccountHolderType | null;\n /** The currency the bank account is in. This must be a country/currency pairing that Stripe supports. */\n currency: string | null;\n /** The country in which the bank account is located. */\n country: string | null;\n routingNumber: string | null;\n status: BankAccountStatus | null;\n fingerprint: string | null;\n last4: string | null;\n}\n\nexport type BankAccountStatus =\n | 'Errored'\n | 'New'\n | 'Validated'\n | 'VerificationFailed'\n | 'Verified';\n\nexport interface Card {\n id: string;\n country: string;\n brand: CardBrand;\n currency?: string;\n expMonth: number;\n expYear: number;\n last4: string;\n funding: 'Credit' | 'Debit' | 'Prepaid' | 'Unknown';\n address: Address;\n name?: string;\n}\n\nexport type CreateParams =\n | CreateCardTokenParams\n | CreateBankAccountTokenParams\n | CreatePiiTokenParams;\n\n/** Creates a single-use token that represents a credit card’s details. Use this in combination with either the CardField or CardForm components. This token can be used in place of a credit card object with any API method. See https://stripe.com/docs/api/tokens/create_card*/\nexport type CreateCardTokenParams = {\n type: 'Card';\n address?: Address;\n name?: string;\n currency?: string;\n};\n\nexport type BankAcccountHolderType = 'Company' | 'Individual';\n\nexport type BankAcccountType = 'Checking' | 'Savings';\n\n/** Creates a single-use token that represents a bank account’s details. This token can be used with any API method in place of a bank account object. See https://stripe.com/docs/api/tokens/create_bank_account */\nexport type CreateBankAccountTokenParams = {\n type: 'BankAccount';\n accountHolderName?: string;\n accountHolderType?: BankAcccountHolderType;\n accountNumber: string;\n country: string;\n currency: string;\n routingNumber?: string;\n};\n\n/** Creates a single-use token that represents the details of personally identifiable information (PII). See https://stripe.com/docs/api/tokens/create_pii */\nexport type CreatePiiTokenParams = {\n type: 'Pii';\n /** The user's personal ID number */\n personalId: string;\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["ApplePayButtonComponent.ts"],"sourcesContent":["import type { StyleProp, ViewStyle, NativeSyntheticEvent } from 'react-native';\nimport type { ShippingMethod, ShippingContact } from '../PlatformPay';\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n disabled?: boolean;\n type?: number;\n buttonStyle?: number;\n borderRadius?: number;\n onPressAction?(): void;\n onShippingMethodSelectedAction?: (\n value: NativeSyntheticEvent<{\n shippingMethod: ShippingMethod;\n }>\n ) => void;\n onShippingContactSelectedAction?: (\n value: NativeSyntheticEvent<{\n shippingContact: ShippingContact;\n }>\n ) => void;\n onCouponCodeEnteredAction?: (\n value: NativeSyntheticEvent<{\n couponCode: string;\n }>\n ) => void;\n}\n\nexport type Type =\n | 'plain'\n | 'buy'\n | 'setUp'\n | 'inStore'\n | 'donate'\n | 'checkout'\n | 'book'\n | 'subscribe'\n | 'reload'\n | 'addMoney'\n | 'topUp'\n | 'order'\n | 'rent'\n | 'support'\n | 'contribute'\n | 'tip'\n | 'continue';\n\nexport type Style = 'white' | 'whiteOutline' | 'black' | 'automatic';\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["AuBECSDebitFormComponent.ts"],"sourcesContent":["import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\n\n/**\n * @ignore\n */\nexport interface NativeProps {\n companyName: string;\n style?: StyleProp<ViewStyle>;\n formStyle: Styles;\n onCompleteAction(value: NativeSyntheticEvent<FormDetails>): void;\n}\n\nexport interface FormDetails {\n accountNumber: string;\n bsbNumber: string;\n email: string;\n name: string;\n}\n\nexport interface Styles {\n borderWidth?: number;\n backgroundColor?: string;\n borderColor?: string;\n borderRadius?: number;\n textColor?: string;\n fontSize?: number;\n placeholderColor?: string;\n textErrorColor?: string;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["CardFieldInput.ts"],"names":["ValidationState"],"mappings":"2FAKYA,CAAAA,e,mDAAAA,e,EAAAA,e,kBAAAA,e,sBAAAA,e,4BAAAA,e,yBAAAA,e,2BAAAA,e","sourcesContent":["import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\nimport type { CardBrand } from '../Token';\n\nexport type FieldName = 'CardNumber' | 'Cvc' | 'ExpiryDate' | 'PostalCode';\n\nexport enum ValidationState {\n Valid = 'Valid',\n Invalid = 'Invalid',\n Incomplete = 'Incomplete',\n Unknown = 'Unknown',\n}\n\nexport interface Details {\n last4: string;\n expiryMonth: number;\n expiryYear: number;\n postalCode?: string;\n brand: CardBrand;\n complete: boolean;\n validExpiryDate: ValidationState;\n validCVC: ValidationState;\n validNumber: ValidationState;\n /**\n * WARNING: Full card details are only returned when the `dangerouslyGetFullCardDetails` prop\n * on the `CardField` component is set to `true`.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n number?: string;\n cvc?: string;\n}\n\nexport interface Styles {\n borderWidth?: number;\n backgroundColor?: string;\n borderColor?: string;\n borderRadius?: number;\n textColor?: string;\n fontSize?: number;\n placeholderColor?: string;\n cursorColor?: string;\n textErrorColor?: string;\n fontFamily?: string;\n}\n\nexport interface Placeholders {\n number?: string;\n expiration?: string;\n cvc?: string;\n postalCode?: string;\n}\n\n/**\n * @ignore\n */\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n value?: Partial<Details>;\n postalCodeEnabled?: boolean;\n autofocus?: boolean;\n countryCode: string | null;\n onCardChange(event: NativeSyntheticEvent<Details>): void;\n onFocusChange(\n event: NativeSyntheticEvent<{ focusedField: FieldName | null }>\n ): void;\n cardStyle?: Styles;\n placeholders?: Placeholders;\n}\n\nexport interface Methods {\n focus(): void;\n blur(): void;\n clear(): void;\n}\n"]}
1
+ {"version":3,"names":["ValidationState"],"sources":["CardFieldInput.ts"],"sourcesContent":["import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\nimport type { CardBrand } from '../Token';\n\nexport type FieldName = 'CardNumber' | 'Cvc' | 'ExpiryDate' | 'PostalCode';\n\nexport enum ValidationState {\n Valid = 'Valid',\n Invalid = 'Invalid',\n Incomplete = 'Incomplete',\n Unknown = 'Unknown',\n}\n\nexport interface Details {\n last4: string;\n expiryMonth: number;\n expiryYear: number;\n postalCode?: string;\n brand: CardBrand;\n complete: boolean;\n validExpiryDate: ValidationState;\n validCVC: ValidationState;\n validNumber: ValidationState;\n /**\n * WARNING: Full card details are only returned when the `dangerouslyGetFullCardDetails` prop\n * on the `CardField` component is set to `true`.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n number?: string;\n cvc?: string;\n}\n\nexport interface Styles {\n borderWidth?: number;\n backgroundColor?: string;\n borderColor?: string;\n borderRadius?: number;\n textColor?: string;\n fontSize?: number;\n placeholderColor?: string;\n cursorColor?: string;\n textErrorColor?: string;\n fontFamily?: string;\n}\n\nexport interface Placeholders {\n number?: string;\n expiration?: string;\n cvc?: string;\n postalCode?: string;\n}\n\n/**\n * @ignore\n */\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n value?: Partial<Details>;\n postalCodeEnabled?: boolean;\n autofocus?: boolean;\n countryCode: string | null;\n onCardChange(event: NativeSyntheticEvent<Details>): void;\n onFocusChange(\n event: NativeSyntheticEvent<{ focusedField: FieldName | null }>\n ): void;\n cardStyle?: Styles;\n placeholders?: Placeholders;\n}\n\nexport interface Methods {\n focus(): void;\n blur(): void;\n clear(): void;\n}\n"],"mappings":"2FAKYA,gBAAe,mDAAfA,eAAe,EAAfA,eAAe,kBAAfA,eAAe,sBAAfA,eAAe,4BAAfA,eAAe,yBAAfA,eAAe,2BAAfA,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["CardFormView.ts"],"sourcesContent":["import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\nimport type { CardBrand } from '../Token';\n\nexport type FieldName = 'CardNumber' | 'Cvc' | 'ExpiryDate' | 'PostalCode';\n\nexport interface Details {\n last4: string;\n expiryMonth: number;\n expiryYear: number;\n postalCode?: string;\n brand: CardBrand;\n complete: boolean;\n country: string;\n /**\n * WARNING: Full card details are only returned when the `dangerouslyGetFullCardDetails` prop\n * on the `CardField` component is set to `true`.\n * Only do this if you're certain that you fulfill the necessary PCI compliance requirements.\n * Make sure that you're not mistakenly logging or storing full card details!\n * See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance\n */\n number?: string;\n cvc?: string;\n}\n\nexport interface Styles {\n backgroundColor?: string;\n // disabledBackgroundColor?: string;\n // type?: 'borderless' | 'standard';\n borderWidth?: number;\n borderColor?: string;\n borderRadius?: number;\n textColor?: string;\n fontSize?: number;\n placeholderColor?: string;\n cursorColor?: string;\n textErrorColor?: string;\n fontFamily?: string;\n}\n\nexport interface Placeholders {\n number?: string;\n expiration?: string;\n cvc?: string;\n postalCode?: string;\n}\n\nexport type DefaultValues = {\n /** The 2-letter country code for the country selected by default on Android. If this is null, it is set by the device's configured region in the Settings app. */\n countryCode?: string;\n};\n\n/**\n * @ignore\n */\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n autofocus?: boolean;\n // isUserInteractionEnabledValue?: boolean;\n cardStyle?: Styles;\n /** Android only */\n placeholders?: Placeholders;\n /** Android only */\n defaultValues?: DefaultValues;\n // postalCodeEnabled: boolean;\n onFocusChange(\n event: NativeSyntheticEvent<{ focusedField: FieldName | null }>\n ): void;\n onFormComplete(event: NativeSyntheticEvent<Details>): void;\n}\n\nexport interface Methods {\n focus(): void;\n blur(): void;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});
2
+ //# sourceMappingURL=GooglePayButtonComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["GooglePayButtonComponent.ts"],"sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\nexport interface NativeProps {\n style?: StyleProp<ViewStyle>;\n type?: number;\n buttonType?: string;\n}\n"],"mappings":""}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={ApplePay:true,PaymentIntent:true,PaymentMethod:true,PaymentSheet:true,SetupIntent:true,ThreeDSecure:true,GooglePay:true,ApplePayButtonComponent:true,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,Address:true,BillingDetails:true,AddressDetails:true};Object.defineProperty(exports,"Address",{enumerable:true,get:function get(){return _Common.Address;}});Object.defineProperty(exports,"AddressDetails",{enumerable:true,get:function get(){return _Common.AddressDetails;}});exports.AuBECSDebitFormComponent=exports.ApplePayButtonComponent=exports.ApplePay=void 0;Object.defineProperty(exports,"BillingDetails",{enumerable:true,get:function get(){return _Common.BillingDetails;}});exports.Token=exports.ThreeDSecure=exports.SetupIntent=exports.PaymentSheet=exports.PaymentMethod=exports.PaymentIntent=exports.GooglePay=exports.FinancialConnections=exports.CardFormView=exports.CardFieldInput=void 0;var ApplePay=_interopRequireWildcard(require("./ApplePay"));exports.ApplePay=ApplePay;var PaymentIntent=_interopRequireWildcard(require("./PaymentIntent"));exports.PaymentIntent=PaymentIntent;var PaymentMethod=_interopRequireWildcard(require("./PaymentMethod"));exports.PaymentMethod=PaymentMethod;var PaymentSheet=_interopRequireWildcard(require("./PaymentSheet"));exports.PaymentSheet=PaymentSheet;var SetupIntent=_interopRequireWildcard(require("./SetupIntent"));exports.SetupIntent=SetupIntent;var ThreeDSecure=_interopRequireWildcard(require("./ThreeDSecure"));exports.ThreeDSecure=ThreeDSecure;var GooglePay=_interopRequireWildcard(require("./GooglePay"));exports.GooglePay=GooglePay;var ApplePayButtonComponent=_interopRequireWildcard(require("./components/ApplePayButtonComponent"));exports.ApplePayButtonComponent=ApplePayButtonComponent;var AuBECSDebitFormComponent=_interopRequireWildcard(require("./components/AuBECSDebitFormComponent"));exports.AuBECSDebitFormComponent=AuBECSDebitFormComponent;var CardFieldInput=_interopRequireWildcard(require("./components/CardFieldInput"));exports.CardFieldInput=CardFieldInput;var CardFormView=_interopRequireWildcard(require("./components/CardFormView"));exports.CardFormView=CardFormView;var Token=_interopRequireWildcard(require("./Token"));exports.Token=Token;var FinancialConnections=_interopRequireWildcard(require("./FinancialConnections"));exports.FinancialConnections=FinancialConnections;var _Errors=require("./Errors");Object.keys(_Errors).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_Errors[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _Errors[key];}});});var _Common=require("./Common");function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}
1
+ Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={ApplePay:true,PaymentIntent:true,PaymentMethod:true,PaymentSheet:true,SetupIntent:true,ThreeDSecure:true,GooglePay:true,ApplePayButtonComponent:true,GooglePayButtonComponent:true,AuBECSDebitFormComponent:true,CardFieldInput:true,CardFormView:true,Token:true,FinancialConnections:true,PlatformPay:true,Address:true,BillingDetails:true,AddressDetails:true};Object.defineProperty(exports,"Address",{enumerable:true,get:function get(){return _Common.Address;}});Object.defineProperty(exports,"AddressDetails",{enumerable:true,get:function get(){return _Common.AddressDetails;}});exports.AuBECSDebitFormComponent=exports.ApplePayButtonComponent=exports.ApplePay=void 0;Object.defineProperty(exports,"BillingDetails",{enumerable:true,get:function get(){return _Common.BillingDetails;}});exports.Token=exports.ThreeDSecure=exports.SetupIntent=exports.PlatformPay=exports.PaymentSheet=exports.PaymentMethod=exports.PaymentIntent=exports.GooglePayButtonComponent=exports.GooglePay=exports.FinancialConnections=exports.CardFormView=exports.CardFieldInput=void 0;var ApplePay=_interopRequireWildcard(require("./ApplePay"));exports.ApplePay=ApplePay;var PaymentIntent=_interopRequireWildcard(require("./PaymentIntent"));exports.PaymentIntent=PaymentIntent;var PaymentMethod=_interopRequireWildcard(require("./PaymentMethod"));exports.PaymentMethod=PaymentMethod;var PaymentSheet=_interopRequireWildcard(require("./PaymentSheet"));exports.PaymentSheet=PaymentSheet;var SetupIntent=_interopRequireWildcard(require("./SetupIntent"));exports.SetupIntent=SetupIntent;var ThreeDSecure=_interopRequireWildcard(require("./ThreeDSecure"));exports.ThreeDSecure=ThreeDSecure;var GooglePay=_interopRequireWildcard(require("./GooglePay"));exports.GooglePay=GooglePay;var ApplePayButtonComponent=_interopRequireWildcard(require("./components/ApplePayButtonComponent"));exports.ApplePayButtonComponent=ApplePayButtonComponent;var GooglePayButtonComponent=_interopRequireWildcard(require("./components/GooglePayButtonComponent"));exports.GooglePayButtonComponent=GooglePayButtonComponent;var AuBECSDebitFormComponent=_interopRequireWildcard(require("./components/AuBECSDebitFormComponent"));exports.AuBECSDebitFormComponent=AuBECSDebitFormComponent;var CardFieldInput=_interopRequireWildcard(require("./components/CardFieldInput"));exports.CardFieldInput=CardFieldInput;var CardFormView=_interopRequireWildcard(require("./components/CardFormView"));exports.CardFormView=CardFormView;var Token=_interopRequireWildcard(require("./Token"));exports.Token=Token;var FinancialConnections=_interopRequireWildcard(require("./FinancialConnections"));exports.FinancialConnections=FinancialConnections;var PlatformPay=_interopRequireWildcard(require("./PlatformPay"));exports.PlatformPay=PlatformPay;var _PushProvisioning=require("./PushProvisioning");Object.keys(_PushProvisioning).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_PushProvisioning[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _PushProvisioning[key];}});});var _Errors=require("./Errors");Object.keys(_Errors).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_Errors[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _Errors[key];}});});var _Common=require("./Common");function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"mgCAeA,4D,0BACA,sE,oCACA,sE,oCACA,oE,kCACA,kE,gCACA,oE,kCACA,8D,4BACA,qG,wDACA,uG,0DACA,mF,sCACA,+E,kCACA,sD,oBACA,oF,kDAkBA,iVACA,gC","sourcesContent":["import type {\n ApplePayError,\n CardActionError,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n CreatePaymentMethodError,\n CreateTokenError,\n GooglePayError,\n PaymentSheetError,\n RetrievePaymentIntentError,\n RetrieveSetupIntentError,\n StripeError,\n VerifyMicrodepositsError,\n CollectBankAccountError,\n} from './Errors';\nimport * as ApplePay from './ApplePay';\nimport * as PaymentIntent from './PaymentIntent';\nimport * as PaymentMethod from './PaymentMethod';\nimport * as PaymentSheet from './PaymentSheet';\nimport * as SetupIntent from './SetupIntent';\nimport * as ThreeDSecure from './ThreeDSecure';\nimport * as GooglePay from './GooglePay';\nimport * as ApplePayButtonComponent from './components/ApplePayButtonComponent';\nimport * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';\nimport * as CardFieldInput from './components/CardFieldInput';\nimport * as CardFormView from './components/CardFormView';\nimport * as Token from './Token';\nimport * as FinancialConnections from './FinancialConnections';\n\nexport {\n ApplePay,\n PaymentIntent,\n PaymentMethod,\n PaymentSheet,\n SetupIntent,\n ThreeDSecure,\n GooglePay,\n ApplePayButtonComponent,\n AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n};\n\nexport * from './Errors';\nexport { Address, BillingDetails, AddressDetails } from './Common';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\nexport interface AppInfo {\n name?: string;\n partnerId?: string;\n url?: string;\n version?: string;\n}\n\nexport type CreatePaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult = {\n paymentOption?: PaymentSheet.PaymentOption | undefined;\n error?: StripeError<PaymentSheetError> | undefined;\n};\n\nexport type CreateTokenResult =\n | {\n token: Token.Result;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<CreateTokenError>;\n };\n\nexport type ConfirmPaymentSheetPaymentResult = {\n error?: StripeError<PaymentSheetError>;\n};\n\nexport type ApplePayResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n stripeAccountId?: string;\n threeDSecureParams?: ThreeDSecure.ConfigurationParams;\n merchantIdentifier?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n}\n\nexport interface InitialiseParams extends InitStripeParams {\n appInfo: AppInfo;\n}\n\nexport type GooglePayInitResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type PayWithGooglePayResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type CreateGooglePayPaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type OpenApplePaySetupResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<ApplePayError>;\n };\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type VerifyMicrodepositsForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type VerifyMicrodepositsForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type CollectBankAccountForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type CollectBankAccountForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type GooglePayCardToken = {\n id: string;\n cardLastFour: string;\n network: number;\n serviceProvider: number;\n issuer: string;\n status:\n | 'TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION'\n | 'TOKEN_STATE_PENDING'\n | 'TOKEN_STATE_SUSPENDED'\n | 'TOKEN_STATE_ACTIVE'\n | 'TOKEN_STATE_FELICA_PENDING_PROVISIONING'\n | 'TOKEN_STATE_UNTOKENIZED';\n};\n\nexport type IsCardInWalletResult =\n | {\n isInWallet: boolean;\n token?: GooglePayCardToken;\n error?: undefined;\n }\n | {\n isInWallet?: undefined;\n token?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type CanAddCardToWalletParams = {\n /** The `primary_account_identifier` value from the issued card. Can be an empty string. */\n primaryAccountIdentifier: string | null;\n /** Last 4 digits of the card number. */\n cardLastFour: string;\n /** iOS only. Set this to `true` until shipping through TestFlight || App Store. If true, you must be using live cards, and have the proper iOS entitlement set up. See https://stripe.com/docs/issuing/cards/digital-wallets?platform=react-native#requesting-access-for-ios */\n testEnv?: boolean;\n};\n\nexport type CanAddCardToWalletResult =\n | {\n canAddCard: boolean;\n details?: {\n token?: GooglePayCardToken;\n status?:\n | 'MISSING_CONFIGURATION'\n | 'UNSUPPORTED_DEVICE'\n | 'CARD_ALREADY_EXISTS';\n };\n error?: undefined;\n }\n | {\n canAddCard?: undefined;\n details?: undefined;\n error: StripeError<GooglePayError>;\n };\n"]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import type {\n ApplePayError,\n CardActionError,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n CreatePaymentMethodError,\n CreateTokenError,\n GooglePayError,\n PaymentSheetError,\n RetrievePaymentIntentError,\n RetrieveSetupIntentError,\n StripeError,\n VerifyMicrodepositsError,\n CollectBankAccountError,\n} from './Errors';\nimport * as ApplePay from './ApplePay';\nimport * as PaymentIntent from './PaymentIntent';\nimport * as PaymentMethod from './PaymentMethod';\nimport * as PaymentSheet from './PaymentSheet';\nimport * as SetupIntent from './SetupIntent';\nimport * as ThreeDSecure from './ThreeDSecure';\nimport * as GooglePay from './GooglePay';\nimport * as ApplePayButtonComponent from './components/ApplePayButtonComponent';\nimport * as GooglePayButtonComponent from './components/GooglePayButtonComponent';\nimport * as AuBECSDebitFormComponent from './components/AuBECSDebitFormComponent';\nimport * as CardFieldInput from './components/CardFieldInput';\nimport * as CardFormView from './components/CardFormView';\nimport * as Token from './Token';\nimport * as FinancialConnections from './FinancialConnections';\nimport * as PlatformPay from './PlatformPay';\n\nexport {\n ApplePay,\n PaymentIntent,\n PaymentMethod,\n PaymentSheet,\n SetupIntent,\n ThreeDSecure,\n GooglePay,\n ApplePayButtonComponent,\n GooglePayButtonComponent,\n AuBECSDebitFormComponent,\n CardFieldInput,\n CardFormView,\n Token,\n FinancialConnections,\n PlatformPay,\n};\n\nexport * from './PushProvisioning';\nexport * from './Errors';\nexport { Address, BillingDetails, AddressDetails } from './Common';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\nexport interface AppInfo {\n name?: string;\n partnerId?: string;\n url?: string;\n version?: string;\n}\n\nexport type CreatePaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult = {\n paymentOption?: PaymentSheet.PaymentOption | undefined;\n error?: StripeError<PaymentSheetError> | undefined;\n};\n\nexport type CreateTokenResult =\n | {\n token: Token.Result;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<CreateTokenError>;\n };\n\nexport type ConfirmPaymentSheetPaymentResult = {\n error?: StripeError<PaymentSheetError>;\n};\n\nexport type ApplePayResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n stripeAccountId?: string;\n threeDSecureParams?: ThreeDSecure.ConfigurationParams;\n merchantIdentifier?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n}\n\nexport interface InitialiseParams extends InitStripeParams {\n appInfo: AppInfo;\n}\n\nexport type GooglePayInitResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type PayWithGooglePayResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type CreateGooglePayPaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type OpenApplePaySetupResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<ApplePayError>;\n };\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type VerifyMicrodepositsForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type VerifyMicrodepositsForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type CollectBankAccountForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type CollectBankAccountForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n"],"mappings":"umCAeA,4DAAuC,0BACvC,sEAAiD,oCACjD,sEAAiD,oCACjD,oEAA+C,kCAC/C,kEAA6C,gCAC7C,oEAA+C,kCAC/C,8DAAyC,4BACzC,qGAAgF,wDAChF,uGAAkF,0DAClF,uGAAkF,0DAClF,mFAA8D,sCAC9D,+EAA0D,kCAC1D,sDAAiC,oBACjC,oFAA+D,kDAC/D,kEAA6C,gCAoB7C,mYACA,iVACA,gCAAmE"}
@@ -1,4 +1,4 @@
1
- import type { PaymentMethod, PaymentIntent, ApplePay, PaymentSheet, SetupIntent, InitialiseParams, CreatePaymentMethodResult, RetrievePaymentIntentResult, RetrieveSetupIntentResult, ConfirmPaymentResult, HandleNextActionResult, ConfirmSetupIntentResult, CreateTokenForCVCUpdateResult, InitPaymentSheetResult, PresentPaymentSheetResult, ConfirmPaymentSheetPaymentResult, ApplePayResult, CreateTokenResult, GooglePayInitResult, PayWithGooglePayResult, CreateGooglePayPaymentMethodResult, GooglePay, OpenApplePaySetupResult, Token, VerifyMicrodepositsParams, IsCardInWalletResult, CanAddCardToWalletParams, CanAddCardToWalletResult, FinancialConnections } from './types';
1
+ import type { PaymentMethod, PaymentIntent, ApplePay, PlatformPay, PaymentSheet, SetupIntent, InitialiseParams, CreatePaymentMethodResult, RetrievePaymentIntentResult, RetrieveSetupIntentResult, ConfirmPaymentResult, HandleNextActionResult, ConfirmSetupIntentResult, CreateTokenForCVCUpdateResult, InitPaymentSheetResult, PresentPaymentSheetResult, ConfirmPaymentSheetPaymentResult, ApplePayResult, CreateTokenResult, GooglePayInitResult, PayWithGooglePayResult, CreateGooglePayPaymentMethodResult, GooglePay, OpenApplePaySetupResult, Token, VerifyMicrodepositsParams, IsCardInWalletResult, CanAddCardToWalletParams, CanAddCardToWalletResult, FinancialConnections } from './types';
2
2
  declare type NativeStripeSdkType = {
3
3
  initialise(params: InitialiseParams): Promise<void>;
4
4
  createPaymentMethod(params: PaymentMethod.CreateParams, options: PaymentMethod.CreateOptions): Promise<CreatePaymentMethodResult>;
@@ -40,6 +40,13 @@ declare type NativeStripeSdkType = {
40
40
  collectBankAccountToken(clientSecret: string): Promise<FinancialConnections.TokenResult>;
41
41
  collectFinancialConnectionsAccounts(clientSecret: string): Promise<FinancialConnections.SessionResult>;
42
42
  resetPaymentSheetCustomer(): Promise<null>;
43
+ isPlatformPaySupported(params: {
44
+ googlePay?: GooglePay.IsSupportedParams;
45
+ }): Promise<boolean>;
46
+ createPlatformPayPaymentMethod(params: PlatformPay.PaymentMethodParams): Promise<PlatformPay.PaymentMethodResult>;
47
+ dismissPlatformPay(): Promise<boolean>;
48
+ updatePlatformPaySheet(summaryItems: Array<ApplePay.CartSummaryItem>, shippingMethods: Array<ApplePay.ShippingMethod>, errors: Array<PlatformPay.ApplePaySheetError>): Promise<void>;
49
+ confirmPlatformPay(clientSecret: string, params: PlatformPay.ConfirmParams, isPaymentIntent: boolean): Promise<PlatformPay.ConfirmPaymentResult | PlatformPay.ConfirmSetupIntentResult>;
43
50
  };
44
51
  declare const _default: NativeStripeSdkType;
45
52
  export default _default;
@@ -1,5 +1,5 @@
1
+ import type { AccessibilityProps, StyleProp, ViewStyle } from 'react-native';
1
2
  import type { ApplePayButtonComponent } from '../types';
2
- import { AccessibilityProps, StyleProp, ViewStyle } from 'react-native';
3
3
  /**
4
4
  * Apple Pay Button Component Props
5
5
  */
@@ -0,0 +1,3 @@
1
+ import type { ApplePayButtonComponent } from '../types';
2
+ declare const ApplePayButtonNative: import("react-native").HostComponent<ApplePayButtonComponent.NativeProps>;
3
+ export default ApplePayButtonNative;
@@ -0,0 +1,3 @@
1
+ import type { GooglePayButtonComponent } from '../types';
2
+ declare const GooglePayButtonNative: import("react-native").HostComponent<GooglePayButtonComponent.NativeProps>;
3
+ export default GooglePayButtonNative;
@@ -0,0 +1,65 @@
1
+ import { AccessibilityProps, StyleProp, ViewStyle } from 'react-native';
2
+ import { ButtonType, ButtonStyle, ShippingMethod, ShippingContact } from '../types/PlatformPay';
3
+ /**
4
+ * PlatformPayButton Component Props
5
+ */
6
+ export interface Props extends AccessibilityProps {
7
+ /** Sets the text displayed by the button. */
8
+ type?: ButtonType;
9
+ /** iOS only. Sets the coloring of the button. */
10
+ appearance?: ButtonStyle;
11
+ /** iOS only. Sets the border radius of the button. */
12
+ borderRadius?: number;
13
+ /** Function called whenever the button is pressed. */
14
+ onPress(): void;
15
+ /** Set to `true` to disable the button from being pressed & apply a slight opacity to indicate that it is unpressable. Defaults to false. */
16
+ disabled?: boolean;
17
+ /**
18
+ * This callback is triggered whenever the user selects a shipping method in the Apple Pay sheet.
19
+ * It receives one parameter: an `event` object with a `shippingMethod` field. You MUST
20
+ * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the
21
+ * Apple Pay sheet will hang and the payment flow will automatically cancel.
22
+ */
23
+ onShippingMethodSelected?: (event: {
24
+ shippingMethod: ShippingMethod;
25
+ }) => void;
26
+ /**
27
+ * This callback is triggered whenever the user selects a shipping contact in the Apple Pay sheet.
28
+ * It receives one parameter: an `event` object with a `shippingContact` field. You MUST
29
+ * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the
30
+ * Apple Pay sheet will hang and the payment flow will automatically cancel.
31
+ */
32
+ onShippingContactSelected?: (event: {
33
+ shippingContact: ShippingContact;
34
+ }) => void;
35
+ /**
36
+ * This callback is triggered whenever the user inputs a coupon code in the Apple Pay sheet.
37
+ * It receives one parameter: an `event` object with a `couponCode` field. You MUST
38
+ * update the Apple Pay sheet in your callback using the updatePlatformPaySheet function, otherwise the
39
+ * Apple Pay sheet will hang and the payment flow will automatically cancel.
40
+ */
41
+ onCouponCodeEntered?: (event: {
42
+ couponCode: string;
43
+ }) => void;
44
+ testID?: string;
45
+ style?: StyleProp<ViewStyle>;
46
+ }
47
+ /**
48
+ * PlatformPayButton Component. Display the platform-specific native wallet pay button: Apple Pay on iOS, and Google Pay on Android.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * <PlatformPayButton
53
+ * onPress={pay}
54
+ * type={PlatformPay.ButtonType.Subscribe}
55
+ * appearance={PlatformPay.ButtonStyle.WhiteOutline}
56
+ * borderRadius={4}
57
+ * disabled={!isApplePaySupported}
58
+ * style={styles.payButton}
59
+ * />
60
+ * ```
61
+ * @param __namedParameters Props
62
+ * @returns JSX.Element
63
+ * @category ReactComponents
64
+ */
65
+ export declare function PlatformPayButton({ type, appearance, onPress, disabled, borderRadius, onShippingMethodSelected, onShippingContactSelected, onCouponCodeEntered, ...props }: Props): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { ApplePay, ApplePayError, ApplePayResult, ConfirmPaymentResult, ConfirmPaymentSheetPaymentResult, SetupIntent, PaymentIntent, ConfirmSetupIntentResult, CreatePaymentMethodResult, CreateTokenForCVCUpdateResult, CreateTokenResult, GooglePayInitResult, HandleNextActionResult, InitPaymentSheetResult, PaymentMethod, PaymentSheet, PayWithGooglePayResult, PresentPaymentSheetResult, RetrievePaymentIntentResult, RetrieveSetupIntentResult, StripeError, GooglePay, CreateGooglePayPaymentMethodResult, OpenApplePaySetupResult, Token, VerifyMicrodepositsParams, VerifyMicrodepositsForPaymentResult, VerifyMicrodepositsForSetupResult, CollectBankAccountForPaymentResult, CollectBankAccountForSetupResult, IsCardInWalletResult, CanAddCardToWalletParams, CanAddCardToWalletResult, FinancialConnections } from './types';
1
+ import { ApplePay, ApplePayError, ApplePayResult, PlatformPayError, ConfirmPaymentResult, ConfirmPaymentSheetPaymentResult, SetupIntent, PaymentIntent, ConfirmSetupIntentResult, CreatePaymentMethodResult, CreateTokenForCVCUpdateResult, CreateTokenResult, GooglePayInitResult, HandleNextActionResult, InitPaymentSheetResult, PaymentMethod, PaymentSheet, PayWithGooglePayResult, PresentPaymentSheetResult, RetrievePaymentIntentResult, RetrieveSetupIntentResult, StripeError, GooglePay, CreateGooglePayPaymentMethodResult, OpenApplePaySetupResult, Token, VerifyMicrodepositsParams, VerifyMicrodepositsForPaymentResult, VerifyMicrodepositsForSetupResult, CollectBankAccountForPaymentResult, CollectBankAccountForSetupResult, IsCardInWalletResult, CanAddCardToWalletParams, CanAddCardToWalletResult, FinancialConnections, PlatformPay } from './types';
2
2
  export declare const createPaymentMethod: (params: PaymentMethod.CreateParams, options?: PaymentMethod.CreateOptions) => Promise<CreatePaymentMethodResult>;
3
3
  export declare const createToken: (params: Token.CreateParams) => Promise<CreateTokenResult>;
4
4
  export declare const retrievePaymentIntent: (clientSecret: string) => Promise<RetrievePaymentIntentResult>;
@@ -12,14 +12,18 @@ export declare const retrieveSetupIntent: (clientSecret: string) => Promise<Retr
12
12
  * @returns A promise that resolves to an object containing either a `paymentIntent` field, or an `error` field.
13
13
  */
14
14
  export declare const confirmPayment: (paymentIntentClientSecret: string, params?: PaymentMethod.CreateParams | undefined, options?: PaymentIntent.ConfirmOptions) => Promise<ConfirmPaymentResult>;
15
+ /** @deprecated Use `isPlatformPaySupported` instead. */
15
16
  export declare const isApplePaySupported: () => Promise<boolean>;
17
+ /** @deprecated Use `confirmPlatformPaySetupIntent`, `confirmPlatformPayPayment`, or `createPlatformPayPaymentMethod` instead. */
16
18
  export declare const presentApplePay: (params: ApplePay.PresentParams) => Promise<ApplePayResult>;
19
+ /** @deprecated Use `updatePlatformPaySheet` instead. */
17
20
  export declare const updateApplePaySummaryItems: (summaryItems: ApplePay.CartSummaryItem[], errorAddressFields?: Array<{
18
21
  field: ApplePay.AddressFields;
19
22
  message?: string;
20
23
  }>) => Promise<{
21
24
  error?: StripeError<ApplePayError>;
22
25
  }>;
26
+ /** @deprecated Use `confirmPlatformPaySetupIntent` or `confirmPlatformPayPayment` instead. */
23
27
  export declare const confirmApplePayPayment: (clientSecret: string) => Promise<{
24
28
  error?: StripeError<ApplePayError>;
25
29
  }>;
@@ -44,10 +48,15 @@ export declare const confirmPaymentSheetPayment: () => Promise<ConfirmPaymentShe
44
48
  * is also cleared during logout.
45
49
  */
46
50
  export declare const resetPaymentSheetCustomer: () => Promise<null>;
51
+ /** @deprecated Use `isPlatformPaySupported` instead. */
47
52
  export declare const isGooglePaySupported: (params?: GooglePay.IsSupportedParams | undefined) => Promise<boolean>;
53
+ /** @deprecated Use `confirmPlatformPaySetupIntent`, `confirmPlatformPayPayment`, or `createPlatformPayPaymentMethod` instead. */
48
54
  export declare const initGooglePay: (params: GooglePay.InitParams) => Promise<GooglePayInitResult>;
55
+ /** @deprecated Use `confirmPlatformPaySetupIntent`, `confirmPlatformPayPayment`, or `createPlatformPayPaymentMethod` instead. */
49
56
  export declare const presentGooglePay: (params: GooglePay.PresentParams) => Promise<PayWithGooglePayResult>;
57
+ /** @deprecated Use `createPlatformPayPaymentMethod` instead. */
50
58
  export declare const createGooglePayPaymentMethod: (params: GooglePay.CreatePaymentMethodParams) => Promise<CreateGooglePayPaymentMethodResult>;
59
+ /** @deprecated Use `openNativePaySetup` instead. */
51
60
  export declare const openApplePaySetup: () => Promise<OpenApplePaySetupResult>;
52
61
  export declare const collectBankAccountForPayment: (clientSecret: string, params: PaymentMethod.CollectBankAccountParams) => Promise<CollectBankAccountForPaymentResult>;
53
62
  export declare const collectBankAccountForSetup: (clientSecret: string, params: PaymentMethod.CollectBankAccountParams) => Promise<CollectBankAccountForSetupResult>;
@@ -65,7 +74,14 @@ export declare const collectBankAccountToken: (clientSecret: string) => Promise<
65
74
  * @returns A promise that resolves to an object containing either a `session` field, or an error field.
66
75
  */
67
76
  export declare const collectFinancialConnectionsAccounts: (clientSecret: string) => Promise<FinancialConnections.SessionResult>;
77
+ /**
78
+ * Check if the app & device support adding this card to the native wallet.
79
+ * @param params An object containing fields for `primaryAccountIdentifier`, `cardLastFour`, and `testEnv`.
80
+ *
81
+ * @returns A promise resolving to an object of type CanAddCardToWalletResult. Check the `canAddCard` field, if it's true, you should show the `<AddToWalletButton />`
82
+ */
68
83
  export declare const canAddCardToWallet: (params: CanAddCardToWalletParams) => Promise<CanAddCardToWalletResult>;
84
+ /** @deprecated Please use `canAddCardToWallet` instead. */
69
85
  export declare const isCardInWallet: (params: {
70
86
  cardLastFour: string;
71
87
  }) => Promise<IsCardInWalletResult>;
@@ -75,3 +91,59 @@ export declare const Constants: {
75
91
  ISSUING: string;
76
92
  };
77
93
  };
94
+ /**
95
+ * Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.
96
+ * @returns A boolean indicating whether or not the native wallet is supported.
97
+ */
98
+ export declare const isPlatformPaySupported: (params?: {
99
+ googlePay?: GooglePay.IsSupportedParams | undefined;
100
+ } | undefined) => Promise<boolean>;
101
+ /**
102
+ * 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).
103
+ * @param clientSecret The client secret of the SetupIntent.
104
+ * @param params an object describing the Apple Pay and Google Pay configurations.
105
+ * @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.
106
+ */
107
+ export declare const confirmPlatformPaySetupIntent: (clientSecret: string, params: PlatformPay.ConfirmParams) => Promise<PlatformPay.ConfirmSetupIntentResult>;
108
+ /**
109
+ * 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).
110
+ * @param clientSecret The client secret of the PaymentIntent.
111
+ * @param params an object describing the Apple Pay and Google Pay configurations.
112
+ * @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.
113
+ */
114
+ export declare const confirmPlatformPayPayment: (clientSecret: string, params: PlatformPay.ConfirmParams) => Promise<PlatformPay.ConfirmPaymentResult>;
115
+ /**
116
+ * iOS only, this will always return false on Android. Dismisses the Apple Pay sheet if it is open.
117
+ * @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.
118
+ */
119
+ export declare const dismissPlatformPay: () => Promise<boolean>;
120
+ /**
121
+ * 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).
122
+ * @param params an object describing the Apple Pay and Google Pay configurations.
123
+ * @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.
124
+ */
125
+ export declare const createPlatformPayPaymentMethod: (params: PlatformPay.PaymentMethodParams) => Promise<PlatformPay.PaymentMethodResult>;
126
+ /**
127
+ * 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.
128
+ * @param params an object describing the Apple Pay configuration, with the following fields:
129
+ * - cartItems An array of payment summary items to display in the Apple Pay sheet.
130
+ * - shippingMethods An array of shipping methods to display in the Apple Pay sheet.
131
+ * - 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.
132
+ *
133
+ * @returns An object with an optional 'error' field, which is only populated if something went wrong.
134
+ */
135
+ export declare const updatePlatformPaySheet: (params: {
136
+ applePay: {
137
+ cartItems: Array<PlatformPay.CartSummaryItem>;
138
+ shippingMethods: Array<PlatformPay.ShippingMethod>;
139
+ errors: Array<PlatformPay.ApplePaySheetError>;
140
+ };
141
+ }) => Promise<{
142
+ error?: StripeError<PlatformPayError>;
143
+ }>;
144
+ /**
145
+ * iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards.
146
+ * This method transfers control to the Wallet app on iPhone or to the Settings
147
+ * app on iPad. For devices that don’t support Apple Pay, this method does nothing.
148
+ */
149
+ export declare const openPlatformPaySetup: () => Promise<void>;
@@ -0,0 +1,70 @@
1
+ import type { PlatformPay, CanAddCardToWalletParams, CanAddCardToWalletResult } from '../types';
2
+ /**
3
+ * usePlatformPay hook. Access all Apple and Google Pay functionality with this hook.
4
+ */
5
+ export declare function usePlatformPay(): {
6
+ /** Use this boolean to present a spinner or other similar loading screen. `true` if the SDK is currently processing, `false` if it is not. */
7
+ loading: boolean;
8
+ /**
9
+ * Check if the relevant native wallet (Apple Pay on iOS, Google Pay on Android) is supported.
10
+ * @returns A boolean indicating whether or not the native wallet is supported.
11
+ */
12
+ isPlatformPaySupported: (params?: {
13
+ googlePay?: import("../types/GooglePay").IsSupportedParams | undefined;
14
+ } | undefined) => Promise<boolean>;
15
+ /**
16
+ * 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).
17
+ * @param clientSecret The client secret of the SetupIntent.
18
+ * @param params an object describing the Apple Pay and Google Pay configurations.
19
+ * @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.
20
+ */
21
+ confirmPlatformPaySetupIntent: (clientSecret: string, params: PlatformPay.ConfirmParams) => Promise<PlatformPay.ConfirmSetupIntentResult>;
22
+ /**
23
+ * 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).
24
+ * @param clientSecret The client secret of the PaymentIntent.
25
+ * @param params an object describing the Apple Pay and Google Pay configurations.
26
+ * @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.
27
+ */
28
+ confirmPlatformPayPayment: (clientSecret: string, params: PlatformPay.ConfirmParams) => Promise<PlatformPay.ConfirmPaymentResult>;
29
+ /**
30
+ * 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).
31
+ * @param params an object describing the Apple Pay and Google Pay configurations.
32
+ * @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.
33
+ */
34
+ createPlatformPayPaymentMethod: (params: PlatformPay.PaymentMethodParams) => Promise<PlatformPay.PaymentMethodResult>;
35
+ /**
36
+ * Dismiss the Apple Pay sheet if it is open. iOS only, this is a no-op on Android.
37
+ * @returns A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.
38
+ */
39
+ dismissPlatformPay: () => Promise<boolean>;
40
+ /**
41
+ * 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.
42
+ * @param cartItems An array of payment summary items to display in the Apple Pay sheet.
43
+ * @param shippingMethods An array of shipping methods to display in the Apple Pay sheet.
44
+ * @param errors An array of errors associated with the user's input that must be corrected to proceed with payment. These errors will be shown in the Apple Pay sheet.
45
+ *
46
+ * @returns An object with an optional 'error' field, which is only populated if something went wrong.
47
+ */
48
+ updatePlatformPaySheet: (params: {
49
+ applePay: {
50
+ cartItems: Array<PlatformPay.CartSummaryItem>;
51
+ shippingMethods: Array<PlatformPay.ShippingMethod>;
52
+ errors: Array<PlatformPay.ApplePaySheetError>;
53
+ };
54
+ }) => Promise<{
55
+ error?: import("../types").StripeError<import("../types").PlatformPayError> | undefined;
56
+ }>;
57
+ /**
58
+ * Check if the app & device support adding this card to the native wallet.
59
+ * @param params An object containing fields for `primaryAccountIdentifier`, `cardLastFour`, and `testEnv`.
60
+ *
61
+ * @returns A promise resolving to an object of type CanAddCardToWalletResult. Check the `canAddCard` field, if it's true, you should show the `<AddToWalletButton />`
62
+ */
63
+ canAddCardToWallet: (params: CanAddCardToWalletParams) => Promise<CanAddCardToWalletResult>;
64
+ /**
65
+ * iOS only, this is a no-op on Android. Use this method to move users to the interface for adding credit cards.
66
+ * This method transfers control to the Wallet app on iPhone or to the Settings
67
+ * app on iPad. For devices that don’t support Apple Pay, this method does nothing.
68
+ */
69
+ openPlatformPaySetup: () => Promise<void>;
70
+ };
@@ -1,4 +1,4 @@
1
- import type { PaymentMethod, PaymentIntent, ApplePay, PaymentSheet, CreatePaymentMethodResult, RetrievePaymentIntentResult, RetrieveSetupIntentResult, ConfirmPaymentResult, HandleNextActionResult, ConfirmSetupIntentResult, CreateTokenForCVCUpdateResult, ApplePayResult, ApplePayError, StripeError, InitPaymentSheetResult, PresentPaymentSheetResult, ConfirmPaymentSheetPaymentResult, SetupIntent, CreateTokenResult, PayWithGooglePayResult, GooglePayInitResult, GooglePay, CreateGooglePayPaymentMethodResult, OpenApplePaySetupResult, Token, VerifyMicrodepositsParams, VerifyMicrodepositsForPaymentResult, VerifyMicrodepositsForSetupResult, CollectBankAccountForSetupResult, CollectBankAccountForPaymentResult, CanAddCardToWalletParams, CanAddCardToWalletResult, FinancialConnections } from '../types';
1
+ import type { PaymentMethod, PaymentIntent, ApplePay, PaymentSheet, CreatePaymentMethodResult, RetrievePaymentIntentResult, RetrieveSetupIntentResult, ConfirmPaymentResult, HandleNextActionResult, ConfirmSetupIntentResult, CreateTokenForCVCUpdateResult, ApplePayResult, ApplePayError, StripeError, InitPaymentSheetResult, PresentPaymentSheetResult, ConfirmPaymentSheetPaymentResult, SetupIntent, CreateTokenResult, PayWithGooglePayResult, GooglePayInitResult, GooglePay, CreateGooglePayPaymentMethodResult, OpenApplePaySetupResult, Token, VerifyMicrodepositsParams, VerifyMicrodepositsForPaymentResult, VerifyMicrodepositsForSetupResult, CollectBankAccountForSetupResult, CollectBankAccountForPaymentResult, CanAddCardToWalletParams, CanAddCardToWalletResult, FinancialConnections, PlatformPay, PlatformPayError } from '../types';
2
2
  /**
3
3
  * useStripe hook
4
4
  */
@@ -44,4 +44,21 @@ export declare function useStripe(): {
44
44
  * is also cleared during logout.
45
45
  */
46
46
  resetPaymentSheetCustomer: () => Promise<null>;
47
+ isPlatformPaySupported: (params?: {
48
+ googlePay?: GooglePay.IsSupportedParams | undefined;
49
+ } | undefined) => Promise<boolean>;
50
+ confirmPlatformPaySetupIntent: (clientSecret: string, params: PlatformPay.ConfirmParams) => Promise<PlatformPay.ConfirmSetupIntentResult>;
51
+ confirmPlatformPayPayment: (clientSecret: string, params: PlatformPay.ConfirmParams) => Promise<PlatformPay.ConfirmPaymentResult>;
52
+ dismissPlatformPay: () => Promise<boolean>;
53
+ createPlatformPayPaymentMethod: (params: PlatformPay.PaymentMethodParams) => Promise<PlatformPay.PaymentMethodResult>;
54
+ updatePlatformPaySheet: (params: {
55
+ applePay: {
56
+ cartItems: Array<PlatformPay.CartSummaryItem>;
57
+ shippingMethods: Array<PlatformPay.ShippingMethod>;
58
+ errors: Array<PlatformPay.ApplePaySheetError>;
59
+ };
60
+ }) => Promise<{
61
+ error?: StripeError<PlatformPayError>;
62
+ }>;
63
+ openPlatformPaySetup: () => Promise<void>;
47
64
  };