@sumup/react-native-checkout 0.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1033) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +354 -0
  3. package/android/build.gradle +78 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +3 -0
  6. package/android/src/main/java/com/sumupreactnative/PaymentUtil.java +111 -0
  7. package/android/src/main/java/com/sumupreactnative/SumupReactNativeModule.java +187 -0
  8. package/android/src/main/java/com/sumupreactnative/SumupReactNativePackage.java +28 -0
  9. package/ios/SumupReactNative-Bridging-Header.h +2 -0
  10. package/ios/SumupReactNative.m +18 -0
  11. package/ios/SumupReactNative.swift +164 -0
  12. package/ios/SumupReactNative.xcodeproj/project.pbxproj +283 -0
  13. package/lib/commonjs/assets/fonts/AktivGrotesk/AktivGrotesk-Bold.ttf +0 -0
  14. package/lib/commonjs/assets/fonts/SFProText/SFProText-Bold.ttf +0 -0
  15. package/lib/commonjs/assets/fonts/SFProText/SFProText-Regular.ttf +0 -0
  16. package/lib/commonjs/assets/icons/americanExpress/americanExpress@2x.png +0 -0
  17. package/lib/commonjs/assets/icons/americanExpress/americanExpress@3x.png +0 -0
  18. package/lib/commonjs/assets/icons/applePay/applePay@2x.png +0 -0
  19. package/lib/commonjs/assets/icons/applePay/applePay@3x.png +0 -0
  20. package/lib/commonjs/assets/icons/back/back@2x.png +0 -0
  21. package/lib/commonjs/assets/icons/back/back@3x.png +0 -0
  22. package/lib/commonjs/assets/icons/cardPlaceholder/cardPlaceholder@2x.png +0 -0
  23. package/lib/commonjs/assets/icons/cardPlaceholder/cardPlaceholder@3x.png +0 -0
  24. package/lib/commonjs/assets/icons/checkbox/checkbox@2x.png +0 -0
  25. package/lib/commonjs/assets/icons/checkbox/checkbox@3x.png +0 -0
  26. package/lib/commonjs/assets/icons/cross/cross@2x.png +0 -0
  27. package/lib/commonjs/assets/icons/cross/cross@3x.png +0 -0
  28. package/lib/commonjs/assets/icons/googlePay/googlePay@2x.png +0 -0
  29. package/lib/commonjs/assets/icons/googlePay/googlePay@3x.png +0 -0
  30. package/lib/commonjs/assets/icons/lock/lock@2x.png +0 -0
  31. package/lib/commonjs/assets/icons/lock/lock@3x.png +0 -0
  32. package/lib/commonjs/assets/icons/mastercard/mastercard@2x.png +0 -0
  33. package/lib/commonjs/assets/icons/mastercard/mastercard@3x.png +0 -0
  34. package/lib/commonjs/assets/icons/more/more@2x.png +0 -0
  35. package/lib/commonjs/assets/icons/more/more@3x.png +0 -0
  36. package/lib/commonjs/assets/icons/rightArrow/rightArrow@2x.png +0 -0
  37. package/lib/commonjs/assets/icons/rightArrow/rightArrow@3x.png +0 -0
  38. package/lib/commonjs/assets/icons/visa/visa@2x.png +0 -0
  39. package/lib/commonjs/assets/icons/visa/visa@3x.png +0 -0
  40. package/lib/commonjs/assets/icons/whiteCheckmark/whiteCheckmark@2x.png +0 -0
  41. package/lib/commonjs/assets/icons/whiteCheckmark/whiteCheckmark@3x.png +0 -0
  42. package/lib/commonjs/components/3DSecureSheet/index.js +56 -0
  43. package/lib/commonjs/components/3DSecureSheet/index.js.map +1 -0
  44. package/lib/commonjs/components/AnimatedContainer/index.js +75 -0
  45. package/lib/commonjs/components/AnimatedContainer/index.js.map +1 -0
  46. package/lib/commonjs/components/AnimatedContainer/styles.js +40 -0
  47. package/lib/commonjs/components/AnimatedContainer/styles.js.map +1 -0
  48. package/lib/commonjs/components/ApplePayButton/index.js +29 -0
  49. package/lib/commonjs/components/ApplePayButton/index.js.map +1 -0
  50. package/lib/commonjs/components/ApplePayButton/styles.js +31 -0
  51. package/lib/commonjs/components/ApplePayButton/styles.js.map +1 -0
  52. package/lib/commonjs/components/Button/index.js +21 -0
  53. package/lib/commonjs/components/Button/index.js.map +1 -0
  54. package/lib/commonjs/components/Button/styles.js +55 -0
  55. package/lib/commonjs/components/Button/styles.js.map +1 -0
  56. package/lib/commonjs/components/CardInformation/index.js +87 -0
  57. package/lib/commonjs/components/CardInformation/index.js.map +1 -0
  58. package/lib/commonjs/components/CardInformation/styles.js +42 -0
  59. package/lib/commonjs/components/CardInformation/styles.js.map +1 -0
  60. package/lib/commonjs/components/CardSheet/index.js +138 -0
  61. package/lib/commonjs/components/CardSheet/index.js.map +1 -0
  62. package/lib/commonjs/components/CardSheet/styles.js +53 -0
  63. package/lib/commonjs/components/CardSheet/styles.js.map +1 -0
  64. package/lib/commonjs/components/CardSheet/useCardSheet/index.js +90 -0
  65. package/lib/commonjs/components/CardSheet/useCardSheet/index.js.map +1 -0
  66. package/lib/commonjs/components/Checkbox/index.js +25 -0
  67. package/lib/commonjs/components/Checkbox/index.js.map +1 -0
  68. package/lib/commonjs/components/Checkbox/styles.js +31 -0
  69. package/lib/commonjs/components/Checkbox/styles.js.map +1 -0
  70. package/lib/commonjs/components/GooglePayButton/index.js +29 -0
  71. package/lib/commonjs/components/GooglePayButton/index.js.map +1 -0
  72. package/lib/commonjs/components/GooglePayButton/styles.js +36 -0
  73. package/lib/commonjs/components/GooglePayButton/styles.js.map +1 -0
  74. package/lib/commonjs/components/Header/index.js +35 -0
  75. package/lib/commonjs/components/Header/index.js.map +1 -0
  76. package/lib/commonjs/components/Header/styles.js +42 -0
  77. package/lib/commonjs/components/Header/styles.js.map +1 -0
  78. package/lib/commonjs/components/ImageButton/index.js +28 -0
  79. package/lib/commonjs/components/ImageButton/index.js.map +1 -0
  80. package/lib/commonjs/components/ImageButton/styles.js +16 -0
  81. package/lib/commonjs/components/ImageButton/styles.js.map +1 -0
  82. package/lib/commonjs/components/InputFields/BaseInputField/index.js +48 -0
  83. package/lib/commonjs/components/InputFields/BaseInputField/index.js.map +1 -0
  84. package/lib/commonjs/components/InputFields/BaseInputField/styles.js +45 -0
  85. package/lib/commonjs/components/InputFields/BaseInputField/styles.js.map +1 -0
  86. package/lib/commonjs/components/InputFields/CVCInputField/index.js +27 -0
  87. package/lib/commonjs/components/InputFields/CVCInputField/index.js.map +1 -0
  88. package/lib/commonjs/components/InputFields/CVCInputField/styles.js +28 -0
  89. package/lib/commonjs/components/InputFields/CVCInputField/styles.js.map +1 -0
  90. package/lib/commonjs/components/InputFields/CardInputField/index.js +47 -0
  91. package/lib/commonjs/components/InputFields/CardInputField/index.js.map +1 -0
  92. package/lib/commonjs/components/InputFields/CardInputField/styles.js +31 -0
  93. package/lib/commonjs/components/InputFields/CardInputField/styles.js.map +1 -0
  94. package/lib/commonjs/components/InputFields/ExpirationDateInputField/index.js +20 -0
  95. package/lib/commonjs/components/InputFields/ExpirationDateInputField/index.js.map +1 -0
  96. package/lib/commonjs/components/LoadingSpinner/index.js +42 -0
  97. package/lib/commonjs/components/LoadingSpinner/index.js.map +1 -0
  98. package/lib/commonjs/components/LoadingSpinner/styles.js +35 -0
  99. package/lib/commonjs/components/LoadingSpinner/styles.js.map +1 -0
  100. package/lib/commonjs/components/Modal/index.js +27 -0
  101. package/lib/commonjs/components/Modal/index.js.map +1 -0
  102. package/lib/commonjs/components/Modal/styles.js +35 -0
  103. package/lib/commonjs/components/Modal/styles.js.map +1 -0
  104. package/lib/commonjs/components/NativePayButton/index.js +20 -0
  105. package/lib/commonjs/components/NativePayButton/index.js.map +1 -0
  106. package/lib/commonjs/components/NoInternetConnection/index.js +32 -0
  107. package/lib/commonjs/components/NoInternetConnection/index.js.map +1 -0
  108. package/lib/commonjs/components/NoInternetConnection/styles.js +21 -0
  109. package/lib/commonjs/components/NoInternetConnection/styles.js.map +1 -0
  110. package/lib/commonjs/components/OptionMenuModal/index.js +74 -0
  111. package/lib/commonjs/components/OptionMenuModal/index.js.map +1 -0
  112. package/lib/commonjs/components/OptionMenuModal/styles.js +50 -0
  113. package/lib/commonjs/components/OptionMenuModal/styles.js.map +1 -0
  114. package/lib/commonjs/components/PayButton/index.js +56 -0
  115. package/lib/commonjs/components/PayButton/index.js.map +1 -0
  116. package/lib/commonjs/components/PayButton/styles.js +32 -0
  117. package/lib/commonjs/components/PayButton/styles.js.map +1 -0
  118. package/lib/commonjs/components/PaymentMethod/index.js +45 -0
  119. package/lib/commonjs/components/PaymentMethod/index.js.map +1 -0
  120. package/lib/commonjs/components/PaymentMethod/styles.js +22 -0
  121. package/lib/commonjs/components/PaymentMethod/styles.js.map +1 -0
  122. package/lib/commonjs/components/PaymentMethodFormHeaderOption/index.js +28 -0
  123. package/lib/commonjs/components/PaymentMethodFormHeaderOption/index.js.map +1 -0
  124. package/lib/commonjs/components/PaymentMethodFormHeaderOption/styles.js +43 -0
  125. package/lib/commonjs/components/PaymentMethodFormHeaderOption/styles.js.map +1 -0
  126. package/lib/commonjs/components/PaymentMethodsForm/index.js +23 -0
  127. package/lib/commonjs/components/PaymentMethodsForm/index.js.map +1 -0
  128. package/lib/commonjs/components/PaymentMethodsForm/styles.js +30 -0
  129. package/lib/commonjs/components/PaymentMethodsForm/styles.js.map +1 -0
  130. package/lib/commonjs/components/PaymentSheet/index.js +85 -0
  131. package/lib/commonjs/components/PaymentSheet/index.js.map +1 -0
  132. package/lib/commonjs/components/PrivacyPolicySheet/consts.js +50 -0
  133. package/lib/commonjs/components/PrivacyPolicySheet/consts.js.map +1 -0
  134. package/lib/commonjs/components/PrivacyPolicySheet/index.js +35 -0
  135. package/lib/commonjs/components/PrivacyPolicySheet/index.js.map +1 -0
  136. package/lib/commonjs/components/ProcessButton/index.js +64 -0
  137. package/lib/commonjs/components/ProcessButton/index.js.map +1 -0
  138. package/lib/commonjs/components/ProcessButton/styles.js +36 -0
  139. package/lib/commonjs/components/ProcessButton/styles.js.map +1 -0
  140. package/lib/commonjs/components/SaveCard/index.js +87 -0
  141. package/lib/commonjs/components/SaveCard/index.js.map +1 -0
  142. package/lib/commonjs/components/SaveCard/styles.js +23 -0
  143. package/lib/commonjs/components/SaveCard/styles.js.map +1 -0
  144. package/lib/commonjs/components/SaveCard/useSaveCard/index.js +63 -0
  145. package/lib/commonjs/components/SaveCard/useSaveCard/index.js.map +1 -0
  146. package/lib/commonjs/components/SaveCardButton/index.js +33 -0
  147. package/lib/commonjs/components/SaveCardButton/index.js.map +1 -0
  148. package/lib/commonjs/components/SaveCardButton/styles.js +32 -0
  149. package/lib/commonjs/components/SaveCardButton/styles.js.map +1 -0
  150. package/lib/commonjs/components/SaveCardSheet/index.js +32 -0
  151. package/lib/commonjs/components/SaveCardSheet/index.js.map +1 -0
  152. package/lib/commonjs/components/SavedCard/index.js +50 -0
  153. package/lib/commonjs/components/SavedCard/index.js.map +1 -0
  154. package/lib/commonjs/components/SavedCard/styles.js +39 -0
  155. package/lib/commonjs/components/SavedCard/styles.js.map +1 -0
  156. package/lib/commonjs/components/SavedCardsSheet/index.js +87 -0
  157. package/lib/commonjs/components/SavedCardsSheet/index.js.map +1 -0
  158. package/lib/commonjs/components/SavedCardsSheet/styles.js +22 -0
  159. package/lib/commonjs/components/SavedCardsSheet/styles.js.map +1 -0
  160. package/lib/commonjs/components/SumUpProvider.js +59 -0
  161. package/lib/commonjs/components/SumUpProvider.js.map +1 -0
  162. package/lib/commonjs/components/Switch/index.js +37 -0
  163. package/lib/commonjs/components/Switch/index.js.map +1 -0
  164. package/lib/commonjs/components/Switch/styles.js +55 -0
  165. package/lib/commonjs/components/Switch/styles.js.map +1 -0
  166. package/lib/commonjs/components/Text/index.js +63 -0
  167. package/lib/commonjs/components/Text/index.js.map +1 -0
  168. package/lib/commonjs/components/Text/styles.js +19 -0
  169. package/lib/commonjs/components/Text/styles.js.map +1 -0
  170. package/lib/commonjs/components/WebViewSheet/index.js +48 -0
  171. package/lib/commonjs/components/WebViewSheet/index.js.map +1 -0
  172. package/lib/commonjs/components/WebViewSheet/styles.js +54 -0
  173. package/lib/commonjs/components/WebViewSheet/styles.js.map +1 -0
  174. package/lib/commonjs/consts/UI.js +11 -0
  175. package/lib/commonjs/consts/UI.js.map +1 -0
  176. package/lib/commonjs/consts/errors.js +13 -0
  177. package/lib/commonjs/consts/errors.js.map +1 -0
  178. package/lib/commonjs/consts/nativePayMethod.js +19 -0
  179. package/lib/commonjs/consts/nativePayMethod.js.map +1 -0
  180. package/lib/commonjs/consts/validation.js +22 -0
  181. package/lib/commonjs/consts/validation.js.map +1 -0
  182. package/lib/commonjs/contexts/LanguageContext/index.js +38 -0
  183. package/lib/commonjs/contexts/LanguageContext/index.js.map +1 -0
  184. package/lib/commonjs/contexts/OptionMenuContext/index.js +39 -0
  185. package/lib/commonjs/contexts/OptionMenuContext/index.js.map +1 -0
  186. package/lib/commonjs/contexts/PaymentSheetContext/index.js +39 -0
  187. package/lib/commonjs/contexts/PaymentSheetContext/index.js.map +1 -0
  188. package/lib/commonjs/contexts/StoreContext.js +49 -0
  189. package/lib/commonjs/contexts/StoreContext.js.map +1 -0
  190. package/lib/commonjs/contexts/ThemeContext.js +15 -0
  191. package/lib/commonjs/contexts/ThemeContext.js.map +1 -0
  192. package/lib/commonjs/helpers/formatAmount/index.js +26 -0
  193. package/lib/commonjs/helpers/formatAmount/index.js.map +1 -0
  194. package/lib/commonjs/helpers/getUserAgent/index.js +12 -0
  195. package/lib/commonjs/helpers/getUserAgent/index.js.map +1 -0
  196. package/lib/commonjs/helpers/validation/paymentFields.js +56 -0
  197. package/lib/commonjs/helpers/validation/paymentFields.js.map +1 -0
  198. package/lib/commonjs/hooks/base/index.js +34 -0
  199. package/lib/commonjs/hooks/base/index.js.map +1 -0
  200. package/lib/commonjs/hooks/base/useCard/index.js +62 -0
  201. package/lib/commonjs/hooks/base/useCard/index.js.map +1 -0
  202. package/lib/commonjs/hooks/base/useCvcCode/index.js +52 -0
  203. package/lib/commonjs/hooks/base/useCvcCode/index.js.map +1 -0
  204. package/lib/commonjs/hooks/base/useExpirationDate/index.js +66 -0
  205. package/lib/commonjs/hooks/base/useExpirationDate/index.js.map +1 -0
  206. package/lib/commonjs/hooks/base/useName/index.js +52 -0
  207. package/lib/commonjs/hooks/base/useName/index.js.map +1 -0
  208. package/lib/commonjs/hooks/useSafeArea.js +18 -0
  209. package/lib/commonjs/hooks/useSafeArea.js.map +1 -0
  210. package/lib/commonjs/hooks/useSumUp.js +82 -0
  211. package/lib/commonjs/hooks/useSumUp.js.map +1 -0
  212. package/lib/commonjs/index.js +59 -0
  213. package/lib/commonjs/index.js.map +1 -0
  214. package/lib/commonjs/publicApi/errors.js +103 -0
  215. package/lib/commonjs/publicApi/errors.js.map +1 -0
  216. package/lib/commonjs/services/API/ApiManager/index.js +154 -0
  217. package/lib/commonjs/services/API/ApiManager/index.js.map +1 -0
  218. package/lib/commonjs/services/API/CheckoutApiManager/index.js +83 -0
  219. package/lib/commonjs/services/API/CheckoutApiManager/index.js.map +1 -0
  220. package/lib/commonjs/services/API/CheckoutApiManager/models.js +6 -0
  221. package/lib/commonjs/services/API/CheckoutApiManager/models.js.map +1 -0
  222. package/lib/commonjs/services/API/PullingService/index.js +26 -0
  223. package/lib/commonjs/services/API/PullingService/index.js.map +1 -0
  224. package/lib/commonjs/services/ApplePayService/index.js +51 -0
  225. package/lib/commonjs/services/ApplePayService/index.js.map +1 -0
  226. package/lib/commonjs/services/GooglePayService/index.js +57 -0
  227. package/lib/commonjs/services/GooglePayService/index.js.map +1 -0
  228. package/lib/commonjs/services/Logger/index.js +27 -0
  229. package/lib/commonjs/services/Logger/index.js.map +1 -0
  230. package/lib/commonjs/services/NativePaymentsBridge/index.js +10 -0
  231. package/lib/commonjs/services/NativePaymentsBridge/index.js.map +1 -0
  232. package/lib/commonjs/stores/BaseSheetStore/index.js +127 -0
  233. package/lib/commonjs/stores/BaseSheetStore/index.js.map +1 -0
  234. package/lib/commonjs/stores/NativePaymentStore/index.js +108 -0
  235. package/lib/commonjs/stores/NativePaymentStore/index.js.map +1 -0
  236. package/lib/commonjs/stores/PaymentInstrumentsStore/index.js +121 -0
  237. package/lib/commonjs/stores/PaymentInstrumentsStore/index.js.map +1 -0
  238. package/lib/commonjs/stores/PaymentStore/index.js +150 -0
  239. package/lib/commonjs/stores/PaymentStore/index.js.map +1 -0
  240. package/lib/commonjs/stores/RootStore.js +25 -0
  241. package/lib/commonjs/stores/RootStore.js.map +1 -0
  242. package/lib/commonjs/stores/SaveCardStore/index.js +131 -0
  243. package/lib/commonjs/stores/SaveCardStore/index.js.map +1 -0
  244. package/lib/commonjs/stores/ThreeDSecureStore/index.js +63 -0
  245. package/lib/commonjs/stores/ThreeDSecureStore/index.js.map +1 -0
  246. package/lib/commonjs/styles/colors.js +30 -0
  247. package/lib/commonjs/styles/colors.js.map +1 -0
  248. package/lib/commonjs/styles/fonts.js +13 -0
  249. package/lib/commonjs/styles/fonts.js.map +1 -0
  250. package/lib/commonjs/styles/images.js +23 -0
  251. package/lib/commonjs/styles/images.js.map +1 -0
  252. package/lib/commonjs/styles/index.js +15 -0
  253. package/lib/commonjs/styles/index.js.map +1 -0
  254. package/lib/commonjs/translations/bg-BG.json +55 -0
  255. package/lib/commonjs/translations/ca-ES.json +55 -0
  256. package/lib/commonjs/translations/cs-CZ.json +55 -0
  257. package/lib/commonjs/translations/da-DK.json +55 -0
  258. package/lib/commonjs/translations/de-AT.json +55 -0
  259. package/lib/commonjs/translations/de-CH.json +55 -0
  260. package/lib/commonjs/translations/de-DE.json +55 -0
  261. package/lib/commonjs/translations/de-LU.json +55 -0
  262. package/lib/commonjs/translations/el-CY.json +55 -0
  263. package/lib/commonjs/translations/el-GR.json +55 -0
  264. package/lib/commonjs/translations/en-AU.json +55 -0
  265. package/lib/commonjs/translations/en-GB.json +55 -0
  266. package/lib/commonjs/translations/en-IE.json +55 -0
  267. package/lib/commonjs/translations/en-MT.json +55 -0
  268. package/lib/commonjs/translations/en-US.json +55 -0
  269. package/lib/commonjs/translations/en.json +55 -0
  270. package/lib/commonjs/translations/es-CL.json +55 -0
  271. package/lib/commonjs/translations/es-CO.json +55 -0
  272. package/lib/commonjs/translations/es-ES.json +55 -0
  273. package/lib/commonjs/translations/es-LA.json +55 -0
  274. package/lib/commonjs/translations/es-PE.json +55 -0
  275. package/lib/commonjs/translations/et-EE.json +55 -0
  276. package/lib/commonjs/translations/fi-FI.json +55 -0
  277. package/lib/commonjs/translations/fr-BE.json +55 -0
  278. package/lib/commonjs/translations/fr-CH.json +55 -0
  279. package/lib/commonjs/translations/fr-FR.json +55 -0
  280. package/lib/commonjs/translations/fr-LU.json +55 -0
  281. package/lib/commonjs/translations/hr-HR.json +55 -0
  282. package/lib/commonjs/translations/hu-HU.json +55 -0
  283. package/lib/commonjs/translations/index.js +95 -0
  284. package/lib/commonjs/translations/index.js.map +1 -0
  285. package/lib/commonjs/translations/it-CH.json +55 -0
  286. package/lib/commonjs/translations/it-IT.json +55 -0
  287. package/lib/commonjs/translations/lt-LT.json +55 -0
  288. package/lib/commonjs/translations/lv-LV.json +55 -0
  289. package/lib/commonjs/translations/nb-NO.json +55 -0
  290. package/lib/commonjs/translations/nl-BE.json +55 -0
  291. package/lib/commonjs/translations/nl-NL.json +55 -0
  292. package/lib/commonjs/translations/pl-PL.json +55 -0
  293. package/lib/commonjs/translations/pt-BR.json +55 -0
  294. package/lib/commonjs/translations/pt-PT.json +55 -0
  295. package/lib/commonjs/translations/ro-RO.json +55 -0
  296. package/lib/commonjs/translations/sk-SK.json +55 -0
  297. package/lib/commonjs/translations/sl-SI.json +55 -0
  298. package/lib/commonjs/translations/sv-SE.json +55 -0
  299. package/lib/commonjs/types/ApplePay.js +2 -0
  300. package/lib/commonjs/types/ApplePay.js.map +1 -0
  301. package/lib/commonjs/types/CommonSheet.js +2 -0
  302. package/lib/commonjs/types/CommonSheet.js.map +1 -0
  303. package/lib/commonjs/types/GooglePay.js +2 -0
  304. package/lib/commonjs/types/GooglePay.js.map +1 -0
  305. package/lib/commonjs/types/PaymentSheet.js +6 -0
  306. package/lib/commonjs/types/PaymentSheet.js.map +1 -0
  307. package/lib/commonjs/types/Requests.js +2 -0
  308. package/lib/commonjs/types/Requests.js.map +1 -0
  309. package/lib/commonjs/types/SaveCardSheet.js +6 -0
  310. package/lib/commonjs/types/SaveCardSheet.js.map +1 -0
  311. package/lib/commonjs/types/index.js +19 -0
  312. package/lib/commonjs/types/index.js.map +1 -0
  313. package/lib/commonjs/types/react-native-safe-area-context.d.js +2 -0
  314. package/lib/commonjs/types/react-native-safe-area-context.d.js.map +1 -0
  315. package/lib/module/assets/fonts/AktivGrotesk/AktivGrotesk-Bold.ttf +0 -0
  316. package/lib/module/assets/fonts/SFProText/SFProText-Bold.ttf +0 -0
  317. package/lib/module/assets/fonts/SFProText/SFProText-Regular.ttf +0 -0
  318. package/lib/module/assets/icons/americanExpress/americanExpress@2x.png +0 -0
  319. package/lib/module/assets/icons/americanExpress/americanExpress@3x.png +0 -0
  320. package/lib/module/assets/icons/applePay/applePay@2x.png +0 -0
  321. package/lib/module/assets/icons/applePay/applePay@3x.png +0 -0
  322. package/lib/module/assets/icons/back/back@2x.png +0 -0
  323. package/lib/module/assets/icons/back/back@3x.png +0 -0
  324. package/lib/module/assets/icons/cardPlaceholder/cardPlaceholder@2x.png +0 -0
  325. package/lib/module/assets/icons/cardPlaceholder/cardPlaceholder@3x.png +0 -0
  326. package/lib/module/assets/icons/checkbox/checkbox@2x.png +0 -0
  327. package/lib/module/assets/icons/checkbox/checkbox@3x.png +0 -0
  328. package/lib/module/assets/icons/cross/cross@2x.png +0 -0
  329. package/lib/module/assets/icons/cross/cross@3x.png +0 -0
  330. package/lib/module/assets/icons/googlePay/googlePay@2x.png +0 -0
  331. package/lib/module/assets/icons/googlePay/googlePay@3x.png +0 -0
  332. package/lib/module/assets/icons/lock/lock@2x.png +0 -0
  333. package/lib/module/assets/icons/lock/lock@3x.png +0 -0
  334. package/lib/module/assets/icons/mastercard/mastercard@2x.png +0 -0
  335. package/lib/module/assets/icons/mastercard/mastercard@3x.png +0 -0
  336. package/lib/module/assets/icons/more/more@2x.png +0 -0
  337. package/lib/module/assets/icons/more/more@3x.png +0 -0
  338. package/lib/module/assets/icons/rightArrow/rightArrow@2x.png +0 -0
  339. package/lib/module/assets/icons/rightArrow/rightArrow@3x.png +0 -0
  340. package/lib/module/assets/icons/visa/visa@2x.png +0 -0
  341. package/lib/module/assets/icons/visa/visa@3x.png +0 -0
  342. package/lib/module/assets/icons/whiteCheckmark/whiteCheckmark@2x.png +0 -0
  343. package/lib/module/assets/icons/whiteCheckmark/whiteCheckmark@3x.png +0 -0
  344. package/lib/module/components/3DSecureSheet/index.js +46 -0
  345. package/lib/module/components/3DSecureSheet/index.js.map +1 -0
  346. package/lib/module/components/AnimatedContainer/index.js +66 -0
  347. package/lib/module/components/AnimatedContainer/index.js.map +1 -0
  348. package/lib/module/components/AnimatedContainer/styles.js +33 -0
  349. package/lib/module/components/AnimatedContainer/styles.js.map +1 -0
  350. package/lib/module/components/ApplePayButton/index.js +21 -0
  351. package/lib/module/components/ApplePayButton/index.js.map +1 -0
  352. package/lib/module/components/ApplePayButton/styles.js +24 -0
  353. package/lib/module/components/ApplePayButton/styles.js.map +1 -0
  354. package/lib/module/components/Button/index.js +13 -0
  355. package/lib/module/components/Button/index.js.map +1 -0
  356. package/lib/module/components/Button/styles.js +48 -0
  357. package/lib/module/components/Button/styles.js.map +1 -0
  358. package/lib/module/components/CardInformation/index.js +78 -0
  359. package/lib/module/components/CardInformation/index.js.map +1 -0
  360. package/lib/module/components/CardInformation/styles.js +35 -0
  361. package/lib/module/components/CardInformation/styles.js.map +1 -0
  362. package/lib/module/components/CardSheet/index.js +130 -0
  363. package/lib/module/components/CardSheet/index.js.map +1 -0
  364. package/lib/module/components/CardSheet/styles.js +46 -0
  365. package/lib/module/components/CardSheet/styles.js.map +1 -0
  366. package/lib/module/components/CardSheet/useCardSheet/index.js +83 -0
  367. package/lib/module/components/CardSheet/useCardSheet/index.js.map +1 -0
  368. package/lib/module/components/Checkbox/index.js +17 -0
  369. package/lib/module/components/Checkbox/index.js.map +1 -0
  370. package/lib/module/components/Checkbox/styles.js +24 -0
  371. package/lib/module/components/Checkbox/styles.js.map +1 -0
  372. package/lib/module/components/GooglePayButton/index.js +21 -0
  373. package/lib/module/components/GooglePayButton/index.js.map +1 -0
  374. package/lib/module/components/GooglePayButton/styles.js +29 -0
  375. package/lib/module/components/GooglePayButton/styles.js.map +1 -0
  376. package/lib/module/components/Header/index.js +27 -0
  377. package/lib/module/components/Header/index.js.map +1 -0
  378. package/lib/module/components/Header/styles.js +35 -0
  379. package/lib/module/components/Header/styles.js.map +1 -0
  380. package/lib/module/components/ImageButton/index.js +20 -0
  381. package/lib/module/components/ImageButton/index.js.map +1 -0
  382. package/lib/module/components/ImageButton/styles.js +9 -0
  383. package/lib/module/components/ImageButton/styles.js.map +1 -0
  384. package/lib/module/components/InputFields/BaseInputField/index.js +40 -0
  385. package/lib/module/components/InputFields/BaseInputField/index.js.map +1 -0
  386. package/lib/module/components/InputFields/BaseInputField/styles.js +38 -0
  387. package/lib/module/components/InputFields/BaseInputField/styles.js.map +1 -0
  388. package/lib/module/components/InputFields/CVCInputField/index.js +19 -0
  389. package/lib/module/components/InputFields/CVCInputField/index.js.map +1 -0
  390. package/lib/module/components/InputFields/CVCInputField/styles.js +21 -0
  391. package/lib/module/components/InputFields/CVCInputField/styles.js.map +1 -0
  392. package/lib/module/components/InputFields/CardInputField/index.js +39 -0
  393. package/lib/module/components/InputFields/CardInputField/index.js.map +1 -0
  394. package/lib/module/components/InputFields/CardInputField/styles.js +24 -0
  395. package/lib/module/components/InputFields/CardInputField/styles.js.map +1 -0
  396. package/lib/module/components/InputFields/ExpirationDateInputField/index.js +12 -0
  397. package/lib/module/components/InputFields/ExpirationDateInputField/index.js.map +1 -0
  398. package/lib/module/components/LoadingSpinner/index.js +33 -0
  399. package/lib/module/components/LoadingSpinner/index.js.map +1 -0
  400. package/lib/module/components/LoadingSpinner/styles.js +28 -0
  401. package/lib/module/components/LoadingSpinner/styles.js.map +1 -0
  402. package/lib/module/components/Modal/index.js +19 -0
  403. package/lib/module/components/Modal/index.js.map +1 -0
  404. package/lib/module/components/Modal/styles.js +28 -0
  405. package/lib/module/components/Modal/styles.js.map +1 -0
  406. package/lib/module/components/NativePayButton/index.js +12 -0
  407. package/lib/module/components/NativePayButton/index.js.map +1 -0
  408. package/lib/module/components/NoInternetConnection/index.js +24 -0
  409. package/lib/module/components/NoInternetConnection/index.js.map +1 -0
  410. package/lib/module/components/NoInternetConnection/styles.js +14 -0
  411. package/lib/module/components/NoInternetConnection/styles.js.map +1 -0
  412. package/lib/module/components/OptionMenuModal/index.js +66 -0
  413. package/lib/module/components/OptionMenuModal/index.js.map +1 -0
  414. package/lib/module/components/OptionMenuModal/styles.js +43 -0
  415. package/lib/module/components/OptionMenuModal/styles.js.map +1 -0
  416. package/lib/module/components/PayButton/index.js +48 -0
  417. package/lib/module/components/PayButton/index.js.map +1 -0
  418. package/lib/module/components/PayButton/styles.js +25 -0
  419. package/lib/module/components/PayButton/styles.js.map +1 -0
  420. package/lib/module/components/PaymentMethod/index.js +36 -0
  421. package/lib/module/components/PaymentMethod/index.js.map +1 -0
  422. package/lib/module/components/PaymentMethod/styles.js +15 -0
  423. package/lib/module/components/PaymentMethod/styles.js.map +1 -0
  424. package/lib/module/components/PaymentMethodFormHeaderOption/index.js +20 -0
  425. package/lib/module/components/PaymentMethodFormHeaderOption/index.js.map +1 -0
  426. package/lib/module/components/PaymentMethodFormHeaderOption/styles.js +36 -0
  427. package/lib/module/components/PaymentMethodFormHeaderOption/styles.js.map +1 -0
  428. package/lib/module/components/PaymentMethodsForm/index.js +14 -0
  429. package/lib/module/components/PaymentMethodsForm/index.js.map +1 -0
  430. package/lib/module/components/PaymentMethodsForm/styles.js +23 -0
  431. package/lib/module/components/PaymentMethodsForm/styles.js.map +1 -0
  432. package/lib/module/components/PaymentSheet/index.js +76 -0
  433. package/lib/module/components/PaymentSheet/index.js.map +1 -0
  434. package/lib/module/components/PrivacyPolicySheet/consts.js +41 -0
  435. package/lib/module/components/PrivacyPolicySheet/consts.js.map +1 -0
  436. package/lib/module/components/PrivacyPolicySheet/index.js +26 -0
  437. package/lib/module/components/PrivacyPolicySheet/index.js.map +1 -0
  438. package/lib/module/components/ProcessButton/index.js +54 -0
  439. package/lib/module/components/ProcessButton/index.js.map +1 -0
  440. package/lib/module/components/ProcessButton/styles.js +29 -0
  441. package/lib/module/components/ProcessButton/styles.js.map +1 -0
  442. package/lib/module/components/SaveCard/index.js +79 -0
  443. package/lib/module/components/SaveCard/index.js.map +1 -0
  444. package/lib/module/components/SaveCard/styles.js +16 -0
  445. package/lib/module/components/SaveCard/styles.js.map +1 -0
  446. package/lib/module/components/SaveCard/useSaveCard/index.js +56 -0
  447. package/lib/module/components/SaveCard/useSaveCard/index.js.map +1 -0
  448. package/lib/module/components/SaveCardButton/index.js +25 -0
  449. package/lib/module/components/SaveCardButton/index.js.map +1 -0
  450. package/lib/module/components/SaveCardButton/styles.js +25 -0
  451. package/lib/module/components/SaveCardButton/styles.js.map +1 -0
  452. package/lib/module/components/SaveCardSheet/index.js +24 -0
  453. package/lib/module/components/SaveCardSheet/index.js.map +1 -0
  454. package/lib/module/components/SavedCard/index.js +42 -0
  455. package/lib/module/components/SavedCard/index.js.map +1 -0
  456. package/lib/module/components/SavedCard/styles.js +32 -0
  457. package/lib/module/components/SavedCard/styles.js.map +1 -0
  458. package/lib/module/components/SavedCardsSheet/index.js +78 -0
  459. package/lib/module/components/SavedCardsSheet/index.js.map +1 -0
  460. package/lib/module/components/SavedCardsSheet/styles.js +15 -0
  461. package/lib/module/components/SavedCardsSheet/styles.js.map +1 -0
  462. package/lib/module/components/SumUpProvider.js +51 -0
  463. package/lib/module/components/SumUpProvider.js.map +1 -0
  464. package/lib/module/components/Switch/index.js +28 -0
  465. package/lib/module/components/Switch/index.js.map +1 -0
  466. package/lib/module/components/Switch/styles.js +48 -0
  467. package/lib/module/components/Switch/styles.js.map +1 -0
  468. package/lib/module/components/Text/index.js +54 -0
  469. package/lib/module/components/Text/index.js.map +1 -0
  470. package/lib/module/components/Text/styles.js +12 -0
  471. package/lib/module/components/Text/styles.js.map +1 -0
  472. package/lib/module/components/WebViewSheet/index.js +38 -0
  473. package/lib/module/components/WebViewSheet/index.js.map +1 -0
  474. package/lib/module/components/WebViewSheet/styles.js +47 -0
  475. package/lib/module/components/WebViewSheet/styles.js.map +1 -0
  476. package/lib/module/consts/UI.js +4 -0
  477. package/lib/module/consts/UI.js.map +1 -0
  478. package/lib/module/consts/errors.js +7 -0
  479. package/lib/module/consts/errors.js.map +1 -0
  480. package/lib/module/consts/nativePayMethod.js +12 -0
  481. package/lib/module/consts/nativePayMethod.js.map +1 -0
  482. package/lib/module/consts/validation.js +15 -0
  483. package/lib/module/consts/validation.js.map +1 -0
  484. package/lib/module/contexts/LanguageContext/index.js +28 -0
  485. package/lib/module/contexts/LanguageContext/index.js.map +1 -0
  486. package/lib/module/contexts/OptionMenuContext/index.js +29 -0
  487. package/lib/module/contexts/OptionMenuContext/index.js.map +1 -0
  488. package/lib/module/contexts/PaymentSheetContext/index.js +28 -0
  489. package/lib/module/contexts/PaymentSheetContext/index.js.map +1 -0
  490. package/lib/module/contexts/StoreContext.js +33 -0
  491. package/lib/module/contexts/StoreContext.js.map +1 -0
  492. package/lib/module/contexts/ThemeContext.js +8 -0
  493. package/lib/module/contexts/ThemeContext.js.map +1 -0
  494. package/lib/module/helpers/formatAmount/index.js +19 -0
  495. package/lib/module/helpers/formatAmount/index.js.map +1 -0
  496. package/lib/module/helpers/getUserAgent/index.js +5 -0
  497. package/lib/module/helpers/getUserAgent/index.js.map +1 -0
  498. package/lib/module/helpers/validation/paymentFields.js +43 -0
  499. package/lib/module/helpers/validation/paymentFields.js.map +1 -0
  500. package/lib/module/hooks/base/index.js +6 -0
  501. package/lib/module/hooks/base/index.js.map +1 -0
  502. package/lib/module/hooks/base/useCard/index.js +54 -0
  503. package/lib/module/hooks/base/useCard/index.js.map +1 -0
  504. package/lib/module/hooks/base/useCvcCode/index.js +44 -0
  505. package/lib/module/hooks/base/useCvcCode/index.js.map +1 -0
  506. package/lib/module/hooks/base/useExpirationDate/index.js +58 -0
  507. package/lib/module/hooks/base/useExpirationDate/index.js.map +1 -0
  508. package/lib/module/hooks/base/useName/index.js +44 -0
  509. package/lib/module/hooks/base/useName/index.js.map +1 -0
  510. package/lib/module/hooks/useSafeArea.js +11 -0
  511. package/lib/module/hooks/useSafeArea.js.map +1 -0
  512. package/lib/module/hooks/useSumUp.js +76 -0
  513. package/lib/module/hooks/useSumUp.js.map +1 -0
  514. package/lib/module/index.js +13 -0
  515. package/lib/module/index.js.map +1 -0
  516. package/lib/module/publicApi/errors.js +92 -0
  517. package/lib/module/publicApi/errors.js.map +1 -0
  518. package/lib/module/services/API/ApiManager/index.js +141 -0
  519. package/lib/module/services/API/ApiManager/index.js.map +1 -0
  520. package/lib/module/services/API/CheckoutApiManager/index.js +76 -0
  521. package/lib/module/services/API/CheckoutApiManager/index.js.map +1 -0
  522. package/lib/module/services/API/CheckoutApiManager/models.js +2 -0
  523. package/lib/module/services/API/CheckoutApiManager/models.js.map +1 -0
  524. package/lib/module/services/API/PullingService/index.js +19 -0
  525. package/lib/module/services/API/PullingService/index.js.map +1 -0
  526. package/lib/module/services/ApplePayService/index.js +42 -0
  527. package/lib/module/services/ApplePayService/index.js.map +1 -0
  528. package/lib/module/services/GooglePayService/index.js +48 -0
  529. package/lib/module/services/GooglePayService/index.js.map +1 -0
  530. package/lib/module/services/Logger/index.js +20 -0
  531. package/lib/module/services/Logger/index.js.map +1 -0
  532. package/lib/module/services/NativePaymentsBridge/index.js +3 -0
  533. package/lib/module/services/NativePaymentsBridge/index.js.map +1 -0
  534. package/lib/module/stores/BaseSheetStore/index.js +119 -0
  535. package/lib/module/stores/BaseSheetStore/index.js.map +1 -0
  536. package/lib/module/stores/NativePaymentStore/index.js +100 -0
  537. package/lib/module/stores/NativePaymentStore/index.js.map +1 -0
  538. package/lib/module/stores/PaymentInstrumentsStore/index.js +113 -0
  539. package/lib/module/stores/PaymentInstrumentsStore/index.js.map +1 -0
  540. package/lib/module/stores/PaymentStore/index.js +142 -0
  541. package/lib/module/stores/PaymentStore/index.js.map +1 -0
  542. package/lib/module/stores/RootStore.js +18 -0
  543. package/lib/module/stores/RootStore.js.map +1 -0
  544. package/lib/module/stores/SaveCardStore/index.js +123 -0
  545. package/lib/module/stores/SaveCardStore/index.js.map +1 -0
  546. package/lib/module/stores/ThreeDSecureStore/index.js +55 -0
  547. package/lib/module/stores/ThreeDSecureStore/index.js.map +1 -0
  548. package/lib/module/styles/colors.js +23 -0
  549. package/lib/module/styles/colors.js.map +1 -0
  550. package/lib/module/styles/fonts.js +6 -0
  551. package/lib/module/styles/fonts.js.map +1 -0
  552. package/lib/module/styles/images.js +16 -0
  553. package/lib/module/styles/images.js.map +1 -0
  554. package/lib/module/styles/index.js +5 -0
  555. package/lib/module/styles/index.js.map +1 -0
  556. package/lib/module/translations/bg-BG.json +55 -0
  557. package/lib/module/translations/ca-ES.json +55 -0
  558. package/lib/module/translations/cs-CZ.json +55 -0
  559. package/lib/module/translations/da-DK.json +55 -0
  560. package/lib/module/translations/de-AT.json +55 -0
  561. package/lib/module/translations/de-CH.json +55 -0
  562. package/lib/module/translations/de-DE.json +55 -0
  563. package/lib/module/translations/de-LU.json +55 -0
  564. package/lib/module/translations/el-CY.json +55 -0
  565. package/lib/module/translations/el-GR.json +55 -0
  566. package/lib/module/translations/en-AU.json +55 -0
  567. package/lib/module/translations/en-GB.json +55 -0
  568. package/lib/module/translations/en-IE.json +55 -0
  569. package/lib/module/translations/en-MT.json +55 -0
  570. package/lib/module/translations/en-US.json +55 -0
  571. package/lib/module/translations/en.json +55 -0
  572. package/lib/module/translations/es-CL.json +55 -0
  573. package/lib/module/translations/es-CO.json +55 -0
  574. package/lib/module/translations/es-ES.json +55 -0
  575. package/lib/module/translations/es-LA.json +55 -0
  576. package/lib/module/translations/es-PE.json +55 -0
  577. package/lib/module/translations/et-EE.json +55 -0
  578. package/lib/module/translations/fi-FI.json +55 -0
  579. package/lib/module/translations/fr-BE.json +55 -0
  580. package/lib/module/translations/fr-CH.json +55 -0
  581. package/lib/module/translations/fr-FR.json +55 -0
  582. package/lib/module/translations/fr-LU.json +55 -0
  583. package/lib/module/translations/hr-HR.json +55 -0
  584. package/lib/module/translations/hu-HU.json +55 -0
  585. package/lib/module/translations/index.js +87 -0
  586. package/lib/module/translations/index.js.map +1 -0
  587. package/lib/module/translations/it-CH.json +55 -0
  588. package/lib/module/translations/it-IT.json +55 -0
  589. package/lib/module/translations/lt-LT.json +55 -0
  590. package/lib/module/translations/lv-LV.json +55 -0
  591. package/lib/module/translations/nb-NO.json +55 -0
  592. package/lib/module/translations/nl-BE.json +55 -0
  593. package/lib/module/translations/nl-NL.json +55 -0
  594. package/lib/module/translations/pl-PL.json +55 -0
  595. package/lib/module/translations/pt-BR.json +55 -0
  596. package/lib/module/translations/pt-PT.json +55 -0
  597. package/lib/module/translations/ro-RO.json +55 -0
  598. package/lib/module/translations/sk-SK.json +55 -0
  599. package/lib/module/translations/sl-SI.json +55 -0
  600. package/lib/module/translations/sv-SE.json +55 -0
  601. package/lib/module/types/ApplePay.js +2 -0
  602. package/lib/module/types/ApplePay.js.map +1 -0
  603. package/lib/module/types/CommonSheet.js +2 -0
  604. package/lib/module/types/CommonSheet.js.map +1 -0
  605. package/lib/module/types/GooglePay.js +2 -0
  606. package/lib/module/types/GooglePay.js.map +1 -0
  607. package/lib/module/types/PaymentSheet.js +2 -0
  608. package/lib/module/types/PaymentSheet.js.map +1 -0
  609. package/lib/module/types/Requests.js +2 -0
  610. package/lib/module/types/Requests.js.map +1 -0
  611. package/lib/module/types/SaveCardSheet.js +2 -0
  612. package/lib/module/types/SaveCardSheet.js.map +1 -0
  613. package/lib/module/types/index.js +7 -0
  614. package/lib/module/types/index.js.map +1 -0
  615. package/lib/module/types/react-native-safe-area-context.d.js +2 -0
  616. package/lib/module/types/react-native-safe-area-context.d.js.map +1 -0
  617. package/lib/typescript/components/3DSecureSheet/index.d.ts +5 -0
  618. package/lib/typescript/components/3DSecureSheet/index.d.ts.map +1 -0
  619. package/lib/typescript/components/AnimatedContainer/index.d.ts +15 -0
  620. package/lib/typescript/components/AnimatedContainer/index.d.ts.map +1 -0
  621. package/lib/typescript/components/AnimatedContainer/styles.d.ts +22 -0
  622. package/lib/typescript/components/AnimatedContainer/styles.d.ts.map +1 -0
  623. package/lib/typescript/components/ApplePayButton/index.d.ts +7 -0
  624. package/lib/typescript/components/ApplePayButton/index.d.ts.map +1 -0
  625. package/lib/typescript/components/ApplePayButton/styles.d.ts +16 -0
  626. package/lib/typescript/components/ApplePayButton/styles.d.ts.map +1 -0
  627. package/lib/typescript/components/Button/index.d.ts +10 -0
  628. package/lib/typescript/components/Button/index.d.ts.map +1 -0
  629. package/lib/typescript/components/Button/styles.d.ts +20 -0
  630. package/lib/typescript/components/Button/styles.d.ts.map +1 -0
  631. package/lib/typescript/components/CardInformation/index.d.ts +16 -0
  632. package/lib/typescript/components/CardInformation/index.d.ts.map +1 -0
  633. package/lib/typescript/components/CardInformation/styles.d.ts +27 -0
  634. package/lib/typescript/components/CardInformation/styles.d.ts.map +1 -0
  635. package/lib/typescript/components/CardSheet/index.d.ts +10 -0
  636. package/lib/typescript/components/CardSheet/index.d.ts.map +1 -0
  637. package/lib/typescript/components/CardSheet/styles.d.ts +31 -0
  638. package/lib/typescript/components/CardSheet/styles.d.ts.map +1 -0
  639. package/lib/typescript/components/CardSheet/useCardSheet/index.d.ts +17 -0
  640. package/lib/typescript/components/CardSheet/useCardSheet/index.d.ts.map +1 -0
  641. package/lib/typescript/components/Checkbox/index.d.ts +8 -0
  642. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -0
  643. package/lib/typescript/components/Checkbox/styles.d.ts +16 -0
  644. package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -0
  645. package/lib/typescript/components/GooglePayButton/index.d.ts +7 -0
  646. package/lib/typescript/components/GooglePayButton/index.d.ts.map +1 -0
  647. package/lib/typescript/components/GooglePayButton/styles.d.ts +21 -0
  648. package/lib/typescript/components/GooglePayButton/styles.d.ts.map +1 -0
  649. package/lib/typescript/components/Header/index.d.ts +9 -0
  650. package/lib/typescript/components/Header/index.d.ts.map +1 -0
  651. package/lib/typescript/components/Header/styles.d.ts +26 -0
  652. package/lib/typescript/components/Header/styles.d.ts.map +1 -0
  653. package/lib/typescript/components/ImageButton/index.d.ts +9 -0
  654. package/lib/typescript/components/ImageButton/index.d.ts.map +1 -0
  655. package/lib/typescript/components/ImageButton/styles.d.ts +5 -0
  656. package/lib/typescript/components/ImageButton/styles.d.ts.map +1 -0
  657. package/lib/typescript/components/InputFields/BaseInputField/index.d.ts +13 -0
  658. package/lib/typescript/components/InputFields/BaseInputField/index.d.ts.map +1 -0
  659. package/lib/typescript/components/InputFields/BaseInputField/styles.d.ts +29 -0
  660. package/lib/typescript/components/InputFields/BaseInputField/styles.d.ts.map +1 -0
  661. package/lib/typescript/components/InputFields/CVCInputField/index.d.ts +6 -0
  662. package/lib/typescript/components/InputFields/CVCInputField/index.d.ts.map +1 -0
  663. package/lib/typescript/components/InputFields/CVCInputField/styles.d.ts +17 -0
  664. package/lib/typescript/components/InputFields/CVCInputField/styles.d.ts.map +1 -0
  665. package/lib/typescript/components/InputFields/CardInputField/index.d.ts +9 -0
  666. package/lib/typescript/components/InputFields/CardInputField/index.d.ts.map +1 -0
  667. package/lib/typescript/components/InputFields/CardInputField/styles.d.ts +20 -0
  668. package/lib/typescript/components/InputFields/CardInputField/styles.d.ts.map +1 -0
  669. package/lib/typescript/components/InputFields/ExpirationDateInputField/index.d.ts +9 -0
  670. package/lib/typescript/components/InputFields/ExpirationDateInputField/index.d.ts.map +1 -0
  671. package/lib/typescript/components/LoadingSpinner/index.d.ts +3 -0
  672. package/lib/typescript/components/LoadingSpinner/index.d.ts.map +1 -0
  673. package/lib/typescript/components/LoadingSpinner/styles.d.ts +20 -0
  674. package/lib/typescript/components/LoadingSpinner/styles.d.ts.map +1 -0
  675. package/lib/typescript/components/Modal/index.d.ts +9 -0
  676. package/lib/typescript/components/Modal/index.d.ts.map +1 -0
  677. package/lib/typescript/components/Modal/styles.d.ts +20 -0
  678. package/lib/typescript/components/Modal/styles.d.ts.map +1 -0
  679. package/lib/typescript/components/NativePayButton/index.d.ts +7 -0
  680. package/lib/typescript/components/NativePayButton/index.d.ts.map +1 -0
  681. package/lib/typescript/components/NoInternetConnection/index.d.ts +3 -0
  682. package/lib/typescript/components/NoInternetConnection/index.d.ts.map +1 -0
  683. package/lib/typescript/components/NoInternetConnection/styles.d.ts +6 -0
  684. package/lib/typescript/components/NoInternetConnection/styles.d.ts.map +1 -0
  685. package/lib/typescript/components/OptionMenuModal/index.d.ts +8 -0
  686. package/lib/typescript/components/OptionMenuModal/index.d.ts.map +1 -0
  687. package/lib/typescript/components/OptionMenuModal/styles.d.ts +34 -0
  688. package/lib/typescript/components/OptionMenuModal/styles.d.ts.map +1 -0
  689. package/lib/typescript/components/PayButton/index.d.ts +10 -0
  690. package/lib/typescript/components/PayButton/index.d.ts.map +1 -0
  691. package/lib/typescript/components/PayButton/styles.d.ts +16 -0
  692. package/lib/typescript/components/PayButton/styles.d.ts.map +1 -0
  693. package/lib/typescript/components/PaymentMethod/index.d.ts +11 -0
  694. package/lib/typescript/components/PaymentMethod/index.d.ts.map +1 -0
  695. package/lib/typescript/components/PaymentMethod/styles.d.ts +11 -0
  696. package/lib/typescript/components/PaymentMethod/styles.d.ts.map +1 -0
  697. package/lib/typescript/components/PaymentMethodFormHeaderOption/index.d.ts +11 -0
  698. package/lib/typescript/components/PaymentMethodFormHeaderOption/index.d.ts.map +1 -0
  699. package/lib/typescript/components/PaymentMethodFormHeaderOption/styles.d.ts +27 -0
  700. package/lib/typescript/components/PaymentMethodFormHeaderOption/styles.d.ts.map +1 -0
  701. package/lib/typescript/components/PaymentMethodsForm/index.d.ts +7 -0
  702. package/lib/typescript/components/PaymentMethodsForm/index.d.ts.map +1 -0
  703. package/lib/typescript/components/PaymentMethodsForm/styles.d.ts +15 -0
  704. package/lib/typescript/components/PaymentMethodsForm/styles.d.ts.map +1 -0
  705. package/lib/typescript/components/PaymentSheet/index.d.ts +5 -0
  706. package/lib/typescript/components/PaymentSheet/index.d.ts.map +1 -0
  707. package/lib/typescript/components/PrivacyPolicySheet/consts.d.ts +41 -0
  708. package/lib/typescript/components/PrivacyPolicySheet/consts.d.ts.map +1 -0
  709. package/lib/typescript/components/PrivacyPolicySheet/index.d.ts +10 -0
  710. package/lib/typescript/components/PrivacyPolicySheet/index.d.ts.map +1 -0
  711. package/lib/typescript/components/ProcessButton/index.d.ts +11 -0
  712. package/lib/typescript/components/ProcessButton/index.d.ts.map +1 -0
  713. package/lib/typescript/components/ProcessButton/styles.d.ts +16 -0
  714. package/lib/typescript/components/ProcessButton/styles.d.ts.map +1 -0
  715. package/lib/typescript/components/SaveCard/index.d.ts +9 -0
  716. package/lib/typescript/components/SaveCard/index.d.ts.map +1 -0
  717. package/lib/typescript/components/SaveCard/styles.d.ts +10 -0
  718. package/lib/typescript/components/SaveCard/styles.d.ts.map +1 -0
  719. package/lib/typescript/components/SaveCard/useSaveCard/index.d.ts +9 -0
  720. package/lib/typescript/components/SaveCard/useSaveCard/index.d.ts.map +1 -0
  721. package/lib/typescript/components/SaveCardButton/index.d.ts +10 -0
  722. package/lib/typescript/components/SaveCardButton/index.d.ts.map +1 -0
  723. package/lib/typescript/components/SaveCardButton/styles.d.ts +16 -0
  724. package/lib/typescript/components/SaveCardButton/styles.d.ts.map +1 -0
  725. package/lib/typescript/components/SaveCardSheet/index.d.ts +5 -0
  726. package/lib/typescript/components/SaveCardSheet/index.d.ts.map +1 -0
  727. package/lib/typescript/components/SavedCard/index.d.ts +8 -0
  728. package/lib/typescript/components/SavedCard/index.d.ts.map +1 -0
  729. package/lib/typescript/components/SavedCard/styles.d.ts +23 -0
  730. package/lib/typescript/components/SavedCard/styles.d.ts.map +1 -0
  731. package/lib/typescript/components/SavedCardsSheet/index.d.ts +10 -0
  732. package/lib/typescript/components/SavedCardsSheet/index.d.ts.map +1 -0
  733. package/lib/typescript/components/SavedCardsSheet/styles.d.ts +9 -0
  734. package/lib/typescript/components/SavedCardsSheet/styles.d.ts.map +1 -0
  735. package/lib/typescript/components/SumUpProvider.d.ts +25 -0
  736. package/lib/typescript/components/SumUpProvider.d.ts.map +1 -0
  737. package/lib/typescript/components/Switch/index.d.ts +9 -0
  738. package/lib/typescript/components/Switch/index.d.ts.map +1 -0
  739. package/lib/typescript/components/Switch/styles.d.ts +37 -0
  740. package/lib/typescript/components/Switch/styles.d.ts.map +1 -0
  741. package/lib/typescript/components/Text/index.d.ts +10 -0
  742. package/lib/typescript/components/Text/index.d.ts.map +1 -0
  743. package/lib/typescript/components/Text/styles.d.ts +9 -0
  744. package/lib/typescript/components/Text/styles.d.ts.map +1 -0
  745. package/lib/typescript/components/WebViewSheet/index.d.ts +9 -0
  746. package/lib/typescript/components/WebViewSheet/index.d.ts.map +1 -0
  747. package/lib/typescript/components/WebViewSheet/styles.d.ts +34 -0
  748. package/lib/typescript/components/WebViewSheet/styles.d.ts.map +1 -0
  749. package/lib/typescript/consts/UI.d.ts +5 -0
  750. package/lib/typescript/consts/UI.d.ts.map +1 -0
  751. package/lib/typescript/consts/errors.d.ts +7 -0
  752. package/lib/typescript/consts/errors.d.ts.map +1 -0
  753. package/lib/typescript/consts/nativePayMethod.d.ts +12 -0
  754. package/lib/typescript/consts/nativePayMethod.d.ts.map +1 -0
  755. package/lib/typescript/consts/validation.d.ts +16 -0
  756. package/lib/typescript/consts/validation.d.ts.map +1 -0
  757. package/lib/typescript/contexts/LanguageContext/index.d.ts +12 -0
  758. package/lib/typescript/contexts/LanguageContext/index.d.ts.map +1 -0
  759. package/lib/typescript/contexts/OptionMenuContext/index.d.ts +16 -0
  760. package/lib/typescript/contexts/OptionMenuContext/index.d.ts.map +1 -0
  761. package/lib/typescript/contexts/PaymentSheetContext/index.d.ts +13 -0
  762. package/lib/typescript/contexts/PaymentSheetContext/index.d.ts.map +1 -0
  763. package/lib/typescript/contexts/StoreContext.d.ts +15 -0
  764. package/lib/typescript/contexts/StoreContext.d.ts.map +1 -0
  765. package/lib/typescript/contexts/ThemeContext.d.ts +45 -0
  766. package/lib/typescript/contexts/ThemeContext.d.ts.map +1 -0
  767. package/lib/typescript/helpers/formatAmount/index.d.ts +2 -0
  768. package/lib/typescript/helpers/formatAmount/index.d.ts.map +1 -0
  769. package/lib/typescript/helpers/getUserAgent/index.d.ts +2 -0
  770. package/lib/typescript/helpers/getUserAgent/index.d.ts.map +1 -0
  771. package/lib/typescript/helpers/validation/paymentFields.d.ts +12 -0
  772. package/lib/typescript/helpers/validation/paymentFields.d.ts.map +1 -0
  773. package/lib/typescript/hooks/base/index.d.ts +6 -0
  774. package/lib/typescript/hooks/base/index.d.ts.map +1 -0
  775. package/lib/typescript/hooks/base/useCard/index.d.ts +3 -0
  776. package/lib/typescript/hooks/base/useCard/index.d.ts.map +1 -0
  777. package/lib/typescript/hooks/base/useCvcCode/index.d.ts +3 -0
  778. package/lib/typescript/hooks/base/useCvcCode/index.d.ts.map +1 -0
  779. package/lib/typescript/hooks/base/useExpirationDate/index.d.ts +3 -0
  780. package/lib/typescript/hooks/base/useExpirationDate/index.d.ts.map +1 -0
  781. package/lib/typescript/hooks/base/useName/index.d.ts +3 -0
  782. package/lib/typescript/hooks/base/useName/index.d.ts.map +1 -0
  783. package/lib/typescript/hooks/useSafeArea.d.ts +7 -0
  784. package/lib/typescript/hooks/useSafeArea.d.ts.map +1 -0
  785. package/lib/typescript/hooks/useSumUp.d.ts +15 -0
  786. package/lib/typescript/hooks/useSumUp.d.ts.map +1 -0
  787. package/lib/typescript/index.d.ts +6 -0
  788. package/lib/typescript/index.d.ts.map +1 -0
  789. package/lib/typescript/publicApi/errors.d.ts +29 -0
  790. package/lib/typescript/publicApi/errors.d.ts.map +1 -0
  791. package/lib/typescript/services/API/ApiManager/index.d.ts +32 -0
  792. package/lib/typescript/services/API/ApiManager/index.d.ts.map +1 -0
  793. package/lib/typescript/services/API/CheckoutApiManager/index.d.ts +17 -0
  794. package/lib/typescript/services/API/CheckoutApiManager/index.d.ts.map +1 -0
  795. package/lib/typescript/services/API/CheckoutApiManager/models.d.ts +80 -0
  796. package/lib/typescript/services/API/CheckoutApiManager/models.d.ts.map +1 -0
  797. package/lib/typescript/services/API/PullingService/index.d.ts +7 -0
  798. package/lib/typescript/services/API/PullingService/index.d.ts.map +1 -0
  799. package/lib/typescript/services/ApplePayService/index.d.ts +11 -0
  800. package/lib/typescript/services/ApplePayService/index.d.ts.map +1 -0
  801. package/lib/typescript/services/GooglePayService/index.d.ts +12 -0
  802. package/lib/typescript/services/GooglePayService/index.d.ts.map +1 -0
  803. package/lib/typescript/services/Logger/index.d.ts +12 -0
  804. package/lib/typescript/services/Logger/index.d.ts.map +1 -0
  805. package/lib/typescript/services/NativePaymentsBridge/index.d.ts +34 -0
  806. package/lib/typescript/services/NativePaymentsBridge/index.d.ts.map +1 -0
  807. package/lib/typescript/stores/BaseSheetStore/index.d.ts +24 -0
  808. package/lib/typescript/stores/BaseSheetStore/index.d.ts.map +1 -0
  809. package/lib/typescript/stores/NativePaymentStore/index.d.ts +23 -0
  810. package/lib/typescript/stores/NativePaymentStore/index.d.ts.map +1 -0
  811. package/lib/typescript/stores/PaymentInstrumentsStore/index.d.ts +29 -0
  812. package/lib/typescript/stores/PaymentInstrumentsStore/index.d.ts.map +1 -0
  813. package/lib/typescript/stores/PaymentStore/index.d.ts +18 -0
  814. package/lib/typescript/stores/PaymentStore/index.d.ts.map +1 -0
  815. package/lib/typescript/stores/RootStore.d.ts +14 -0
  816. package/lib/typescript/stores/RootStore.d.ts.map +1 -0
  817. package/lib/typescript/stores/SaveCardStore/index.d.ts +17 -0
  818. package/lib/typescript/stores/SaveCardStore/index.d.ts.map +1 -0
  819. package/lib/typescript/stores/ThreeDSecureStore/index.d.ts +18 -0
  820. package/lib/typescript/stores/ThreeDSecureStore/index.d.ts.map +1 -0
  821. package/lib/typescript/styles/colors.d.ts +23 -0
  822. package/lib/typescript/styles/colors.d.ts.map +1 -0
  823. package/lib/typescript/styles/fonts.d.ts +6 -0
  824. package/lib/typescript/styles/fonts.d.ts.map +1 -0
  825. package/lib/typescript/styles/images.d.ts +16 -0
  826. package/lib/typescript/styles/images.d.ts.map +1 -0
  827. package/lib/typescript/styles/index.d.ts +5 -0
  828. package/lib/typescript/styles/index.d.ts.map +1 -0
  829. package/lib/typescript/translations/index.d.ts +2 -0
  830. package/lib/typescript/translations/index.d.ts.map +1 -0
  831. package/lib/typescript/types/ApplePay.d.ts +32 -0
  832. package/lib/typescript/types/ApplePay.d.ts.map +1 -0
  833. package/lib/typescript/types/CommonSheet.d.ts +45 -0
  834. package/lib/typescript/types/CommonSheet.d.ts.map +1 -0
  835. package/lib/typescript/types/GooglePay.d.ts +45 -0
  836. package/lib/typescript/types/GooglePay.d.ts.map +1 -0
  837. package/lib/typescript/types/PaymentSheet.d.ts +76 -0
  838. package/lib/typescript/types/PaymentSheet.d.ts.map +1 -0
  839. package/lib/typescript/types/Requests.d.ts +20 -0
  840. package/lib/typescript/types/Requests.d.ts.map +1 -0
  841. package/lib/typescript/types/SaveCardSheet.d.ts +22 -0
  842. package/lib/typescript/types/SaveCardSheet.d.ts.map +1 -0
  843. package/lib/typescript/types/index.d.ts +13 -0
  844. package/lib/typescript/types/index.d.ts.map +1 -0
  845. package/package.json +164 -0
  846. package/src/assets/fonts/AktivGrotesk/AktivGrotesk-Bold.ttf +0 -0
  847. package/src/assets/fonts/SFProText/SFProText-Bold.ttf +0 -0
  848. package/src/assets/fonts/SFProText/SFProText-Regular.ttf +0 -0
  849. package/src/assets/icons/americanExpress/americanExpress@2x.png +0 -0
  850. package/src/assets/icons/americanExpress/americanExpress@3x.png +0 -0
  851. package/src/assets/icons/applePay/applePay@2x.png +0 -0
  852. package/src/assets/icons/applePay/applePay@3x.png +0 -0
  853. package/src/assets/icons/back/back@2x.png +0 -0
  854. package/src/assets/icons/back/back@3x.png +0 -0
  855. package/src/assets/icons/cardPlaceholder/cardPlaceholder@2x.png +0 -0
  856. package/src/assets/icons/cardPlaceholder/cardPlaceholder@3x.png +0 -0
  857. package/src/assets/icons/checkbox/checkbox@2x.png +0 -0
  858. package/src/assets/icons/checkbox/checkbox@3x.png +0 -0
  859. package/src/assets/icons/cross/cross@2x.png +0 -0
  860. package/src/assets/icons/cross/cross@3x.png +0 -0
  861. package/src/assets/icons/googlePay/googlePay@2x.png +0 -0
  862. package/src/assets/icons/googlePay/googlePay@3x.png +0 -0
  863. package/src/assets/icons/lock/lock@2x.png +0 -0
  864. package/src/assets/icons/lock/lock@3x.png +0 -0
  865. package/src/assets/icons/mastercard/mastercard@2x.png +0 -0
  866. package/src/assets/icons/mastercard/mastercard@3x.png +0 -0
  867. package/src/assets/icons/more/more@2x.png +0 -0
  868. package/src/assets/icons/more/more@3x.png +0 -0
  869. package/src/assets/icons/rightArrow/rightArrow@2x.png +0 -0
  870. package/src/assets/icons/rightArrow/rightArrow@3x.png +0 -0
  871. package/src/assets/icons/visa/visa@2x.png +0 -0
  872. package/src/assets/icons/visa/visa@3x.png +0 -0
  873. package/src/assets/icons/whiteCheckmark/whiteCheckmark@2x.png +0 -0
  874. package/src/assets/icons/whiteCheckmark/whiteCheckmark@3x.png +0 -0
  875. package/src/components/3DSecureSheet/index.tsx +57 -0
  876. package/src/components/AnimatedContainer/index.tsx +105 -0
  877. package/src/components/AnimatedContainer/styles.tsx +32 -0
  878. package/src/components/ApplePayButton/index.tsx +26 -0
  879. package/src/components/ApplePayButton/styles.tsx +24 -0
  880. package/src/components/Button/index.tsx +22 -0
  881. package/src/components/Button/styles.tsx +52 -0
  882. package/src/components/CardInformation/index.tsx +129 -0
  883. package/src/components/CardInformation/styles.tsx +35 -0
  884. package/src/components/CardSheet/index.tsx +165 -0
  885. package/src/components/CardSheet/styles.tsx +46 -0
  886. package/src/components/CardSheet/useCardSheet/index.ts +104 -0
  887. package/src/components/Checkbox/index.tsx +26 -0
  888. package/src/components/Checkbox/styles.tsx +24 -0
  889. package/src/components/GooglePayButton/index.tsx +26 -0
  890. package/src/components/GooglePayButton/styles.tsx +29 -0
  891. package/src/components/Header/index.tsx +37 -0
  892. package/src/components/Header/styles.tsx +34 -0
  893. package/src/components/ImageButton/index.tsx +22 -0
  894. package/src/components/ImageButton/styles.tsx +10 -0
  895. package/src/components/InputFields/BaseInputField/index.tsx +62 -0
  896. package/src/components/InputFields/BaseInputField/styles.tsx +37 -0
  897. package/src/components/InputFields/CVCInputField/index.tsx +27 -0
  898. package/src/components/InputFields/CVCInputField/styles.tsx +22 -0
  899. package/src/components/InputFields/CardInputField/index.tsx +56 -0
  900. package/src/components/InputFields/CardInputField/styles.tsx +25 -0
  901. package/src/components/InputFields/ExpirationDateInputField/index.tsx +24 -0
  902. package/src/components/LoadingSpinner/index.tsx +51 -0
  903. package/src/components/LoadingSpinner/styles.tsx +28 -0
  904. package/src/components/Modal/index.tsx +31 -0
  905. package/src/components/Modal/styles.tsx +28 -0
  906. package/src/components/NativePayButton/index.tsx +16 -0
  907. package/src/components/NoInternetConnection/index.tsx +24 -0
  908. package/src/components/NoInternetConnection/styles.tsx +14 -0
  909. package/src/components/OptionMenuModal/index.tsx +97 -0
  910. package/src/components/OptionMenuModal/styles.tsx +43 -0
  911. package/src/components/PayButton/index.tsx +55 -0
  912. package/src/components/PayButton/styles.tsx +24 -0
  913. package/src/components/PaymentMethod/index.tsx +43 -0
  914. package/src/components/PaymentMethod/styles.tsx +16 -0
  915. package/src/components/PaymentMethodFormHeaderOption/index.tsx +34 -0
  916. package/src/components/PaymentMethodFormHeaderOption/styles.tsx +35 -0
  917. package/src/components/PaymentMethodsForm/index.tsx +24 -0
  918. package/src/components/PaymentMethodsForm/styles.tsx +23 -0
  919. package/src/components/PaymentSheet/index.tsx +86 -0
  920. package/src/components/PrivacyPolicySheet/consts.ts +42 -0
  921. package/src/components/PrivacyPolicySheet/index.tsx +56 -0
  922. package/src/components/ProcessButton/index.tsx +75 -0
  923. package/src/components/ProcessButton/styles.tsx +36 -0
  924. package/src/components/SaveCard/index.tsx +88 -0
  925. package/src/components/SaveCard/styles.tsx +18 -0
  926. package/src/components/SaveCard/useSaveCard/index.ts +71 -0
  927. package/src/components/SaveCardButton/index.tsx +32 -0
  928. package/src/components/SaveCardButton/styles.tsx +24 -0
  929. package/src/components/SaveCardSheet/index.tsx +24 -0
  930. package/src/components/SavedCard/index.tsx +50 -0
  931. package/src/components/SavedCard/styles.tsx +31 -0
  932. package/src/components/SavedCardsSheet/index.tsx +108 -0
  933. package/src/components/SavedCardsSheet/styles.tsx +17 -0
  934. package/src/components/SumUpProvider.tsx +68 -0
  935. package/src/components/Switch/index.tsx +40 -0
  936. package/src/components/Switch/styles.tsx +48 -0
  937. package/src/components/Text/index.tsx +98 -0
  938. package/src/components/Text/styles.tsx +13 -0
  939. package/src/components/WebViewSheet/index.tsx +52 -0
  940. package/src/components/WebViewSheet/styles.tsx +45 -0
  941. package/src/consts/UI.ts +3 -0
  942. package/src/consts/errors.ts +7 -0
  943. package/src/consts/nativePayMethod.ts +14 -0
  944. package/src/consts/validation.ts +14 -0
  945. package/src/contexts/LanguageContext/index.tsx +47 -0
  946. package/src/contexts/OptionMenuContext/index.tsx +46 -0
  947. package/src/contexts/PaymentSheetContext/index.tsx +41 -0
  948. package/src/contexts/StoreContext.tsx +46 -0
  949. package/src/contexts/ThemeContext.tsx +9 -0
  950. package/src/helpers/formatAmount/index.ts +22 -0
  951. package/src/helpers/getUserAgent/index.ts +5 -0
  952. package/src/helpers/validation/paymentFields.ts +73 -0
  953. package/src/hooks/base/index.ts +6 -0
  954. package/src/hooks/base/useCard/index.ts +69 -0
  955. package/src/hooks/base/useCvcCode/index.ts +51 -0
  956. package/src/hooks/base/useExpirationDate/index.ts +71 -0
  957. package/src/hooks/base/useName/index.ts +51 -0
  958. package/src/hooks/useSafeArea.ts +12 -0
  959. package/src/hooks/useSumUp.ts +100 -0
  960. package/src/index.tsx +16 -0
  961. package/src/publicApi/errors.ts +155 -0
  962. package/src/services/API/ApiManager/index.ts +182 -0
  963. package/src/services/API/CheckoutApiManager/index.ts +148 -0
  964. package/src/services/API/CheckoutApiManager/models.ts +140 -0
  965. package/src/services/API/PullingService/index.ts +29 -0
  966. package/src/services/ApplePayService/index.ts +54 -0
  967. package/src/services/GooglePayService/index.ts +67 -0
  968. package/src/services/Logger/index.ts +28 -0
  969. package/src/services/NativePaymentsBridge/index.ts +44 -0
  970. package/src/stores/BaseSheetStore/index.ts +181 -0
  971. package/src/stores/NativePaymentStore/index.ts +137 -0
  972. package/src/stores/PaymentInstrumentsStore/index.ts +166 -0
  973. package/src/stores/PaymentStore/index.ts +188 -0
  974. package/src/stores/RootStore.ts +29 -0
  975. package/src/stores/SaveCardStore/index.ts +159 -0
  976. package/src/stores/ThreeDSecureStore/index.ts +75 -0
  977. package/src/styles/colors.ts +22 -0
  978. package/src/styles/fonts.ts +5 -0
  979. package/src/styles/images.ts +15 -0
  980. package/src/styles/index.ts +5 -0
  981. package/src/translations/bg-BG.json +55 -0
  982. package/src/translations/ca-ES.json +55 -0
  983. package/src/translations/cs-CZ.json +55 -0
  984. package/src/translations/da-DK.json +55 -0
  985. package/src/translations/de-AT.json +55 -0
  986. package/src/translations/de-CH.json +55 -0
  987. package/src/translations/de-DE.json +55 -0
  988. package/src/translations/de-LU.json +55 -0
  989. package/src/translations/el-CY.json +55 -0
  990. package/src/translations/el-GR.json +55 -0
  991. package/src/translations/en-AU.json +55 -0
  992. package/src/translations/en-GB.json +55 -0
  993. package/src/translations/en-IE.json +55 -0
  994. package/src/translations/en-MT.json +55 -0
  995. package/src/translations/en-US.json +55 -0
  996. package/src/translations/en.json +55 -0
  997. package/src/translations/es-CL.json +55 -0
  998. package/src/translations/es-CO.json +55 -0
  999. package/src/translations/es-ES.json +55 -0
  1000. package/src/translations/es-LA.json +55 -0
  1001. package/src/translations/es-PE.json +55 -0
  1002. package/src/translations/et-EE.json +55 -0
  1003. package/src/translations/fi-FI.json +55 -0
  1004. package/src/translations/fr-BE.json +55 -0
  1005. package/src/translations/fr-CH.json +55 -0
  1006. package/src/translations/fr-FR.json +55 -0
  1007. package/src/translations/fr-LU.json +55 -0
  1008. package/src/translations/hr-HR.json +55 -0
  1009. package/src/translations/hu-HU.json +55 -0
  1010. package/src/translations/index.ts +87 -0
  1011. package/src/translations/it-CH.json +55 -0
  1012. package/src/translations/it-IT.json +55 -0
  1013. package/src/translations/lt-LT.json +55 -0
  1014. package/src/translations/lv-LV.json +55 -0
  1015. package/src/translations/nb-NO.json +55 -0
  1016. package/src/translations/nl-BE.json +55 -0
  1017. package/src/translations/nl-NL.json +55 -0
  1018. package/src/translations/pl-PL.json +55 -0
  1019. package/src/translations/pt-BR.json +55 -0
  1020. package/src/translations/pt-PT.json +55 -0
  1021. package/src/translations/ro-RO.json +55 -0
  1022. package/src/translations/sk-SK.json +55 -0
  1023. package/src/translations/sl-SI.json +55 -0
  1024. package/src/translations/sv-SE.json +55 -0
  1025. package/src/types/ApplePay.ts +33 -0
  1026. package/src/types/CommonSheet.ts +60 -0
  1027. package/src/types/GooglePay.ts +44 -0
  1028. package/src/types/PaymentSheet.ts +102 -0
  1029. package/src/types/Requests.ts +20 -0
  1030. package/src/types/SaveCardSheet.ts +24 -0
  1031. package/src/types/index.ts +14 -0
  1032. package/src/types/react-native-safe-area-context.d.ts +16 -0
  1033. package/sumup-react-native.podspec +35 -0
