@stripe/stripe-react-native 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (465) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +1 -1
  3. package/android/build/.transforms/{31ceac6fb5d33b3621129bf6bacef38e → 391dacf2d8747d5d964db20fd2dd8815}/results.bin +0 -0
  4. package/android/build/.transforms/391dacf2d8747d5d964db20fd2dd8815/transformed/classes/classes.dex +0 -0
  5. package/android/build/.transforms/{48791259e8e16eb93ec0e1ee5c2320d3 → 465a3f28c318295b6d1e745a1358f0e6}/results.bin +0 -0
  6. package/android/build/.transforms/465a3f28c318295b6d1e745a1358f0e6/transformed/classes/classes.dex +0 -0
  7. package/android/build/.transforms/{74570cf3214a596c51ea9185f02b2c7f → 538f1369a832b015f982db8e9f3e63d4}/results.bin +0 -0
  8. package/android/build/.transforms/538f1369a832b015f982db8e9f3e63d4/transformed/classes/classes.dex +0 -0
  9. package/android/build/.transforms/{82928fc3901d2ce5cedef114e23b9dd5 → 5821b0d6d2e0908c8ed0cd6c2f4e6587}/results.bin +0 -0
  10. package/android/build/.transforms/5821b0d6d2e0908c8ed0cd6c2f4e6587/transformed/classes/classes.dex +0 -0
  11. package/android/build/.transforms/{9338bfb74c726e5746db5e10b980917a → 60446a8b59a82b3ae8bcd81aa8d01afc}/results.bin +0 -0
  12. package/android/build/.transforms/60446a8b59a82b3ae8bcd81aa8d01afc/transformed/classes/classes.dex +0 -0
  13. package/android/build/.transforms/{c731e6bf5b480f659bf1c341f3f0657c → 87295b99343bf0db705fbc154493ffa4}/results.bin +0 -0
  14. package/android/build/.transforms/87295b99343bf0db705fbc154493ffa4/transformed/classes/classes.dex +0 -0
  15. package/android/build/.transforms/{d436978a4beecbc35d07543a01fe4a5c → ae18a466edb55818daf7c30291ff4843}/results.bin +0 -0
  16. package/android/build/.transforms/ae18a466edb55818daf7c30291ff4843/transformed/classes/classes.dex +0 -0
  17. package/android/build/.transforms/d42db6dbe74ca8dbcb5922d32e8646c4/transformed/classes/classes.dex +0 -0
  18. package/android/build/.transforms/e9a96dae20bdea4f5ebd602fc83f5f77/results.bin +1 -0
  19. package/android/build/.transforms/e9a96dae20bdea4f5ebd602fc83f5f77/transformed/classes/classes.dex +0 -0
  20. package/android/build/.transforms/f183966fd9230baa4d89c2c4e2fcb664/results.bin +1 -0
  21. package/android/build/.transforms/f183966fd9230baa4d89c2c4e2fcb664/transformed/classes/classes.dex +0 -0
  22. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  23. package/android/build/intermediates/compile_library_classes_jar/release/classes.jar +0 -0
  24. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  25. package/android/build/intermediates/compile_r_class_jar/release/R.jar +0 -0
  26. package/android/build/intermediates/compile_symbol_list/debug/R.txt +108 -20
  27. package/android/build/intermediates/compile_symbol_list/release/R.txt +108 -20
  28. package/android/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +1 -1
  29. package/android/build/intermediates/incremental/packageReleaseResources/compile-file-map.properties +1 -1
  30. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  31. package/android/build/intermediates/runtime_library_classes_jar/release/classes.jar +0 -0
  32. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +78 -20
  33. package/android/build/intermediates/symbol_list_with_package_name/release/package-aware-r.txt +78 -20
  34. package/android/build/kotlin/compileDebugKotlin/build-history.bin +0 -0
  35. package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab +0 -0
  36. package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  37. package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  38. package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.len +0 -0
  39. package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  40. package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i +0 -0
  41. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  42. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  43. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  44. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  45. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  46. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  48. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  49. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  51. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  52. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  53. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab +0 -0
  54. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  55. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  56. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  57. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  58. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  59. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  60. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  61. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  62. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  63. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab +0 -0
  64. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  65. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  66. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  67. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  68. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/counters.tab +2 -2
  84. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.len +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.len +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.at +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.s +1 -1
  103. package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/last-build.bin +0 -0
  105. package/android/build/kotlin/compileReleaseKotlin/build-history.bin +0 -0
  106. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab +0 -0
  107. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  108. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  109. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.len +0 -0
  110. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  111. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/inputs/source-to-output.tab_i +0 -0
  112. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  113. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  114. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  115. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  116. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  117. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  118. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  119. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  120. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  121. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  122. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  123. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  124. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/constants.tab +0 -0
  125. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  126. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  127. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  128. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  129. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  130. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  131. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab +0 -0
  132. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  133. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  134. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  135. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  136. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  137. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  138. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  139. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  140. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  141. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  142. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  143. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  144. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  145. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  146. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  147. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  148. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  149. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  150. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  151. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/counters.tab +1 -1
  152. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab +0 -0
  153. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  154. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  155. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.len +0 -0
  156. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  157. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/file-to-id.tab_i +0 -0
  158. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab +0 -0
  159. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  160. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  161. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.len +0 -0
  162. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  163. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/id-to-file.tab_i +0 -0
  164. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab +0 -0
  165. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.keystream +0 -0
  166. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  167. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.len +0 -0
  168. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.values +0 -0
  169. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.values.at +0 -0
  170. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab.values.s +1 -1
  171. package/android/build/kotlin/compileReleaseKotlin/caches-jvm/lookups/lookups.tab_i +0 -0
  172. package/android/build/kotlin/compileReleaseKotlin/last-build.bin +0 -0
  173. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/AuBECSDebitFormViewManager.class +0 -0
  174. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldView$setListeners$10.class +0 -0
  175. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldView$setListeners$6.class +0 -0
  176. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/{CardFieldView$setListeners$3.class → CardFieldView$setListeners$7.class} +0 -0
  177. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/{CardFieldView$setListeners$4.class → CardFieldView$setListeners$8.class} +0 -0
  178. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/{CardFieldView$setListeners$5.class → CardFieldView$setListeners$9.class} +0 -0
  179. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldView.class +0 -0
  180. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldViewManager.class +0 -0
  181. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFormViewManager.class +0 -0
  182. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CollectBankAccountLauncherFragment$createBankAccountLauncher$1.class +0 -0
  183. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CollectBankAccountLauncherFragment.class +0 -0
  184. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ConfirmPaymentErrorType.class +0 -0
  185. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ConfirmSetupIntentErrorType.class +0 -0
  186. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ConstantsKt.class +0 -0
  187. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CreateTokenErrorType.class +0 -0
  188. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ErrorType.class +0 -0
  189. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/ErrorsKt.class +0 -0
  190. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayButtonManager$Companion.class +0 -0
  191. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayButtonManager.class +0 -0
  192. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayFragment.class +0 -0
  193. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.class +0 -0
  194. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/MappersKt$WhenMappings.class +0 -0
  195. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/MappersKt.class +0 -0
  196. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment$retrievePaymentIntent$1$WhenMappings.class +0 -0
  197. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment$retrievePaymentIntent$1.class +0 -0
  198. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment$retrieveSetupIntent$1$WhenMappings.class +0 -0
  199. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment$retrieveSetupIntent$1.class +0 -0
  200. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentLauncherFragment.class +0 -0
  201. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentMethodCreateParamsException.class +0 -0
  202. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentMethodCreateParamsFactory$WhenMappings.class +0 -0
  203. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.class +0 -0
  204. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeContainerManager.class +0 -0
  205. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$Companion.class +0 -0
  206. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$createPaymentMethod$1.class +0 -0
  207. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$createTokenForCVCUpdate$1.class +0 -0
  208. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$createTokenFromBankAccount$1.class +0 -0
  209. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$createTokenFromCard$1.class +0 -0
  210. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$googlePayReceiver$1.class +0 -0
  211. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1.class +0 -0
  212. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$mPaymentSheetReceiver$1.class +0 -0
  213. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$retrievePaymentIntent$1.class +0 -0
  214. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$retrieveSetupIntent$1.class +0 -0
  215. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$verifyMicrodeposits$paymentCallback$1.class +0 -0
  216. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$verifyMicrodeposits$setupCallback$1.class +0 -0
  217. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule.class +0 -0
  218. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/AuBECSDebitFormViewManager.class +0 -0
  219. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldView$setListeners$10.class +0 -0
  220. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldView$setListeners$6.class +0 -0
  221. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/{CardFieldView$setListeners$3.class → CardFieldView$setListeners$7.class} +0 -0
  222. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/{CardFieldView$setListeners$4.class → CardFieldView$setListeners$8.class} +0 -0
  223. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/{CardFieldView$setListeners$5.class → CardFieldView$setListeners$9.class} +0 -0
  224. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldView.class +0 -0
  225. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldViewManager.class +0 -0
  226. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFormViewManager.class +0 -0
  227. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CollectBankAccountLauncherFragment$createBankAccountLauncher$1.class +0 -0
  228. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CollectBankAccountLauncherFragment.class +0 -0
  229. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ConfirmPaymentErrorType.class +0 -0
  230. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ConfirmSetupIntentErrorType.class +0 -0
  231. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ConstantsKt.class +0 -0
  232. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CreateTokenErrorType.class +0 -0
  233. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ErrorType.class +0 -0
  234. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/ErrorsKt.class +0 -0
  235. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/GooglePayButtonManager$Companion.class +0 -0
  236. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/GooglePayButtonManager.class +0 -0
  237. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/GooglePayFragment.class +0 -0
  238. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.class +0 -0
  239. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/MappersKt$WhenMappings.class +0 -0
  240. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/MappersKt.class +0 -0
  241. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$WhenMappings.class +0 -0
  242. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$retrievePaymentIntent$1$WhenMappings.class +0 -0
  243. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$retrievePaymentIntent$1.class +0 -0
  244. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$retrieveSetupIntent$1$WhenMappings.class +0 -0
  245. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment$retrieveSetupIntent$1.class +0 -0
  246. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentLauncherFragment.class +0 -0
  247. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentMethodCreateParamsException.class +0 -0
  248. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentMethodCreateParamsFactory$WhenMappings.class +0 -0
  249. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.class +0 -0
  250. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeContainerManager.class +0 -0
  251. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$Companion.class +0 -0
  252. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$createPaymentMethod$1.class +0 -0
  253. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$createTokenForCVCUpdate$1.class +0 -0
  254. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$createTokenFromBankAccount$1.class +0 -0
  255. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$createTokenFromCard$1.class +0 -0
  256. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$googlePayReceiver$1.class +0 -0
  257. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1.class +0 -0
  258. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$mPaymentSheetReceiver$1.class +0 -0
  259. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$retrievePaymentIntent$1.class +0 -0
  260. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$retrieveSetupIntent$1.class +0 -0
  261. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$verifyMicrodeposits$paymentCallback$1.class +0 -0
  262. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$verifyMicrodeposits$setupCallback$1.class +0 -0
  263. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule.class +0 -0
  264. package/android/build.gradle +4 -2
  265. package/android/gradle.properties +1 -0
  266. package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +0 -2
  267. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +48 -34
  268. package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +0 -5
  269. package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +0 -4
  270. package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +84 -0
  271. package/android/src/main/java/com/reactnativestripesdk/Constants.kt +0 -1
  272. package/android/src/main/java/com/reactnativestripesdk/Errors.kt +16 -6
  273. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +0 -1
  274. package/android/src/main/java/com/reactnativestripesdk/GooglePayFragment.kt +0 -3
  275. package/android/src/main/java/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.kt +3 -2
  276. package/android/src/main/java/com/reactnativestripesdk/Mappers.kt +77 -40
  277. package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +77 -22
  278. package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +81 -5
  279. package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +0 -1
  280. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +199 -113
  281. package/ios/.DS_Store +0 -0
  282. package/ios/Mappers.swift +23 -18
  283. package/ios/StripeSdk.m +2 -2
  284. package/ios/StripeSdk.swift +16 -26
  285. package/lib/commonjs/NativeStripeSdk.js.map +1 -1
  286. package/lib/commonjs/components/ApplePayButton.js.map +1 -1
  287. package/lib/commonjs/components/CardField.js.map +1 -1
  288. package/lib/commonjs/components/CardForm.js.map +1 -1
  289. package/lib/commonjs/components/StripeProvider.js +1 -1
  290. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  291. package/lib/commonjs/functions.js +1 -1
  292. package/lib/commonjs/functions.js.map +1 -1
  293. package/lib/commonjs/helpers.js.map +1 -1
  294. package/lib/commonjs/hooks/useConfirmPayment.js.map +1 -1
  295. package/lib/commonjs/hooks/useConfirmSetupIntent.js.map +1 -1
  296. package/lib/commonjs/hooks/useGooglePay.js.map +1 -1
  297. package/lib/commonjs/hooks/useStripe.js +1 -1
  298. package/lib/commonjs/hooks/useStripe.js.map +1 -1
  299. package/lib/commonjs/types/ApplePay.js +1 -1
  300. package/lib/commonjs/types/ApplePay.js.map +1 -1
  301. package/lib/commonjs/types/Common.js +2 -0
  302. package/lib/commonjs/types/Common.js.map +1 -0
  303. package/lib/commonjs/types/Errors.js +1 -1
  304. package/lib/commonjs/types/Errors.js.map +1 -1
  305. package/lib/commonjs/types/GooglePay.js +1 -1
  306. package/lib/commonjs/types/GooglePay.js.map +1 -1
  307. package/lib/commonjs/types/PaymentIntent.js +2 -0
  308. package/lib/commonjs/types/PaymentIntent.js.map +1 -0
  309. package/lib/commonjs/types/PaymentMethod.js +2 -0
  310. package/lib/commonjs/types/PaymentMethod.js.map +1 -0
  311. package/lib/commonjs/types/PaymentSheet.js +1 -1
  312. package/lib/commonjs/types/SetupIntent.js +1 -1
  313. package/lib/commonjs/types/SetupIntent.js.map +1 -1
  314. package/lib/commonjs/types/ThreeDSecure.js +1 -1
  315. package/lib/commonjs/types/ThreeDSecure.js.map +1 -1
  316. package/lib/commonjs/types/Token.js +2 -0
  317. package/lib/commonjs/types/Token.js.map +1 -0
  318. package/lib/commonjs/types/components/ApplePayButtonComponent.js +1 -1
  319. package/lib/commonjs/types/components/ApplePayButtonComponent.js.map +1 -1
  320. package/lib/commonjs/types/components/AuBECSDebitFormComponent.js +2 -0
  321. package/lib/commonjs/types/components/AuBECSDebitFormComponent.js.map +1 -0
  322. package/lib/commonjs/types/components/CardFieldInput.js +1 -1
  323. package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
  324. package/lib/commonjs/types/components/CardFormView.js +1 -1
  325. package/lib/commonjs/types/components/CardFormView.js.map +1 -1
  326. package/lib/commonjs/types/index.js +1 -1
  327. package/lib/commonjs/types/index.js.map +1 -1
  328. package/lib/module/NativeStripeSdk.js.map +1 -1
  329. package/lib/module/components/ApplePayButton.js.map +1 -1
  330. package/lib/module/components/CardField.js.map +1 -1
  331. package/lib/module/components/CardForm.js.map +1 -1
  332. package/lib/module/components/StripeProvider.js +1 -1
  333. package/lib/module/components/StripeProvider.js.map +1 -1
  334. package/lib/module/functions.js +1 -1
  335. package/lib/module/functions.js.map +1 -1
  336. package/lib/module/helpers.js.map +1 -1
  337. package/lib/module/hooks/useConfirmPayment.js.map +1 -1
  338. package/lib/module/hooks/useConfirmSetupIntent.js.map +1 -1
  339. package/lib/module/hooks/useGooglePay.js.map +1 -1
  340. package/lib/module/hooks/useStripe.js +1 -1
  341. package/lib/module/hooks/useStripe.js.map +1 -1
  342. package/lib/module/types/ApplePay.js +1 -1
  343. package/lib/module/types/ApplePay.js.map +1 -1
  344. package/lib/module/types/Common.js +2 -0
  345. package/lib/module/types/Common.js.map +1 -0
  346. package/lib/module/types/Errors.js +1 -1
  347. package/lib/module/types/Errors.js.map +1 -1
  348. package/lib/module/types/GooglePay.js +1 -1
  349. package/lib/module/types/GooglePay.js.map +1 -1
  350. package/lib/module/types/PaymentIntent.js +2 -0
  351. package/lib/module/types/PaymentIntent.js.map +1 -0
  352. package/lib/module/types/PaymentMethod.js +2 -0
  353. package/lib/module/types/PaymentMethod.js.map +1 -0
  354. package/lib/module/types/PaymentSheet.js +1 -1
  355. package/lib/module/types/SetupIntent.js +1 -1
  356. package/lib/module/types/SetupIntent.js.map +1 -1
  357. package/lib/module/types/ThreeDSecure.js +1 -1
  358. package/lib/module/types/ThreeDSecure.js.map +1 -1
  359. package/lib/module/types/Token.js +2 -0
  360. package/lib/module/types/Token.js.map +1 -0
  361. package/lib/module/types/components/ApplePayButtonComponent.js +1 -1
  362. package/lib/module/types/components/ApplePayButtonComponent.js.map +1 -1
  363. package/lib/module/types/components/AuBECSDebitFormComponent.js +2 -0
  364. package/lib/module/types/components/AuBECSDebitFormComponent.js.map +1 -0
  365. package/lib/module/types/components/CardFieldInput.js +1 -1
  366. package/lib/module/types/components/CardFieldInput.js.map +1 -1
  367. package/lib/module/types/components/CardFormView.js +1 -1
  368. package/lib/module/types/components/CardFormView.js.map +1 -1
  369. package/lib/module/types/index.js +1 -1
  370. package/lib/module/types/index.js.map +1 -1
  371. package/lib/typescript/src/NativeStripeSdk.d.ts +9 -9
  372. package/lib/typescript/src/components/ApplePayButton.d.ts +2 -2
  373. package/lib/typescript/src/components/CardField.d.ts +2 -2
  374. package/lib/typescript/src/components/StripeProvider.d.ts +1 -1
  375. package/lib/typescript/src/functions.d.ts +11 -15
  376. package/lib/typescript/src/helpers.d.ts +2 -1
  377. package/lib/typescript/src/hooks/useConfirmPayment.d.ts +2 -2
  378. package/lib/typescript/src/hooks/useConfirmSetupIntent.d.ts +2 -2
  379. package/lib/typescript/src/hooks/useGooglePay.d.ts +2 -2
  380. package/lib/typescript/src/hooks/useStripe.d.ts +11 -12
  381. package/lib/typescript/src/types/ApplePay.d.ts +48 -50
  382. package/lib/typescript/src/types/Common.d.ts +14 -0
  383. package/lib/typescript/src/types/Errors.d.ts +10 -0
  384. package/lib/typescript/src/types/GooglePay.d.ts +45 -50
  385. package/lib/typescript/src/types/PaymentIntent.d.ts +46 -0
  386. package/lib/typescript/src/types/PaymentMethod.d.ts +167 -0
  387. package/lib/typescript/src/types/PaymentSheet.d.ts +41 -55
  388. package/lib/typescript/src/types/SetupIntent.d.ts +22 -56
  389. package/lib/typescript/src/types/ThreeDSecure.d.ts +62 -68
  390. package/lib/typescript/src/types/Token.d.ts +50 -0
  391. package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts +8 -10
  392. package/{src/types/components/AuBECSDebitForm.ts → lib/typescript/src/types/components/AuBECSDebitFormComponent.d.ts} +8 -13
  393. package/lib/typescript/src/types/components/CardFieldInput.d.ts +62 -65
  394. package/lib/typescript/src/types/components/CardFormView.d.ts +41 -44
  395. package/lib/typescript/src/types/index.d.ts +53 -61
  396. package/package.json +7 -3
  397. package/src/NativeStripeSdk.tsx +15 -18
  398. package/src/components/ApplePayButton.tsx +4 -4
  399. package/src/components/CardField.tsx +2 -2
  400. package/src/components/CardForm.tsx +1 -1
  401. package/src/components/StripeProvider.tsx +1 -4
  402. package/src/functions.ts +75 -136
  403. package/src/helpers.ts +3 -2
  404. package/src/hooks/useConfirmPayment.tsx +3 -3
  405. package/src/hooks/useConfirmSetupIntent.tsx +3 -3
  406. package/src/hooks/useGooglePay.tsx +2 -2
  407. package/src/hooks/useStripe.tsx +22 -20
  408. package/src/types/ApplePay.ts +60 -62
  409. package/src/types/Common.ts +15 -0
  410. package/src/types/Errors.ts +12 -0
  411. package/src/types/GooglePay.ts +67 -73
  412. package/src/types/PaymentIntent.ts +53 -0
  413. package/src/types/PaymentMethod.ts +242 -0
  414. package/src/types/PaymentSheet.ts +49 -63
  415. package/src/types/SetupIntent.ts +30 -82
  416. package/src/types/ThreeDSecure.ts +63 -69
  417. package/src/types/Token.ts +74 -0
  418. package/src/types/components/ApplePayButtonComponent.ts +25 -27
  419. package/src/types/components/AuBECSDebitFormComponent.ts +29 -0
  420. package/src/types/components/CardFieldInput.ts +65 -67
  421. package/src/types/components/CardFormView.ts +48 -51
  422. package/src/types/index.ts +78 -71
  423. package/android/build/.transforms/06225d218c14d1720edd690e5aad3666/results.bin +0 -0
  424. package/android/build/.transforms/31ceac6fb5d33b3621129bf6bacef38e/transformed/classes/classes.dex +0 -0
  425. package/android/build/.transforms/48791259e8e16eb93ec0e1ee5c2320d3/transformed/classes/classes.dex +0 -0
  426. package/android/build/.transforms/74570cf3214a596c51ea9185f02b2c7f/transformed/classes/classes.dex +0 -0
  427. package/android/build/.transforms/82928fc3901d2ce5cedef114e23b9dd5/transformed/classes/classes.dex +0 -0
  428. package/android/build/.transforms/9338bfb74c726e5746db5e10b980917a/transformed/classes/classes.dex +0 -0
  429. package/android/build/.transforms/c731e6bf5b480f659bf1c341f3f0657c/transformed/classes/classes.dex +0 -0
  430. package/android/build/.transforms/d436978a4beecbc35d07543a01fe4a5c/transformed/classes/classes.dex +0 -0
  431. package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values +0 -0
  432. package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.s +0 -1
  433. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values +0 -0
  434. package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.s +0 -1
  435. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/CardFieldView$setListeners$2.class +0 -0
  436. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/NextPaymentActionErrorType.class +0 -0
  437. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$2$WhenMappings.class +0 -0
  438. package/android/build/tmp/kotlin-classes/debug/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$2.class +0 -0
  439. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/CardFieldView$setListeners$2.class +0 -0
  440. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/NextPaymentActionErrorType.class +0 -0
  441. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$2$WhenMappings.class +0 -0
  442. package/android/build/tmp/kotlin-classes/release/com/reactnativestripesdk/StripeSdkModule$mActivityEventListener$1$onActivityResult$2.class +0 -0
  443. package/lib/commonjs/types/Card.js +0 -2
  444. package/lib/commonjs/types/Card.js.map +0 -1
  445. package/lib/commonjs/types/PaymentIntents.js +0 -2
  446. package/lib/commonjs/types/PaymentIntents.js.map +0 -1
  447. package/lib/commonjs/types/PaymentMethods.js +0 -2
  448. package/lib/commonjs/types/PaymentMethods.js.map +0 -1
  449. package/lib/commonjs/types/components/AuBECSDebitForm.js +0 -2
  450. package/lib/commonjs/types/components/AuBECSDebitForm.js.map +0 -1
  451. package/lib/module/types/Card.js +0 -2
  452. package/lib/module/types/Card.js.map +0 -1
  453. package/lib/module/types/PaymentIntents.js +0 -2
  454. package/lib/module/types/PaymentIntents.js.map +0 -1
  455. package/lib/module/types/PaymentMethods.js +0 -2
  456. package/lib/module/types/PaymentMethods.js.map +0 -1
  457. package/lib/module/types/components/AuBECSDebitForm.js +0 -2
  458. package/lib/module/types/components/AuBECSDebitForm.js.map +0 -1
  459. package/lib/typescript/src/types/Card.d.ts +0 -42
  460. package/lib/typescript/src/types/PaymentIntents.d.ts +0 -52
  461. package/lib/typescript/src/types/PaymentMethods.d.ts +0 -193
  462. package/lib/typescript/src/types/components/AuBECSDebitForm.d.ts +0 -28
  463. package/src/types/Card.ts +0 -61
  464. package/src/types/PaymentIntents.ts +0 -58
  465. package/src/types/PaymentMethods.ts +0 -264
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"yDAuBA,0RACA,wTACA,wTACA,ySACA,+RACA,8SACA,gXACA,wUACA,mUACA,yTACA,sQACA,gRACA","sourcesContent":["import type { Card } from './Card';\nimport type {\n ApplePayError,\n CardActionError,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n CreatePaymentMethodError,\n CreateTokenError,\n GooglePayError,\n PaymentSheetError,\n RetrievePaymentIntentError,\n RetrieveSetupIntentError,\n StripeError,\n} from './Errors';\nimport type { PaymentIntent } from './PaymentIntents';\nimport type {\n PaymentMethod,\n PaymentMethodCreateParams,\n} from './PaymentMethods';\nimport type { PaymentSheet } from './PaymentSheet';\nimport type { SetupIntent } from './SetupIntent';\nimport type { ThreeDSecureConfigurationParams } from './ThreeDSecure';\n\nexport * from './ApplePay';\nexport * from './PaymentIntents';\nexport * from './PaymentMethods';\nexport * from './SetupIntent';\nexport * from './GooglePay';\nexport * from './ThreeDSecure';\nexport * from './components/ApplePayButtonComponent';\nexport * from './components/AuBECSDebitForm';\nexport * from './components/CardFieldInput';\nexport * from './components/CardFormView';\nexport * from './Card';\nexport * from './Errors';\nexport * from './PaymentSheet';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\n/**\n * @ignore\n */\nexport type Nullable<T> = T | null;\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;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult =\n | {\n paymentOption?: undefined;\n error?: undefined;\n }\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type CreateTokenResult =\n | {\n token: Card.Token;\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;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n merchantIdentifier?: string;\n threeDSecureParams?: ThreeDSecureConfigurationParams;\n stripeAccountId?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n /**\n * @deprecated Use setReturnUrlSchemeOnAndroid instead\n */\n setUrlSchemeOnAndroid?: 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;\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 CreateTokenParams =\n | CreateTokenCardParams\n | CreateTokenBankAccountParams;\n\nexport type CreateTokenCardParams = {\n type: 'Card';\n address?: Card.Address;\n name?: string;\n currency?: string;\n};\n\nexport type BankAcccountHolderType = 'Company' | 'Individual';\n\nexport type BankAcccountType = 'Checking' | 'Savings';\n\nexport type CreateTokenBankAccountParams = {\n type: 'BankAccount';\n accountHolderName?: string;\n accountHolderType?: BankAcccountHolderType;\n accountNumber: string;\n country: string;\n currency: string;\n routingNumber?: string;\n};\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type CollectBankAccountParams =\n PaymentMethodCreateParams.USBankAccountParams & {\n billingDetails: {\n name: string;\n email?: string;\n };\n };\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":"m0BAeA,4D,0BACA,sE,oCACA,sE,oCACA,oE,kCACA,kE,gCACA,oE,kCACA,8D,4BACA,qG,wDACA,uG,0DACA,mF,sCACA,+E,kCACA,sD,oBAiBA,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';\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};\n\nexport * from './Errors';\nexport { Address, BillingDetails } from './Common';\n\n/**\n * @ignore\n */\nexport type Dictionary<T> = {\n [key: string]: T;\n};\n\nexport interface AppInfo {\n name?: string;\n partnerId?: string;\n url?: string;\n version?: string;\n}\n\nexport type CreatePaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<CreatePaymentMethodError>;\n };\n\nexport type RetrievePaymentIntentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<RetrievePaymentIntentError>;\n };\n\nexport type RetrieveSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<RetrieveSetupIntentError>;\n };\n\nexport type ConfirmPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<ConfirmPaymentError>;\n };\n\nexport type HandleNextActionResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CardActionError>;\n };\n\nexport type ConfirmSetupIntentResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type CreateTokenForCVCUpdateResult =\n | {\n tokenId: string;\n error?: undefined;\n }\n | {\n tokenId?: undefined;\n error: StripeError<ConfirmSetupIntentError>;\n };\n\nexport type InitPaymentSheetResult =\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type PresentPaymentSheetResult =\n | {\n paymentOption?: undefined;\n error?: undefined;\n }\n | {\n paymentOption?: PaymentSheet.PaymentOption;\n error?: undefined;\n }\n | {\n paymentOption?: undefined;\n error: StripeError<PaymentSheetError>;\n };\n\nexport type CreateTokenResult =\n | {\n token: Token.Result;\n error?: undefined;\n }\n | {\n token?: undefined;\n error: StripeError<CreateTokenError>;\n };\n\nexport type ConfirmPaymentSheetPaymentResult = {\n error?: StripeError<PaymentSheetError>;\n};\n\nexport type ApplePayResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<ApplePayError>;\n };\n\nexport interface InitStripeParams {\n publishableKey: string;\n stripeAccountId?: string;\n threeDSecureParams?: ThreeDSecure.ConfigurationParams;\n merchantIdentifier?: string;\n urlScheme?: string;\n setReturnUrlSchemeOnAndroid?: boolean;\n}\n\nexport interface InitialiseParams extends InitStripeParams {\n appInfo: AppInfo;\n}\n\nexport type GooglePayInitResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type PayWithGooglePayResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<GooglePayError>;\n };\n\nexport type CreateGooglePayPaymentMethodResult =\n | {\n paymentMethod: PaymentMethod.Result;\n error?: undefined;\n }\n | {\n paymentMethod?: undefined;\n error: StripeError<GooglePayError>;\n };\n\nexport type OpenApplePaySetupResult =\n | {\n error?: undefined;\n }\n | {\n error: StripeError<ApplePayError>;\n };\n\nexport type VerifyMicrodepositsParams =\n | {\n amounts: number[];\n descriptorCode?: undefined;\n }\n | {\n amounts?: undefined;\n descriptorCode: string;\n };\n\nexport type VerifyMicrodepositsForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type VerifyMicrodepositsForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<VerifyMicrodepositsError>;\n };\n\nexport type CollectBankAccountForPaymentResult =\n | {\n paymentIntent: PaymentIntent.Result;\n error?: undefined;\n }\n | {\n paymentIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n\nexport type CollectBankAccountForSetupResult =\n | {\n setupIntent: SetupIntent.Result;\n error?: undefined;\n }\n | {\n setupIntent?: undefined;\n error: StripeError<CollectBankAccountError>;\n };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["NativeStripeSdk.tsx"],"names":["StripeSdk","NativeModules"],"mappings":"gFAAA,yCA6FA,GAAQA,CAAAA,SAAR,CAAsBC,0BAAtB,CAAQD,SAAR,C,aAEeA,S","sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethodCreateParams,\n ApplePay,\n PaymentSheet,\n ConfirmSetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n ApplePayResult,\n CreateTokenResult,\n GooglePayInitResult,\n PayWithGooglePayResult,\n CreateGooglePayPaymentMethodResult,\n GooglePay,\n OpenApplePaySetupResult,\n CreateTokenParams,\n VerifyMicrodepositsParams,\n CollectBankAccountParams,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n data: PaymentMethodCreateParams.Params,\n options: PaymentMethodCreateParams.Options\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string\n ): Promise<HandleNextActionResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n data: PaymentMethodCreateParams.Params,\n options: PaymentMethodCreateParams.Options\n ): Promise<ConfirmPaymentResult>;\n isApplePaySupported(): Promise<boolean>;\n presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;\n confirmApplePayPayment(clientSecret: string): Promise<void>;\n updateApplePaySummaryItems(\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ): Promise<void>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n data: ConfirmSetupIntent.Params,\n options: ConfirmSetupIntent.Options\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n presentPaymentSheet(): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: CreateTokenParams): Promise<CreateTokenResult>;\n isGooglePaySupported(\n params: GooglePay.IsGooglePaySupportedParams\n ): Promise<boolean>;\n initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;\n presentGooglePay(\n params: GooglePay.PresentGooglePayParams\n ): Promise<PayWithGooglePayResult>;\n createGooglePayPaymentMethod(\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n type: 'payment' | 'setup',\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n type: 'payment' | 'setup',\n clientSecret: string,\n params: CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"]}
1
+ {"version":3,"sources":["NativeStripeSdk.tsx"],"names":["StripeSdk","NativeModules"],"mappings":"gFAAA,yCA0FA,GAAQA,CAAAA,SAAR,CAAsBC,0BAAtB,CAAQD,SAAR,C,aAEeA,S","sourcesContent":["import { NativeModules } from 'react-native';\nimport type {\n PaymentMethod,\n ApplePay,\n PaymentSheet,\n SetupIntent,\n InitialiseParams,\n CreatePaymentMethodResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n ConfirmPaymentResult,\n HandleNextActionResult,\n ConfirmSetupIntentResult,\n CreateTokenForCVCUpdateResult,\n InitPaymentSheetResult,\n PresentPaymentSheetResult,\n ConfirmPaymentSheetPaymentResult,\n ApplePayResult,\n CreateTokenResult,\n GooglePayInitResult,\n PayWithGooglePayResult,\n CreateGooglePayPaymentMethodResult,\n GooglePay,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n} from './types';\n\ntype NativeStripeSdkType = {\n initialise(params: InitialiseParams): Promise<void>;\n createPaymentMethod(\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions\n ): Promise<CreatePaymentMethodResult>;\n handleNextAction(\n paymentIntentClientSecret: string\n ): Promise<HandleNextActionResult>;\n confirmPayment(\n paymentIntentClientSecret: string,\n params: PaymentMethod.ConfirmParams,\n options: PaymentMethod.ConfirmOptions\n ): Promise<ConfirmPaymentResult>;\n isApplePaySupported(): Promise<boolean>;\n presentApplePay(params: ApplePay.PresentParams): Promise<ApplePayResult>;\n confirmApplePayPayment(clientSecret: string): Promise<void>;\n updateApplePaySummaryItems(\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }>\n ): Promise<void>;\n confirmSetupIntent(\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions\n ): Promise<ConfirmSetupIntentResult>;\n retrievePaymentIntent(\n clientSecret: string\n ): Promise<RetrievePaymentIntentResult>;\n retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;\n initPaymentSheet(\n params: PaymentSheet.SetupParams\n ): Promise<InitPaymentSheetResult>;\n presentPaymentSheet(): Promise<PresentPaymentSheetResult>;\n confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;\n createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;\n handleURLCallback(url: string): Promise<boolean>;\n createToken(params: Token.CreateParams): Promise<CreateTokenResult>;\n isGooglePaySupported(params: GooglePay.IsSupportedParams): Promise<boolean>;\n initGooglePay(params: GooglePay.InitParams): Promise<GooglePayInitResult>;\n presentGooglePay(\n params: GooglePay.PresentParams\n ): Promise<PayWithGooglePayResult>;\n createGooglePayPaymentMethod(\n params: GooglePay.CreatePaymentMethodParams\n ): Promise<CreateGooglePayPaymentMethodResult>;\n openApplePaySetup(): Promise<OpenApplePaySetupResult>;\n verifyMicrodeposits(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: VerifyMicrodepositsParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n collectBankAccount(\n isPaymentIntent: boolean,\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n ): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;\n};\n\nconst { StripeSdk } = NativeModules;\n\nexport default StripeSdk as NativeStripeSdkType;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["ApplePayButton.tsx"],"names":["ApplePayButtonNative","ApplePayButton","onPress","buttonSty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CACF,IAAK,SAAL,CACE,MAAO,GAAP,CACF,IAAK,YAAL,CACE,MAAO,GAAP,CACF,IAAK,KAAL,CACE,MAAO,GAAP,CACF,QACE,MAAO,EAAP,CAlCJ,CAoCD,CAED,QAASM,CAAAA,cAAT,CAAwBN,IAAxB,CAA8D,CAC5D,OAAQA,IAAR,EACE,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,cAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,WAAL,CACE,MAAO,EAAP,CACF,QACE,MAAO,EAAP,CAVJ,CAYD","sourcesContent":["import type { ApplePayButtonComponent } from '../types';\nimport React, { useMemo } from 'react';\nimport {\n AccessibilityProps,\n requireNativeComponent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nconst ApplePayButtonNative =\n requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');\n\n/**\n * Apple Pay Button Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n type?: ApplePayButtonComponent.Types;\n buttonStyle?: ApplePayButtonComponent.Styles;\n borderRadius?: number;\n onPress(): void;\n testID?: string;\n}\n\n/**\n * Apple Pay Button Component\n *\n * @example\n * ```ts\n * <ApplePayButton\n * onPress={pay}\n * type=\"plain\"\n * buttonStyle=\"black\"\n * borderRadius={4}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function ApplePayButton({\n onPress,\n buttonStyle = 'black',\n type = 'plain',\n borderRadius = 4,\n ...props\n}: Props) {\n const buttonType = useMemo(() => mapButtonType(type), [type]);\n const style = useMemo(() => mapButtonStyle(buttonStyle), [buttonStyle]);\n\n return (\n <ApplePayButtonNative\n type={buttonType}\n buttonStyle={style}\n borderRadius={borderRadius}\n onPressAction={onPress}\n {...props}\n />\n );\n}\n\nfunction mapButtonType(type: ApplePayButtonComponent.Types) {\n switch (type) {\n case 'plain':\n return 0;\n case 'buy':\n return 1;\n case 'setUp':\n return 2;\n case 'inStore':\n return 3;\n case 'donate':\n return 4;\n case 'checkout':\n return 5;\n case 'book':\n return 6;\n case 'subscribe':\n return 7;\n case 'reload':\n return 8;\n case 'addMoney':\n return 9;\n case 'topUp':\n return 10;\n case 'order':\n return 11;\n case 'rent':\n return 12;\n case 'support':\n return 13;\n case 'contribute':\n return 14;\n case 'tip':\n return 15;\n default:\n return 0;\n }\n}\n\nfunction mapButtonStyle(type: ApplePayButtonComponent.Styles) {\n switch (type) {\n case 'white':\n return 0;\n case 'whiteOutline':\n return 1;\n case 'black':\n return 2;\n case 'automatic':\n return 3;\n default:\n return 2;\n }\n}\n"]}
1
+ {"version":3,"sources":["ApplePayButton.tsx"],"names":["ApplePayButtonNative","ApplePayButton","onPress","buttonStyle","type","borderRadius","props","buttonType","mapButtonType","style","mapButtonStyle"],"mappings":"kXACA,qDACA,yC,6pCAOA,GAAMA,CAAAA,oBAAoB,CACxB,wCAA4D,gBAA5D,CADF,CAgCO,QAASC,CAAAA,cAAT,MAMG,IALRC,CAAAA,OAKQ,MALRA,OAKQ,uBAJRC,WAIQ,CAJRA,WAIQ,2BAJM,OAIN,iCAHRC,IAGQ,CAHRA,IAGQ,oBAHD,OAGC,kCAFRC,YAEQ,CAFRA,YAEQ,4BAFO,CAEP,mBADLC,KACK,uDACR,GAAMC,CAAAA,UAAU,CAAG,mBAAQ,iBAAMC,CAAAA,aAAa,CAACJ,IAAD,CAAnB,EAAR,CAAmC,CAACA,IAAD,CAAnC,CAAnB,CACA,GAAMK,CAAAA,KAAK,CAAG,mBAAQ,iBAAMC,CAAAA,cAAc,CAACP,WAAD,CAApB,EAAR,CAA2C,CAACA,WAAD,CAA3C,CAAd,CAEA,MACE,8BAAC,oBAAD,wBACE,IAAI,CAAEI,UADR,CAEE,WAAW,CAAEE,KAFf,CAGE,YAAY,CAAEJ,YAHhB,CAIE,aAAa,CAAEH,OAJjB,EAKMI,KALN,8EADF,CASD,CAED,QAASE,CAAAA,aAAT,CAAuBJ,IAAvB,CAA2D,CACzD,OAAQA,IAAR,EACE,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,KAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,SAAL,CACE,MAAO,EAAP,CACF,IAAK,QAAL,CACE,MAAO,EAAP,CACF,IAAK,UAAL,CACE,MAAO,EAAP,CACF,IAAK,MAAL,CACE,MAAO,EAAP,CACF,IAAK,WAAL,CACE,MAAO,EAAP,CACF,IAAK,QAAL,CACE,MAAO,EAAP,CACF,IAAK,UAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,GAAP,CACF,IAAK,OAAL,CACE,MAAO,GAAP,CACF,IAAK,MAAL,CACE,MAAO,GAAP,CACF,IAAK,SAAL,CACE,MAAO,GAAP,CACF,IAAK,YAAL,CACE,MAAO,GAAP,CACF,IAAK,KAAL,CACE,MAAO,GAAP,CACF,QACE,MAAO,EAAP,CAlCJ,CAoCD,CAED,QAASM,CAAAA,cAAT,CAAwBN,IAAxB,CAA6D,CAC3D,OAAQA,IAAR,EACE,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,cAAL,CACE,MAAO,EAAP,CACF,IAAK,OAAL,CACE,MAAO,EAAP,CACF,IAAK,WAAL,CACE,MAAO,EAAP,CACF,QACE,MAAO,EAAP,CAVJ,CAYD","sourcesContent":["import type { ApplePayButtonComponent } from '../types';\nimport React, { useMemo } from 'react';\nimport {\n AccessibilityProps,\n requireNativeComponent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nconst ApplePayButtonNative =\n requireNativeComponent<ApplePayButtonComponent.NativeProps>('ApplePayButton');\n\n/**\n * Apple Pay Button Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n type?: ApplePayButtonComponent.Type;\n buttonStyle?: ApplePayButtonComponent.Style;\n borderRadius?: number;\n onPress(): void;\n testID?: string;\n}\n\n/**\n * Apple Pay Button Component\n *\n * @example\n * ```ts\n * <ApplePayButton\n * onPress={pay}\n * type=\"plain\"\n * buttonStyle=\"black\"\n * borderRadius={4}\n * style={styles.payButton}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function ApplePayButton({\n onPress,\n buttonStyle = 'black',\n type = 'plain',\n borderRadius = 4,\n ...props\n}: Props) {\n const buttonType = useMemo(() => mapButtonType(type), [type]);\n const style = useMemo(() => mapButtonStyle(buttonStyle), [buttonStyle]);\n\n return (\n <ApplePayButtonNative\n type={buttonType}\n buttonStyle={style}\n borderRadius={borderRadius}\n onPressAction={onPress}\n {...props}\n />\n );\n}\n\nfunction mapButtonType(type: ApplePayButtonComponent.Type) {\n switch (type) {\n case 'plain':\n return 0;\n case 'buy':\n return 1;\n case 'setUp':\n return 2;\n case 'inStore':\n return 3;\n case 'donate':\n return 4;\n case 'checkout':\n return 5;\n case 'book':\n return 6;\n case 'subscribe':\n return 7;\n case 'reload':\n return 8;\n case 'addMoney':\n return 9;\n case 'topUp':\n return 10;\n case 'order':\n return 11;\n case 'rent':\n return 12;\n case 'support':\n return 13;\n case 'contribute':\n return 14;\n case 'tip':\n return 15;\n default:\n return 0;\n }\n}\n\nfunction mapButtonStyle(type: ApplePayButtonComponent.Style) {\n switch (type) {\n case 'white':\n return 0;\n case 'whiteOutline':\n return 1;\n case 'black':\n return 2;\n case 'automatic':\n return 3;\n default:\n return 2;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["CardField.tsx"],"names":["CardFieldNative","CardField","ref","onCardChange","onFocus","onBlur","cardStyle","placeholder","postalCodeEnabled","props","inputRef","onCardChangeHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","hasOwnProperty","postalCode","number","__DEV__","console","warn","onFocusHandler","focusedField","current","focus","UIManager","dispatchViewManagerCommand","blur","clear","inputRefValue","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","cvc"],"mappings":"qWACA,qDAOA,yCASA,mC,qsCAOA,GAAMA,CAAAA,eAAe,CACnB,wCAAmD,WAAnD,CADF,CA2CO,GAAMC,CAAAA,SAAS,CAAG,sBACvB,cAUEC,GAVF,CAWK,IATDC,CAAAA,YASC,MATDA,YASC,CARDC,OAQC,MARDA,OAQC,CAPDC,MAOC,MAPDA,MAOC,CANDC,SAMC,MANDA,SAMC,CALDC,WAKC,MALDA,WAKC,CAJDC,iBAIC,MAJDA,iBAIC,CAHEC,KAGF,uDACH,GAAMC,CAAAA,QAAQ,CAAG,kBAAY,IAAZ,CAAjB,CAEA,GAAMC,CAAAA,mBAAmB,CAAG,uBAC1B,SAACC,KAAD,CAAyD,CACvD,GAAMC,CAAAA,IAAI,CAAGD,KAAK,CAACE,WAAnB,CAEA,GAAMC,CAAAA,IAA4B,CAAG,CACnCC,KAAK,CAAEH,IAAI,CAACG,KADuB,CAEnCC,WAAW,CAAEJ,IAAI,CAACI,WAFiB,CAGnCC,UAAU,CAAEL,IAAI,CAACK,UAHkB,CAInCC,QAAQ,CAAEN,IAAI,CAACM,QAJoB,CAKnCC,KAAK,CAAEP,IAAI,CAACO,KALuB,CAMnCC,eAAe,CAAER,IAAI,CAACQ,eANa,CAOnCC,WAAW,CAAET,IAAI,CAACS,WAPiB,CAQnCC,QAAQ,CAAEV,IAAI,CAACU,QARoB,CAArC,CAWA,GAAIV,IAAI,CAACW,cAAL,CAAoB,YAApB,CAAJ,CAAuC,CACrCT,IAAI,CAACU,UAAL,CAAkBZ,IAAI,CAACY,UAAL,EAAmB,EAArC,CACD,CACD,GAAIZ,IAAI,CAACW,cAAL,CAAoB,QAApB,CAAJ,CAAmC,CACjCT,IAAI,CAACW,MAAL,CAAcb,IAAI,CAACa,MAAL,EAAe,EAA7B,CACA,GAAIC,OAAO,EAAIxB,YAAX,EAA2BU,IAAI,CAACM,QAApC,CAA8C,CAC5CS,OAAO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{ CardFieldInput, Nullable } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFieldNative =\n requireNativeComponent<CardFieldInput.NativeProps>('CardField');\n\n/**\n * Card Field Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n postalCodeEnabled?: boolean;\n cardStyle?: CardFieldInput.Styles;\n placeholder?: CardFieldInput.Placeholders;\n autofocus?: boolean;\n onCardChange?(card: CardFieldInput.Details): void;\n onBlur?(): void;\n onFocus?(focusedField: Nullable<CardFieldInput.Names>): void;\n testID?: string;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onCardChange` handler.\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 dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Field Component\n *\n * @example\n * ```ts\n * <CardField\n * postalCodeEnabled={false}\n * onCardChange={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 50}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardField = forwardRef<CardFieldInput.Methods, Props>(\n (\n {\n onCardChange,\n onFocus,\n onBlur,\n cardStyle,\n placeholder,\n postalCodeEnabled,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onCardChangeHandler = useCallback(\n (event: NativeSyntheticEvent<CardFieldInput.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFieldInput.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n validExpiryDate: card.validExpiryDate,\n validNumber: card.validNumber,\n validCVC: card.validCVC,\n };\n\n if (card.hasOwnProperty('postalCode')) {\n data.postalCode = card.postalCode || '';\n }\n if (card.hasOwnProperty('number')) {\n data.number = card.number || '';\n if (__DEV__ && onCardChange && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onCardChange?.(data);\n },\n [onCardChange]\n );\n\n const onFocusHandler = useCallback(\n (event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n onFocus?.(focusedField);\n } else {\n onBlur?.();\n }\n },\n [onFocus, onBlur]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n const clear = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'clear' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n clear,\n }));\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFieldNative\n ref={inputRef}\n onCardChange={onCardChangeHandler}\n onFocusChange={onFocusHandler}\n postalCodeEnabled={postalCodeEnabled ?? true}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n borderColor: cardStyle?.borderColor,\n borderWidth: cardStyle?.borderWidth,\n borderRadius: cardStyle?.borderRadius,\n cursorColor: cardStyle?.cursorColor,\n fontSize: cardStyle?.fontSize,\n placeholderColor: cardStyle?.placeholderColor,\n textColor: cardStyle?.textColor,\n textErrorColor: cardStyle?.textErrorColor,\n fontFamily: cardStyle?.fontFamily,\n }}\n placeholder={{\n number: placeholder?.number,\n expiration: placeholder?.expiration,\n cvc: placeholder?.cvc,\n postalCode: placeholder?.postalCode,\n }}\n {...props}\n />\n );\n }\n);\n"]}
1
+ {"version":3,"sources":["CardField.tsx"],"names":["CardFieldNative","CardField","ref","onCardChange","onFocus","onBlur","cardStyle","placeholder","postalCodeEnabled","props","inputRef","onCardChangeHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","hasOwnProperty","postalCode","number","__DEV__","console","warn","onFocusHandler","focusedField","current","focus","UIManager","dispatchViewManagerCommand","blur","clear","inputRefValue","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","cvc"],"mappings":"qWACA,qDAOA,yCASA,mC,qsCAOA,GAAMA,CAAAA,eAAe,CACnB,wCAAmD,WAAnD,CADF,CA2CO,GAAMC,CAAAA,SAAS,CAAG,sBACvB,cAUEC,GAVF,CAWK,IATDC,CAAAA,YASC,MATDA,YASC,CARDC,OAQC,MARDA,OAQC,CAPDC,MAOC,MAPDA,MAOC,CANDC,SAMC,MANDA,SAMC,CALDC,WAKC,MALDA,WAKC,CAJDC,iBAIC,MAJDA,iBAIC,CAHEC,KAGF,uDACH,GAAMC,CAAAA,QAAQ,CAAG,kBAAY,IAAZ,CAAjB,CAEA,GAAMC,CAAAA,mBAAmB,CAAG,uBAC1B,SAACC,KAAD,CAAyD,CACvD,GAAMC,CAAAA,IAAI,CAAGD,KAAK,CAACE,WAAnB,CAEA,GAAMC,CAAAA,IAA4B,CAAG,CACnCC,KAAK,CAAEH,IAAI,CAACG,KADuB,CAEnCC,WAAW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S,CAAEqC,WALf,CAMTC,QAAQ,CAAEtC,SAAF,cAAEA,SAAS,CAAEsC,QANZ,CAOTC,gBAAgB,CAAEvC,SAAF,cAAEA,SAAS,CAAEuC,gBAPpB,CAQTC,SAAS,CAAExC,SAAF,cAAEA,SAAS,CAAEwC,SARb,CASTC,cAAc,CAAEzC,SAAF,cAAEA,SAAS,CAAEyC,cATlB,CAUTC,UAAU,CAAE1C,SAAF,cAAEA,SAAS,CAAE0C,UAVd,CALb,CAiBE,WAAW,CAAE,CACXtB,MAAM,CAAEnB,WAAF,cAAEA,WAAW,CAAEmB,MADV,CAEXuB,UAAU,CAAE1C,WAAF,cAAEA,WAAW,CAAE0C,UAFd,CAGXC,GAAG,CAAE3C,WAAF,cAAEA,WAAW,CAAE2C,GAHP,CAIXzB,UAAU,CAAElB,WAAF,cAAEA,WAAW,CAAEkB,UAJd,CAjBf,EAuBMhB,KAvBN,gFADF,CA2BD,CAlIsB,CAAlB,C","sourcesContent":["import type { CardFieldInput } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFieldNative =\n requireNativeComponent<CardFieldInput.NativeProps>('CardField');\n\n/**\n * Card Field Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n postalCodeEnabled?: boolean;\n cardStyle?: CardFieldInput.Styles;\n placeholder?: CardFieldInput.Placeholders;\n autofocus?: boolean;\n onCardChange?(card: CardFieldInput.Details): void;\n onBlur?(): void;\n onFocus?(focusedField: CardFieldInput.FieldName | null): void;\n testID?: string;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onCardChange` handler.\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 dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Field Component\n *\n * @example\n * ```ts\n * <CardField\n * postalCodeEnabled={false}\n * onCardChange={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 50}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardField = forwardRef<CardFieldInput.Methods, Props>(\n (\n {\n onCardChange,\n onFocus,\n onBlur,\n cardStyle,\n placeholder,\n postalCodeEnabled,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onCardChangeHandler = useCallback(\n (event: NativeSyntheticEvent<CardFieldInput.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFieldInput.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n validExpiryDate: card.validExpiryDate,\n validNumber: card.validNumber,\n validCVC: card.validCVC,\n };\n\n if (card.hasOwnProperty('postalCode')) {\n data.postalCode = card.postalCode || '';\n }\n if (card.hasOwnProperty('number')) {\n data.number = card.number || '';\n if (__DEV__ && onCardChange && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onCardChange?.(data);\n },\n [onCardChange]\n );\n\n const onFocusHandler = useCallback(\n (event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n onFocus?.(focusedField);\n } else {\n onBlur?.();\n }\n },\n [onFocus, onBlur]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n const clear = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'clear' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n clear,\n }));\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFieldNative\n ref={inputRef}\n onCardChange={onCardChangeHandler}\n onFocusChange={onFocusHandler}\n postalCodeEnabled={postalCodeEnabled ?? true}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n borderColor: cardStyle?.borderColor,\n borderWidth: cardStyle?.borderWidth,\n borderRadius: cardStyle?.borderRadius,\n cursorColor: cardStyle?.cursorColor,\n fontSize: cardStyle?.fontSize,\n placeholderColor: cardStyle?.placeholderColor,\n textColor: cardStyle?.textColor,\n textErrorColor: cardStyle?.textErrorColor,\n fontFamily: cardStyle?.fontFamily,\n }}\n placeholder={{\n number: placeholder?.number,\n expiration: placeholder?.expiration,\n cvc: placeholder?.cvc,\n postalCode: placeholder?.postalCode,\n }}\n {...props}\n />\n );\n }\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["CardForm.tsx"],"names":["CardFormNative","CardForm","ref","onFormComplete","cardStyle","props","inputRef","onFormCompleteHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","hasOwnProperty","number","__DEV__","console","warn","focus","UIManager","dispatchViewManagerCommand","current","blur","onFocusHandler","focusedField","inputRefValue","backgroundColor"],"mappings":"oWACA,qDAOA,yCASA,mC,ipCAOA,GAAMA,CAAAA,cAAc,CAClB,wCAAiD,UAAjD,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B,CADF,CAEE,MAFF,CAGE,EAHF,EAKD,CAND,CAQA,+BAAoBzB,GAApB,CAAyB,iBAAO,CAC9BsB,KAAK,CAALA,KAD8B,CAE9BI,IAAI,CAAJA,IAF8B,CAAP,EAAzB,EAKA,GAAMC,CAAAA,cAAc,CAAG,uBAAY,SAACrB,KAAD,CAAW,CAC5C,GAAQsB,CAAAA,YAAR,CAAyBtB,KAAK,CAACE,WAA/B,CAAQoB,YAAR,CACA,GAAIA,YAAJ,CAAkB,CAChB,wBAAWxB,QAAQ,CAACqB,OAApB,EAED,CAHD,IAGO,CAEN,CACF,CARsB,CAQpB,EARoB,CAAvB,CAUA,2BAAgB,UAAM,CACpB,GAAMI,CAAAA,aAAa,CAAGzB,QAAQ,CAACqB,OAA/B,CACA,GAAII,aAAa,GAAK,IAAtB,CAA4B,CAC1B,2BAAcA,aAAd,EACA,MAAO,WAAM,CACX,6BAAgBA,aAAhB,EACA,GAAI,uCAA4BA,aAAhC,CAA+C,CAC7CA,aAAa,CAACH,IAAd,GACD,CACF,CALD,CAMD,CACD,MAAO,WAAM,CAAE,CAAf,CACD,CAZD,CAYG,CAACtB,QAAD,CAZH,EAcA,MACE,8BAAC,cAAD,wBACE,GAAG,CAAEA,QADP,CAEE,cAAc,CAAEC,qBAFlB,CAGE,SAAS,CAAE,CACTyB,eAAe,CAAE5B,SAAF,cAAEA,SAAS,CAAE4B,eADnB,CAHb,CAeE,aAAa,CAAEH,cAfjB,EAiBMxB,KAjBN,gFADF,CAqBD,CA7GqB,CAAjB,C","sourcesContent":["import type { CardFormView } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFormNative =\n requireNativeComponent<CardFormView.NativeProps>('CardForm');\n\n/**\n * Card Form Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n autofocus?: boolean;\n testID?: string;\n\n // props iOS only\n cardStyle?: CardFormView.Styles;\n // isUserInteractionEnabled?: boolean;\n\n // TODO: will make it public when android-sdk allows for this\n // postalCodeEnabled?: boolean;\n\n // TODO: will make it public when ios-sdk allows for this\n // placeholder: CardFormView.Placeholders;\n // onBlur?(): void;\n // onFocus?(focusedField: Nullable<CardFormView.Names>): void;\n onFormComplete?(card: CardFormView.Details): void;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onFormComplete` handler.\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 dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Form Component\n *\n * @example\n * ```ts\n * <CardForm\n * onFormComplete={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 200}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardForm = forwardRef<CardFormView.Methods, Props>(\n (\n {\n onFormComplete,\n cardStyle,\n // isUserInteractionEnabled = true,\n // postalCodeEnabled = true,\n // onFocus,\n // onBlur,\n // placeholder,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onFormCompleteHandler = useCallback(\n (event: NativeSyntheticEvent<CardFormView.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFormView.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n country: card.country,\n postalCode: card.postalCode,\n };\n\n if (card.hasOwnProperty('number')) {\n data.number = card.number || '';\n if (__DEV__ && onFormComplete && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onFormComplete?.(data);\n },\n [onFormComplete]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n }));\n\n const onFocusHandler = useCallback((event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n // onFocus?.(focusedField);\n } else {\n // onBlur?.();\n }\n }, []);\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFormNative\n ref={inputRef}\n onFormComplete={onFormCompleteHandler}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n // disabledBackgroundColor: cardStyle?.disabledBackgroundColor,\n // type: cardStyle?.type,\n }}\n // isUserInteractionEnabledValue={isUserInteractionEnabled}\n // placeholder={{\n // number: placeholder?.number,\n // expiration: placeholder?.expiration,\n // cvc: placeholder?.cvc,\n // postalCode: placeholder?.postalCode,\n // }}\n onFocusChange={onFocusHandler}\n // postalCodeEnabled={postalCodeEnabled}\n {...props}\n />\n );\n }\n);\n"]}
1
+ {"version":3,"sources":["CardForm.tsx"],"names":["CardFormNative","CardForm","ref","onFormComplete","cardStyle","props","inputRef","onFormCompleteHandler","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","hasOwnProperty","number","__DEV__","console","warn","focus","UIManager","dispatchViewManager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EAKD,CAND,CAQA,GAAMC,CAAAA,IAAI,CAAG,QAAPA,CAAAA,IAAO,EAAM,CACjBH,uBAAUC,0BAAV,CACE,gCAAepB,QAAQ,CAACqB,OAAxB,CADF,CAEE,MAFF,CAGE,EAHF,EAKD,CAND,CAQA,+BAAoBzB,GAApB,CAAyB,iBAAO,CAC9BsB,KAAK,CAALA,KAD8B,CAE9BI,IAAI,CAAJA,IAF8B,CAAP,EAAzB,EAKA,GAAMC,CAAAA,cAAc,CAAG,uBAAY,SAACrB,KAAD,CAAW,CAC5C,GAAQsB,CAAAA,YAAR,CAAyBtB,KAAK,CAACE,WAA/B,CAAQoB,YAAR,CACA,GAAIA,YAAJ,CAAkB,CAChB,wBAAWxB,QAAQ,CAACqB,OAApB,EAED,CAHD,IAGO,CAEN,CACF,CARsB,CAQpB,EARoB,CAAvB,CAUA,2BAAgB,UAAM,CACpB,GAAMI,CAAAA,aAAa,CAAGzB,QAAQ,CAACqB,OAA/B,CACA,GAAII,aAAa,GAAK,IAAtB,CAA4B,CAC1B,2BAAcA,aAAd,EACA,MAAO,WAAM,CACX,6BAAgBA,aAAhB,EACA,GAAI,uCAA4BA,aAAhC,CAA+C,CAC7CA,aAAa,CAACH,IAAd,GACD,CACF,CALD,CAMD,CACD,MAAO,WAAM,CAAE,CAAf,CACD,CAZD,CAYG,CAACtB,QAAD,CAZH,EAcA,MACE,8BAAC,cAAD,wBACE,GAAG,CAAEA,QADP,CAEE,cAAc,CAAEC,qBAFlB,CAGE,SAAS,CAAE,CACTyB,eAAe,CAAE5B,SAAF,cAAEA,SAAS,CAAE4B,eADnB,CAHb,CAeE,aAAa,CAAEH,cAfjB,EAiBMxB,KAjBN,gFADF,CAqBD,CA7GqB,CAAjB,C","sourcesContent":["import type { CardFormView } from '../types';\nimport React, {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport {\n AccessibilityProps,\n NativeSyntheticEvent,\n requireNativeComponent,\n UIManager,\n StyleProp,\n findNodeHandle,\n ViewStyle,\n} from 'react-native';\nimport {\n currentlyFocusedInput,\n focusInput,\n registerInput,\n unregisterInput,\n} from '../helpers';\n\nconst CardFormNative =\n requireNativeComponent<CardFormView.NativeProps>('CardForm');\n\n/**\n * Card Form Component Props\n */\nexport interface Props extends AccessibilityProps {\n style?: StyleProp<ViewStyle>;\n autofocus?: boolean;\n testID?: string;\n\n // props iOS only\n cardStyle?: CardFormView.Styles;\n // isUserInteractionEnabled?: boolean;\n\n // TODO: will make it public when android-sdk allows for this\n // postalCodeEnabled?: boolean;\n\n // TODO: will make it public when ios-sdk allows for this\n // placeholder: CardFormView.Placeholders;\n // onBlur?(): void;\n // onFocus?(focusedField: CardFormView.FieldNames | null): void;\n onFormComplete?(card: CardFormView.Details): void;\n /**\n * WARNING: If set to `true` the full card number will be returned in the `onFormComplete` handler.\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 dangerouslyGetFullCardDetails?: boolean;\n}\n\n/**\n * Card Form Component\n *\n * @example\n * ```ts\n * <CardForm\n * onFormComplete={(cardDetails) => {\n * console.log('card details', cardDetails);\n * setCard(cardDetails);\n * }}\n * style={{height: 200}}\n * />\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport const CardForm = forwardRef<CardFormView.Methods, Props>(\n (\n {\n onFormComplete,\n cardStyle,\n // isUserInteractionEnabled = true,\n // postalCodeEnabled = true,\n // onFocus,\n // onBlur,\n // placeholder,\n ...props\n },\n ref\n ) => {\n const inputRef = useRef<any>(null);\n\n const onFormCompleteHandler = useCallback(\n (event: NativeSyntheticEvent<CardFormView.Details>) => {\n const card = event.nativeEvent;\n\n const data: CardFormView.Details = {\n last4: card.last4,\n expiryMonth: card.expiryMonth,\n expiryYear: card.expiryYear,\n complete: card.complete,\n brand: card.brand,\n country: card.country,\n postalCode: card.postalCode,\n };\n\n if (card.hasOwnProperty('number')) {\n data.number = card.number || '';\n if (__DEV__ && onFormComplete && card.complete) {\n console.warn(\n `[stripe-react-native] ⚠️ WARNING: You've enabled \\`dangerouslyGetFullCardDetails\\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`\n );\n }\n }\n onFormComplete?.(data);\n },\n [onFormComplete]\n );\n\n const focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'focus' as any,\n []\n );\n };\n\n const blur = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(inputRef.current),\n 'blur' as any,\n []\n );\n };\n\n useImperativeHandle(ref, () => ({\n focus,\n blur,\n }));\n\n const onFocusHandler = useCallback((event) => {\n const { focusedField } = event.nativeEvent;\n if (focusedField) {\n focusInput(inputRef.current);\n // onFocus?.(focusedField);\n } else {\n // onBlur?.();\n }\n }, []);\n\n useLayoutEffect(() => {\n const inputRefValue = inputRef.current;\n if (inputRefValue !== null) {\n registerInput(inputRefValue);\n return () => {\n unregisterInput(inputRefValue);\n if (currentlyFocusedInput() === inputRefValue) {\n inputRefValue.blur();\n }\n };\n }\n return () => {};\n }, [inputRef]);\n\n return (\n <CardFormNative\n ref={inputRef}\n onFormComplete={onFormCompleteHandler}\n cardStyle={{\n backgroundColor: cardStyle?.backgroundColor,\n // disabledBackgroundColor: cardStyle?.disabledBackgroundColor,\n // type: cardStyle?.type,\n }}\n // isUserInteractionEnabledValue={isUserInteractionEnabled}\n // placeholder={{\n // number: placeholder?.number,\n // expiration: placeholder?.expiration,\n // cvc: placeholder?.cvc,\n // postalCode: placeholder?.postalCode,\n // }}\n onFocusChange={onFocusHandler}\n // postalCodeEnabled={postalCodeEnabled}\n {...props}\n />\n );\n }\n);\n"]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeProvider=StripeProvider;exports.initStripe=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _react=_interopRequireWildcard(require("react"));var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../package.json"));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;}var EXPO_PARTNER_ID='pp_partner_JBN7LkABco2yUu';var repository=_package.default.repository;var appInfo={name:(0,_helpers.shouldAttributeExpo)()?_package.default.name+"/expo":_package.default.name,url:repository.url||repository,version:_package.default.version,partnerId:(0,_helpers.shouldAttributeExpo)()?EXPO_PARTNER_ID:undefined};var initStripe=function _callee(params){var extendedParams;return _regenerator.default.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:extendedParams=(0,_extends2.default)({},params,{appInfo:appInfo});_NativeStripeSdk.default.initialise(extendedParams);case 2:case"end":return _context.stop();}}},null,null,null,Promise);};exports.initStripe=initStripe;function StripeProvider(_ref){var children=_ref.children,publishableKey=_ref.publishableKey,merchantIdentifier=_ref.merchantIdentifier,threeDSecureParams=_ref.threeDSecureParams,stripeAccountId=_ref.stripeAccountId,urlScheme=_ref.urlScheme,setReturnUrlSchemeOnAndroid=_ref.setReturnUrlSchemeOnAndroid,setUrlSchemeOnAndroid=_ref.setUrlSchemeOnAndroid;(0,_react.useEffect)(function(){if(!publishableKey){return;}if(_helpers.isAndroid){_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,urlScheme:urlScheme,setReturnUrlSchemeOnAndroid:setReturnUrlSchemeOnAndroid||setUrlSchemeOnAndroid});}else{_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,merchantIdentifier:merchantIdentifier,urlScheme:urlScheme});}},[publishableKey,merchantIdentifier,stripeAccountId,threeDSecureParams,urlScheme,setReturnUrlSchemeOnAndroid,setUrlSchemeOnAndroid]);return _react.default.createElement(_react.default.Fragment,null,children);}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeProvider=StripeProvider;exports.initStripe=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _react=_interopRequireWildcard(require("react"));var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../package.json"));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;}var EXPO_PARTNER_ID='pp_partner_JBN7LkABco2yUu';var repository=_package.default.repository;var appInfo={name:(0,_helpers.shouldAttributeExpo)()?_package.default.name+"/expo":_package.default.name,url:repository.url||repository,version:_package.default.version,partnerId:(0,_helpers.shouldAttributeExpo)()?EXPO_PARTNER_ID:undefined};var initStripe=function _callee(params){var extendedParams;return _regenerator.default.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:extendedParams=(0,_extends2.default)({},params,{appInfo:appInfo});_NativeStripeSdk.default.initialise(extendedParams);case 2:case"end":return _context.stop();}}},null,null,null,Promise);};exports.initStripe=initStripe;function StripeProvider(_ref){var children=_ref.children,publishableKey=_ref.publishableKey,merchantIdentifier=_ref.merchantIdentifier,threeDSecureParams=_ref.threeDSecureParams,stripeAccountId=_ref.stripeAccountId,urlScheme=_ref.urlScheme,setReturnUrlSchemeOnAndroid=_ref.setReturnUrlSchemeOnAndroid;(0,_react.useEffect)(function(){if(!publishableKey){return;}if(_helpers.isAndroid){_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,urlScheme:urlScheme,setReturnUrlSchemeOnAndroid:setReturnUrlSchemeOnAndroid});}else{_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,merchantIdentifier:merchantIdentifier,urlScheme:urlScheme});}},[publishableKey,merchantIdentifier,stripeAccountId,threeDSecureParams,urlScheme,setReturnUrlSchemeOnAndroid]);return _react.default.createElement(_react.default.Fragment,null,children);}
2
2
  //# sourceMappingURL=StripeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["StripeProvider.tsx"],"names":["EXPO_PARTNER_ID","repository","pjson","appInfo","name","url","version","partnerId","undefined","initStripe","params","extendedParams","NativeStripeSdk","initialise","StripeProvider","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","setUrlSchemeOnAndroid","isAndroid"],"mappings":"2WAAA,qDAEA,2EACA,mCAEA,mE,0/BAEA,GAAMA,CAAAA,eAAe,CAAG,2BAAxB,CASA,GAAMC,CAAAA,UAAe,CAAGC,iBAAMD,UAA9B,CAEA,GAAME,CAAAA,OAAgB,CAAG,CACvBC,IAAI,CAAE,mCAA2BF,iBAAME,IAAjC,SAA+CF,iBAAME,IADpC,CAKvBC,GAAG,CAAEJ,UAAU,CAACI,GAAX,EAAkBJ,UALA,CAMvBK,OAAO,CAAEJ,iBAAMI,OANQ,CAOvBC,SAAS,CAAE,mCAAwBP,eAAxB,CAA0CQ,SAP9B,CAAzB,CAUO,GAAMC,CAAAA,UAAU,CAAG,iBAAOC,MAAP,uIAClBC,cADkB,0BACsBD,MADtB,EAC8BP,OAAO,CAAPA,OAD9B,GAExBS,yBAAgBC,UAAhB,CAA2BF,cAA3B,EAFwB,qEAAnB,C,8BAyBA,QAASG,CAAAA,cAAT,MASG,IARRC,CAAAA,QAQQ,MARRA,QAQQ,CAPRC,cAOQ,MAPRA,cAOQ,CANRC,kBAMQ,MANRA,kBAMQ,CALRC,kBAKQ,MALRA,kBAKQ,CAJRC,eAIQ,MAJRA,eAIQ,CAHRC,SAGQ,MAHRA,SAGQ,CAFRC,2BAEQ,MAFRA,2BAEQ,CADRC,qBACQ,MADRA,qBACQ,CACR,qBAAU,UAAM,CACd,GAAI,CAACN,cAAL,CAAqB,CACnB,OACD,CACD,GAAIO,kBAAJ,CAAe,CACbX,yBAAgBC,UAAhB,CAA2B,CACzBG,cAAc,CAAdA,cADyB,CAEzBb,OAAO,CAAPA,OAFyB,CAGzBgB,eAAe,CAAfA,eAHyB,CAIzBD,kBAAkB,CAAlBA,kBAJyB,CAKzBE,SAAS,CAATA,SALyB,CAMzBC,2BAA2B,CACzBA,2BAA2B,EAAIC,qBAPR,CAA3B,EASD,CAVD,IAUO,CACLV,yBAAgBC,UAAhB,CAA2B,CACzBG,cAAc,CAAdA,cADyB,CAEzBb,OAAO,CAAPA,OAFyB,CAGzBgB,eAAe,CAAfA,eAHyB,CAIzBD,kBAAkB,CAAlBA,kBAJyB,CAKzBD,kBAAkB,CAAlBA,kBALyB,CAMzBG,SAAS,CAATA,SANyB,CAA3B,EAQD,CACF,CAxBD,CAwBG,CACDJ,cADC,CAEDC,kBAFC,CAGDE,eAHC,CAIDD,kBAJC,CAKDE,SALC,CAMDC,2BANC,CAODC,qBAPC,CAxBH,EAkCA,MAAO,2DAAGP,QAAH,CAAP,CACD","sourcesContent":["import React, { useEffect } from 'react';\n\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport { isAndroid, shouldAttributeExpo } from '../helpers';\nimport type { AppInfo, InitStripeParams, InitialiseParams } from '../types';\nimport pjson from '../../package.json';\n\nconst EXPO_PARTNER_ID = 'pp_partner_JBN7LkABco2yUu';\n\n/**\n * Stripe Provider Component Props\n */\nexport type Props = InitStripeParams & {\n children: React.ReactElement | React.ReactElement[];\n};\n\nconst repository: any = pjson.repository;\n\nconst appInfo: AppInfo = {\n name: shouldAttributeExpo() ? `${pjson.name}/expo` : pjson.name,\n // package.json output installed via npm is a bit different than from yarn\n // the repository field can be an object or string\n // for more context: https://github.com/stripe/stripe-react-native/issues/200\n url: repository.url || repository,\n version: pjson.version,\n partnerId: shouldAttributeExpo() ? EXPO_PARTNER_ID : undefined,\n};\n\nexport const initStripe = async (params: InitStripeParams): Promise<void> => {\n const extendedParams: InitialiseParams = { ...params, appInfo };\n NativeStripeSdk.initialise(extendedParams);\n};\n\n/**\n * StripeProvider Component\n *\n * @example\n * ```ts\n * <StripeProvider\n * publishableKey=\"_publishableKey\"\n * merchantIdentifier=\"merchant.com.stripe.react.native\"\n * threeDSecureParams={{\n * backgroundColor: \"#FFF\",\n * timeout: 5,\n * }}\n * >\n * <App />\n * </StripeProvider>\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeProvider({\n children,\n publishableKey,\n merchantIdentifier,\n threeDSecureParams,\n stripeAccountId,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n setUrlSchemeOnAndroid,\n}: Props) {\n useEffect(() => {\n if (!publishableKey) {\n return;\n }\n if (isAndroid) {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid:\n setReturnUrlSchemeOnAndroid || setUrlSchemeOnAndroid,\n });\n } else {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n merchantIdentifier,\n urlScheme,\n });\n }\n }, [\n publishableKey,\n merchantIdentifier,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n setUrlSchemeOnAndroid,\n ]);\n\n return <>{children}</>;\n}\n"]}
1
+ {"version":3,"sources":["StripeProvider.tsx"],"names":["EXPO_PARTNER_ID","repository","pjson","appInfo","name","url","version","partnerId","undefined","initStripe","params","extendedParams","NativeStripeSdk","initialise","StripeProvider","children","publishableKey","merchantIdentifier","threeDSecureParams","stripeAccountId","urlScheme","setReturnUrlSchemeOnAndroid","isAndroid"],"mappings":"2WAAA,qDAEA,2EACA,mCAEA,mE,0/BAEA,GAAMA,CAAAA,eAAe,CAAG,2BAAxB,CASA,GAAMC,CAAAA,UAAe,CAAGC,iBAAMD,UAA9B,CAEA,GAAME,CAAAA,OAAgB,CAA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JC,CAKDE,SALC,CAMDC,2BANC,CAvBH,EAgCA,MAAO,2DAAGN,QAAH,CAAP,CACD","sourcesContent":["import React, { useEffect } from 'react';\n\nimport NativeStripeSdk from '../NativeStripeSdk';\nimport { isAndroid, shouldAttributeExpo } from '../helpers';\nimport type { AppInfo, InitStripeParams, InitialiseParams } from '../types';\nimport pjson from '../../package.json';\n\nconst EXPO_PARTNER_ID = 'pp_partner_JBN7LkABco2yUu';\n\n/**\n * Stripe Provider Component Props\n */\nexport type Props = InitStripeParams & {\n children: React.ReactElement | React.ReactElement[];\n};\n\nconst repository: any = pjson.repository;\n\nconst appInfo: AppInfo = {\n name: shouldAttributeExpo() ? `${pjson.name}/expo` : pjson.name,\n // package.json output installed via npm is a bit different than from yarn\n // the repository field can be an object or string\n // for more context: https://github.com/stripe/stripe-react-native/issues/200\n url: repository.url || repository,\n version: pjson.version,\n partnerId: shouldAttributeExpo() ? EXPO_PARTNER_ID : undefined,\n};\n\nexport const initStripe = async (params: InitStripeParams): Promise<void> => {\n const extendedParams: InitialiseParams = { ...params, appInfo };\n NativeStripeSdk.initialise(extendedParams);\n};\n\n/**\n * StripeProvider Component\n *\n * @example\n * ```ts\n * <StripeProvider\n * publishableKey=\"_publishableKey\"\n * merchantIdentifier=\"merchant.com.stripe.react.native\"\n * threeDSecureParams={{\n * backgroundColor: \"#FFF\",\n * timeout: 5,\n * }}\n * >\n * <App />\n * </StripeProvider>\n * ```\n * @param __namedParameters Props\n * @returns JSX.Element\n * @category ReactComponents\n */\nexport function StripeProvider({\n children,\n publishableKey,\n merchantIdentifier,\n threeDSecureParams,\n stripeAccountId,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n}: Props) {\n useEffect(() => {\n if (!publishableKey) {\n return;\n }\n if (isAndroid) {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n });\n } else {\n NativeStripeSdk.initialise({\n publishableKey,\n appInfo,\n stripeAccountId,\n threeDSecureParams,\n merchantIdentifier,\n urlScheme,\n });\n }\n }, [\n publishableKey,\n merchantIdentifier,\n stripeAccountId,\n threeDSecureParams,\n urlScheme,\n setReturnUrlSchemeOnAndroid,\n ]);\n\n return <>{children}</>;\n}\n"]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updateApplePaySummaryItems=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.presentPaymentSheet=exports.presentGooglePay=exports.presentApplePay=exports.openApplePaySetup=exports.isGooglePaySupported=exports.isApplePaySupported=exports.initPaymentSheet=exports.initGooglePay=exports.handleURLCallback=exports.handleNextAction=exports.handleCardAction=exports.createTokenForCVCUpdate=exports.createToken=exports.createPaymentMethod=exports.createGooglePayPaymentMethod=exports.confirmSetupIntent=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.confirmApplePayPayment=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _types=require("./types");var APPLE_PAY_NOT_SUPPORTED_MESSAGE='Apple pay is not supported on this device';var PAYMENT_INTENT='payment';var SETUP_INTENT='setup';var createPaymentMethod=function _callee(data){var options,_await$NativeStripeSd,paymentMethod,error,_args=arguments;return _regenerator.default.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:options=_args.length>1&&_args[1]!==undefined?_args[1]:{};_context.prev=1;_context.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.createPaymentMethod(data,options));case 4:_await$NativeStripeSd=_context.sent;paymentMethod=_await$NativeStripeSd.paymentMethod;error=_await$NativeStripeSd.error;if(!error){_context.next=9;break;}return _context.abrupt("return",{error:error});case 9:return _context.abrupt("return",{paymentMethod:paymentMethod});case 12:_context.prev=12;_context.t0=_context["catch"](1);return _context.abrupt("return",{error:_context.t0});case 15:case"end":return _context.stop();}}},null,null,[[1,12]],Promise);};exports.createPaymentMethod=createPaymentMethod;var createToken=function _callee2(params){var _params$country;var _await$NativeStripeSd2,token,error;return _regenerator.default.async(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:if(!(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber)){_context2.next=2;break;}return _context2.abrupt("return",{error:_Errors.MissingRoutingNumber});case 2:_context2.prev=2;_context2.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.createToken(params));case 5:_await$NativeStripeSd2=_context2.sent;token=_await$NativeStripeSd2.token;error=_await$NativeStripeSd2.error;if(!error){_context2.next=10;break;}return _context2.abrupt("return",{error:error});case 10:return _context2.abrupt("return",{token:token});case 13:_context2.prev=13;_context2.t0=_context2["catch"](2);return _context2.abrupt("return",{error:(0,_helpers.createError)(_context2.t0)});case 16:case"end":return _context2.stop();}}},null,null,[[2,13]],Promise);};exports.createToken=createToken;var retrievePaymentIntent=function _callee3(clientSecret){var _await$NativeStripeSd3,paymentIntent,error;return _regenerator.default.async(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.retrievePaymentIntent(clientSecret));case 3:_await$NativeStripeSd3=_context3.sent;paymentIntent=_await$NativeStripeSd3.paymentIntent;error=_await$NativeStripeSd3.error;if(!error){_context3.next=8;break;}return _context3.abrupt("return",{error:error});case 8:return _context3.abrupt("return",{paymentIntent:paymentIntent});case 11:_context3.prev=11;_context3.t0=_context3["catch"](0);return _context3.abrupt("return",{error:_context3.t0});case 14:case"end":return _context3.stop();}}},null,null,[[0,11]],Promise);};exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function _callee4(clientSecret){var _await$NativeStripeSd4,setupIntent,error;return _regenerator.default.async(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.prev=0;_context4.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.retrieveSetupIntent(clientSecret));case 3:_await$NativeStripeSd4=_context4.sent;setupIntent=_await$NativeStripeSd4.setupIntent;error=_await$NativeStripeSd4.error;if(!error){_context4.next=8;break;}return _context4.abrupt("return",{error:error});case 8:return _context4.abrupt("return",{setupIntent:setupIntent});case 11:_context4.prev=11;_context4.t0=_context4["catch"](0);return _context4.abrupt("return",{error:_context4.t0});case 14:case"end":return _context4.stop();}}},null,null,[[0,11]],Promise);};exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function _callee5(paymentIntentClientSecret,data){var options,_await$NativeStripeSd5,paymentIntent,error,_args5=arguments;return _regenerator.default.async(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:options=_args5.length>2&&_args5[2]!==undefined?_args5[2]:{};_context5.prev=1;_context5.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,data,options));case 4:_await$NativeStripeSd5=_context5.sent;paymentIntent=_await$NativeStripeSd5.paymentIntent;error=_await$NativeStripeSd5.error;if(!error){_context5.next=9;break;}return _context5.abrupt("return",{error:error});case 9:return _context5.abrupt("return",{paymentIntent:paymentIntent});case 12:_context5.prev=12;_context5.t0=_context5["catch"](1);return _context5.abrupt("return",{error:_context5.t0});case 15:case"end":return _context5.stop();}}},null,null,[[1,12]],Promise);};exports.confirmPayment=confirmPayment;var isApplePaySupported=function _callee6(){return _regenerator.default.async(function _callee6$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:_context6.t0=_helpers.isiOS;if(!_context6.t0){_context6.next=5;break;}_context6.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 4:_context6.t0=_context6.sent;case 5:return _context6.abrupt("return",_context6.t0);case 6:case"end":return _context6.stop();}}},null,null,null,Promise);};exports.isApplePaySupported=isApplePaySupported;var presentApplePay=function _callee7(params){var _await$NativeStripeSd6,paymentMethod,error;return _regenerator.default.async(function _callee7$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:_context7.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 2:if(_context7.sent){_context7.next=4;break;}return _context7.abrupt("return",{error:(0,_helpers.createError)({code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE})});case 4:_context7.prev=4;_context7.next=7;return _regenerator.default.awrap(_NativeStripeSdk.default.presentApplePay(params));case 7:_await$NativeStripeSd6=_context7.sent;paymentMethod=_await$NativeStripeSd6.paymentMethod;error=_await$NativeStripeSd6.error;if(!error){_context7.next=12;break;}return _context7.abrupt("return",{error:error});case 12:return _context7.abrupt("return",{paymentMethod:paymentMethod});case 15:_context7.prev=15;_context7.t0=_context7["catch"](4);return _context7.abrupt("return",{error:_context7.t0});case 18:case"end":return _context7.stop();}}},null,null,[[4,15]],Promise);};exports.presentApplePay=presentApplePay;var updateApplePaySummaryItems=function _callee8(summaryItems){var errorAddressFields,_args8=arguments;return _regenerator.default.async(function _callee8$(_context8){while(1){switch(_context8.prev=_context8.next){case 0:errorAddressFields=_args8.length>1&&_args8[1]!==undefined?_args8[1]:[];_context8.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 3:if(_context8.sent){_context8.next=5;break;}return _context8.abrupt("return",{error:(0,_helpers.createError)({code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE})});case 5:_context8.prev=5;_context8.next=8;return _regenerator.default.awrap(_NativeStripeSdk.default.updateApplePaySummaryItems(summaryItems,errorAddressFields));case 8:return _context8.abrupt("return",{});case 11:_context8.prev=11;_context8.t0=_context8["catch"](5);return _context8.abrupt("return",{error:(0,_helpers.createError)(_context8.t0)});case 14:case"end":return _context8.stop();}}},null,null,[[5,11]],Promise);};exports.updateApplePaySummaryItems=updateApplePaySummaryItems;var confirmApplePayPayment=function _callee9(clientSecret){return _regenerator.default.async(function _callee9$(_context9){while(1){switch(_context9.prev=_context9.next){case 0:_context9.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 2:if(_context9.sent){_context9.next=4;break;}return _context9.abrupt("return",{error:(0,_helpers.createError)({code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE})});case 4:_context9.prev=4;_context9.next=7;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmApplePayPayment(clientSecret));case 7:return _context9.abrupt("return",{});case 10:_context9.prev=10;_context9.t0=_context9["catch"](4);return _context9.abrupt("return",{error:(0,_helpers.createError)(_context9.t0)});case 13:case"end":return _context9.stop();}}},null,null,[[4,10]],Promise);};exports.confirmApplePayPayment=confirmApplePayPayment;var handleNextAction=function _callee10(paymentIntentClientSecret){var _await$NativeStripeSd7,paymentIntent,error;return _regenerator.default.async(function _callee10$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:_context10.prev=0;_context10.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret));case 3:_await$NativeStripeSd7=_context10.sent;paymentIntent=_await$NativeStripeSd7.paymentIntent;error=_await$NativeStripeSd7.error;if(!error){_context10.next=8;break;}return _context10.abrupt("return",{error:error});case 8:return _context10.abrupt("return",{paymentIntent:paymentIntent});case 11:_context10.prev=11;_context10.t0=_context10["catch"](0);return _context10.abrupt("return",{error:(0,_helpers.createError)(_context10.t0)});case 14:case"end":return _context10.stop();}}},null,null,[[0,11]],Promise);};exports.handleNextAction=handleNextAction;var handleCardAction=function _callee11(paymentIntentClientSecret){var _await$NativeStripeSd8,paymentIntent,error;return _regenerator.default.async(function _callee11$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:_context11.prev=0;_context11.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret));case 3:_await$NativeStripeSd8=_context11.sent;paymentIntent=_await$NativeStripeSd8.paymentIntent;error=_await$NativeStripeSd8.error;if(!error){_context11.next=8;break;}return _context11.abrupt("return",{error:error});case 8:return _context11.abrupt("return",{paymentIntent:paymentIntent});case 11:_context11.prev=11;_context11.t0=_context11["catch"](0);return _context11.abrupt("return",{error:(0,_helpers.createError)(_context11.t0)});case 14:case"end":return _context11.stop();}}},null,null,[[0,11]],Promise);};exports.handleCardAction=handleCardAction;var confirmSetupIntent=function _callee12(paymentIntentClientSecret,data){var options,_await$NativeStripeSd9,setupIntent,error,_args12=arguments;return _regenerator.default.async(function _callee12$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:options=_args12.length>2&&_args12[2]!==undefined?_args12[2]:{};_context12.prev=1;_context12.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,data,options));case 4:_await$NativeStripeSd9=_context12.sent;setupIntent=_await$NativeStripeSd9.setupIntent;error=_await$NativeStripeSd9.error;if(!error){_context12.next=9;break;}return _context12.abrupt("return",{error:error});case 9:return _context12.abrupt("return",{setupIntent:setupIntent});case 12:_context12.prev=12;_context12.t0=_context12["catch"](1);return _context12.abrupt("return",{error:(0,_helpers.createError)(_context12.t0)});case 15:case"end":return _context12.stop();}}},null,null,[[1,12]],Promise);};exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function _callee13(cvc){var _await$NativeStripeSd10,tokenId,error;return _regenerator.default.async(function _callee13$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:_context13.prev=0;_context13.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.createTokenForCVCUpdate(cvc));case 3:_await$NativeStripeSd10=_context13.sent;tokenId=_await$NativeStripeSd10.tokenId;error=_await$NativeStripeSd10.error;if(!error){_context13.next=8;break;}return _context13.abrupt("return",{error:error});case 8:return _context13.abrupt("return",{tokenId:tokenId});case 11:_context13.prev=11;_context13.t0=_context13["catch"](0);return _context13.abrupt("return",{error:(0,_helpers.createError)(_context13.t0)});case 14:case"end":return _context13.stop();}}},null,null,[[0,11]],Promise);};exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function _callee14(url){var stripeHandled;return _regenerator.default.async(function _callee14$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:_context14.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.handleURLCallback(url));case 2:stripeHandled=_context14.sent;return _context14.abrupt("return",stripeHandled);case 4:case"end":return _context14.stop();}}},null,null,null,Promise);};exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function _callee15(clientSecret,params){var _ref,paymentIntent,error;return _regenerator.default.async(function _callee15$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:if(!_helpers.isAndroid){_context15.next=2;break;}return _context15.abrupt("return",{error:(0,_helpers.createError)({code:_types.ConfirmPaymentError.Failed,message:'verifyMicrodepositsForPayment is only supported on iOS on this version of @stripe/stripe-react-native. Please verify with paymentIntent.nextAction.redirectUrl'})});case 2:_context15.prev=2;_context15.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.verifyMicrodeposits(PAYMENT_INTENT,clientSecret,params));case 5:_ref=_context15.sent;paymentIntent=_ref.paymentIntent;error=_ref.error;if(!error){_context15.next=10;break;}return _context15.abrupt("return",{error:error});case 10:return _context15.abrupt("return",{paymentIntent:paymentIntent});case 13:_context15.prev=13;_context15.t0=_context15["catch"](2);return _context15.abrupt("return",{error:(0,_helpers.createError)(_context15.t0)});case 16:case"end":return _context15.stop();}}},null,null,[[2,13]],Promise);};exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function _callee16(clientSecret,params){var _ref2,setupIntent,error;return _regenerator.default.async(function _callee16$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:if(!_helpers.isAndroid){_context16.next=2;break;}return _context16.abrupt("return",{error:(0,_helpers.createError)({code:_types.ConfirmSetupIntentError.Failed,message:'verifyMicrodepositsForSetup is only supported on iOS on this version of @stripe/stripe-react-native. Please verify with setupIntent.nextAction.redirectUrl'})});case 2:_context16.prev=2;_context16.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.verifyMicrodeposits(SETUP_INTENT,clientSecret,params));case 5:_ref2=_context16.sent;setupIntent=_ref2.setupIntent;error=_ref2.error;if(!error){_context16.next=10;break;}return _context16.abrupt("return",{error:error});case 10:return _context16.abrupt("return",{setupIntent:setupIntent});case 13:_context16.prev=13;_context16.t0=_context16["catch"](2);return _context16.abrupt("return",{error:(0,_helpers.createError)(_context16.t0)});case 16:case"end":return _context16.stop();}}},null,null,[[2,13]],Promise);};exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var initPaymentSheet=function _callee17(params){var _await$NativeStripeSd11,paymentOption,error;return _regenerator.default.async(function _callee17$(_context17){while(1){switch(_context17.prev=_context17.next){case 0:_context17.prev=0;_context17.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.initPaymentSheet(params));case 3:_await$NativeStripeSd11=_context17.sent;paymentOption=_await$NativeStripeSd11.paymentOption;error=_await$NativeStripeSd11.error;if(!error){_context17.next=8;break;}return _context17.abrupt("return",{error:error});case 8:return _context17.abrupt("return",{paymentOption:paymentOption});case 11:_context17.prev=11;_context17.t0=_context17["catch"](0);return _context17.abrupt("return",{error:(0,_helpers.createError)(_context17.t0)});case 14:case"end":return _context17.stop();}}},null,null,[[0,11]],Promise);};exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function _callee18(){var _await$NativeStripeSd12,paymentOption,error;return _regenerator.default.async(function _callee18$(_context18){while(1){switch(_context18.prev=_context18.next){case 0:_context18.prev=0;_context18.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.presentPaymentSheet());case 3:_await$NativeStripeSd12=_context18.sent;paymentOption=_await$NativeStripeSd12.paymentOption;error=_await$NativeStripeSd12.error;if(!error){_context18.next=8;break;}return _context18.abrupt("return",{error:error});case 8:return _context18.abrupt("return",{paymentOption:paymentOption});case 11:_context18.prev=11;_context18.t0=_context18["catch"](0);return _context18.abrupt("return",{error:(0,_helpers.createError)(_context18.t0)});case 14:case"end":return _context18.stop();}}},null,null,[[0,11]],Promise);};exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function _callee19(){var _await$NativeStripeSd13,error;return _regenerator.default.async(function _callee19$(_context19){while(1){switch(_context19.prev=_context19.next){case 0:_context19.prev=0;_context19.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmPaymentSheetPayment());case 3:_await$NativeStripeSd13=_context19.sent;error=_await$NativeStripeSd13.error;if(!error){_context19.next=7;break;}return _context19.abrupt("return",{error:error});case 7:return _context19.abrupt("return",{});case 10:_context19.prev=10;_context19.t0=_context19["catch"](0);return _context19.abrupt("return",{error:(0,_helpers.createError)(_context19.t0)});case 13:case"end":return _context19.stop();}}},null,null,[[0,10]],Promise);};exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var isGooglePaySupported=function _callee20(params){return _regenerator.default.async(function _callee20$(_context20){while(1){switch(_context20.prev=_context20.next){case 0:_context20.t0=_helpers.isAndroid;if(!_context20.t0){_context20.next=5;break;}_context20.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isGooglePaySupported(params!=null?params:{}));case 4:_context20.t0=_context20.sent;case 5:return _context20.abrupt("return",_context20.t0);case 6:case"end":return _context20.stop();}}},null,null,null,Promise);};exports.isGooglePaySupported=isGooglePaySupported;var initGooglePay=function _callee21(params){var _await$NativeStripeSd14,error;return _regenerator.default.async(function _callee21$(_context21){while(1){switch(_context21.prev=_context21.next){case 0:_context21.prev=0;_context21.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.initGooglePay(params));case 3:_await$NativeStripeSd14=_context21.sent;error=_await$NativeStripeSd14.error;if(!error){_context21.next=7;break;}return _context21.abrupt("return",{error:error});case 7:return _context21.abrupt("return",{});case 10:_context21.prev=10;_context21.t0=_context21["catch"](0);return _context21.abrupt("return",{error:(0,_helpers.createError)(_context21.t0)});case 13:case"end":return _context21.stop();}}},null,null,[[0,10]],Promise);};exports.initGooglePay=initGooglePay;var presentGooglePay=function _callee22(params){var _await$NativeStripeSd15,error;return _regenerator.default.async(function _callee22$(_context22){while(1){switch(_context22.prev=_context22.next){case 0:_context22.prev=0;_context22.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.presentGooglePay(params));case 3:_await$NativeStripeSd15=_context22.sent;error=_await$NativeStripeSd15.error;if(!error){_context22.next=7;break;}return _context22.abrupt("return",{error:error});case 7:return _context22.abrupt("return",{});case 10:_context22.prev=10;_context22.t0=_context22["catch"](0);return _context22.abrupt("return",{error:(0,_helpers.createError)(_context22.t0)});case 13:case"end":return _context22.stop();}}},null,null,[[0,10]],Promise);};exports.presentGooglePay=presentGooglePay;var createGooglePayPaymentMethod=function _callee23(params){var _await$NativeStripeSd16,error,paymentMethod;return _regenerator.default.async(function _callee23$(_context23){while(1){switch(_context23.prev=_context23.next){case 0:_context23.prev=0;_context23.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.createGooglePayPaymentMethod(params));case 3:_await$NativeStripeSd16=_context23.sent;error=_await$NativeStripeSd16.error;paymentMethod=_await$NativeStripeSd16.paymentMethod;if(!error){_context23.next=8;break;}return _context23.abrupt("return",{error:error});case 8:return _context23.abrupt("return",{paymentMethod:paymentMethod});case 11:_context23.prev=11;_context23.t0=_context23["catch"](0);return _context23.abrupt("return",{error:(0,_helpers.createError)(_context23.t0)});case 14:case"end":return _context23.stop();}}},null,null,[[0,11]],Promise);};exports.createGooglePayPaymentMethod=createGooglePayPaymentMethod;var openApplePaySetup=function _callee24(){var _await$NativeStripeSd17,error;return _regenerator.default.async(function _callee24$(_context24){while(1){switch(_context24.prev=_context24.next){case 0:_context24.prev=0;_context24.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.openApplePaySetup());case 3:_await$NativeStripeSd17=_context24.sent;error=_await$NativeStripeSd17.error;if(!error){_context24.next=7;break;}return _context24.abrupt("return",{error:error});case 7:return _context24.abrupt("return",{});case 10:_context24.prev=10;_context24.t0=_context24["catch"](0);return _context24.abrupt("return",{error:(0,_helpers.createError)(_context24.t0)});case 13:case"end":return _context24.stop();}}},null,null,[[0,10]],Promise);};exports.openApplePaySetup=openApplePaySetup;var collectBankAccountForPayment=function _callee25(clientSecret,params){var _ref3,paymentIntent,error;return _regenerator.default.async(function _callee25$(_context25){while(1){switch(_context25.prev=_context25.next){case 0:if(!_helpers.isAndroid){_context25.next=2;break;}return _context25.abrupt("return",{error:(0,_helpers.createError)({code:_types.ConfirmPaymentError.Failed,message:'collectBankAccountForPayment is only supported on iOS on this version of @stripe/stripe-react-native.'})});case 2:_context25.prev=2;_context25.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.collectBankAccount(PAYMENT_INTENT,clientSecret,params));case 5:_ref3=_context25.sent;paymentIntent=_ref3.paymentIntent;error=_ref3.error;if(!error){_context25.next=10;break;}return _context25.abrupt("return",{error:error});case 10:return _context25.abrupt("return",{paymentIntent:paymentIntent});case 13:_context25.prev=13;_context25.t0=_context25["catch"](2);return _context25.abrupt("return",{error:(0,_helpers.createError)(_context25.t0)});case 16:case"end":return _context25.stop();}}},null,null,[[2,13]],Promise);};exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function _callee26(clientSecret,params){var _ref4,setupIntent,error;return _regenerator.default.async(function _callee26$(_context26){while(1){switch(_context26.prev=_context26.next){case 0:if(!_helpers.isAndroid){_context26.next=2;break;}return _context26.abrupt("return",{error:(0,_helpers.createError)({code:_types.ConfirmSetupIntentError.Failed,message:'collectBankAccountForSetup is only supported on iOS on this version of @stripe/stripe-react-native.'})});case 2:_context26.prev=2;_context26.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.collectBankAccount(SETUP_INTENT,clientSecret,params));case 5:_ref4=_context26.sent;setupIntent=_ref4.setupIntent;error=_ref4.error;if(!error){_context26.next=10;break;}return _context26.abrupt("return",{error:error});case 10:return _context26.abrupt("return",{setupIntent:setupIntent});case 13:_context26.prev=13;_context26.t0=_context26["catch"](2);return _context26.abrupt("return",{error:(0,_helpers.createError)(_context26.t0)});case 16:case"end":return _context26.stop();}}},null,null,[[2,13]],Promise);};exports.collectBankAccountForSetup=collectBankAccountForSetup;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.verifyMicrodepositsForSetup=exports.verifyMicrodepositsForPayment=exports.updateApplePaySummaryItems=exports.retrieveSetupIntent=exports.retrievePaymentIntent=exports.presentPaymentSheet=exports.presentGooglePay=exports.presentApplePay=exports.openApplePaySetup=exports.isGooglePaySupported=exports.isApplePaySupported=exports.initPaymentSheet=exports.initGooglePay=exports.handleURLCallback=exports.handleNextAction=exports.createTokenForCVCUpdate=exports.createToken=exports.createPaymentMethod=exports.createGooglePayPaymentMethod=exports.confirmSetupIntent=exports.confirmPaymentSheetPayment=exports.confirmPayment=exports.confirmApplePayPayment=exports.collectBankAccountForSetup=exports.collectBankAccountForPayment=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _helpers=require("./helpers");var _Errors=require("./types/Errors");var _NativeStripeSdk=_interopRequireDefault(require("./NativeStripeSdk"));var _types=require("./types");var APPLE_PAY_NOT_SUPPORTED_MESSAGE='Apple pay is not supported on this device';var createPaymentMethod=function _callee(params){var options,_await$NativeStripeSd,paymentMethod,error,_args=arguments;return _regenerator.default.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:options=_args.length>1&&_args[1]!==undefined?_args[1]:{};_context.prev=1;_context.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.createPaymentMethod(params,options));case 4:_await$NativeStripeSd=_context.sent;paymentMethod=_await$NativeStripeSd.paymentMethod;error=_await$NativeStripeSd.error;if(!error){_context.next=9;break;}return _context.abrupt("return",{error:error});case 9:return _context.abrupt("return",{paymentMethod:paymentMethod});case 12:_context.prev=12;_context.t0=_context["catch"](1);return _context.abrupt("return",{error:_context.t0});case 15:case"end":return _context.stop();}}},null,null,[[1,12]],Promise);};exports.createPaymentMethod=createPaymentMethod;var createToken=function _callee2(params){var _params$country;var _await$NativeStripeSd2,token,error;return _regenerator.default.async(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:if(!(params.type==='BankAccount'&&((_params$country=params.country)==null?void 0:_params$country.toLowerCase())==='us'&&!params.routingNumber)){_context2.next=2;break;}return _context2.abrupt("return",{error:_Errors.MissingRoutingNumber});case 2:_context2.prev=2;_context2.next=5;return _regenerator.default.awrap(_NativeStripeSdk.default.createToken(params));case 5:_await$NativeStripeSd2=_context2.sent;token=_await$NativeStripeSd2.token;error=_await$NativeStripeSd2.error;if(!error){_context2.next=10;break;}return _context2.abrupt("return",{error:error});case 10:return _context2.abrupt("return",{token:token});case 13:_context2.prev=13;_context2.t0=_context2["catch"](2);return _context2.abrupt("return",{error:_context2.t0});case 16:case"end":return _context2.stop();}}},null,null,[[2,13]],Promise);};exports.createToken=createToken;var retrievePaymentIntent=function _callee3(clientSecret){var _await$NativeStripeSd3,paymentIntent,error;return _regenerator.default.async(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.retrievePaymentIntent(clientSecret));case 3:_await$NativeStripeSd3=_context3.sent;paymentIntent=_await$NativeStripeSd3.paymentIntent;error=_await$NativeStripeSd3.error;if(!error){_context3.next=8;break;}return _context3.abrupt("return",{error:error});case 8:return _context3.abrupt("return",{paymentIntent:paymentIntent});case 11:_context3.prev=11;_context3.t0=_context3["catch"](0);return _context3.abrupt("return",{error:_context3.t0});case 14:case"end":return _context3.stop();}}},null,null,[[0,11]],Promise);};exports.retrievePaymentIntent=retrievePaymentIntent;var retrieveSetupIntent=function _callee4(clientSecret){var _await$NativeStripeSd4,setupIntent,error;return _regenerator.default.async(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.prev=0;_context4.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.retrieveSetupIntent(clientSecret));case 3:_await$NativeStripeSd4=_context4.sent;setupIntent=_await$NativeStripeSd4.setupIntent;error=_await$NativeStripeSd4.error;if(!error){_context4.next=8;break;}return _context4.abrupt("return",{error:error});case 8:return _context4.abrupt("return",{setupIntent:setupIntent});case 11:_context4.prev=11;_context4.t0=_context4["catch"](0);return _context4.abrupt("return",{error:_context4.t0});case 14:case"end":return _context4.stop();}}},null,null,[[0,11]],Promise);};exports.retrieveSetupIntent=retrieveSetupIntent;var confirmPayment=function _callee5(paymentIntentClientSecret,params){var options,_await$NativeStripeSd5,paymentIntent,error,_args5=arguments;return _regenerator.default.async(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:options=_args5.length>2&&_args5[2]!==undefined?_args5[2]:{};_context5.prev=1;_context5.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmPayment(paymentIntentClientSecret,params,options));case 4:_await$NativeStripeSd5=_context5.sent;paymentIntent=_await$NativeStripeSd5.paymentIntent;error=_await$NativeStripeSd5.error;if(!error){_context5.next=9;break;}return _context5.abrupt("return",{error:error});case 9:return _context5.abrupt("return",{paymentIntent:paymentIntent});case 12:_context5.prev=12;_context5.t0=_context5["catch"](1);return _context5.abrupt("return",{error:_context5.t0});case 15:case"end":return _context5.stop();}}},null,null,[[1,12]],Promise);};exports.confirmPayment=confirmPayment;var isApplePaySupported=function _callee6(){return _regenerator.default.async(function _callee6$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:_context6.t0=_helpers.isiOS;if(!_context6.t0){_context6.next=5;break;}_context6.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 4:_context6.t0=_context6.sent;case 5:return _context6.abrupt("return",_context6.t0);case 6:case"end":return _context6.stop();}}},null,null,null,Promise);};exports.isApplePaySupported=isApplePaySupported;var presentApplePay=function _callee7(params){var _await$NativeStripeSd6,paymentMethod,error;return _regenerator.default.async(function _callee7$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:_context7.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 2:if(_context7.sent){_context7.next=4;break;}return _context7.abrupt("return",{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}});case 4:_context7.prev=4;_context7.next=7;return _regenerator.default.awrap(_NativeStripeSdk.default.presentApplePay(params));case 7:_await$NativeStripeSd6=_context7.sent;paymentMethod=_await$NativeStripeSd6.paymentMethod;error=_await$NativeStripeSd6.error;if(!error){_context7.next=12;break;}return _context7.abrupt("return",{error:error});case 12:return _context7.abrupt("return",{paymentMethod:paymentMethod});case 15:_context7.prev=15;_context7.t0=_context7["catch"](4);return _context7.abrupt("return",{error:_context7.t0});case 18:case"end":return _context7.stop();}}},null,null,[[4,15]],Promise);};exports.presentApplePay=presentApplePay;var updateApplePaySummaryItems=function _callee8(summaryItems){var errorAddressFields,_args8=arguments;return _regenerator.default.async(function _callee8$(_context8){while(1){switch(_context8.prev=_context8.next){case 0:errorAddressFields=_args8.length>1&&_args8[1]!==undefined?_args8[1]:[];_context8.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 3:if(_context8.sent){_context8.next=5;break;}return _context8.abrupt("return",{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}});case 5:_context8.prev=5;_context8.next=8;return _regenerator.default.awrap(_NativeStripeSdk.default.updateApplePaySummaryItems(summaryItems,errorAddressFields));case 8:return _context8.abrupt("return",{});case 11:_context8.prev=11;_context8.t0=_context8["catch"](5);return _context8.abrupt("return",{error:_context8.t0});case 14:case"end":return _context8.stop();}}},null,null,[[5,11]],Promise);};exports.updateApplePaySummaryItems=updateApplePaySummaryItems;var confirmApplePayPayment=function _callee9(clientSecret){return _regenerator.default.async(function _callee9$(_context9){while(1){switch(_context9.prev=_context9.next){case 0:_context9.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 2:if(_context9.sent){_context9.next=4;break;}return _context9.abrupt("return",{error:{code:_types.ApplePayError.Canceled,message:APPLE_PAY_NOT_SUPPORTED_MESSAGE}});case 4:_context9.prev=4;_context9.next=7;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmApplePayPayment(clientSecret));case 7:return _context9.abrupt("return",{});case 10:_context9.prev=10;_context9.t0=_context9["catch"](4);return _context9.abrupt("return",{error:_context9.t0});case 13:case"end":return _context9.stop();}}},null,null,[[4,10]],Promise);};exports.confirmApplePayPayment=confirmApplePayPayment;var handleNextAction=function _callee10(paymentIntentClientSecret){var _await$NativeStripeSd7,paymentIntent,error;return _regenerator.default.async(function _callee10$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:_context10.prev=0;_context10.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.handleNextAction(paymentIntentClientSecret));case 3:_await$NativeStripeSd7=_context10.sent;paymentIntent=_await$NativeStripeSd7.paymentIntent;error=_await$NativeStripeSd7.error;if(!error){_context10.next=8;break;}return _context10.abrupt("return",{error:error});case 8:return _context10.abrupt("return",{paymentIntent:paymentIntent});case 11:_context10.prev=11;_context10.t0=_context10["catch"](0);return _context10.abrupt("return",{error:(0,_helpers.createError)(_context10.t0)});case 14:case"end":return _context10.stop();}}},null,null,[[0,11]],Promise);};exports.handleNextAction=handleNextAction;var confirmSetupIntent=function _callee11(paymentIntentClientSecret,params){var options,_await$NativeStripeSd8,setupIntent,error,_args11=arguments;return _regenerator.default.async(function _callee11$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:options=_args11.length>2&&_args11[2]!==undefined?_args11[2]:{};_context11.prev=1;_context11.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmSetupIntent(paymentIntentClientSecret,params,options));case 4:_await$NativeStripeSd8=_context11.sent;setupIntent=_await$NativeStripeSd8.setupIntent;error=_await$NativeStripeSd8.error;if(!error){_context11.next=9;break;}return _context11.abrupt("return",{error:error});case 9:return _context11.abrupt("return",{setupIntent:setupIntent});case 12:_context11.prev=12;_context11.t0=_context11["catch"](1);return _context11.abrupt("return",{error:_context11.t0});case 15:case"end":return _context11.stop();}}},null,null,[[1,12]],Promise);};exports.confirmSetupIntent=confirmSetupIntent;var createTokenForCVCUpdate=function _callee12(cvc){var _await$NativeStripeSd9,tokenId,error;return _regenerator.default.async(function _callee12$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:_context12.prev=0;_context12.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.createTokenForCVCUpdate(cvc));case 3:_await$NativeStripeSd9=_context12.sent;tokenId=_await$NativeStripeSd9.tokenId;error=_await$NativeStripeSd9.error;if(!error){_context12.next=8;break;}return _context12.abrupt("return",{error:error});case 8:return _context12.abrupt("return",{tokenId:tokenId});case 11:_context12.prev=11;_context12.t0=_context12["catch"](0);return _context12.abrupt("return",{error:_context12.t0});case 14:case"end":return _context12.stop();}}},null,null,[[0,11]],Promise);};exports.createTokenForCVCUpdate=createTokenForCVCUpdate;var handleURLCallback=function _callee13(url){var stripeHandled;return _regenerator.default.async(function _callee13$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:_context13.next=2;return _regenerator.default.awrap(_NativeStripeSdk.default.handleURLCallback(url));case 2:stripeHandled=_context13.sent;return _context13.abrupt("return",stripeHandled);case 4:case"end":return _context13.stop();}}},null,null,null,Promise);};exports.handleURLCallback=handleURLCallback;var verifyMicrodepositsForPayment=function _callee14(clientSecret,params){var _ref,paymentIntent,error;return _regenerator.default.async(function _callee14$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:_context14.prev=0;_context14.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.verifyMicrodeposits(true,clientSecret,params));case 3:_ref=_context14.sent;paymentIntent=_ref.paymentIntent;error=_ref.error;if(!error){_context14.next=8;break;}return _context14.abrupt("return",{error:error});case 8:return _context14.abrupt("return",{paymentIntent:paymentIntent});case 11:_context14.prev=11;_context14.t0=_context14["catch"](0);return _context14.abrupt("return",{error:(0,_helpers.createError)(_context14.t0)});case 14:case"end":return _context14.stop();}}},null,null,[[0,11]],Promise);};exports.verifyMicrodepositsForPayment=verifyMicrodepositsForPayment;var verifyMicrodepositsForSetup=function _callee15(clientSecret,params){var _ref2,setupIntent,error;return _regenerator.default.async(function _callee15$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:_context15.prev=0;_context15.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.verifyMicrodeposits(false,clientSecret,params));case 3:_ref2=_context15.sent;setupIntent=_ref2.setupIntent;error=_ref2.error;if(!error){_context15.next=8;break;}return _context15.abrupt("return",{error:error});case 8:return _context15.abrupt("return",{setupIntent:setupIntent});case 11:_context15.prev=11;_context15.t0=_context15["catch"](0);return _context15.abrupt("return",{error:(0,_helpers.createError)(_context15.t0)});case 14:case"end":return _context15.stop();}}},null,null,[[0,11]],Promise);};exports.verifyMicrodepositsForSetup=verifyMicrodepositsForSetup;var initPaymentSheet=function _callee16(params){var _await$NativeStripeSd10,paymentOption,error;return _regenerator.default.async(function _callee16$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:_context16.prev=0;_context16.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.initPaymentSheet(params));case 3:_await$NativeStripeSd10=_context16.sent;paymentOption=_await$NativeStripeSd10.paymentOption;error=_await$NativeStripeSd10.error;if(!error){_context16.next=8;break;}return _context16.abrupt("return",{error:error});case 8:return _context16.abrupt("return",{paymentOption:paymentOption});case 11:_context16.prev=11;_context16.t0=_context16["catch"](0);return _context16.abrupt("return",{error:_context16.t0});case 14:case"end":return _context16.stop();}}},null,null,[[0,11]],Promise);};exports.initPaymentSheet=initPaymentSheet;var presentPaymentSheet=function _callee17(){var _await$NativeStripeSd11,paymentOption,error;return _regenerator.default.async(function _callee17$(_context17){while(1){switch(_context17.prev=_context17.next){case 0:_context17.prev=0;_context17.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.presentPaymentSheet());case 3:_await$NativeStripeSd11=_context17.sent;paymentOption=_await$NativeStripeSd11.paymentOption;error=_await$NativeStripeSd11.error;if(!error){_context17.next=8;break;}return _context17.abrupt("return",{error:error});case 8:return _context17.abrupt("return",{paymentOption:paymentOption});case 11:_context17.prev=11;_context17.t0=_context17["catch"](0);return _context17.abrupt("return",{error:_context17.t0});case 14:case"end":return _context17.stop();}}},null,null,[[0,11]],Promise);};exports.presentPaymentSheet=presentPaymentSheet;var confirmPaymentSheetPayment=function _callee18(){var _await$NativeStripeSd12,error;return _regenerator.default.async(function _callee18$(_context18){while(1){switch(_context18.prev=_context18.next){case 0:_context18.prev=0;_context18.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.confirmPaymentSheetPayment());case 3:_await$NativeStripeSd12=_context18.sent;error=_await$NativeStripeSd12.error;if(!error){_context18.next=7;break;}return _context18.abrupt("return",{error:error});case 7:return _context18.abrupt("return",{});case 10:_context18.prev=10;_context18.t0=_context18["catch"](0);return _context18.abrupt("return",{error:_context18.t0});case 13:case"end":return _context18.stop();}}},null,null,[[0,10]],Promise);};exports.confirmPaymentSheetPayment=confirmPaymentSheetPayment;var isGooglePaySupported=function _callee19(params){return _regenerator.default.async(function _callee19$(_context19){while(1){switch(_context19.prev=_context19.next){case 0:_context19.t0=_helpers.isAndroid;if(!_context19.t0){_context19.next=5;break;}_context19.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isGooglePaySupported(params!=null?params:{}));case 4:_context19.t0=_context19.sent;case 5:return _context19.abrupt("return",_context19.t0);case 6:case"end":return _context19.stop();}}},null,null,null,Promise);};exports.isGooglePaySupported=isGooglePaySupported;var initGooglePay=function _callee20(params){var _await$NativeStripeSd13,error;return _regenerator.default.async(function _callee20$(_context20){while(1){switch(_context20.prev=_context20.next){case 0:_context20.prev=0;_context20.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.initGooglePay(params));case 3:_await$NativeStripeSd13=_context20.sent;error=_await$NativeStripeSd13.error;if(!error){_context20.next=7;break;}return _context20.abrupt("return",{error:error});case 7:return _context20.abrupt("return",{});case 10:_context20.prev=10;_context20.t0=_context20["catch"](0);return _context20.abrupt("return",{error:_context20.t0});case 13:case"end":return _context20.stop();}}},null,null,[[0,10]],Promise);};exports.initGooglePay=initGooglePay;var presentGooglePay=function _callee21(params){var _await$NativeStripeSd14,error;return _regenerator.default.async(function _callee21$(_context21){while(1){switch(_context21.prev=_context21.next){case 0:_context21.prev=0;_context21.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.presentGooglePay(params));case 3:_await$NativeStripeSd14=_context21.sent;error=_await$NativeStripeSd14.error;if(!error){_context21.next=7;break;}return _context21.abrupt("return",{error:error});case 7:return _context21.abrupt("return",{});case 10:_context21.prev=10;_context21.t0=_context21["catch"](0);return _context21.abrupt("return",{error:_context21.t0});case 13:case"end":return _context21.stop();}}},null,null,[[0,10]],Promise);};exports.presentGooglePay=presentGooglePay;var createGooglePayPaymentMethod=function _callee22(params){var _await$NativeStripeSd15,error,paymentMethod;return _regenerator.default.async(function _callee22$(_context22){while(1){switch(_context22.prev=_context22.next){case 0:_context22.prev=0;_context22.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.createGooglePayPaymentMethod(params));case 3:_await$NativeStripeSd15=_context22.sent;error=_await$NativeStripeSd15.error;paymentMethod=_await$NativeStripeSd15.paymentMethod;if(!error){_context22.next=8;break;}return _context22.abrupt("return",{error:error});case 8:return _context22.abrupt("return",{paymentMethod:paymentMethod});case 11:_context22.prev=11;_context22.t0=_context22["catch"](0);return _context22.abrupt("return",{error:_context22.t0});case 14:case"end":return _context22.stop();}}},null,null,[[0,11]],Promise);};exports.createGooglePayPaymentMethod=createGooglePayPaymentMethod;var openApplePaySetup=function _callee23(){var _await$NativeStripeSd16,error;return _regenerator.default.async(function _callee23$(_context23){while(1){switch(_context23.prev=_context23.next){case 0:_context23.prev=0;_context23.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.openApplePaySetup());case 3:_await$NativeStripeSd16=_context23.sent;error=_await$NativeStripeSd16.error;if(!error){_context23.next=7;break;}return _context23.abrupt("return",{error:error});case 7:return _context23.abrupt("return",{});case 10:_context23.prev=10;_context23.t0=_context23["catch"](0);return _context23.abrupt("return",{error:_context23.t0});case 13:case"end":return _context23.stop();}}},null,null,[[0,10]],Promise);};exports.openApplePaySetup=openApplePaySetup;var collectBankAccountForPayment=function _callee24(clientSecret,params){var _ref3,paymentIntent,error;return _regenerator.default.async(function _callee24$(_context24){while(1){switch(_context24.prev=_context24.next){case 0:_context24.prev=0;_context24.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.collectBankAccount(true,clientSecret,params));case 3:_ref3=_context24.sent;paymentIntent=_ref3.paymentIntent;error=_ref3.error;if(!error){_context24.next=8;break;}return _context24.abrupt("return",{error:error});case 8:return _context24.abrupt("return",{paymentIntent:paymentIntent});case 11:_context24.prev=11;_context24.t0=_context24["catch"](0);return _context24.abrupt("return",{error:(0,_helpers.createError)(_context24.t0)});case 14:case"end":return _context24.stop();}}},null,null,[[0,11]],Promise);};exports.collectBankAccountForPayment=collectBankAccountForPayment;var collectBankAccountForSetup=function _callee25(clientSecret,params){var _ref4,setupIntent,error;return _regenerator.default.async(function _callee25$(_context25){while(1){switch(_context25.prev=_context25.next){case 0:_context25.prev=0;_context25.next=3;return _regenerator.default.awrap(_NativeStripeSdk.default.collectBankAccount(false,clientSecret,params));case 3:_ref4=_context25.sent;setupIntent=_ref4.setupIntent;error=_ref4.error;if(!error){_context25.next=8;break;}return _context25.abrupt("return",{error:error});case 8:return _context25.abrupt("return",{setupIntent:setupIntent});case 11:_context25.prev=11;_context25.t0=_context25["catch"](0);return _context25.abrupt("return",{error:(0,_helpers.createError)(_context25.t0)});case 14:case"end":return _context25.stop();}}},null,null,[[0,11]],Promise);};exports.collectBankAccountForSetup=collectBankAccountForSetup;
2
2
  //# sourceMappingURL=functions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["functions.ts"],"names":["APPLE_PAY_NOT_SUPPORTED_MESSAGE","PAYMENT_INTENT","SETUP_INTENT","createPaymentMethod","data","options","NativeStripeSdk","paymentMethod","error","createToken","params","type","country","toLowerCase","routingNumber","MissingRoutingNumber","token","retrievePaymentIntent","clientSecret","paymentIntent","retrieveSetupIntent","setupIntent","confirmPayment","paymentIntentClientSecret","isApplePaySupported","isiOS","presentApplePay","code","ApplePayError","Canceled","message","updateApplePaySummaryItems","summaryItems","errorAddressFields","confirmApplePayPayment","handleNextAction","handleCardAction","confirmSetupIntent","createTokenForCVCUpdate","cvc","tokenId","handleURLCallback","url","stripeHandled","verifyMicrodepositsForPayment","isAndroid","ConfirmPaymentError","Failed","verifyMicrodeposits","verifyMicrodepositsForSetup","ConfirmSetupIntentError","initPaymentSheet","paymentOption","presentPaymentSheet","confirmPaymentSheetPayment","isGooglePaySupported","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","openApplePaySetup","collectBankAccountForPayment","collectBankAccount","collectBankAccountForSetup"],"mappings":"q9BAAA,kCACA,sCACA,0EACA,8BA+BA,GAAMA,CAAAA,+BAA+B,CACnC,2CADF,CAEA,GAAMC,CAAAA,cAAc,CAAG,SAAvB,CACA,GAAMC,CAAAA,YAAY,CAAG,OAArB,CAEO,GAAMC,CAAAA,mBAAmB,CAAG,iBACjCC,IADiC,0LAEjCC,OAFiC,+CAEY,EAFZ,mEAKQC,yBAAgBH,mBAAhB,CACrCC,IADqC,CAErCC,OAFqC,CALR,6CAKvBE,aALuB,uBAKvBA,aALuB,CAKRC,KALQ,uBAKRA,KALQ,KAS3BA,KAT2B,yDAUtB,CACLA,KAAK,CAALA,KADK,CAVsB,yCAcxB,CACLD,aAAa,CAAEA,aADV,CAdwB,4FAkBxB,CACLC,KAAK,YADA,CAlBwB,4EAA5B,C,gDAwBA,GAAMC,CAAAA,WAAW,CAAG,kBACzBC,MADyB,wLAIvBA,MAAM,CAACC,IAAP,GAAgB,aAAhB,EACA,kBAAAD,MAAM,CAACE,OAAP,+BAAgBC,WAAhB,MAAkC,IADlC,EAEA,CAACH,MAAM,CAACI,aANe,4DAQhB,CACLN,KAAK,CAAEO,4BADF,CARgB,6EAcQT,yBAAgBG,WAAhB,CAA4BC,MAA5B,CAdR,+CAcfM,KAde,wBAcfA,KAde,CAcRR,KAd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CAAE,uCADF,CA7BiC,8EAArC,C,kEAmCA,GAAMsD,CAAAA,0BAA0B,CAAG,mBACxC5C,YADwC,CAExCR,MAFwC,4JAIpCmC,kBAJoC,6DAK/B,CACLrC,KAAK,CAAE,yBAAY,CACjBmB,IAAI,CAAEuB,+BAAwBH,MADb,CAEjBjB,OAAO,CACL,qGAHe,CAAZ,CADF,CAL+B,+EAcAxB,yBAAgBuD,kBAAhB,CACpC3D,YADoC,CAEpCgB,YAFoC,CAGpCR,MAHoC,CAdA,+BAc9BW,WAd8B,OAc9BA,WAd8B,CAcjBb,KAdiB,OAcjBA,KAdiB,KAoBlCA,KApBkC,8DAqB7B,CACLA,KAAK,CAALA,KADK,CArB6B,4CAyB/B,CACLa,WAAW,CAAEA,WADR,CAzB+B,oGA6B/B,CACLb,KAAK,CAAE,uCADF,CA7B+B,8EAAnC,C","sourcesContent":["import { createError, isAndroid, isiOS } from './helpers';\nimport { MissingRoutingNumber } from './types/Errors';\nimport NativeStripeSdk from './NativeStripeSdk';\nimport {\n ApplePay,\n ApplePayError,\n ApplePayResult,\n ConfirmPaymentResult,\n ConfirmPaymentError,\n ConfirmSetupIntentError,\n ConfirmPaymentSheetPaymentResult,\n ConfirmSetupIntent,\n ConfirmSetupIntentResult,\n CreatePaymentMethodResult,\n CreateTokenForCVCUpdateResult,\n CreateTokenResult,\n GooglePayInitResult,\n HandleNextActionResult,\n InitPaymentSheetResult,\n PaymentMethodCreateParams,\n PaymentSheet,\n PayWithGooglePayResult,\n PresentPaymentSheetResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n StripeError,\n GooglePay,\n CreateGooglePayPaymentMethodResult,\n OpenApplePaySetupResult,\n CreateTokenParams,\n VerifyMicrodepositsParams,\n CollectBankAccountParams,\n} from './types';\n\nconst APPLE_PAY_NOT_SUPPORTED_MESSAGE =\n 'Apple pay is not supported on this device';\nconst PAYMENT_INTENT = 'payment';\nconst SETUP_INTENT = 'setup';\n\nexport const createPaymentMethod = async (\n data: PaymentMethodCreateParams.Params,\n options: PaymentMethodCreateParams.Options = {}\n): Promise<CreatePaymentMethodResult> => {\n try {\n const { paymentMethod, error } = await NativeStripeSdk.createPaymentMethod(\n data,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error) {\n return {\n error,\n };\n }\n};\n\nexport const createToken = async (\n params: CreateTokenParams\n): Promise<CreateTokenResult> => {\n if (\n params.type === 'BankAccount' &&\n params.country?.toLowerCase() === 'us' &&\n !params.routingNumber\n ) {\n return {\n error: MissingRoutingNumber,\n };\n }\n\n try {\n const { token, error } = await NativeStripeSdk.createToken(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const retrievePaymentIntent = async (\n clientSecret: string\n): Promise<RetrievePaymentIntentResult> => {\n try {\n const { paymentIntent, error } =\n await NativeStripeSdk.retrievePaymentIntent(clientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error) {\n return {\n error,\n };\n }\n};\n\nexport const retrieveSetupIntent = async (\n clientSecret: string\n): Promise<RetrieveSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.retrieveSetupIntent(\n clientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error) {\n return {\n error,\n };\n }\n};\n\nexport const confirmPayment = async (\n paymentIntentClientSecret: string,\n data: PaymentMethodCreateParams.Params,\n options: PaymentMethodCreateParams.Options = {}\n): Promise<ConfirmPaymentResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.confirmPayment(\n paymentIntentClientSecret,\n data,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error) {\n return {\n error,\n };\n }\n};\n\nexport const isApplePaySupported = async (): Promise<boolean> => {\n return isiOS && (await NativeStripeSdk.isApplePaySupported());\n};\n\nexport const presentApplePay = async (\n params: ApplePay.PresentParams\n): Promise<ApplePayResult> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: createError({\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n }),\n };\n }\n\n try {\n const { paymentMethod, error } = await NativeStripeSdk.presentApplePay(\n params\n );\n if (error) {\n return {\n error,\n };\n }\n return { paymentMethod: paymentMethod! };\n } catch (error) {\n return {\n error,\n };\n }\n};\n\nexport const updateApplePaySummaryItems = async (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }> = []\n): Promise<{ error?: StripeError<ApplePayError> }> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: createError({\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n }),\n };\n }\n\n try {\n await NativeStripeSdk.updateApplePaySummaryItems(\n summaryItems,\n errorAddressFields\n );\n\n return {};\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const confirmApplePayPayment = async (\n clientSecret: string\n): Promise<{ error?: StripeError<ApplePayError> }> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: createError({\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n }),\n };\n }\n try {\n await NativeStripeSdk.confirmApplePayPayment(clientSecret);\n return {};\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const handleNextAction = async (\n paymentIntentClientSecret: string\n): Promise<HandleNextActionResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.handleNextAction(\n paymentIntentClientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\n/**\n * @deprecated This method is deprecated, you should use `handleNextAction` as a drop-in replacement instead.\n */\nexport const handleCardAction = async (\n paymentIntentClientSecret: string\n): Promise<HandleNextActionResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.handleNextAction(\n paymentIntentClientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const confirmSetupIntent = async (\n paymentIntentClientSecret: string,\n data: ConfirmSetupIntent.Params,\n options: ConfirmSetupIntent.Options = {}\n): Promise<ConfirmSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.confirmSetupIntent(\n paymentIntentClientSecret,\n data,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const createTokenForCVCUpdate = async (\n cvc: string\n): Promise<CreateTokenForCVCUpdateResult> => {\n try {\n const { tokenId, error } = await NativeStripeSdk.createTokenForCVCUpdate(\n cvc\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n tokenId: tokenId!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const handleURLCallback = async (url: string): Promise<boolean> => {\n const stripeHandled = await NativeStripeSdk.handleURLCallback(url);\n return stripeHandled;\n};\n\nexport const verifyMicrodepositsForPayment = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<ConfirmPaymentResult> => {\n if (isAndroid) {\n return {\n error: createError({\n code: ConfirmPaymentError.Failed,\n message:\n 'verifyMicrodepositsForPayment is only supported on iOS on this version of @stripe/stripe-react-native. Please verify with paymentIntent.nextAction.redirectUrl',\n }),\n };\n }\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n PAYMENT_INTENT,\n clientSecret,\n params\n )) as ConfirmPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const verifyMicrodepositsForSetup = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<ConfirmSetupIntentResult> => {\n if (isAndroid) {\n return {\n error: createError({\n code: ConfirmSetupIntentError.Failed,\n message:\n 'verifyMicrodepositsForSetup is only supported on iOS on this version of @stripe/stripe-react-native. Please verify with setupIntent.nextAction.redirectUrl',\n }),\n };\n }\n try {\n const { setupIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n SETUP_INTENT,\n clientSecret,\n params\n )) as ConfirmSetupIntentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const initPaymentSheet = async (\n params: PaymentSheet.SetupParams\n): Promise<InitPaymentSheetResult> => {\n try {\n const { paymentOption, error } = await NativeStripeSdk.initPaymentSheet(\n params\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const presentPaymentSheet =\n async (): Promise<PresentPaymentSheetResult> => {\n try {\n const { paymentOption, error } =\n await NativeStripeSdk.presentPaymentSheet();\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption: paymentOption,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n };\n\nexport const confirmPaymentSheetPayment =\n async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n try {\n const { error } = await NativeStripeSdk.confirmPaymentSheetPayment();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n };\n\nexport const isGooglePaySupported = async (\n params?: GooglePay.IsGooglePaySupportedParams\n): Promise<boolean> => {\n return (\n isAndroid && (await NativeStripeSdk.isGooglePaySupported(params ?? {}))\n );\n};\n\nexport const initGooglePay = async (\n params: GooglePay.InitParams\n): Promise<GooglePayInitResult> => {\n try {\n const { error } = await NativeStripeSdk.initGooglePay(params);\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const presentGooglePay = async (\n params: GooglePay.SetupIntentParams\n): Promise<PayWithGooglePayResult> => {\n try {\n const { error } = await NativeStripeSdk.presentGooglePay(params);\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const createGooglePayPaymentMethod = async (\n params: GooglePay.CreatePaymentMethodParams\n): Promise<CreateGooglePayPaymentMethodResult> => {\n try {\n const { error, paymentMethod } =\n await NativeStripeSdk.createGooglePayPaymentMethod(params);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const openApplePaySetup = async (): Promise<OpenApplePaySetupResult> => {\n try {\n const { error } = await NativeStripeSdk.openApplePaySetup();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const collectBankAccountForPayment = async (\n clientSecret: string,\n params: CollectBankAccountParams\n): Promise<ConfirmPaymentResult> => {\n if (isAndroid) {\n return {\n error: createError({\n code: ConfirmPaymentError.Failed,\n message:\n 'collectBankAccountForPayment is only supported on iOS on this version of @stripe/stripe-react-native.',\n }),\n };\n }\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.collectBankAccount(\n PAYMENT_INTENT,\n clientSecret,\n params\n )) as ConfirmPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const collectBankAccountForSetup = async (\n clientSecret: string,\n params: CollectBankAccountParams\n): Promise<ConfirmSetupIntentResult> => {\n if (isAndroid) {\n return {\n error: createError({\n code: ConfirmSetupIntentError.Failed,\n message:\n 'collectBankAccountForSetup is only supported on iOS on this version of @stripe/stripe-react-native.',\n }),\n };\n }\n try {\n const { setupIntent, error } = (await NativeStripeSdk.collectBankAccount(\n SETUP_INTENT,\n clientSecret,\n params\n )) as ConfirmSetupIntentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error) {\n return {\n error: createError(error),\n };\n }\n};\n"]}
1
+ {"version":3,"sources":["functions.ts"],"names":["APPLE_PAY_NOT_SUPPORTED_MESSAGE","createPaymentMethod","params","options","NativeStripeSdk","paymentMethod","error","createToken","type","country","toLowerCase","routingNumber","MissingRoutingNumber","token","retrievePaymentIntent","clientSecret","paymentIntent","retrieveSetupIntent","setupIntent","confirmPayment","paymentIntentClientSecret","isApplePaySupported","isiOS","presentApplePay","code","ApplePayError","Canceled","message","updateApplePaySummaryItems","summaryItems","errorAddressFields","confirmApplePayPayment","handleNextAction","confirmSetupIntent","createTokenForCVCUpdate","cvc","tokenId","handleURLCallback","url","stripeHandled","verifyMicrodepositsForPayment","verifyMicrodeposits","verifyMicrodepositsForSetup","initPaymentSheet","paymentOption","presentPaymentSheet","confirmPaymentSheetPayment","isGooglePaySupported","isAndroid","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","openApplePaySetup","collectBankAccountForPayment","collectBankAccount","collectBankAccountForSetup"],"mappings":"47BAAA,kCACA,sCACA,0EACA,8BAiCA,GAAMA,CAAAA,+BAA+B,CACnC,2CADF,CAGO,GAAMC,CAAAA,mBAAmB,CAAG,iBACjCC,MADiC,0LAEjCC,OAFiC,+CAEM,EAFN,mEAKQC,yBAAgBH,mBAAhB,CACrCC,MADqC,CAErCC,OAFqC,CALR,6CAKvBE,aALuB,uBAKvBA,aALuB,CAKRC,KALQ,uBAKRA,KALQ,KAS3BA,KAT2B,yDAUtB,CACLA,KAAK,CAALA,KADK,CAVsB,yCAcxB,CACLD,aAAa,CAAEA,aADV,CAdwB,4FAkBxB,CACLC,KAAK,YADA,CAlBwB,4EAA5B,C,gDAwBA,GAAMC,CAAAA,WAAW,CAAG,kBACzBL,MADyB,wLAIvBA,MAAM,CAACM,IAAP,GAAgB,aAAhB,EACA,kBAAAN,MAAM,C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A,iBAAiB,CAAG,uPAELhD,yBAAgBgD,iBAAhB,EAFK,iDAErB9C,KAFqB,yBAErBA,KAFqB,KAGzBA,KAHyB,6DAIpB,CACLA,KAAK,CAALA,KADK,CAJoB,2CAQtB,EARsB,oGAUtB,CACLA,KAAK,cADA,CAVsB,8EAA1B,C,4CAgBA,GAAM+C,CAAAA,4BAA4B,CAAG,mBAC1CtC,YAD0C,CAE1Cb,MAF0C,gOAKAE,yBAAgBkD,kBAAhB,CACtC,IADsC,CAEtCvC,YAFsC,CAGtCb,MAHsC,CALA,+BAKhCc,aALgC,OAKhCA,aALgC,CAKjBV,KALiB,OAKjBA,KALiB,KAWpCA,KAXoC,6DAY/B,CACLA,KAAK,CAALA,KADK,CAZ+B,2CAgBjC,CACLU,aAAa,CAAEA,aADV,CAhBiC,oGAoBjC,CACLV,KAAK,CAAE,uCADF,CApBiC,8EAArC,C,kEA0BA,GAAMiD,CAAAA,0BAA0B,CAAG,mBACxCxC,YADwC,CAExCb,MAFwC,8NAKAE,yBAAgBkD,kBAAhB,CACpC,KADoC,CAEpCvC,YAFoC,CAGpCb,MAHoC,CALA,+BAK9BgB,WAL8B,OAK9BA,WAL8B,CAKjBZ,KALiB,OAKjBA,KALiB,KAWlCA,KAXkC,6DAY7B,CACLA,KAAK,CAALA,KADK,CAZ6B,2CAgB/B,CACLY,WAAW,CAAEA,WADR,CAhB+B,oGAoB/B,CACLZ,KAAK,CAAE,uCADF,CApB+B,8EAAnC,C","sourcesContent":["import { isAndroid, isiOS, createError } from './helpers';\nimport { MissingRoutingNumber } from './types/Errors';\nimport NativeStripeSdk from './NativeStripeSdk';\nimport {\n ApplePay,\n ApplePayError,\n ApplePayResult,\n ConfirmPaymentResult,\n ConfirmPaymentSheetPaymentResult,\n SetupIntent,\n PaymentIntent,\n ConfirmSetupIntentResult,\n CreatePaymentMethodResult,\n CreateTokenForCVCUpdateResult,\n CreateTokenResult,\n GooglePayInitResult,\n HandleNextActionResult,\n InitPaymentSheetResult,\n PaymentMethod,\n PaymentSheet,\n PayWithGooglePayResult,\n PresentPaymentSheetResult,\n RetrievePaymentIntentResult,\n RetrieveSetupIntentResult,\n StripeError,\n GooglePay,\n CreateGooglePayPaymentMethodResult,\n OpenApplePaySetupResult,\n Token,\n VerifyMicrodepositsParams,\n VerifyMicrodepositsForPaymentResult,\n VerifyMicrodepositsForSetupResult,\n CollectBankAccountForPaymentResult,\n CollectBankAccountForSetupResult,\n} from './types';\n\nconst APPLE_PAY_NOT_SUPPORTED_MESSAGE =\n 'Apple pay is not supported on this device';\n\nexport const createPaymentMethod = async (\n params: PaymentMethod.CreateParams,\n options: PaymentMethod.CreateOptions = {}\n): Promise<CreatePaymentMethodResult> => {\n try {\n const { paymentMethod, error } = await NativeStripeSdk.createPaymentMethod(\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createToken = async (\n params: Token.CreateParams\n): Promise<CreateTokenResult> => {\n if (\n params.type === 'BankAccount' &&\n params.country?.toLowerCase() === 'us' &&\n !params.routingNumber\n ) {\n return {\n error: MissingRoutingNumber,\n };\n }\n\n try {\n const { token, error } = await NativeStripeSdk.createToken(params);\n\n if (error) {\n return {\n error,\n };\n }\n return {\n token: token!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrievePaymentIntent = async (\n clientSecret: string\n): Promise<RetrievePaymentIntentResult> => {\n try {\n const { paymentIntent, error } =\n await NativeStripeSdk.retrievePaymentIntent(clientSecret);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const retrieveSetupIntent = async (\n clientSecret: string\n): Promise<RetrieveSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.retrieveSetupIntent(\n clientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const confirmPayment = async (\n paymentIntentClientSecret: string,\n params: PaymentIntent.ConfirmParams,\n options: PaymentIntent.ConfirmOptions = {}\n): Promise<ConfirmPaymentResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.confirmPayment(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const isApplePaySupported = async (): Promise<boolean> => {\n return isiOS && (await NativeStripeSdk.isApplePaySupported());\n};\n\nexport const presentApplePay = async (\n params: ApplePay.PresentParams\n): Promise<ApplePayResult> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: {\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n },\n };\n }\n\n try {\n const { paymentMethod, error } = await NativeStripeSdk.presentApplePay(\n params\n );\n if (error) {\n return {\n error,\n };\n }\n return { paymentMethod: paymentMethod! };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const updateApplePaySummaryItems = async (\n summaryItems: ApplePay.CartSummaryItem[],\n errorAddressFields: Array<{\n field: ApplePay.AddressFields;\n message?: string;\n }> = []\n): Promise<{ error?: StripeError<ApplePayError> }> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: {\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n },\n };\n }\n\n try {\n await NativeStripeSdk.updateApplePaySummaryItems(\n summaryItems,\n errorAddressFields\n );\n\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const confirmApplePayPayment = async (\n clientSecret: string\n): Promise<{ error?: StripeError<ApplePayError> }> => {\n if (!(await NativeStripeSdk.isApplePaySupported())) {\n return {\n error: {\n code: ApplePayError.Canceled,\n message: APPLE_PAY_NOT_SUPPORTED_MESSAGE,\n },\n };\n }\n try {\n await NativeStripeSdk.confirmApplePayPayment(clientSecret);\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const handleNextAction = async (\n paymentIntentClientSecret: string\n): Promise<HandleNextActionResult> => {\n try {\n const { paymentIntent, error } = await NativeStripeSdk.handleNextAction(\n paymentIntentClientSecret\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const confirmSetupIntent = async (\n paymentIntentClientSecret: string,\n params: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n): Promise<ConfirmSetupIntentResult> => {\n try {\n const { setupIntent, error } = await NativeStripeSdk.confirmSetupIntent(\n paymentIntentClientSecret,\n params,\n options\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createTokenForCVCUpdate = async (\n cvc: string\n): Promise<CreateTokenForCVCUpdateResult> => {\n try {\n const { tokenId, error } = await NativeStripeSdk.createTokenForCVCUpdate(\n cvc\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n tokenId: tokenId!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const handleURLCallback = async (url: string): Promise<boolean> => {\n const stripeHandled = await NativeStripeSdk.handleURLCallback(url);\n return stripeHandled;\n};\n\nexport const verifyMicrodepositsForPayment = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n true,\n clientSecret,\n params\n )) as VerifyMicrodepositsForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const verifyMicrodepositsForSetup = async (\n clientSecret: string,\n params: VerifyMicrodepositsParams\n): Promise<VerifyMicrodepositsForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.verifyMicrodeposits(\n false,\n clientSecret,\n params\n )) as VerifyMicrodepositsForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const initPaymentSheet = async (\n params: PaymentSheet.SetupParams\n): Promise<InitPaymentSheetResult> => {\n try {\n const { paymentOption, error } = await NativeStripeSdk.initPaymentSheet(\n params\n );\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const presentPaymentSheet =\n async (): Promise<PresentPaymentSheetResult> => {\n try {\n const { paymentOption, error } =\n await NativeStripeSdk.presentPaymentSheet();\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentOption: paymentOption,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\nexport const confirmPaymentSheetPayment =\n async (): Promise<ConfirmPaymentSheetPaymentResult> => {\n try {\n const { error } = await NativeStripeSdk.confirmPaymentSheetPayment();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n };\n\nexport const isGooglePaySupported = async (\n params?: GooglePay.IsSupportedParams\n): Promise<boolean> => {\n return (\n isAndroid && (await NativeStripeSdk.isGooglePaySupported(params ?? {}))\n );\n};\n\nexport const initGooglePay = async (\n params: GooglePay.InitParams\n): Promise<GooglePayInitResult> => {\n try {\n const { error } = await NativeStripeSdk.initGooglePay(params);\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const presentGooglePay = async (\n params: GooglePay.PresentParams\n): Promise<PayWithGooglePayResult> => {\n try {\n const { error } = await NativeStripeSdk.presentGooglePay(params);\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const createGooglePayPaymentMethod = async (\n params: GooglePay.CreatePaymentMethodParams\n): Promise<CreateGooglePayPaymentMethodResult> => {\n try {\n const { error, paymentMethod } =\n await NativeStripeSdk.createGooglePayPaymentMethod(params);\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentMethod: paymentMethod!,\n };\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const openApplePaySetup = async (): Promise<OpenApplePaySetupResult> => {\n try {\n const { error } = await NativeStripeSdk.openApplePaySetup();\n if (error) {\n return {\n error,\n };\n }\n return {};\n } catch (error: any) {\n return {\n error,\n };\n }\n};\n\nexport const collectBankAccountForPayment = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForPaymentResult> => {\n try {\n const { paymentIntent, error } = (await NativeStripeSdk.collectBankAccount(\n true,\n clientSecret,\n params\n )) as CollectBankAccountForPaymentResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n paymentIntent: paymentIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n\nexport const collectBankAccountForSetup = async (\n clientSecret: string,\n params: PaymentMethod.CollectBankAccountParams\n): Promise<CollectBankAccountForSetupResult> => {\n try {\n const { setupIntent, error } = (await NativeStripeSdk.collectBankAccount(\n false,\n clientSecret,\n params\n )) as CollectBankAccountForSetupResult;\n\n if (error) {\n return {\n error,\n };\n }\n return {\n setupIntent: setupIntent!,\n };\n } catch (error: any) {\n return {\n error: createError(error),\n };\n }\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["helpers.ts"],"names":["TextInputState","require","shouldAttributeExpo","NativeModules","NativeUnimoduleProxy","isiOS","Platform","OS","isAndroid","createError","error","code","message","localizedMessage","declineCode","stripeErrorCode","type","unsupportedMethodMessage","field","focusInput","ref","__DEV__","console","log","registerInput","unregisterInput","currentlyFocusedInput"],"mappings":"4RACA,yCAEA,GAAMA,CAAAA,cAAc,CAAGC,OAAO,CAAC,4DAAD,CAA9B,CAOO,GAAMC,CAAAA,mBAAmB,CAAG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C,oCAUA,GAAMQ,CAAAA,eAAe,CAAG,QAAlBA,CAAAA,eAAkB,CAACL,GAAD,CAAsC,CACnE,GAAI,mBAAqBpB,CAAAA,cAAzB,CAAyC,CACvCA,cAAc,CAACyB,eAAf,CAA+BL,GAA/B,EACD,CAFD,IAEO,CACL,GAAIC,OAAJ,CAAa,CACXC,OAAO,CAACC,GAAR,CAAYN,wBAAwB,CAAC,iBAAD,CAApC,EACD,CACF,CACF,CARM,C,wCAUA,GAAMS,CAAAA,qBAAqB,CAAG,QAAxBA,CAAAA,qBAAwB,EAAM,CACzC,GAAI,yBAA2B1B,CAAAA,cAA/B,CAA+C,CAC7C,MAAOA,CAAAA,cAAc,CAAC0B,qBAAf,EAAP,CACD,CAFD,IAEO,CACL,GAAIL,OAAJ,CAAa,CACXC,OAAO,CAACC,GAAR,CAAYN,wBAAwB,CAAC,uBAAD,CAApC,EACD,CACF,CACF,CARM,C","sourcesContent":["import type { StripeError } from './types';\nimport { Platform, NativeModules } from 'react-native';\n\nconst TextInputState = require('react-native/Libraries/Components/TextInput/TextInputState');\n\n/**\n * Determines whether or not this library is being used inside of\n * an \"Expo\" project by identifying if Expo's native module\n * infrastructure (react-native-unimodules) is available.\n */\nexport const shouldAttributeExpo = () => {\n try {\n return !!NativeModules.NativeUnimoduleProxy;\n } catch {\n return false;\n }\n};\n\nexport const isiOS = Platform.OS === 'ios';\nexport const isAndroid = Platform.OS === 'android';\n\nexport function createError<T>(error: StripeError<T>) {\n return {\n code: error.code,\n message: error.message,\n localizedMessage: error.localizedMessage,\n declineCode: error.declineCode,\n stripeErrorCode: error.stripeErrorCode,\n type: error.type,\n };\n}\n\nexport const unsupportedMethodMessage = (field: string) =>\n `${field} method is not supported. Consider to upgrade react-native version to 0.63.x or higher`;\n\nexport const focusInput = (ref: React.MutableRefObject<any>) => {\n if ('focusInput' in TextInputState) {\n TextInputState.focusInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('focusInput'));\n }\n }\n};\n\nexport const registerInput = (ref: React.MutableRefObject<any>) => {\n if ('registerInput' in TextInputState) {\n TextInputState.registerInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('registerInput'));\n }\n }\n};\n\nexport const unregisterInput = (ref: React.MutableRefObject<any>) => {\n if ('unregisterInput' in TextInputState) {\n TextInputState.unregisterInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('unregisterInput'));\n }\n }\n};\n\nexport const currentlyFocusedInput = () => {\n if ('currentlyFocusedInput' in TextInputState) {\n return TextInputState.currentlyFocusedInput();\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('currentlyFocusedInput'));\n }\n }\n};\n"]}
1
+ {"version":3,"sources":["helpers.ts"],"names":["TextInputState","require","shouldAttributeExpo","NativeModules","NativeUnimoduleProxy","isiOS","Platform","OS","isAndroid","createError","error","code","message","localizedMessage","declineCode","stripeErrorCode","type","unsupportedMethodMessage","field","focusInput","ref","__DEV__","console","log","registerInput","unregisterInput","currentlyFocusedInput"],"mappings":"4RAGA,yCACA,GAAMA,CAAAA,cAAc,CAAGC,OAAO,CAAC,4DAAD,CAA9B,CAOO,GAAMC,CAAAA,mBAAmB,CAAG,QAAtBA,CAAAA,mBAAsB,EAAM,CACvC,GAAI,CACF,MAAO,CAAC,CAACC,2BAAcC,oBAAvB,CACD,CAAC,cAAM,CACN,MAAO,MAAP,CACD,CACF,CANM,C,gDAQA,GAAMC,CAAAA,KAAK,CAAGC,sBAASC,EAAT,GAAgB,KAA9B,C,oBACA,GAAMC,CAAAA,SAAS,CAAGF,sBAASC,EAAT,GAAgB,SAAlC,C,4BAEA,QAASE,CAAAA,WAAT,CAAwBC,KAAxB,CAA+C,CACpD,MAAO,CACLC,IAAI,CAAED,KAAK,CAACC,IADP,CAELC,OAAO,CAAEF,KAAK,CAACE,OAFV,CAGLC,gBAAgB,CAAEH,KAAK,CAACG,gBAHnB,CAILC,WAAW,CAAEJ,KAAK,CAACI,WAJd,CAKLC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,CAAa,CACXC,OAAO,CAACC,GAAR,CAAYN,wBAAwB,CAAC,uBAAD,CAApC,EACD,CACF,CACF,CARM,C","sourcesContent":["import type React from 'react';\nimport type { StripeError } from './types';\n\nimport { Platform, NativeModules } from 'react-native';\nconst TextInputState = require('react-native/Libraries/Components/TextInput/TextInputState');\n\n/**\n * Determines whether or not this library is being used inside of\n * an \"Expo\" project by identifying if Expo's native module\n * infrastructure (react-native-unimodules AKA expo-modules) is available.\n */\nexport const shouldAttributeExpo = () => {\n try {\n return !!NativeModules.NativeUnimoduleProxy;\n } catch {\n return false;\n }\n};\n\nexport const isiOS = Platform.OS === 'ios';\nexport const isAndroid = Platform.OS === 'android';\n\nexport function createError<T>(error: StripeError<T>) {\n return {\n code: error.code,\n message: error.message,\n localizedMessage: error.localizedMessage,\n declineCode: error.declineCode,\n stripeErrorCode: error.stripeErrorCode,\n type: error.type,\n };\n}\n\nexport const unsupportedMethodMessage = (field: string) =>\n `${field} method is not supported. Consider to upgrade react-native version to 0.63.x or higher`;\n\nexport const focusInput = (ref: React.MutableRefObject<any>) => {\n if ('focusInput' in TextInputState) {\n TextInputState.focusInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('focusInput'));\n }\n }\n};\n\nexport const registerInput = (ref: React.MutableRefObject<any>) => {\n if ('registerInput' in TextInputState) {\n TextInputState.registerInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('registerInput'));\n }\n }\n};\n\nexport const unregisterInput = (ref: React.MutableRefObject<any>) => {\n if ('unregisterInput' in TextInputState) {\n TextInputState.unregisterInput(ref);\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('unregisterInput'));\n }\n }\n};\n\nexport const currentlyFocusedInput = () => {\n if ('currentlyFocusedInput' in TextInputState) {\n return TextInputState.currentlyFocusedInput();\n } else {\n if (__DEV__) {\n console.log(unsupportedMethodMessage('currentlyFocusedInput'));\n }\n }\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["useConfirmPayment.tsx"],"names":["useConfirmPayment","loading","setLoading","confirmPayment","_confirmPayment","paymentIntentClientSecret","data","options","result"],"mappings":"mWAAA,4BAEA,uCAKO,QAASA,CAAAA,iBAAT,EAA6B,CAClC,cAA8B,oBAAS,KAAT,CAA9B,qDAAOC,OAAP,eAAgBC,UAAhB,eACA,eAA2B,2BAA3B,CAAQC,cAAR,YAAQA,cAAR,CAEA,GAAMC,CAAAA,eAAe,CAAG,uBACtB,iBACEC,yBADF,CAEEC,IAFF,uJAGEC,OAHF,+CAG+C,EAH/C,CAKEL,UAAU,CAAC,IAAD,CAAV,CALF,kDAOuBC,cAAc,CACjCE,yBADiC,CAEjCC,IAFiC,CAGjCC,OAHiC,CAPrC,SAOQC,MAPR,eAaEN,UAAU,CAAC,KAAD,CAAV,CAbF,gCAeSM,MAfT,uEADsB,CAkBtB,CAACL,cAAD,CAlBsB,CAAxB,CAqBA,MAAO,CACLA,cAAc,CAAEC,eADX,CAELH,OAAO,CAAPA,OAFK,CAAP,CAID","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { PaymentMethodCreateParams } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmPayment hook\n */\nexport function useConfirmPayment() {\n const [loading, setLoading] = useState(false);\n const { confirmPayment } = useStripe();\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: PaymentMethodCreateParams.Params,\n options: PaymentMethodCreateParams.Options = {}\n ) => {\n setLoading(true);\n\n const result = await confirmPayment(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmPayment]\n );\n\n return {\n confirmPayment: _confirmPayment,\n loading,\n };\n}\n"]}
1
+ {"version":3,"sources":["useConfirmPayment.tsx"],"names":["useConfirmPayment","loading","setLoading","confirmPayment","_confirmPayment","paymentIntentClientSecret","data","options","result"],"mappings":"mWAAA,4BAEA,uCAKO,QAASA,CAAAA,iBAAT,EAA6B,CAClC,cAA8B,oBAAS,KAAT,CAA9B,qDAAOC,OAAP,eAAgBC,UAAhB,eACA,eAA2B,2BAA3B,CAAQC,cAAR,YAAQA,cAAR,CAEA,GAAMC,CAAAA,eAAe,CAAG,uBACtB,iBACEC,yBADF,CAEEC,IAFF,uJAGEC,OAHF,+CAG0C,EAH1C,CAKEL,UAAU,CAAC,IAAD,CAAV,CALF,kDAOuBC,cAAc,CACjCE,yBADiC,CAEjCC,IAFiC,CAGjCC,OAHiC,CAPrC,SAOQC,MAPR,eAaEN,UAAU,CAAC,KAAD,CAAV,CAbF,gCAeSM,MAfT,uEADsB,CAkBtB,CAACL,cAAD,CAlBsB,CAAxB,CAqBA,MAAO,CACLA,cAAc,CAAEC,eADX,CAELH,OAAO,CAAPA,OAFK,CAAP,CAID","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { PaymentMethod } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmPayment hook\n */\nexport function useConfirmPayment() {\n const [loading, setLoading] = useState(false);\n const { confirmPayment } = useStripe();\n\n const _confirmPayment = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: PaymentMethod.ConfirmParams,\n options: PaymentMethod.ConfirmOptions = {}\n ) => {\n setLoading(true);\n\n const result = await confirmPayment(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmPayment]\n );\n\n return {\n confirmPayment: _confirmPayment,\n loading,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["useConfirmSetupIntent.tsx"],"names":["useConfirmSetupIntent","loading","setLoading","confirmSetupIntent","_confirmSetupIntent","paymentIntentClientSecret","data","options","result"],"mappings":"2WAAA,4BAEA,uCAKO,QAASA,CAAAA,qBAAT,EAAiC,CACtC,cAA8B,oBAAS,KAAT,CAA9B,qDAAOC,OAAP,eAAgBC,UAAhB,eACA,eAAmD,2BAAnD,CAA4BC,kBAA5B,YAAQA,kBAAR,CAEA,GAAMC,CAAAA,mBAAmB,CAAG,uBAC1B,iBACEC,yBADF,CAEEC,IAFF,uJAGEC,OAHF,+CAGwC,EAHxC,CAKEL,UAAU,CAAC,IAAD,CAAV,CALF,kDAOuBC,kBAAkB,CACrCE,yBADqC,CAErCC,IAFqC,CAGrCC,OAHqC,CAPzC,SAOQC,MAPR,eAaEN,UAAU,CAAC,KAAD,CAAV,CAbF,gCAeSM,MAfT,uEAD0B,CAkB1B,CAACL,kBAAD,CAlB0B,CAA5B,CAqBA,MAAO,CACLA,kBAAkB,CAAEC,mBADf,CAELH,OAAO,CAAPA,OAFK,CAAP,CAID","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { ConfirmSetupIntent } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmSetupIntent hook\n */\nexport function useConfirmSetupIntent() {\n const [loading, setLoading] = useState(false);\n const { confirmSetupIntent: confirmSetupIntent } = useStripe();\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: ConfirmSetupIntent.Params,\n options: ConfirmSetupIntent.Options = {}\n ) => {\n setLoading(true);\n\n const result = await confirmSetupIntent(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmSetupIntent]\n );\n\n return {\n confirmSetupIntent: _confirmSetupIntent,\n loading,\n };\n}\n"]}
1
+ {"version":3,"sources":["useConfirmSetupIntent.tsx"],"names":["useConfirmSetupIntent","loading","setLoading","confirmSetupIntent","_confirmSetupIntent","paymentIntentClientSecret","data","options","result"],"mappings":"2WAAA,4BAEA,uCAKO,QAASA,CAAAA,qBAAT,EAAiC,CACtC,cAA8B,oBAAS,KAAT,CAA9B,qDAAOC,OAAP,eAAgBC,UAAhB,eACA,eAAmD,2BAAnD,CAA4BC,kBAA5B,YAAQA,kBAAR,CAEA,GAAMC,CAAAA,mBAAmB,CAAG,uBAC1B,iBACEC,yBADF,CAEEC,IAFF,uJAGEC,OAHF,+CAGwC,EAHxC,CAKEL,UAAU,CAAC,IAAD,CAAV,CALF,kDAOuBC,kBAAkB,CACrCE,yBADqC,CAErCC,IAFqC,CAGrCC,OAHqC,CAPzC,SAOQC,MAPR,eAaEN,UAAU,CAAC,KAAD,CAAV,CAbF,gCAeSM,MAfT,uEAD0B,CAkB1B,CAACL,kBAAD,CAlB0B,CAA5B,CAqBA,MAAO,CACLA,kBAAkB,CAAEC,mBADf,CAELH,OAAO,CAAPA,OAFK,CAAP,CAID","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { SetupIntent } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useConfirmSetupIntent hook\n */\nexport function useConfirmSetupIntent() {\n const [loading, setLoading] = useState(false);\n const { confirmSetupIntent: confirmSetupIntent } = useStripe();\n\n const _confirmSetupIntent = useCallback(\n async (\n paymentIntentClientSecret: string,\n data: SetupIntent.ConfirmParams,\n options: SetupIntent.ConfirmOptions = {}\n ) => {\n setLoading(true);\n\n const result = await confirmSetupIntent(\n paymentIntentClientSecret,\n data,\n options\n );\n\n setLoading(false);\n\n return result;\n },\n [confirmSetupIntent]\n );\n\n return {\n confirmSetupIntent: _confirmSetupIntent,\n loading,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["useGooglePay.tsx"],"names":["useGooglePay","isGooglePaySupported","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","loading","setLoading","_isGooglePaySupported","params","result","_initGooglePay","_presentGooglePay","_createGooglePayPaymentMethod"],"mappings":"yVAAA,4BAEA,uCAKO,QAASA,CAAAA,YAAT,EAAwB,CAC7B,eAKI,2BALJ,CACEC,oBADF,YACEA,oBADF,CAEEC,aAFF,YAEEA,aAFF,CAGEC,gBAHF,YAGEA,gBAHF,CAIEC,4BAJF,YAIEA,4BAJF,CAMA,cAA8B,oBAAS,KAAT,CAA9B,qDAAOC,OAAP,eAAgBC,UAAhB,eAEA,GAAMC,CAAAA,qBAAqB,CAAG,uBAC5B,iBAAOC,MAAP,+HACEF,UAAU,CAAC,IAAD,CAAV,CADF,kDAGuBL,oBAAoB,CAACO,MAAD,CAH3C,SAGQC,MAHR,eAIEH,UAAU,CAAC,KAAD,CAAV,CAJF,gCAMSG,MANT,uEAD4B,CAS5B,CAACR,oBAAD,CAT4B,CAA9B,CAYA,GAAMS,CAAAA,cAAc,CAAG,uBACrB,kBAAOF,MAAP,mIACEF,UAAU,CAAC,IAAD,CAAV,CADF,mDAGuBJ,aAAa,CAACM,MAAD,CAHpC,SAGQC,MAHR,gBAIEH,UAAU,CAAC,KAAD,CAAV,CAJF,iCAMSG,MANT,wEADqB,CASrB,CAACP,aAAD,CATqB,CAAvB,CAYA,GAAMS,CAAAA,iBAAiB,CAAG,uBACxB,kBAAOH,MAAP,mIACEF,UAAU,CAAC,IAAD,CAAV,CADF,mDAGuBH,gBAAgB,CAACK,MAAD,CAHvC,SAGQC,MAHR,gBAIEH,UAAU,CAAC,KAAD,CAAV,CAJF,iCAMSG,MANT,wEADwB,CASxB,CAACN,gBAAD,CATwB,CAA1B,CAYA,GAAMS,CAAAA,6BAA6B,CAAG,uBACpC,kBAAOJ,MAAP,mIACEF,UAAU,CAAC,IAAD,CAAV,CADF,mDAGuBF,4BAA4B,CAACI,MAAD,CAHnD,SAGQC,MAHR,gBAIEH,UAAU,CAAC,KAAD,CAAV,CAJF,iCAMSG,MANT,wEADoC,CASpC,CAACL,4BAAD,CAToC,CAAtC,CAYA,MAAO,CACLC,OAAO,CAAPA,OADK,CAELJ,oBAAoB,CAAEM,qBAFjB,CAGLL,aAAa,CAAEQ,cAHV,CAILP,gBAAgB,CAAEQ,iBAJb,CAKLP,4BAA4B,CAAEQ,6BALzB,CAAP,CAOD","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { GooglePay } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useGooglePay hook\n */\nexport function useGooglePay() {\n const {\n isGooglePaySupported,\n initGooglePay,\n presentGooglePay,\n createGooglePayPaymentMethod,\n } = useStripe();\n const [loading, setLoading] = useState(false);\n\n const _isGooglePaySupported = useCallback(\n async (params?: GooglePay.IsGooglePaySupportedParams) => {\n setLoading(true);\n\n const result = await isGooglePaySupported(params);\n setLoading(false);\n\n return result;\n },\n [isGooglePaySupported]\n );\n\n const _initGooglePay = useCallback(\n async (params: GooglePay.InitParams) => {\n setLoading(true);\n\n const result = await initGooglePay(params);\n setLoading(false);\n\n return result;\n },\n [initGooglePay]\n );\n\n const _presentGooglePay = useCallback(\n async (params: GooglePay.PresentGooglePayParams) => {\n setLoading(true);\n\n const result = await presentGooglePay(params);\n setLoading(false);\n\n return result;\n },\n [presentGooglePay]\n );\n\n const _createGooglePayPaymentMethod = useCallback(\n async (params: GooglePay.CreatePaymentMethodParams) => {\n setLoading(true);\n\n const result = await createGooglePayPaymentMethod(params);\n setLoading(false);\n\n return result;\n },\n [createGooglePayPaymentMethod]\n );\n\n return {\n loading,\n isGooglePaySupported: _isGooglePaySupported,\n initGooglePay: _initGooglePay,\n presentGooglePay: _presentGooglePay,\n createGooglePayPaymentMethod: _createGooglePayPaymentMethod,\n };\n}\n"]}
1
+ {"version":3,"sources":["useGooglePay.tsx"],"names":["useGooglePay","isGooglePaySupported","initGooglePay","presentGooglePay","createGooglePayPaymentMethod","loading","setLoading","_isGooglePaySupported","params","result","_initGooglePay","_presentGooglePay","_createGooglePayPaymentMethod"],"mappings":"yVAAA,4BAEA,uCAKO,QAASA,CAAAA,YAAT,EAAwB,CAC7B,eAKI,2BALJ,CACEC,oBADF,YACEA,oBADF,CAEEC,aAFF,YAEEA,aAFF,CAGEC,gBAHF,YAGEA,gBAHF,CAIEC,4BAJF,YAIEA,4BAJF,CAMA,cAA8B,oBAAS,KAAT,CAA9B,qDAAOC,OAAP,eAAgBC,UAAhB,eAEA,GAAMC,CAAAA,qBAAqB,CAAG,uBAC5B,iBAAOC,MAAP,+HACEF,UAAU,CAAC,IAAD,CAAV,CADF,kDAGuBL,oBAAoB,CAACO,MAAD,CAH3C,SAGQC,MAHR,eAIEH,UAAU,CAAC,KAAD,CAAV,CAJF,gCAMSG,MANT,uEAD4B,CAS5B,CAACR,oBAAD,CAT4B,CAA9B,CAYA,GAAMS,CAAAA,cAAc,CAAG,uBACrB,kBAAOF,MAAP,mIACEF,UAAU,CAAC,IAAD,CAAV,CADF,mDAGuBJ,aAAa,CAACM,MAAD,CAHpC,SAGQC,MAHR,gBAIEH,UAAU,CAAC,KAAD,CAAV,CAJF,iCAMSG,MANT,wEADqB,CASrB,CAACP,aAAD,CATqB,CAAvB,CAYA,GAAMS,CAAAA,iBAAiB,CAAG,uBACxB,kBAAOH,MAAP,mIACEF,UAAU,CAAC,IAAD,CAAV,CADF,mDAGuBH,gBAAgB,CAACK,MAAD,CAHvC,SAGQC,MAHR,gBAIEH,UAAU,CAAC,KAAD,CAAV,CAJF,iCAMSG,MANT,wEADwB,CASxB,CAACN,gBAAD,CATwB,CAA1B,CAYA,GAAMS,CAAAA,6BAA6B,CAAG,uBACpC,kBAAOJ,MAAP,mIACEF,UAAU,CAAC,IAAD,CAAV,CADF,mDAGuBF,4BAA4B,CAACI,MAAD,CAHnD,SAGQC,MAHR,gBAIEH,UAAU,CAAC,KAAD,CAAV,CAJF,iCAMSG,MANT,wEADoC,CASpC,CAACL,4BAAD,CAToC,CAAtC,CAYA,MAAO,CACLC,OAAO,CAAPA,OADK,CAELJ,oBAAoB,CAAEM,qBAFjB,CAGLL,aAAa,CAAEQ,cAHV,CAILP,gBAAgB,CAAEQ,iBAJb,CAKLP,4BAA4B,CAAEQ,6BALzB,CAAP,CAOD","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { GooglePay } from '../types';\nimport { useStripe } from './useStripe';\n\n/**\n * useGooglePay hook\n */\nexport function useGooglePay() {\n const {\n isGooglePaySupported,\n initGooglePay,\n presentGooglePay,\n createGooglePayPaymentMethod,\n } = useStripe();\n const [loading, setLoading] = useState(false);\n\n const _isGooglePaySupported = useCallback(\n async (params?: GooglePay.IsSupportedParams) => {\n setLoading(true);\n\n const result = await isGooglePaySupported(params);\n setLoading(false);\n\n return result;\n },\n [isGooglePaySupported]\n );\n\n const _initGooglePay = useCallback(\n async (params: GooglePay.InitParams) => {\n setLoading(true);\n\n const result = await initGooglePay(params);\n setLoading(false);\n\n return result;\n },\n [initGooglePay]\n );\n\n const _presentGooglePay = useCallback(\n async (params: GooglePay.PresentParams) => {\n setLoading(true);\n\n const result = await presentGooglePay(params);\n setLoading(false);\n\n return result;\n },\n [presentGooglePay]\n );\n\n const _createGooglePayPaymentMethod = useCallback(\n async (params: GooglePay.CreatePaymentMethodParams) => {\n setLoading(true);\n\n const result = await createGooglePayPaymentMethod(params);\n setLoading(false);\n\n return result;\n },\n [createGooglePayPaymentMethod]\n );\n\n return {\n loading,\n isGooglePaySupported: _isGooglePaySupported,\n initGooglePay: _initGooglePay,\n presentGooglePay: _presentGooglePay,\n createGooglePayPaymentMethod: _createGooglePayPaymentMethod,\n };\n}\n"]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useStripe=useStripe;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _helpers=require("../helpers");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _functions=require("../functions");function useStripe(){var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),isApplePaySupported=_useState2[0],setApplePaySupported=_useState2[1];(0,_react.useEffect)(function(){function checkApplePaySupport(){var isSupported;return _regenerator.default.async(function checkApplePaySupport$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.t0=_helpers.isiOS;if(!_context.t0){_context.next=5;break;}_context.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 4:_context.t0=_context.sent;case 5:isSupported=_context.t0;setApplePaySupported(isSupported);case 7:case"end":return _context.stop();}}},null,null,null,Promise);}checkApplePaySupport();},[]);var _createPaymentMethod=(0,_react.useCallback)(function _callee(data){var options,_args2=arguments;return _regenerator.default.async(function _callee$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:options=_args2.length>1&&_args2[1]!==undefined?_args2[1]:{};return _context2.abrupt("return",(0,_functions.createPaymentMethod)(data,options));case 2:case"end":return _context2.stop();}}},null,null,null,Promise);},[]);var _createToken=(0,_react.useCallback)(function _callee2(params){return _regenerator.default.async(function _callee2$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:return _context3.abrupt("return",(0,_functions.createToken)(params));case 1:case"end":return _context3.stop();}}},null,null,null,Promise);},[]);var _retrievePaymentIntent=(0,_react.useCallback)(function _callee3(clientSecret){return _regenerator.default.async(function _callee3$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:return _context4.abrupt("return",(0,_functions.retrievePaymentIntent)(clientSecret));case 1:case"end":return _context4.stop();}}},null,null,null,Promise);},[]);var _retrieveSetupIntent=(0,_react.useCallback)(function _callee4(clientSecret){return _regenerator.default.async(function _callee4$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:return _context5.abrupt("return",(0,_functions.retrieveSetupIntent)(clientSecret));case 1:case"end":return _context5.stop();}}},null,null,null,Promise);},[]);var _confirmPayment=(0,_react.useCallback)(function _callee5(paymentIntentClientSecret,data){var options,_args6=arguments;return _regenerator.default.async(function _callee5$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:options=_args6.length>2&&_args6[2]!==undefined?_args6[2]:{};return _context6.abrupt("return",(0,_functions.confirmPayment)(paymentIntentClientSecret,data,options));case 2:case"end":return _context6.stop();}}},null,null,null,Promise);},[]);var _presentApplePay=(0,_react.useCallback)(function _callee6(params){return _regenerator.default.async(function _callee6$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:return _context7.abrupt("return",(0,_functions.presentApplePay)(params));case 1:case"end":return _context7.stop();}}},null,null,null,Promise);},[]);var _updateApplePaySummaryItems=(0,_react.useCallback)(function _callee7(summaryItems){var errorAddressFields,_args8=arguments;return _regenerator.default.async(function _callee7$(_context8){while(1){switch(_context8.prev=_context8.next){case 0:errorAddressFields=_args8.length>1&&_args8[1]!==undefined?_args8[1]:[];return _context8.abrupt("return",(0,_functions.updateApplePaySummaryItems)(summaryItems,errorAddressFields));case 2:case"end":return _context8.stop();}}},null,null,null,Promise);},[]);var _confirmApplePayPayment=(0,_react.useCallback)(function _callee8(clientSecret){return _regenerator.default.async(function _callee8$(_context9){while(1){switch(_context9.prev=_context9.next){case 0:return _context9.abrupt("return",(0,_functions.confirmApplePayPayment)(clientSecret));case 1:case"end":return _context9.stop();}}},null,null,null,Promise);},[]);var _handleNextAction=(0,_react.useCallback)(function _callee9(paymentIntentClientSecret){return _regenerator.default.async(function _callee9$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:return _context10.abrupt("return",(0,_functions.handleNextAction)(paymentIntentClientSecret));case 1:case"end":return _context10.stop();}}},null,null,null,Promise);},[]);var _confirmSetupIntent=(0,_react.useCallback)(function _callee10(paymentIntentClientSecret,data){var options,_args11=arguments;return _regenerator.default.async(function _callee10$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:options=_args11.length>2&&_args11[2]!==undefined?_args11[2]:{};return _context11.abrupt("return",(0,_functions.confirmSetupIntent)(paymentIntentClientSecret,data,options));case 2:case"end":return _context11.stop();}}},null,null,null,Promise);},[]);var _createTokenForCVCUpdate=(0,_react.useCallback)(function _callee11(cvc){return _regenerator.default.async(function _callee11$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:return _context12.abrupt("return",(0,_functions.createTokenForCVCUpdate)(cvc));case 1:case"end":return _context12.stop();}}},null,null,null,Promise);},[]);var _initPaymentSheet=(0,_react.useCallback)(function _callee12(params){return _regenerator.default.async(function _callee12$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:return _context13.abrupt("return",(0,_functions.initPaymentSheet)(params));case 1:case"end":return _context13.stop();}}},null,null,null,Promise);},[]);var _presentPaymentSheet=(0,_react.useCallback)(function _callee13(){return _regenerator.default.async(function _callee13$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:return _context14.abrupt("return",(0,_functions.presentPaymentSheet)());case 1:case"end":return _context14.stop();}}},null,null,null,Promise);},[]);var _confirmPaymentSheetPayment=(0,_react.useCallback)(function _callee14(){return _regenerator.default.async(function _callee14$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:return _context15.abrupt("return",(0,_functions.confirmPaymentSheetPayment)());case 1:case"end":return _context15.stop();}}},null,null,null,Promise);},[]);var _handleURLCallback=(0,_react.useCallback)(function _callee15(url){return _regenerator.default.async(function _callee15$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:return _context16.abrupt("return",(0,_functions.handleURLCallback)(url));case 1:case"end":return _context16.stop();}}},null,null,null,Promise);},[]);var _isGooglePaySupported=(0,_react.useCallback)(function _callee16(params){return _regenerator.default.async(function _callee16$(_context17){while(1){switch(_context17.prev=_context17.next){case 0:return _context17.abrupt("return",(0,_functions.isGooglePaySupported)(params));case 1:case"end":return _context17.stop();}}},null,null,null,Promise);},[]);var _initGooglePay=(0,_react.useCallback)(function _callee17(params){return _regenerator.default.async(function _callee17$(_context18){while(1){switch(_context18.prev=_context18.next){case 0:return _context18.abrupt("return",(0,_functions.initGooglePay)(params));case 1:case"end":return _context18.stop();}}},null,null,null,Promise);},[]);var _presentGooglePay=(0,_react.useCallback)(function _callee18(params){return _regenerator.default.async(function _callee18$(_context19){while(1){switch(_context19.prev=_context19.next){case 0:return _context19.abrupt("return",(0,_functions.presentGooglePay)(params));case 1:case"end":return _context19.stop();}}},null,null,null,Promise);},[]);var _createGooglePayPaymentMethod=(0,_react.useCallback)(function _callee19(params){return _regenerator.default.async(function _callee19$(_context20){while(1){switch(_context20.prev=_context20.next){case 0:return _context20.abrupt("return",(0,_functions.createGooglePayPaymentMethod)(params));case 1:case"end":return _context20.stop();}}},null,null,null,Promise);},[]);var _openApplePaySetup=(0,_react.useCallback)(function _callee20(){return _regenerator.default.async(function _callee20$(_context21){while(1){switch(_context21.prev=_context21.next){case 0:return _context21.abrupt("return",(0,_functions.openApplePaySetup)());case 1:case"end":return _context21.stop();}}},null,null,null,Promise);},[]);var _collectBankAccountForPayment=(0,_react.useCallback)(function _callee21(clientSecret,params){return _regenerator.default.async(function _callee21$(_context22){while(1){switch(_context22.prev=_context22.next){case 0:return _context22.abrupt("return",(0,_functions.collectBankAccountForPayment)(clientSecret,params));case 1:case"end":return _context22.stop();}}},null,null,null,Promise);},[]);var _collectBankAccountForSetup=(0,_react.useCallback)(function _callee22(clientSecret,params){return _regenerator.default.async(function _callee22$(_context23){while(1){switch(_context23.prev=_context23.next){case 0:return _context23.abrupt("return",(0,_functions.collectBankAccountForSetup)(clientSecret,params));case 1:case"end":return _context23.stop();}}},null,null,null,Promise);},[]);var _verifyMicrodepositsForPayment=(0,_react.useCallback)(function _callee23(clientSecret,params){return _regenerator.default.async(function _callee23$(_context24){while(1){switch(_context24.prev=_context24.next){case 0:return _context24.abrupt("return",(0,_functions.verifyMicrodepositsForPayment)(clientSecret,params));case 1:case"end":return _context24.stop();}}},null,null,null,Promise);},[]);var _verifyMicrodepositsForSetup=(0,_react.useCallback)(function _callee24(clientSecret,params){return _regenerator.default.async(function _callee24$(_context25){while(1){switch(_context25.prev=_context25.next){case 0:return _context25.abrupt("return",(0,_functions.verifyMicrodepositsForSetup)(clientSecret,params));case 1:case"end":return _context25.stop();}}},null,null,null,Promise);},[]);return{retrievePaymentIntent:_retrievePaymentIntent,retrieveSetupIntent:_retrieveSetupIntent,confirmPayment:_confirmPayment,createPaymentMethod:_createPaymentMethod,handleNextAction:_handleNextAction,handleCardAction:_handleNextAction,isApplePaySupported:isApplePaySupported,presentApplePay:_presentApplePay,confirmApplePayPayment:_confirmApplePayPayment,confirmSetupIntent:_confirmSetupIntent,createTokenForCVCUpdate:_createTokenForCVCUpdate,updateApplePaySummaryItems:_updateApplePaySummaryItems,handleURLCallback:_handleURLCallback,confirmPaymentSheetPayment:_confirmPaymentSheetPayment,presentPaymentSheet:_presentPaymentSheet,initPaymentSheet:_initPaymentSheet,createToken:_createToken,isGooglePaySupported:_isGooglePaySupported,initGooglePay:_initGooglePay,presentGooglePay:_presentGooglePay,createGooglePayPaymentMethod:_createGooglePayPaymentMethod,openApplePaySetup:_openApplePaySetup,collectBankAccountForPayment:_collectBankAccountForPayment,collectBankAccountForSetup:_collectBankAccountForSetup,verifyMicrodepositsForPayment:_verifyMicrodepositsForPayment,verifyMicrodepositsForSetup:_verifyMicrodepositsForSetup};}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.useStripe=useStripe;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=require("react");var _helpers=require("../helpers");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _functions=require("../functions");function useStripe(){var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),isApplePaySupported=_useState2[0],setApplePaySupported=_useState2[1];(0,_react.useEffect)(function(){function checkApplePaySupport(){var isSupported;return _regenerator.default.async(function checkApplePaySupport$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.t0=_helpers.isiOS;if(!_context.t0){_context.next=5;break;}_context.next=4;return _regenerator.default.awrap(_NativeStripeSdk.default.isApplePaySupported());case 4:_context.t0=_context.sent;case 5:isSupported=_context.t0;setApplePaySupported(isSupported);case 7:case"end":return _context.stop();}}},null,null,null,Promise);}checkApplePaySupport();},[]);var _createPaymentMethod=(0,_react.useCallback)(function _callee(data){var options,_args2=arguments;return _regenerator.default.async(function _callee$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:options=_args2.length>1&&_args2[1]!==undefined?_args2[1]:{};return _context2.abrupt("return",(0,_functions.createPaymentMethod)(data,options));case 2:case"end":return _context2.stop();}}},null,null,null,Promise);},[]);var _createToken=(0,_react.useCallback)(function _callee2(params){return _regenerator.default.async(function _callee2$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:return _context3.abrupt("return",(0,_functions.createToken)(params));case 1:case"end":return _context3.stop();}}},null,null,null,Promise);},[]);var _retrievePaymentIntent=(0,_react.useCallback)(function _callee3(clientSecret){return _regenerator.default.async(function _callee3$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:return _context4.abrupt("return",(0,_functions.retrievePaymentIntent)(clientSecret));case 1:case"end":return _context4.stop();}}},null,null,null,Promise);},[]);var _retrieveSetupIntent=(0,_react.useCallback)(function _callee4(clientSecret){return _regenerator.default.async(function _callee4$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:return _context5.abrupt("return",(0,_functions.retrieveSetupIntent)(clientSecret));case 1:case"end":return _context5.stop();}}},null,null,null,Promise);},[]);var _confirmPayment=(0,_react.useCallback)(function _callee5(paymentIntentClientSecret,data){var options,_args6=arguments;return _regenerator.default.async(function _callee5$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:options=_args6.length>2&&_args6[2]!==undefined?_args6[2]:{};return _context6.abrupt("return",(0,_functions.confirmPayment)(paymentIntentClientSecret,data,options));case 2:case"end":return _context6.stop();}}},null,null,null,Promise);},[]);var _presentApplePay=(0,_react.useCallback)(function _callee6(params){return _regenerator.default.async(function _callee6$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:return _context7.abrupt("return",(0,_functions.presentApplePay)(params));case 1:case"end":return _context7.stop();}}},null,null,null,Promise);},[]);var _updateApplePaySummaryItems=(0,_react.useCallback)(function _callee7(summaryItems){var errorAddressFields,_args8=arguments;return _regenerator.default.async(function _callee7$(_context8){while(1){switch(_context8.prev=_context8.next){case 0:errorAddressFields=_args8.length>1&&_args8[1]!==undefined?_args8[1]:[];return _context8.abrupt("return",(0,_functions.updateApplePaySummaryItems)(summaryItems,errorAddressFields));case 2:case"end":return _context8.stop();}}},null,null,null,Promise);},[]);var _confirmApplePayPayment=(0,_react.useCallback)(function _callee8(clientSecret){return _regenerator.default.async(function _callee8$(_context9){while(1){switch(_context9.prev=_context9.next){case 0:return _context9.abrupt("return",(0,_functions.confirmApplePayPayment)(clientSecret));case 1:case"end":return _context9.stop();}}},null,null,null,Promise);},[]);var _handleNextAction=(0,_react.useCallback)(function _callee9(paymentIntentClientSecret){return _regenerator.default.async(function _callee9$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:return _context10.abrupt("return",(0,_functions.handleNextAction)(paymentIntentClientSecret));case 1:case"end":return _context10.stop();}}},null,null,null,Promise);},[]);var _confirmSetupIntent=(0,_react.useCallback)(function _callee10(paymentIntentClientSecret,data){var options,_args11=arguments;return _regenerator.default.async(function _callee10$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:options=_args11.length>2&&_args11[2]!==undefined?_args11[2]:{};return _context11.abrupt("return",(0,_functions.confirmSetupIntent)(paymentIntentClientSecret,data,options));case 2:case"end":return _context11.stop();}}},null,null,null,Promise);},[]);var _createTokenForCVCUpdate=(0,_react.useCallback)(function _callee11(cvc){return _regenerator.default.async(function _callee11$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:return _context12.abrupt("return",(0,_functions.createTokenForCVCUpdate)(cvc));case 1:case"end":return _context12.stop();}}},null,null,null,Promise);},[]);var _initPaymentSheet=(0,_react.useCallback)(function _callee12(params){return _regenerator.default.async(function _callee12$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:return _context13.abrupt("return",(0,_functions.initPaymentSheet)(params));case 1:case"end":return _context13.stop();}}},null,null,null,Promise);},[]);var _presentPaymentSheet=(0,_react.useCallback)(function _callee13(){return _regenerator.default.async(function _callee13$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:return _context14.abrupt("return",(0,_functions.presentPaymentSheet)());case 1:case"end":return _context14.stop();}}},null,null,null,Promise);},[]);var _confirmPaymentSheetPayment=(0,_react.useCallback)(function _callee14(){return _regenerator.default.async(function _callee14$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:return _context15.abrupt("return",(0,_functions.confirmPaymentSheetPayment)());case 1:case"end":return _context15.stop();}}},null,null,null,Promise);},[]);var _handleURLCallback=(0,_react.useCallback)(function _callee15(url){return _regenerator.default.async(function _callee15$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:return _context16.abrupt("return",(0,_functions.handleURLCallback)(url));case 1:case"end":return _context16.stop();}}},null,null,null,Promise);},[]);var _isGooglePaySupported=(0,_react.useCallback)(function _callee16(params){return _regenerator.default.async(function _callee16$(_context17){while(1){switch(_context17.prev=_context17.next){case 0:return _context17.abrupt("return",(0,_functions.isGooglePaySupported)(params));case 1:case"end":return _context17.stop();}}},null,null,null,Promise);},[]);var _initGooglePay=(0,_react.useCallback)(function _callee17(params){return _regenerator.default.async(function _callee17$(_context18){while(1){switch(_context18.prev=_context18.next){case 0:return _context18.abrupt("return",(0,_functions.initGooglePay)(params));case 1:case"end":return _context18.stop();}}},null,null,null,Promise);},[]);var _presentGooglePay=(0,_react.useCallback)(function _callee18(params){return _regenerator.default.async(function _callee18$(_context19){while(1){switch(_context19.prev=_context19.next){case 0:return _context19.abrupt("return",(0,_functions.presentGooglePay)(params));case 1:case"end":return _context19.stop();}}},null,null,null,Promise);},[]);var _createGooglePayPaymentMethod=(0,_react.useCallback)(function _callee19(params){return _regenerator.default.async(function _callee19$(_context20){while(1){switch(_context20.prev=_context20.next){case 0:return _context20.abrupt("return",(0,_functions.createGooglePayPaymentMethod)(params));case 1:case"end":return _context20.stop();}}},null,null,null,Promise);},[]);var _openApplePaySetup=(0,_react.useCallback)(function _callee20(){return _regenerator.default.async(function _callee20$(_context21){while(1){switch(_context21.prev=_context21.next){case 0:return _context21.abrupt("return",(0,_functions.openApplePaySetup)());case 1:case"end":return _context21.stop();}}},null,null,null,Promise);},[]);var _collectBankAccountForPayment=(0,_react.useCallback)(function _callee21(clientSecret,params){return _regenerator.default.async(function _callee21$(_context22){while(1){switch(_context22.prev=_context22.next){case 0:return _context22.abrupt("return",(0,_functions.collectBankAccountForPayment)(clientSecret,params));case 1:case"end":return _context22.stop();}}},null,null,null,Promise);},[]);var _collectBankAccountForSetup=(0,_react.useCallback)(function _callee22(clientSecret,params){return _regenerator.default.async(function _callee22$(_context23){while(1){switch(_context23.prev=_context23.next){case 0:return _context23.abrupt("return",(0,_functions.collectBankAccountForSetup)(clientSecret,params));case 1:case"end":return _context23.stop();}}},null,null,null,Promise);},[]);var _verifyMicrodepositsForPayment=(0,_react.useCallback)(function _callee23(clientSecret,params){return _regenerator.default.async(function _callee23$(_context24){while(1){switch(_context24.prev=_context24.next){case 0:return _context24.abrupt("return",(0,_functions.verifyMicrodepositsForPayment)(clientSecret,params));case 1:case"end":return _context24.stop();}}},null,null,null,Promise);},[]);var _verifyMicrodepositsForSetup=(0,_react.useCallback)(function _callee24(clientSecret,params){return _regenerator.default.async(function _callee24$(_context25){while(1){switch(_context25.prev=_context25.next){case 0:return _context25.abrupt("return",(0,_functions.verifyMicrodepositsForSetup)(clientSecret,params));case 1:case"end":return _context25.stop();}}},null,null,null,Promise);},[]);return{retrievePaymentIntent:_retrievePaymentIntent,retrieveSetupIntent:_retrieveSetupIntent,confirmPayment:_confirmPayment,createPaymentMethod:_createPaymentMethod,handleNextAction:_handleNextAction,isApplePaySupported:isApplePaySupported,presentApplePay:_presentApplePay,confirmApplePayPayment:_confirmApplePayPayment,confirmSetupIntent:_confirmSetupIntent,createTokenForCVCUpdate:_createTokenForCVCUpdate,updateApplePaySummaryItems:_updateApplePaySummaryItems,handleURLCallback:_handleURLCallback,confirmPaymentSheetPayment:_confirmPaymentSheetPayment,presentPaymentSheet:_presentPaymentSheet,initPaymentSheet:_initPaymentSheet,createToken:_createToken,isGooglePaySupported:_isGooglePaySupported,initGooglePay:_initGooglePay,presentGooglePay:_presentGooglePay,createGooglePayPaymentMethod:_createGooglePayPaymentMethod,openApplePaySetup:_openApplePaySetup,collectBankAccountForPayment:_collectBankAccountForPayment,collectBankAccountForSetup:_collectBankAccountForSetup,verifyMicrodepositsForPayment:_verifyMicrodepositsForPayment,verifyMicrodepositsForSetup:_verifyMicrodepositsForSetup};}
2
2
  //# sourceMappingURL=useStripe.js.map