@@ -0,0 +1,148 @@
1
+ import {
2
+ CardPaymentRequest,
3
+ TokenPaymentRequest,
4
+ } from '../../../types/Requests';
5
+ import type { ApplePay, GooglePay } from '../../../types';
6
+ import type { MyProfile, PaymentInstrument } from '../../../types/PaymentSheet';
7
+ import { request, RequestType } from '../ApiManager';
8
+ import { PullingService } from '../PullingService';
9
+ import type {
10
+ ListPaymentInstrumentsResponse,
11
+ MyProfileResponse,
12
+ PayCheckout3DSecureResponse,
13
+ PayCheckoutResponse,
14
+ RetrieveCheckoutResponse,
15
+ } from './models';
16
+ import {
17
+ Checkout,
18
+ CheckoutStatus,
19
+ ThreeDSecureModel,
20
+ } from '../../../types/CommonSheet';
21
+
22
+ export class CheckoutApiManager {
23
+ private publicKey: string;
24
+ private domain: string | undefined;
25
+
26
+ constructor(publicKey: string, domain?: string) {
27
+ this.domain = domain;
28
+ this.publicKey = publicKey;
29
+ }
30
+
31
+ getListPaymentInstruments = async (
32
+ checkoutId: string,
33
+ customerId: string
34
+ ): Promise<PaymentInstrument[]> => {
35
+ const response = await request<ListPaymentInstrumentsResponse>(
36
+ RequestType.listPaymentInstruments,
37
+ this.publicKey,
38
+ {
39
+ domain: this.domain,
40
+ params: [checkoutId, customerId],
41
+ }
42
+ );
43
+
44
+ return response
45
+ .filter(
46
+ (item) =>
47
+ item.active &&
48
+ item.type === 'CARD' &&
49
+ item.mandate?.status === 'active'
50
+ )
51
+ .map((item) => ({
52
+ token: item.token,
53
+ type: item.card.type,
54
+ lastDigits: item.card.last_4_digits,
55
+ }));
56
+ };
57
+
58
+ getMyProfile = async (): Promise<MyProfile> => {
59
+ const response = await request<MyProfileResponse>(
60
+ RequestType.myProfile,
61
+ this.publicKey,
62
+ {
63
+ domain: this.domain,
64
+ }
65
+ );
66
+
67
+ return {
68
+ merchantId: response.merchant.code,
69
+ merchantName: response.merchant.name,
70
+ countryCode: response.merchant.country,
71
+ };
72
+ };
73
+
74
+ getCheckout = async (checkoutId: string): Promise<Checkout> => {
75
+ const response = await request<RetrieveCheckoutResponse>(
76
+ RequestType.retrieveCheckout,
77
+ this.publicKey,
78
+ {
79
+ domain: this.domain,
80
+ params: [checkoutId],
81
+ }
82
+ );
83
+
84
+ return {
85
+ id: checkoutId,
86
+ status: response.status,
87
+ amount: response.amount,
88
+ currency: response.currency,
89
+ purpose: response.purpose,
90
+ };
91
+ };
92
+
93
+ handlePayment = async (
94
+ checkoutId: string,
95
+ model:
96
+ | TokenPaymentRequest
97
+ | CardPaymentRequest
98
+ | GooglePay.PaymentRequest
99
+ | ApplePay.PaymentRequest
100
+ ): Promise<{ status: CheckoutStatus } | ThreeDSecureModel> => {
101
+ const response = await request<
102
+ PayCheckoutResponse | PayCheckout3DSecureResponse
103
+ >(RequestType.checkoutById, this.publicKey, {
104
+ domain: this.domain,
105
+ params: [checkoutId],
106
+ body: model,
107
+ });
108
+
109
+ if ('next_step' in response) {
110
+ return {
111
+ url: response.next_step.url,
112
+ method: response.next_step.method,
113
+ payload: response.next_step.payload,
114
+ };
115
+ }
116
+
117
+ if (response.status === 'PENDING') {
118
+ const pullResponse = await PullingService.pull(
119
+ () => this.getCheckout(checkoutId),
120
+ (checkout) => checkout.status !== 'PENDING'
121
+ );
122
+
123
+ return {
124
+ status: pullResponse.status,
125
+ };
126
+ }
127
+
128
+ return {
129
+ status: response.status,
130
+ };
131
+ };
132
+
133
+ deletePaymentInstrument = async (
134
+ checkoutId: string,
135
+ customerId: string,
136
+ token: string
137
+ ) => {
138
+ return await request<void>(
139
+ RequestType.deletePaymentInstrument,
140
+ this.publicKey,
141
+ {
142
+ domain: this.domain,
143
+ params: [checkoutId, customerId, token],
144
+ responseNotExpected: true,
145
+ }
146
+ );
147
+ };
148
+ }
@@ -0,0 +1,140 @@
1
+ import { CheckoutStatus } from '../../../types/CommonSheet';
2
+
3
+ export interface RetrieveCheckoutResponse {
4
+ amount: number;
5
+ currency: string;
6
+ id: string;
7
+ merchant_code: string;
8
+ status: CheckoutStatus;
9
+ purpose?: 'SETUP_RECURRING_PAYMENT';
10
+ }
11
+
12
+ export interface CheckoutTransactionResponse {
13
+ amount: number;
14
+ currency: string;
15
+ entry_mode: string;
16
+ id: string;
17
+ installments_count: number;
18
+ internal_id: number;
19
+ merchant_code: string;
20
+ payment_type: string;
21
+ status: CheckoutStatus;
22
+ timestamp: string;
23
+ tip_amount: number;
24
+ transaction_code: string;
25
+ vat_amount: number;
26
+ }
27
+
28
+ export interface PayCheckoutResponse {
29
+ checkout_reference: string;
30
+ amount: number;
31
+ currency: string;
32
+ pay_to_email: string;
33
+ merchant_code: string;
34
+ description: string;
35
+ id: string;
36
+ status: CheckoutStatus;
37
+ date: string;
38
+ transaction_code: string;
39
+ transaction_id: string;
40
+ merchant_name: string;
41
+ purpose: string;
42
+ transactions: CheckoutTransactionResponse[];
43
+ }
44
+
45
+ export interface PayCheckout3DSecureResponse {
46
+ next_step: {
47
+ url: string;
48
+ method: string;
49
+ redirect_url?: string;
50
+ mechanism: string[];
51
+ payload: Record<string, string>;
52
+ };
53
+ }
54
+
55
+ // for /public/merchant-profile
56
+ interface MyProfilePaymentMethod {
57
+ id: 'apple_pay' | 'google_pay' | string;
58
+ name: string;
59
+ }
60
+
61
+ export interface MyProfileResponse {
62
+ // for /public/merchant-profile
63
+ merchant: {
64
+ code: string;
65
+ country: string;
66
+ currency: string;
67
+ name: string;
68
+ };
69
+ payment_methods: MyProfilePaymentMethod[];
70
+ // for /me
71
+ // account: {
72
+ // type: string;
73
+ // username: string;
74
+ // };
75
+ // details_submitted: boolean;
76
+ // is_migrated_payleven_br: boolean;
77
+ // merchant_profile: {
78
+ // address: {
79
+ // address_line1: string;
80
+ // city: string;
81
+ // country: string;
82
+ // landline: string;
83
+ // post_code: string;
84
+ // };
85
+ // business_owners: [];
86
+ // company_name: string;
87
+ // complete: boolean;
88
+ // country: string;
89
+ // default_currency: string;
90
+ // doing_business_as: {
91
+ // business_name: string;
92
+ // dynamic_descriptor: string;
93
+ // email: string;
94
+ // };
95
+ // legal_type: {
96
+ // description: string;
97
+ // full_description: string;
98
+ // id: number;
99
+ // sole_trader: boolean;
100
+ // };
101
+ // locale: string;
102
+ // merchant_category_code: string;
103
+ // merchant_code: string;
104
+ // mobile_phone: string;
105
+ // };
106
+ // personal_profile: {
107
+ // address: {
108
+ // address_line1: string;
109
+ // city: string;
110
+ // country: string;
111
+ // post_code: string;
112
+ // };
113
+ // complete: boolean;
114
+ // date_of_birth: string;
115
+ // first_name: string;
116
+ // last_name: string;
117
+ // mobile_phone: string;
118
+ // };
119
+ // requirements: [];
120
+ // signup_time: string;
121
+ // verifications: [];
122
+ }
123
+
124
+ interface ListPaymentInstrument {
125
+ token: string;
126
+ active: boolean;
127
+ type: 'CARD';
128
+ card: {
129
+ last_4_digits: string;
130
+ type: 'VISA';
131
+ };
132
+ mandate?: {
133
+ type: 'recurrent';
134
+ status: 'active' | 'disabled';
135
+ merchantCode: string;
136
+ };
137
+ created_at: string;
138
+ }
139
+
140
+ export type ListPaymentInstrumentsResponse = ListPaymentInstrument[];
@@ -0,0 +1,29 @@
1
+ const DEFAULT_INTERVAL = 1000;
2
+ const DEFAULT_MAX_REPEAT_TIMES = 30;
3
+
4
+ export class PullingService {
5
+ static pull = async <T>(
6
+ request: () => Promise<T>,
7
+ condition: (data: T) => boolean,
8
+ config?: {
9
+ maxRepeatTimes?: number;
10
+ defaultInterval?: number;
11
+ }
12
+ ): Promise<T> => {
13
+ const maxRepeatTimes = config?.maxRepeatTimes || DEFAULT_MAX_REPEAT_TIMES;
14
+ const interval = config?.defaultInterval || DEFAULT_INTERVAL;
15
+
16
+ for (let counter = 0; counter < maxRepeatTimes; counter++) {
17
+ const response = await request();
18
+ if (condition(response)) {
19
+ return response;
20
+ }
21
+
22
+ if (counter < maxRepeatTimes - 1) {
23
+ await new Promise((resolve) => setTimeout(resolve, interval));
24
+ }
25
+ }
26
+
27
+ throw new Error('Polling timeout');
28
+ };
29
+ }
@@ -0,0 +1,54 @@
1
+ import type { ApplePay } from '../../types';
2
+ import consts from '../../consts/nativePayMethod';
3
+ import logger from '../Logger';
4
+ import { getNativePaymentsBridge } from '../NativePaymentsBridge';
5
+
6
+ export class ApplePayService {
7
+ private applePayNative = getNativePaymentsBridge();
8
+
9
+ private isConfigured = false;
10
+
11
+ configure = async (props: ApplePay.InitApplePayProps) => {
12
+ this.applePayNative.configure(
13
+ {
14
+ countryCode: props.countryCode,
15
+ currencyCode: props.currencyCode,
16
+ supportedNetworks: consts.supportedCardTypesIOS,
17
+ merchantIdentifier: props.merchantIdentifier,
18
+ },
19
+ {
20
+ total: {
21
+ label: props.label,
22
+ amount: props.amount,
23
+ },
24
+ }
25
+ );
26
+
27
+ this.isConfigured = true;
28
+ };
29
+
30
+ canMakePayments = async (): Promise<boolean> => {
31
+ return !this.isConfigured
32
+ ? false
33
+ : await this.applePayNative.canMakePayments();
34
+ };
35
+
36
+ present = async (): Promise<ApplePay.PresentResponse | undefined> => {
37
+ try {
38
+ const response = await this.applePayNative.presentApplePay();
39
+
40
+ return {
41
+ paymentMethod: response.paymentMethod,
42
+ transactionIdentifier: response.transactionIdentifier,
43
+ paymentData: JSON.parse(response.paymentData),
44
+ };
45
+ } catch (error) {
46
+ logger.log('[ApplePay] Error:', { error });
47
+ return;
48
+ }
49
+ };
50
+ }
51
+
52
+ const applePayService = new ApplePayService();
53
+
54
+ export default applePayService;
@@ -0,0 +1,67 @@
1
+ import type { GooglePay } from '../../types';
2
+ import consts from '../../consts/nativePayMethod';
3
+ import logger from '../Logger';
4
+ import { getNativePaymentsBridge } from '../NativePaymentsBridge';
5
+
6
+ export class GooglePayService {
7
+ private googlePayNative = getNativePaymentsBridge();
8
+
9
+ private requestData: GooglePay.RequestData | undefined;
10
+ private isReady = false;
11
+
12
+ configure = async (props: GooglePay.InitGooglePayProps) => {
13
+ const allowedCardNetworks = consts.supportedCardTypesAndroid;
14
+ const allowedCardAuthMethods = consts.android.allowedCardAuthMethods;
15
+
16
+ this.requestData = {
17
+ cardPaymentMethod: {
18
+ tokenizationSpecification: {
19
+ type: consts.android.type,
20
+ gateway: consts.android.gateway,
21
+ gatewayMerchantId: props.gatewayMerchantId,
22
+ },
23
+ allowedCardNetworks,
24
+ allowedCardAuthMethods,
25
+ },
26
+ transaction: {
27
+ totalPrice: props.amount.toString(),
28
+ totalPriceStatus: consts.android.totalPriceStatus,
29
+ currencyCode: props.currencyCode,
30
+ },
31
+ merchantName: props.merchantName,
32
+ };
33
+
34
+ this.googlePayNative.setEnvironment(
35
+ props.isProductionEnvironment
36
+ ? this.googlePayNative.ENVIRONMENT_PRODUCTION
37
+ : this.googlePayNative.ENVIRONMENT_TEST
38
+ );
39
+
40
+ this.isReady = await this.googlePayNative.isReadyToPay(
41
+ allowedCardNetworks,
42
+ allowedCardAuthMethods
43
+ );
44
+ };
45
+
46
+ canMakePayments = async () => {
47
+ return this.isReady;
48
+ };
49
+
50
+ present = async (): Promise<GooglePay.PresentResponse | undefined> => {
51
+ if (this.requestData) {
52
+ try {
53
+ return JSON.parse(
54
+ await this.googlePayNative.requestPayment(this.requestData)
55
+ );
56
+ } catch (error) {
57
+ logger.log('[GooglePay] Error:', { error });
58
+ }
59
+ }
60
+
61
+ return;
62
+ };
63
+ }
64
+
65
+ const googlePayService = new GooglePayService();
66
+
67
+ export default googlePayService;
@@ -0,0 +1,28 @@
1
+ import { LogEventData, OnLogCallback } from '../../types/CommonSheet';
2
+
3
+ class Logger {
4
+ private onLog: OnLogCallback | undefined;
5
+
6
+ private baseParams: Record<string, string> = {};
7
+
8
+ setup = (params: Record<string, any>) => {
9
+ this.baseParams = params;
10
+ };
11
+
12
+ reset = () => {
13
+ this.baseParams = {};
14
+ };
15
+
16
+ setupCallback = (onLogCallback: OnLogCallback) => {
17
+ this.onLog = onLogCallback;
18
+
19
+ this.log('logs configured', {});
20
+ };
21
+
22
+ log = (message: string, model: LogEventData) => {
23
+ this.onLog?.(`[SDK] ${message}`, model, this.baseParams);
24
+ };
25
+ }
26
+
27
+ const logger = new Logger();
28
+ export default logger;
@@ -0,0 +1,44 @@
1
+ import { NativeModules } from 'react-native';
2
+ import type { GooglePay } from '../../types';
3
+
4
+ type ConfigureApplePayPayload = {
5
+ countryCode: string;
6
+ currencyCode: string;
7
+ supportedNetworks: string[];
8
+ merchantIdentifier: string;
9
+ };
10
+
11
+ type ConfigureApplePaySummary = {
12
+ total: {
13
+ label: string;
14
+ amount: number;
15
+ };
16
+ };
17
+
18
+ interface SumupReactNativeModule {
19
+ configure: (
20
+ payload: ConfigureApplePayPayload,
21
+ summary: ConfigureApplePaySummary
22
+ ) => void;
23
+ canMakePayments: () => Promise<boolean>;
24
+ presentApplePay: () => Promise<{
25
+ paymentMethod: {
26
+ displayName: string;
27
+ network: string;
28
+ type: string;
29
+ };
30
+ transactionIdentifier: string;
31
+ paymentData: string;
32
+ }>;
33
+ setEnvironment: (environment: number) => void;
34
+ isReadyToPay: (
35
+ allowedCardNetworks: string[],
36
+ allowedCardAuthMethods: string[]
37
+ ) => Promise<boolean>;
38
+ requestPayment: (requestData: GooglePay.RequestData) => Promise<string>;
39
+ ENVIRONMENT_TEST: number;
40
+ ENVIRONMENT_PRODUCTION: number;
41
+ }
42
+
43
+ export const getNativePaymentsBridge = (): SumupReactNativeModule =>
44
+ NativeModules.SumupReactNative as SumupReactNativeModule;
@@ -0,0 +1,181 @@
1
+ import { ApiError } from '../../services/API/ApiManager';
2
+ import { CheckoutApiManager } from '../../services/API/CheckoutApiManager';
3
+ import type { ApplePay, GooglePay } from '../../types';
4
+ import type { RootStore } from '../RootStore';
5
+ import { Alert } from 'react-native';
6
+ import en from '../../translations/en-GB.json';
7
+ import { ERROR_CODES } from '../../consts/errors';
8
+ import logger from '../../services/Logger';
9
+ import {
10
+ Checkout,
11
+ EmptyCallback,
12
+ InvalidFieldError,
13
+ PaymentStatus,
14
+ PresentSheetResult,
15
+ } from '../../types/CommonSheet';
16
+ import { CardPaymentRequest, TokenPaymentRequest } from '../../types/Requests';
17
+
18
+ const DELAY_TO_HIDE_PAYMENT_SHEET_AFTER_SUCCESS_PAYMENT = 1500;
19
+
20
+ export type PresentPaymentResolveCallback = (
21
+ result: PresentSheetResult
22
+ ) => void;
23
+
24
+ export class BaseSheetStore {
25
+ private onReset: EmptyCallback | undefined;
26
+
27
+ protected rootStore: RootStore;
28
+
29
+ protected checkoutApi: CheckoutApiManager;
30
+
31
+ protected checkoutId: string | undefined;
32
+
33
+ protected presentSheetResolveCallback:
34
+ | PresentPaymentResolveCallback
35
+ | undefined;
36
+
37
+ isSheetVisible = false;
38
+ paymentStatus: PaymentStatus = 'default';
39
+
40
+ constructor(
41
+ rootStore: RootStore,
42
+ publicKey: string,
43
+ domain?: string,
44
+ onReset?: EmptyCallback
45
+ ) {
46
+ this.rootStore = rootStore;
47
+ this.checkoutApi = new CheckoutApiManager(publicKey, domain);
48
+ this.onReset = onReset;
49
+ }
50
+
51
+ setIsSheetVisible = (isVisible: boolean) => {
52
+ this.isSheetVisible = isVisible;
53
+ };
54
+
55
+ setPaymentStatus = (paymentStatus: PaymentStatus) => {
56
+ this.paymentStatus = paymentStatus;
57
+ };
58
+
59
+ handlePayment = async (
60
+ validCheckoutId: string,
61
+ model:
62
+ | TokenPaymentRequest
63
+ | CardPaymentRequest
64
+ | GooglePay.PaymentRequest
65
+ | ApplePay.PaymentRequest
66
+ ): Promise<InvalidFieldError | void> => {
67
+ this.setPaymentStatus('processing');
68
+
69
+ try {
70
+ const response = await this.checkoutApi.handlePayment(
71
+ validCheckoutId,
72
+ model
73
+ );
74
+
75
+ if (response && 'url' in response) {
76
+ this.rootStore.threeDSecureStore.show(response);
77
+ return;
78
+ }
79
+
80
+ if (response.status === 'PAID') {
81
+ logger.log('the checkout is paid', {});
82
+ this.proceedSuccessfulPayment();
83
+ return;
84
+ }
85
+
86
+ this.handleFailedTransaction();
87
+ } catch (err) {
88
+ if (err instanceof ApiError) {
89
+ if (err.errorCode === ERROR_CODES.checkoutProcessed) {
90
+ logger.log('the checkout is already processed', {});
91
+ this.proceedSuccessfulPayment();
92
+ return;
93
+ }
94
+
95
+ this.setPaymentStatus('failed');
96
+
97
+ if (err.errorCode === ERROR_CODES.invalid) {
98
+ logger.log('validation error', { error: err });
99
+ return {
100
+ message: err.title || err.message,
101
+ param: err.param || '',
102
+ };
103
+ }
104
+
105
+ logger.log('API error while processing the checkout', { error: err });
106
+
107
+ this.setIsSheetVisible(false);
108
+ this.presentSheetResolveCallback?.({
109
+ error: {
110
+ status: 'failure',
111
+ message: err.message,
112
+ errorCode: err.errorCode,
113
+ },
114
+ });
115
+
116
+ return;
117
+ }
118
+
119
+ this.handleFailedTransaction();
120
+ }
121
+ };
122
+
123
+ protected getAndValidateCheckout = async (
124
+ checkoutId?: string
125
+ ): Promise<PresentSheetResult | Checkout> => {
126
+ if (!checkoutId) {
127
+ return {
128
+ error: {
129
+ status: 'failure',
130
+ message: 'checkoutId field is required',
131
+ },
132
+ };
133
+ }
134
+
135
+ const checkout = await this.checkoutApi.getCheckout(checkoutId);
136
+
137
+ if (checkout.status === 'PAID') {
138
+ return {
139
+ error: {
140
+ status: 'failure',
141
+ message: 'The checkout was already paid.',
142
+ },
143
+ };
144
+ }
145
+
146
+ if (checkout.status === 'EXPIRED') {
147
+ return {
148
+ error: {
149
+ status: 'failure',
150
+ message: 'The checkout is expired.',
151
+ },
152
+ };
153
+ }
154
+
155
+ return checkout;
156
+ };
157
+
158
+ protected handleFailedTransaction = () => {
159
+ this.setPaymentStatus('failed');
160
+ Alert.alert(en.common.alerts.failedTransaction.title);
161
+ };
162
+
163
+ protected proceedSuccessfulPayment = () => {
164
+ this.setPaymentStatus('success');
165
+
166
+ setTimeout(() => {
167
+ this.setIsSheetVisible(false);
168
+ this.presentSheetResolveCallback?.({});
169
+ this.onReset?.();
170
+ }, DELAY_TO_HIDE_PAYMENT_SHEET_AFTER_SUCCESS_PAYMENT);
171
+ };
172
+
173
+ protected baseReset = () => {
174
+ this.checkoutId = undefined;
175
+ this.setPaymentStatus('default');
176
+
177
+ this.rootStore.paymentInstrumentsStore.reset();
178
+ this.rootStore.nativePaymentStore.reset();
179
+ this.rootStore.threeDSecureStore.reset();
180
+ };
181
+ }