@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.
- package/LICENSE +201 -0
- package/README.md +354 -0
- package/android/build.gradle +78 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/com/sumupreactnative/PaymentUtil.java +111 -0
- package/android/src/main/java/com/sumupreactnative/SumupReactNativeModule.java +187 -0
- package/android/src/main/java/com/sumupreactnative/SumupReactNativePackage.java +28 -0
- package/ios/SumupReactNative-Bridging-Header.h +2 -0
- package/ios/SumupReactNative.m +18 -0
- package/ios/SumupReactNative.swift +164 -0
- package/ios/SumupReactNative.xcodeproj/project.pbxproj +283 -0
- package/lib/commonjs/assets/fonts/AktivGrotesk/AktivGrotesk-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/SFProText/SFProText-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/SFProText/SFProText-Regular.ttf +0 -0
- package/lib/commonjs/assets/icons/americanExpress/americanExpress@2x.png +0 -0
- package/lib/commonjs/assets/icons/americanExpress/americanExpress@3x.png +0 -0
- package/lib/commonjs/assets/icons/applePay/applePay@2x.png +0 -0
- package/lib/commonjs/assets/icons/applePay/applePay@3x.png +0 -0
- package/lib/commonjs/assets/icons/back/back@2x.png +0 -0
- package/lib/commonjs/assets/icons/back/back@3x.png +0 -0
- package/lib/commonjs/assets/icons/cardPlaceholder/cardPlaceholder@2x.png +0 -0
- package/lib/commonjs/assets/icons/cardPlaceholder/cardPlaceholder@3x.png +0 -0
- package/lib/commonjs/assets/icons/checkbox/checkbox@2x.png +0 -0
- package/lib/commonjs/assets/icons/checkbox/checkbox@3x.png +0 -0
- package/lib/commonjs/assets/icons/cross/cross@2x.png +0 -0
- package/lib/commonjs/assets/icons/cross/cross@3x.png +0 -0
- package/lib/commonjs/assets/icons/googlePay/googlePay@2x.png +0 -0
- package/lib/commonjs/assets/icons/googlePay/googlePay@3x.png +0 -0
- package/lib/commonjs/assets/icons/lock/lock@2x.png +0 -0
- package/lib/commonjs/assets/icons/lock/lock@3x.png +0 -0
- package/lib/commonjs/assets/icons/mastercard/mastercard@2x.png +0 -0
- package/lib/commonjs/assets/icons/mastercard/mastercard@3x.png +0 -0
- package/lib/commonjs/assets/icons/more/more@2x.png +0 -0
- package/lib/commonjs/assets/icons/more/more@3x.png +0 -0
- package/lib/commonjs/assets/icons/rightArrow/rightArrow@2x.png +0 -0
- package/lib/commonjs/assets/icons/rightArrow/rightArrow@3x.png +0 -0
- package/lib/commonjs/assets/icons/visa/visa@2x.png +0 -0
- package/lib/commonjs/assets/icons/visa/visa@3x.png +0 -0
- package/lib/commonjs/assets/icons/whiteCheckmark/whiteCheckmark@2x.png +0 -0
- package/lib/commonjs/assets/icons/whiteCheckmark/whiteCheckmark@3x.png +0 -0
- package/lib/commonjs/components/3DSecureSheet/index.js +56 -0
- package/lib/commonjs/components/3DSecureSheet/index.js.map +1 -0
- package/lib/commonjs/components/AnimatedContainer/index.js +75 -0
- package/lib/commonjs/components/AnimatedContainer/index.js.map +1 -0
- package/lib/commonjs/components/AnimatedContainer/styles.js +40 -0
- package/lib/commonjs/components/AnimatedContainer/styles.js.map +1 -0
- package/lib/commonjs/components/ApplePayButton/index.js +29 -0
- package/lib/commonjs/components/ApplePayButton/index.js.map +1 -0
- package/lib/commonjs/components/ApplePayButton/styles.js +31 -0
- package/lib/commonjs/components/ApplePayButton/styles.js.map +1 -0
- package/lib/commonjs/components/Button/index.js +21 -0
- package/lib/commonjs/components/Button/index.js.map +1 -0
- package/lib/commonjs/components/Button/styles.js +55 -0
- package/lib/commonjs/components/Button/styles.js.map +1 -0
- package/lib/commonjs/components/CardInformation/index.js +87 -0
- package/lib/commonjs/components/CardInformation/index.js.map +1 -0
- package/lib/commonjs/components/CardInformation/styles.js +42 -0
- package/lib/commonjs/components/CardInformation/styles.js.map +1 -0
- package/lib/commonjs/components/CardSheet/index.js +138 -0
- package/lib/commonjs/components/CardSheet/index.js.map +1 -0
- package/lib/commonjs/components/CardSheet/styles.js +53 -0
- package/lib/commonjs/components/CardSheet/styles.js.map +1 -0
- package/lib/commonjs/components/CardSheet/useCardSheet/index.js +90 -0
- package/lib/commonjs/components/CardSheet/useCardSheet/index.js.map +1 -0
- package/lib/commonjs/components/Checkbox/index.js +25 -0
- package/lib/commonjs/components/Checkbox/index.js.map +1 -0
- package/lib/commonjs/components/Checkbox/styles.js +31 -0
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -0
- package/lib/commonjs/components/GooglePayButton/index.js +29 -0
- package/lib/commonjs/components/GooglePayButton/index.js.map +1 -0
- package/lib/commonjs/components/GooglePayButton/styles.js +36 -0
- package/lib/commonjs/components/GooglePayButton/styles.js.map +1 -0
- package/lib/commonjs/components/Header/index.js +35 -0
- package/lib/commonjs/components/Header/index.js.map +1 -0
- package/lib/commonjs/components/Header/styles.js +42 -0
- package/lib/commonjs/components/Header/styles.js.map +1 -0
- package/lib/commonjs/components/ImageButton/index.js +28 -0
- package/lib/commonjs/components/ImageButton/index.js.map +1 -0
- package/lib/commonjs/components/ImageButton/styles.js +16 -0
- package/lib/commonjs/components/ImageButton/styles.js.map +1 -0
- package/lib/commonjs/components/InputFields/BaseInputField/index.js +48 -0
- package/lib/commonjs/components/InputFields/BaseInputField/index.js.map +1 -0
- package/lib/commonjs/components/InputFields/BaseInputField/styles.js +45 -0
- package/lib/commonjs/components/InputFields/BaseInputField/styles.js.map +1 -0
- package/lib/commonjs/components/InputFields/CVCInputField/index.js +27 -0
- package/lib/commonjs/components/InputFields/CVCInputField/index.js.map +1 -0
- package/lib/commonjs/components/InputFields/CVCInputField/styles.js +28 -0
- package/lib/commonjs/components/InputFields/CVCInputField/styles.js.map +1 -0
- package/lib/commonjs/components/InputFields/CardInputField/index.js +47 -0
- package/lib/commonjs/components/InputFields/CardInputField/index.js.map +1 -0
- package/lib/commonjs/components/InputFields/CardInputField/styles.js +31 -0
- package/lib/commonjs/components/InputFields/CardInputField/styles.js.map +1 -0
- package/lib/commonjs/components/InputFields/ExpirationDateInputField/index.js +20 -0
- package/lib/commonjs/components/InputFields/ExpirationDateInputField/index.js.map +1 -0
- package/lib/commonjs/components/LoadingSpinner/index.js +42 -0
- package/lib/commonjs/components/LoadingSpinner/index.js.map +1 -0
- package/lib/commonjs/components/LoadingSpinner/styles.js +35 -0
- package/lib/commonjs/components/LoadingSpinner/styles.js.map +1 -0
- package/lib/commonjs/components/Modal/index.js +27 -0
- package/lib/commonjs/components/Modal/index.js.map +1 -0
- package/lib/commonjs/components/Modal/styles.js +35 -0
- package/lib/commonjs/components/Modal/styles.js.map +1 -0
- package/lib/commonjs/components/NativePayButton/index.js +20 -0
- package/lib/commonjs/components/NativePayButton/index.js.map +1 -0
- package/lib/commonjs/components/NoInternetConnection/index.js +32 -0
- package/lib/commonjs/components/NoInternetConnection/index.js.map +1 -0
- package/lib/commonjs/components/NoInternetConnection/styles.js +21 -0
- package/lib/commonjs/components/NoInternetConnection/styles.js.map +1 -0
- package/lib/commonjs/components/OptionMenuModal/index.js +74 -0
- package/lib/commonjs/components/OptionMenuModal/index.js.map +1 -0
- package/lib/commonjs/components/OptionMenuModal/styles.js +50 -0
- package/lib/commonjs/components/OptionMenuModal/styles.js.map +1 -0
- package/lib/commonjs/components/PayButton/index.js +56 -0
- package/lib/commonjs/components/PayButton/index.js.map +1 -0
- package/lib/commonjs/components/PayButton/styles.js +32 -0
- package/lib/commonjs/components/PayButton/styles.js.map +1 -0
- package/lib/commonjs/components/PaymentMethod/index.js +45 -0
- package/lib/commonjs/components/PaymentMethod/index.js.map +1 -0
- package/lib/commonjs/components/PaymentMethod/styles.js +22 -0
- package/lib/commonjs/components/PaymentMethod/styles.js.map +1 -0
- package/lib/commonjs/components/PaymentMethodFormHeaderOption/index.js +28 -0
- package/lib/commonjs/components/PaymentMethodFormHeaderOption/index.js.map +1 -0
- package/lib/commonjs/components/PaymentMethodFormHeaderOption/styles.js +43 -0
- package/lib/commonjs/components/PaymentMethodFormHeaderOption/styles.js.map +1 -0
- package/lib/commonjs/components/PaymentMethodsForm/index.js +23 -0
- package/lib/commonjs/components/PaymentMethodsForm/index.js.map +1 -0
- package/lib/commonjs/components/PaymentMethodsForm/styles.js +30 -0
- package/lib/commonjs/components/PaymentMethodsForm/styles.js.map +1 -0
- package/lib/commonjs/components/PaymentSheet/index.js +85 -0
- package/lib/commonjs/components/PaymentSheet/index.js.map +1 -0
- package/lib/commonjs/components/PrivacyPolicySheet/consts.js +50 -0
- package/lib/commonjs/components/PrivacyPolicySheet/consts.js.map +1 -0
- package/lib/commonjs/components/PrivacyPolicySheet/index.js +35 -0
- package/lib/commonjs/components/PrivacyPolicySheet/index.js.map +1 -0
- package/lib/commonjs/components/ProcessButton/index.js +64 -0
- package/lib/commonjs/components/ProcessButton/index.js.map +1 -0
- package/lib/commonjs/components/ProcessButton/styles.js +36 -0
- package/lib/commonjs/components/ProcessButton/styles.js.map +1 -0
- package/lib/commonjs/components/SaveCard/index.js +87 -0
- package/lib/commonjs/components/SaveCard/index.js.map +1 -0
- package/lib/commonjs/components/SaveCard/styles.js +23 -0
- package/lib/commonjs/components/SaveCard/styles.js.map +1 -0
- package/lib/commonjs/components/SaveCard/useSaveCard/index.js +63 -0
- package/lib/commonjs/components/SaveCard/useSaveCard/index.js.map +1 -0
- package/lib/commonjs/components/SaveCardButton/index.js +33 -0
- package/lib/commonjs/components/SaveCardButton/index.js.map +1 -0
- package/lib/commonjs/components/SaveCardButton/styles.js +32 -0
- package/lib/commonjs/components/SaveCardButton/styles.js.map +1 -0
- package/lib/commonjs/components/SaveCardSheet/index.js +32 -0
- package/lib/commonjs/components/SaveCardSheet/index.js.map +1 -0
- package/lib/commonjs/components/SavedCard/index.js +50 -0
- package/lib/commonjs/components/SavedCard/index.js.map +1 -0
- package/lib/commonjs/components/SavedCard/styles.js +39 -0
- package/lib/commonjs/components/SavedCard/styles.js.map +1 -0
- package/lib/commonjs/components/SavedCardsSheet/index.js +87 -0
- package/lib/commonjs/components/SavedCardsSheet/index.js.map +1 -0
- package/lib/commonjs/components/SavedCardsSheet/styles.js +22 -0
- package/lib/commonjs/components/SavedCardsSheet/styles.js.map +1 -0
- package/lib/commonjs/components/SumUpProvider.js +59 -0
- package/lib/commonjs/components/SumUpProvider.js.map +1 -0
- package/lib/commonjs/components/Switch/index.js +37 -0
- package/lib/commonjs/components/Switch/index.js.map +1 -0
- package/lib/commonjs/components/Switch/styles.js +55 -0
- package/lib/commonjs/components/Switch/styles.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +63 -0
- package/lib/commonjs/components/Text/index.js.map +1 -0
- package/lib/commonjs/components/Text/styles.js +19 -0
- package/lib/commonjs/components/Text/styles.js.map +1 -0
- package/lib/commonjs/components/WebViewSheet/index.js +48 -0
- package/lib/commonjs/components/WebViewSheet/index.js.map +1 -0
- package/lib/commonjs/components/WebViewSheet/styles.js +54 -0
- package/lib/commonjs/components/WebViewSheet/styles.js.map +1 -0
- package/lib/commonjs/consts/UI.js +11 -0
- package/lib/commonjs/consts/UI.js.map +1 -0
- package/lib/commonjs/consts/errors.js +13 -0
- package/lib/commonjs/consts/errors.js.map +1 -0
- package/lib/commonjs/consts/nativePayMethod.js +19 -0
- package/lib/commonjs/consts/nativePayMethod.js.map +1 -0
- package/lib/commonjs/consts/validation.js +22 -0
- package/lib/commonjs/consts/validation.js.map +1 -0
- package/lib/commonjs/contexts/LanguageContext/index.js +38 -0
- package/lib/commonjs/contexts/LanguageContext/index.js.map +1 -0
- package/lib/commonjs/contexts/OptionMenuContext/index.js +39 -0
- package/lib/commonjs/contexts/OptionMenuContext/index.js.map +1 -0
- package/lib/commonjs/contexts/PaymentSheetContext/index.js +39 -0
- package/lib/commonjs/contexts/PaymentSheetContext/index.js.map +1 -0
- package/lib/commonjs/contexts/StoreContext.js +49 -0
- package/lib/commonjs/contexts/StoreContext.js.map +1 -0
- package/lib/commonjs/contexts/ThemeContext.js +15 -0
- package/lib/commonjs/contexts/ThemeContext.js.map +1 -0
- package/lib/commonjs/helpers/formatAmount/index.js +26 -0
- package/lib/commonjs/helpers/formatAmount/index.js.map +1 -0
- package/lib/commonjs/helpers/getUserAgent/index.js +12 -0
- package/lib/commonjs/helpers/getUserAgent/index.js.map +1 -0
- package/lib/commonjs/helpers/validation/paymentFields.js +56 -0
- package/lib/commonjs/helpers/validation/paymentFields.js.map +1 -0
- package/lib/commonjs/hooks/base/index.js +34 -0
- package/lib/commonjs/hooks/base/index.js.map +1 -0
- package/lib/commonjs/hooks/base/useCard/index.js +62 -0
- package/lib/commonjs/hooks/base/useCard/index.js.map +1 -0
- package/lib/commonjs/hooks/base/useCvcCode/index.js +52 -0
- package/lib/commonjs/hooks/base/useCvcCode/index.js.map +1 -0
- package/lib/commonjs/hooks/base/useExpirationDate/index.js +66 -0
- package/lib/commonjs/hooks/base/useExpirationDate/index.js.map +1 -0
- package/lib/commonjs/hooks/base/useName/index.js +52 -0
- package/lib/commonjs/hooks/base/useName/index.js.map +1 -0
- package/lib/commonjs/hooks/useSafeArea.js +18 -0
- package/lib/commonjs/hooks/useSafeArea.js.map +1 -0
- package/lib/commonjs/hooks/useSumUp.js +82 -0
- package/lib/commonjs/hooks/useSumUp.js.map +1 -0
- package/lib/commonjs/index.js +59 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/publicApi/errors.js +103 -0
- package/lib/commonjs/publicApi/errors.js.map +1 -0
- package/lib/commonjs/services/API/ApiManager/index.js +154 -0
- package/lib/commonjs/services/API/ApiManager/index.js.map +1 -0
- package/lib/commonjs/services/API/CheckoutApiManager/index.js +83 -0
- package/lib/commonjs/services/API/CheckoutApiManager/index.js.map +1 -0
- package/lib/commonjs/services/API/CheckoutApiManager/models.js +6 -0
- package/lib/commonjs/services/API/CheckoutApiManager/models.js.map +1 -0
- package/lib/commonjs/services/API/PullingService/index.js +26 -0
- package/lib/commonjs/services/API/PullingService/index.js.map +1 -0
- package/lib/commonjs/services/ApplePayService/index.js +51 -0
- package/lib/commonjs/services/ApplePayService/index.js.map +1 -0
- package/lib/commonjs/services/GooglePayService/index.js +57 -0
- package/lib/commonjs/services/GooglePayService/index.js.map +1 -0
- package/lib/commonjs/services/Logger/index.js +27 -0
- package/lib/commonjs/services/Logger/index.js.map +1 -0
- package/lib/commonjs/services/NativePaymentsBridge/index.js +10 -0
- package/lib/commonjs/services/NativePaymentsBridge/index.js.map +1 -0
- package/lib/commonjs/stores/BaseSheetStore/index.js +127 -0
- package/lib/commonjs/stores/BaseSheetStore/index.js.map +1 -0
- package/lib/commonjs/stores/NativePaymentStore/index.js +108 -0
- package/lib/commonjs/stores/NativePaymentStore/index.js.map +1 -0
- package/lib/commonjs/stores/PaymentInstrumentsStore/index.js +121 -0
- package/lib/commonjs/stores/PaymentInstrumentsStore/index.js.map +1 -0
- package/lib/commonjs/stores/PaymentStore/index.js +150 -0
- package/lib/commonjs/stores/PaymentStore/index.js.map +1 -0
- package/lib/commonjs/stores/RootStore.js +25 -0
- package/lib/commonjs/stores/RootStore.js.map +1 -0
- package/lib/commonjs/stores/SaveCardStore/index.js +131 -0
- package/lib/commonjs/stores/SaveCardStore/index.js.map +1 -0
- package/lib/commonjs/stores/ThreeDSecureStore/index.js +63 -0
- package/lib/commonjs/stores/ThreeDSecureStore/index.js.map +1 -0
- package/lib/commonjs/styles/colors.js +30 -0
- package/lib/commonjs/styles/colors.js.map +1 -0
- package/lib/commonjs/styles/fonts.js +13 -0
- package/lib/commonjs/styles/fonts.js.map +1 -0
- package/lib/commonjs/styles/images.js +23 -0
- package/lib/commonjs/styles/images.js.map +1 -0
- package/lib/commonjs/styles/index.js +15 -0
- package/lib/commonjs/styles/index.js.map +1 -0
- package/lib/commonjs/translations/bg-BG.json +55 -0
- package/lib/commonjs/translations/ca-ES.json +55 -0
- package/lib/commonjs/translations/cs-CZ.json +55 -0
- package/lib/commonjs/translations/da-DK.json +55 -0
- package/lib/commonjs/translations/de-AT.json +55 -0
- package/lib/commonjs/translations/de-CH.json +55 -0
- package/lib/commonjs/translations/de-DE.json +55 -0
- package/lib/commonjs/translations/de-LU.json +55 -0
- package/lib/commonjs/translations/el-CY.json +55 -0
- package/lib/commonjs/translations/el-GR.json +55 -0
- package/lib/commonjs/translations/en-AU.json +55 -0
- package/lib/commonjs/translations/en-GB.json +55 -0
- package/lib/commonjs/translations/en-IE.json +55 -0
- package/lib/commonjs/translations/en-MT.json +55 -0
- package/lib/commonjs/translations/en-US.json +55 -0
- package/lib/commonjs/translations/en.json +55 -0
- package/lib/commonjs/translations/es-CL.json +55 -0
- package/lib/commonjs/translations/es-CO.json +55 -0
- package/lib/commonjs/translations/es-ES.json +55 -0
- package/lib/commonjs/translations/es-LA.json +55 -0
- package/lib/commonjs/translations/es-PE.json +55 -0
- package/lib/commonjs/translations/et-EE.json +55 -0
- package/lib/commonjs/translations/fi-FI.json +55 -0
- package/lib/commonjs/translations/fr-BE.json +55 -0
- package/lib/commonjs/translations/fr-CH.json +55 -0
- package/lib/commonjs/translations/fr-FR.json +55 -0
- package/lib/commonjs/translations/fr-LU.json +55 -0
- package/lib/commonjs/translations/hr-HR.json +55 -0
- package/lib/commonjs/translations/hu-HU.json +55 -0
- package/lib/commonjs/translations/index.js +95 -0
- package/lib/commonjs/translations/index.js.map +1 -0
- package/lib/commonjs/translations/it-CH.json +55 -0
- package/lib/commonjs/translations/it-IT.json +55 -0
- package/lib/commonjs/translations/lt-LT.json +55 -0
- package/lib/commonjs/translations/lv-LV.json +55 -0
- package/lib/commonjs/translations/nb-NO.json +55 -0
- package/lib/commonjs/translations/nl-BE.json +55 -0
- package/lib/commonjs/translations/nl-NL.json +55 -0
- package/lib/commonjs/translations/pl-PL.json +55 -0
- package/lib/commonjs/translations/pt-BR.json +55 -0
- package/lib/commonjs/translations/pt-PT.json +55 -0
- package/lib/commonjs/translations/ro-RO.json +55 -0
- package/lib/commonjs/translations/sk-SK.json +55 -0
- package/lib/commonjs/translations/sl-SI.json +55 -0
- package/lib/commonjs/translations/sv-SE.json +55 -0
- package/lib/commonjs/types/ApplePay.js +2 -0
- package/lib/commonjs/types/ApplePay.js.map +1 -0
- package/lib/commonjs/types/CommonSheet.js +2 -0
- package/lib/commonjs/types/CommonSheet.js.map +1 -0
- package/lib/commonjs/types/GooglePay.js +2 -0
- package/lib/commonjs/types/GooglePay.js.map +1 -0
- package/lib/commonjs/types/PaymentSheet.js +6 -0
- package/lib/commonjs/types/PaymentSheet.js.map +1 -0
- package/lib/commonjs/types/Requests.js +2 -0
- package/lib/commonjs/types/Requests.js.map +1 -0
- package/lib/commonjs/types/SaveCardSheet.js +6 -0
- package/lib/commonjs/types/SaveCardSheet.js.map +1 -0
- package/lib/commonjs/types/index.js +19 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/types/react-native-safe-area-context.d.js +2 -0
- package/lib/commonjs/types/react-native-safe-area-context.d.js.map +1 -0
- package/lib/module/assets/fonts/AktivGrotesk/AktivGrotesk-Bold.ttf +0 -0
- package/lib/module/assets/fonts/SFProText/SFProText-Bold.ttf +0 -0
- package/lib/module/assets/fonts/SFProText/SFProText-Regular.ttf +0 -0
- package/lib/module/assets/icons/americanExpress/americanExpress@2x.png +0 -0
- package/lib/module/assets/icons/americanExpress/americanExpress@3x.png +0 -0
- package/lib/module/assets/icons/applePay/applePay@2x.png +0 -0
- package/lib/module/assets/icons/applePay/applePay@3x.png +0 -0
- package/lib/module/assets/icons/back/back@2x.png +0 -0
- package/lib/module/assets/icons/back/back@3x.png +0 -0
- package/lib/module/assets/icons/cardPlaceholder/cardPlaceholder@2x.png +0 -0
- package/lib/module/assets/icons/cardPlaceholder/cardPlaceholder@3x.png +0 -0
- package/lib/module/assets/icons/checkbox/checkbox@2x.png +0 -0
- package/lib/module/assets/icons/checkbox/checkbox@3x.png +0 -0
- package/lib/module/assets/icons/cross/cross@2x.png +0 -0
- package/lib/module/assets/icons/cross/cross@3x.png +0 -0
- package/lib/module/assets/icons/googlePay/googlePay@2x.png +0 -0
- package/lib/module/assets/icons/googlePay/googlePay@3x.png +0 -0
- package/lib/module/assets/icons/lock/lock@2x.png +0 -0
- package/lib/module/assets/icons/lock/lock@3x.png +0 -0
- package/lib/module/assets/icons/mastercard/mastercard@2x.png +0 -0
- package/lib/module/assets/icons/mastercard/mastercard@3x.png +0 -0
- package/lib/module/assets/icons/more/more@2x.png +0 -0
- package/lib/module/assets/icons/more/more@3x.png +0 -0
- package/lib/module/assets/icons/rightArrow/rightArrow@2x.png +0 -0
- package/lib/module/assets/icons/rightArrow/rightArrow@3x.png +0 -0
- package/lib/module/assets/icons/visa/visa@2x.png +0 -0
- package/lib/module/assets/icons/visa/visa@3x.png +0 -0
- package/lib/module/assets/icons/whiteCheckmark/whiteCheckmark@2x.png +0 -0
- package/lib/module/assets/icons/whiteCheckmark/whiteCheckmark@3x.png +0 -0
- package/lib/module/components/3DSecureSheet/index.js +46 -0
- package/lib/module/components/3DSecureSheet/index.js.map +1 -0
- package/lib/module/components/AnimatedContainer/index.js +66 -0
- package/lib/module/components/AnimatedContainer/index.js.map +1 -0
- package/lib/module/components/AnimatedContainer/styles.js +33 -0
- package/lib/module/components/AnimatedContainer/styles.js.map +1 -0
- package/lib/module/components/ApplePayButton/index.js +21 -0
- package/lib/module/components/ApplePayButton/index.js.map +1 -0
- package/lib/module/components/ApplePayButton/styles.js +24 -0
- package/lib/module/components/ApplePayButton/styles.js.map +1 -0
- package/lib/module/components/Button/index.js +13 -0
- package/lib/module/components/Button/index.js.map +1 -0
- package/lib/module/components/Button/styles.js +48 -0
- package/lib/module/components/Button/styles.js.map +1 -0
- package/lib/module/components/CardInformation/index.js +78 -0
- package/lib/module/components/CardInformation/index.js.map +1 -0
- package/lib/module/components/CardInformation/styles.js +35 -0
- package/lib/module/components/CardInformation/styles.js.map +1 -0
- package/lib/module/components/CardSheet/index.js +130 -0
- package/lib/module/components/CardSheet/index.js.map +1 -0
- package/lib/module/components/CardSheet/styles.js +46 -0
- package/lib/module/components/CardSheet/styles.js.map +1 -0
- package/lib/module/components/CardSheet/useCardSheet/index.js +83 -0
- package/lib/module/components/CardSheet/useCardSheet/index.js.map +1 -0
- package/lib/module/components/Checkbox/index.js +17 -0
- package/lib/module/components/Checkbox/index.js.map +1 -0
- package/lib/module/components/Checkbox/styles.js +24 -0
- package/lib/module/components/Checkbox/styles.js.map +1 -0
- package/lib/module/components/GooglePayButton/index.js +21 -0
- package/lib/module/components/GooglePayButton/index.js.map +1 -0
- package/lib/module/components/GooglePayButton/styles.js +29 -0
- package/lib/module/components/GooglePayButton/styles.js.map +1 -0
- package/lib/module/components/Header/index.js +27 -0
- package/lib/module/components/Header/index.js.map +1 -0
- package/lib/module/components/Header/styles.js +35 -0
- package/lib/module/components/Header/styles.js.map +1 -0
- package/lib/module/components/ImageButton/index.js +20 -0
- package/lib/module/components/ImageButton/index.js.map +1 -0
- package/lib/module/components/ImageButton/styles.js +9 -0
- package/lib/module/components/ImageButton/styles.js.map +1 -0
- package/lib/module/components/InputFields/BaseInputField/index.js +40 -0
- package/lib/module/components/InputFields/BaseInputField/index.js.map +1 -0
- package/lib/module/components/InputFields/BaseInputField/styles.js +38 -0
- package/lib/module/components/InputFields/BaseInputField/styles.js.map +1 -0
- package/lib/module/components/InputFields/CVCInputField/index.js +19 -0
- package/lib/module/components/InputFields/CVCInputField/index.js.map +1 -0
- package/lib/module/components/InputFields/CVCInputField/styles.js +21 -0
- package/lib/module/components/InputFields/CVCInputField/styles.js.map +1 -0
- package/lib/module/components/InputFields/CardInputField/index.js +39 -0
- package/lib/module/components/InputFields/CardInputField/index.js.map +1 -0
- package/lib/module/components/InputFields/CardInputField/styles.js +24 -0
- package/lib/module/components/InputFields/CardInputField/styles.js.map +1 -0
- package/lib/module/components/InputFields/ExpirationDateInputField/index.js +12 -0
- package/lib/module/components/InputFields/ExpirationDateInputField/index.js.map +1 -0
- package/lib/module/components/LoadingSpinner/index.js +33 -0
- package/lib/module/components/LoadingSpinner/index.js.map +1 -0
- package/lib/module/components/LoadingSpinner/styles.js +28 -0
- package/lib/module/components/LoadingSpinner/styles.js.map +1 -0
- package/lib/module/components/Modal/index.js +19 -0
- package/lib/module/components/Modal/index.js.map +1 -0
- package/lib/module/components/Modal/styles.js +28 -0
- package/lib/module/components/Modal/styles.js.map +1 -0
- package/lib/module/components/NativePayButton/index.js +12 -0
- package/lib/module/components/NativePayButton/index.js.map +1 -0
- package/lib/module/components/NoInternetConnection/index.js +24 -0
- package/lib/module/components/NoInternetConnection/index.js.map +1 -0
- package/lib/module/components/NoInternetConnection/styles.js +14 -0
- package/lib/module/components/NoInternetConnection/styles.js.map +1 -0
- package/lib/module/components/OptionMenuModal/index.js +66 -0
- package/lib/module/components/OptionMenuModal/index.js.map +1 -0
- package/lib/module/components/OptionMenuModal/styles.js +43 -0
- package/lib/module/components/OptionMenuModal/styles.js.map +1 -0
- package/lib/module/components/PayButton/index.js +48 -0
- package/lib/module/components/PayButton/index.js.map +1 -0
- package/lib/module/components/PayButton/styles.js +25 -0
- package/lib/module/components/PayButton/styles.js.map +1 -0
- package/lib/module/components/PaymentMethod/index.js +36 -0
- package/lib/module/components/PaymentMethod/index.js.map +1 -0
- package/lib/module/components/PaymentMethod/styles.js +15 -0
- package/lib/module/components/PaymentMethod/styles.js.map +1 -0
- package/lib/module/components/PaymentMethodFormHeaderOption/index.js +20 -0
- package/lib/module/components/PaymentMethodFormHeaderOption/index.js.map +1 -0
- package/lib/module/components/PaymentMethodFormHeaderOption/styles.js +36 -0
- package/lib/module/components/PaymentMethodFormHeaderOption/styles.js.map +1 -0
- package/lib/module/components/PaymentMethodsForm/index.js +14 -0
- package/lib/module/components/PaymentMethodsForm/index.js.map +1 -0
- package/lib/module/components/PaymentMethodsForm/styles.js +23 -0
- package/lib/module/components/PaymentMethodsForm/styles.js.map +1 -0
- package/lib/module/components/PaymentSheet/index.js +76 -0
- package/lib/module/components/PaymentSheet/index.js.map +1 -0
- package/lib/module/components/PrivacyPolicySheet/consts.js +41 -0
- package/lib/module/components/PrivacyPolicySheet/consts.js.map +1 -0
- package/lib/module/components/PrivacyPolicySheet/index.js +26 -0
- package/lib/module/components/PrivacyPolicySheet/index.js.map +1 -0
- package/lib/module/components/ProcessButton/index.js +54 -0
- package/lib/module/components/ProcessButton/index.js.map +1 -0
- package/lib/module/components/ProcessButton/styles.js +29 -0
- package/lib/module/components/ProcessButton/styles.js.map +1 -0
- package/lib/module/components/SaveCard/index.js +79 -0
- package/lib/module/components/SaveCard/index.js.map +1 -0
- package/lib/module/components/SaveCard/styles.js +16 -0
- package/lib/module/components/SaveCard/styles.js.map +1 -0
- package/lib/module/components/SaveCard/useSaveCard/index.js +56 -0
- package/lib/module/components/SaveCard/useSaveCard/index.js.map +1 -0
- package/lib/module/components/SaveCardButton/index.js +25 -0
- package/lib/module/components/SaveCardButton/index.js.map +1 -0
- package/lib/module/components/SaveCardButton/styles.js +25 -0
- package/lib/module/components/SaveCardButton/styles.js.map +1 -0
- package/lib/module/components/SaveCardSheet/index.js +24 -0
- package/lib/module/components/SaveCardSheet/index.js.map +1 -0
- package/lib/module/components/SavedCard/index.js +42 -0
- package/lib/module/components/SavedCard/index.js.map +1 -0
- package/lib/module/components/SavedCard/styles.js +32 -0
- package/lib/module/components/SavedCard/styles.js.map +1 -0
- package/lib/module/components/SavedCardsSheet/index.js +78 -0
- package/lib/module/components/SavedCardsSheet/index.js.map +1 -0
- package/lib/module/components/SavedCardsSheet/styles.js +15 -0
- package/lib/module/components/SavedCardsSheet/styles.js.map +1 -0
- package/lib/module/components/SumUpProvider.js +51 -0
- package/lib/module/components/SumUpProvider.js.map +1 -0
- package/lib/module/components/Switch/index.js +28 -0
- package/lib/module/components/Switch/index.js.map +1 -0
- package/lib/module/components/Switch/styles.js +48 -0
- package/lib/module/components/Switch/styles.js.map +1 -0
- package/lib/module/components/Text/index.js +54 -0
- package/lib/module/components/Text/index.js.map +1 -0
- package/lib/module/components/Text/styles.js +12 -0
- package/lib/module/components/Text/styles.js.map +1 -0
- package/lib/module/components/WebViewSheet/index.js +38 -0
- package/lib/module/components/WebViewSheet/index.js.map +1 -0
- package/lib/module/components/WebViewSheet/styles.js +47 -0
- package/lib/module/components/WebViewSheet/styles.js.map +1 -0
- package/lib/module/consts/UI.js +4 -0
- package/lib/module/consts/UI.js.map +1 -0
- package/lib/module/consts/errors.js +7 -0
- package/lib/module/consts/errors.js.map +1 -0
- package/lib/module/consts/nativePayMethod.js +12 -0
- package/lib/module/consts/nativePayMethod.js.map +1 -0
- package/lib/module/consts/validation.js +15 -0
- package/lib/module/consts/validation.js.map +1 -0
- package/lib/module/contexts/LanguageContext/index.js +28 -0
- package/lib/module/contexts/LanguageContext/index.js.map +1 -0
- package/lib/module/contexts/OptionMenuContext/index.js +29 -0
- package/lib/module/contexts/OptionMenuContext/index.js.map +1 -0
- package/lib/module/contexts/PaymentSheetContext/index.js +28 -0
- package/lib/module/contexts/PaymentSheetContext/index.js.map +1 -0
- package/lib/module/contexts/StoreContext.js +33 -0
- package/lib/module/contexts/StoreContext.js.map +1 -0
- package/lib/module/contexts/ThemeContext.js +8 -0
- package/lib/module/contexts/ThemeContext.js.map +1 -0
- package/lib/module/helpers/formatAmount/index.js +19 -0
- package/lib/module/helpers/formatAmount/index.js.map +1 -0
- package/lib/module/helpers/getUserAgent/index.js +5 -0
- package/lib/module/helpers/getUserAgent/index.js.map +1 -0
- package/lib/module/helpers/validation/paymentFields.js +43 -0
- package/lib/module/helpers/validation/paymentFields.js.map +1 -0
- package/lib/module/hooks/base/index.js +6 -0
- package/lib/module/hooks/base/index.js.map +1 -0
- package/lib/module/hooks/base/useCard/index.js +54 -0
- package/lib/module/hooks/base/useCard/index.js.map +1 -0
- package/lib/module/hooks/base/useCvcCode/index.js +44 -0
- package/lib/module/hooks/base/useCvcCode/index.js.map +1 -0
- package/lib/module/hooks/base/useExpirationDate/index.js +58 -0
- package/lib/module/hooks/base/useExpirationDate/index.js.map +1 -0
- package/lib/module/hooks/base/useName/index.js +44 -0
- package/lib/module/hooks/base/useName/index.js.map +1 -0
- package/lib/module/hooks/useSafeArea.js +11 -0
- package/lib/module/hooks/useSafeArea.js.map +1 -0
- package/lib/module/hooks/useSumUp.js +76 -0
- package/lib/module/hooks/useSumUp.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/publicApi/errors.js +92 -0
- package/lib/module/publicApi/errors.js.map +1 -0
- package/lib/module/services/API/ApiManager/index.js +141 -0
- package/lib/module/services/API/ApiManager/index.js.map +1 -0
- package/lib/module/services/API/CheckoutApiManager/index.js +76 -0
- package/lib/module/services/API/CheckoutApiManager/index.js.map +1 -0
- package/lib/module/services/API/CheckoutApiManager/models.js +2 -0
- package/lib/module/services/API/CheckoutApiManager/models.js.map +1 -0
- package/lib/module/services/API/PullingService/index.js +19 -0
- package/lib/module/services/API/PullingService/index.js.map +1 -0
- package/lib/module/services/ApplePayService/index.js +42 -0
- package/lib/module/services/ApplePayService/index.js.map +1 -0
- package/lib/module/services/GooglePayService/index.js +48 -0
- package/lib/module/services/GooglePayService/index.js.map +1 -0
- package/lib/module/services/Logger/index.js +20 -0
- package/lib/module/services/Logger/index.js.map +1 -0
- package/lib/module/services/NativePaymentsBridge/index.js +3 -0
- package/lib/module/services/NativePaymentsBridge/index.js.map +1 -0
- package/lib/module/stores/BaseSheetStore/index.js +119 -0
- package/lib/module/stores/BaseSheetStore/index.js.map +1 -0
- package/lib/module/stores/NativePaymentStore/index.js +100 -0
- package/lib/module/stores/NativePaymentStore/index.js.map +1 -0
- package/lib/module/stores/PaymentInstrumentsStore/index.js +113 -0
- package/lib/module/stores/PaymentInstrumentsStore/index.js.map +1 -0
- package/lib/module/stores/PaymentStore/index.js +142 -0
- package/lib/module/stores/PaymentStore/index.js.map +1 -0
- package/lib/module/stores/RootStore.js +18 -0
- package/lib/module/stores/RootStore.js.map +1 -0
- package/lib/module/stores/SaveCardStore/index.js +123 -0
- package/lib/module/stores/SaveCardStore/index.js.map +1 -0
- package/lib/module/stores/ThreeDSecureStore/index.js +55 -0
- package/lib/module/stores/ThreeDSecureStore/index.js.map +1 -0
- package/lib/module/styles/colors.js +23 -0
- package/lib/module/styles/colors.js.map +1 -0
- package/lib/module/styles/fonts.js +6 -0
- package/lib/module/styles/fonts.js.map +1 -0
- package/lib/module/styles/images.js +16 -0
- package/lib/module/styles/images.js.map +1 -0
- package/lib/module/styles/index.js +5 -0
- package/lib/module/styles/index.js.map +1 -0
- package/lib/module/translations/bg-BG.json +55 -0
- package/lib/module/translations/ca-ES.json +55 -0
- package/lib/module/translations/cs-CZ.json +55 -0
- package/lib/module/translations/da-DK.json +55 -0
- package/lib/module/translations/de-AT.json +55 -0
- package/lib/module/translations/de-CH.json +55 -0
- package/lib/module/translations/de-DE.json +55 -0
- package/lib/module/translations/de-LU.json +55 -0
- package/lib/module/translations/el-CY.json +55 -0
- package/lib/module/translations/el-GR.json +55 -0
- package/lib/module/translations/en-AU.json +55 -0
- package/lib/module/translations/en-GB.json +55 -0
- package/lib/module/translations/en-IE.json +55 -0
- package/lib/module/translations/en-MT.json +55 -0
- package/lib/module/translations/en-US.json +55 -0
- package/lib/module/translations/en.json +55 -0
- package/lib/module/translations/es-CL.json +55 -0
- package/lib/module/translations/es-CO.json +55 -0
- package/lib/module/translations/es-ES.json +55 -0
- package/lib/module/translations/es-LA.json +55 -0
- package/lib/module/translations/es-PE.json +55 -0
- package/lib/module/translations/et-EE.json +55 -0
- package/lib/module/translations/fi-FI.json +55 -0
- package/lib/module/translations/fr-BE.json +55 -0
- package/lib/module/translations/fr-CH.json +55 -0
- package/lib/module/translations/fr-FR.json +55 -0
- package/lib/module/translations/fr-LU.json +55 -0
- package/lib/module/translations/hr-HR.json +55 -0
- package/lib/module/translations/hu-HU.json +55 -0
- package/lib/module/translations/index.js +87 -0
- package/lib/module/translations/index.js.map +1 -0
- package/lib/module/translations/it-CH.json +55 -0
- package/lib/module/translations/it-IT.json +55 -0
- package/lib/module/translations/lt-LT.json +55 -0
- package/lib/module/translations/lv-LV.json +55 -0
- package/lib/module/translations/nb-NO.json +55 -0
- package/lib/module/translations/nl-BE.json +55 -0
- package/lib/module/translations/nl-NL.json +55 -0
- package/lib/module/translations/pl-PL.json +55 -0
- package/lib/module/translations/pt-BR.json +55 -0
- package/lib/module/translations/pt-PT.json +55 -0
- package/lib/module/translations/ro-RO.json +55 -0
- package/lib/module/translations/sk-SK.json +55 -0
- package/lib/module/translations/sl-SI.json +55 -0
- package/lib/module/translations/sv-SE.json +55 -0
- package/lib/module/types/ApplePay.js +2 -0
- package/lib/module/types/ApplePay.js.map +1 -0
- package/lib/module/types/CommonSheet.js +2 -0
- package/lib/module/types/CommonSheet.js.map +1 -0
- package/lib/module/types/GooglePay.js +2 -0
- package/lib/module/types/GooglePay.js.map +1 -0
- package/lib/module/types/PaymentSheet.js +2 -0
- package/lib/module/types/PaymentSheet.js.map +1 -0
- package/lib/module/types/Requests.js +2 -0
- package/lib/module/types/Requests.js.map +1 -0
- package/lib/module/types/SaveCardSheet.js +2 -0
- package/lib/module/types/SaveCardSheet.js.map +1 -0
- package/lib/module/types/index.js +7 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/react-native-safe-area-context.d.js +2 -0
- package/lib/module/types/react-native-safe-area-context.d.js.map +1 -0
- package/lib/typescript/components/3DSecureSheet/index.d.ts +5 -0
- package/lib/typescript/components/3DSecureSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/AnimatedContainer/index.d.ts +15 -0
- package/lib/typescript/components/AnimatedContainer/index.d.ts.map +1 -0
- package/lib/typescript/components/AnimatedContainer/styles.d.ts +22 -0
- package/lib/typescript/components/AnimatedContainer/styles.d.ts.map +1 -0
- package/lib/typescript/components/ApplePayButton/index.d.ts +7 -0
- package/lib/typescript/components/ApplePayButton/index.d.ts.map +1 -0
- package/lib/typescript/components/ApplePayButton/styles.d.ts +16 -0
- package/lib/typescript/components/ApplePayButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Button/index.d.ts +10 -0
- package/lib/typescript/components/Button/index.d.ts.map +1 -0
- package/lib/typescript/components/Button/styles.d.ts +20 -0
- package/lib/typescript/components/Button/styles.d.ts.map +1 -0
- package/lib/typescript/components/CardInformation/index.d.ts +16 -0
- package/lib/typescript/components/CardInformation/index.d.ts.map +1 -0
- package/lib/typescript/components/CardInformation/styles.d.ts +27 -0
- package/lib/typescript/components/CardInformation/styles.d.ts.map +1 -0
- package/lib/typescript/components/CardSheet/index.d.ts +10 -0
- package/lib/typescript/components/CardSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/CardSheet/styles.d.ts +31 -0
- package/lib/typescript/components/CardSheet/styles.d.ts.map +1 -0
- package/lib/typescript/components/CardSheet/useCardSheet/index.d.ts +17 -0
- package/lib/typescript/components/CardSheet/useCardSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox/index.d.ts +8 -0
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox/styles.d.ts +16 -0
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -0
- package/lib/typescript/components/GooglePayButton/index.d.ts +7 -0
- package/lib/typescript/components/GooglePayButton/index.d.ts.map +1 -0
- package/lib/typescript/components/GooglePayButton/styles.d.ts +21 -0
- package/lib/typescript/components/GooglePayButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Header/index.d.ts +9 -0
- package/lib/typescript/components/Header/index.d.ts.map +1 -0
- package/lib/typescript/components/Header/styles.d.ts +26 -0
- package/lib/typescript/components/Header/styles.d.ts.map +1 -0
- package/lib/typescript/components/ImageButton/index.d.ts +9 -0
- package/lib/typescript/components/ImageButton/index.d.ts.map +1 -0
- package/lib/typescript/components/ImageButton/styles.d.ts +5 -0
- package/lib/typescript/components/ImageButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/InputFields/BaseInputField/index.d.ts +13 -0
- package/lib/typescript/components/InputFields/BaseInputField/index.d.ts.map +1 -0
- package/lib/typescript/components/InputFields/BaseInputField/styles.d.ts +29 -0
- package/lib/typescript/components/InputFields/BaseInputField/styles.d.ts.map +1 -0
- package/lib/typescript/components/InputFields/CVCInputField/index.d.ts +6 -0
- package/lib/typescript/components/InputFields/CVCInputField/index.d.ts.map +1 -0
- package/lib/typescript/components/InputFields/CVCInputField/styles.d.ts +17 -0
- package/lib/typescript/components/InputFields/CVCInputField/styles.d.ts.map +1 -0
- package/lib/typescript/components/InputFields/CardInputField/index.d.ts +9 -0
- package/lib/typescript/components/InputFields/CardInputField/index.d.ts.map +1 -0
- package/lib/typescript/components/InputFields/CardInputField/styles.d.ts +20 -0
- package/lib/typescript/components/InputFields/CardInputField/styles.d.ts.map +1 -0
- package/lib/typescript/components/InputFields/ExpirationDateInputField/index.d.ts +9 -0
- package/lib/typescript/components/InputFields/ExpirationDateInputField/index.d.ts.map +1 -0
- package/lib/typescript/components/LoadingSpinner/index.d.ts +3 -0
- package/lib/typescript/components/LoadingSpinner/index.d.ts.map +1 -0
- package/lib/typescript/components/LoadingSpinner/styles.d.ts +20 -0
- package/lib/typescript/components/LoadingSpinner/styles.d.ts.map +1 -0
- package/lib/typescript/components/Modal/index.d.ts +9 -0
- package/lib/typescript/components/Modal/index.d.ts.map +1 -0
- package/lib/typescript/components/Modal/styles.d.ts +20 -0
- package/lib/typescript/components/Modal/styles.d.ts.map +1 -0
- package/lib/typescript/components/NativePayButton/index.d.ts +7 -0
- package/lib/typescript/components/NativePayButton/index.d.ts.map +1 -0
- package/lib/typescript/components/NoInternetConnection/index.d.ts +3 -0
- package/lib/typescript/components/NoInternetConnection/index.d.ts.map +1 -0
- package/lib/typescript/components/NoInternetConnection/styles.d.ts +6 -0
- package/lib/typescript/components/NoInternetConnection/styles.d.ts.map +1 -0
- package/lib/typescript/components/OptionMenuModal/index.d.ts +8 -0
- package/lib/typescript/components/OptionMenuModal/index.d.ts.map +1 -0
- package/lib/typescript/components/OptionMenuModal/styles.d.ts +34 -0
- package/lib/typescript/components/OptionMenuModal/styles.d.ts.map +1 -0
- package/lib/typescript/components/PayButton/index.d.ts +10 -0
- package/lib/typescript/components/PayButton/index.d.ts.map +1 -0
- package/lib/typescript/components/PayButton/styles.d.ts +16 -0
- package/lib/typescript/components/PayButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/PaymentMethod/index.d.ts +11 -0
- package/lib/typescript/components/PaymentMethod/index.d.ts.map +1 -0
- package/lib/typescript/components/PaymentMethod/styles.d.ts +11 -0
- package/lib/typescript/components/PaymentMethod/styles.d.ts.map +1 -0
- package/lib/typescript/components/PaymentMethodFormHeaderOption/index.d.ts +11 -0
- package/lib/typescript/components/PaymentMethodFormHeaderOption/index.d.ts.map +1 -0
- package/lib/typescript/components/PaymentMethodFormHeaderOption/styles.d.ts +27 -0
- package/lib/typescript/components/PaymentMethodFormHeaderOption/styles.d.ts.map +1 -0
- package/lib/typescript/components/PaymentMethodsForm/index.d.ts +7 -0
- package/lib/typescript/components/PaymentMethodsForm/index.d.ts.map +1 -0
- package/lib/typescript/components/PaymentMethodsForm/styles.d.ts +15 -0
- package/lib/typescript/components/PaymentMethodsForm/styles.d.ts.map +1 -0
- package/lib/typescript/components/PaymentSheet/index.d.ts +5 -0
- package/lib/typescript/components/PaymentSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/PrivacyPolicySheet/consts.d.ts +41 -0
- package/lib/typescript/components/PrivacyPolicySheet/consts.d.ts.map +1 -0
- package/lib/typescript/components/PrivacyPolicySheet/index.d.ts +10 -0
- package/lib/typescript/components/PrivacyPolicySheet/index.d.ts.map +1 -0
- package/lib/typescript/components/ProcessButton/index.d.ts +11 -0
- package/lib/typescript/components/ProcessButton/index.d.ts.map +1 -0
- package/lib/typescript/components/ProcessButton/styles.d.ts +16 -0
- package/lib/typescript/components/ProcessButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/SaveCard/index.d.ts +9 -0
- package/lib/typescript/components/SaveCard/index.d.ts.map +1 -0
- package/lib/typescript/components/SaveCard/styles.d.ts +10 -0
- package/lib/typescript/components/SaveCard/styles.d.ts.map +1 -0
- package/lib/typescript/components/SaveCard/useSaveCard/index.d.ts +9 -0
- package/lib/typescript/components/SaveCard/useSaveCard/index.d.ts.map +1 -0
- package/lib/typescript/components/SaveCardButton/index.d.ts +10 -0
- package/lib/typescript/components/SaveCardButton/index.d.ts.map +1 -0
- package/lib/typescript/components/SaveCardButton/styles.d.ts +16 -0
- package/lib/typescript/components/SaveCardButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/SaveCardSheet/index.d.ts +5 -0
- package/lib/typescript/components/SaveCardSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/SavedCard/index.d.ts +8 -0
- package/lib/typescript/components/SavedCard/index.d.ts.map +1 -0
- package/lib/typescript/components/SavedCard/styles.d.ts +23 -0
- package/lib/typescript/components/SavedCard/styles.d.ts.map +1 -0
- package/lib/typescript/components/SavedCardsSheet/index.d.ts +10 -0
- package/lib/typescript/components/SavedCardsSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/SavedCardsSheet/styles.d.ts +9 -0
- package/lib/typescript/components/SavedCardsSheet/styles.d.ts.map +1 -0
- package/lib/typescript/components/SumUpProvider.d.ts +25 -0
- package/lib/typescript/components/SumUpProvider.d.ts.map +1 -0
- package/lib/typescript/components/Switch/index.d.ts +9 -0
- package/lib/typescript/components/Switch/index.d.ts.map +1 -0
- package/lib/typescript/components/Switch/styles.d.ts +37 -0
- package/lib/typescript/components/Switch/styles.d.ts.map +1 -0
- package/lib/typescript/components/Text/index.d.ts +10 -0
- package/lib/typescript/components/Text/index.d.ts.map +1 -0
- package/lib/typescript/components/Text/styles.d.ts +9 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -0
- package/lib/typescript/components/WebViewSheet/index.d.ts +9 -0
- package/lib/typescript/components/WebViewSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/WebViewSheet/styles.d.ts +34 -0
- package/lib/typescript/components/WebViewSheet/styles.d.ts.map +1 -0
- package/lib/typescript/consts/UI.d.ts +5 -0
- package/lib/typescript/consts/UI.d.ts.map +1 -0
- package/lib/typescript/consts/errors.d.ts +7 -0
- package/lib/typescript/consts/errors.d.ts.map +1 -0
- package/lib/typescript/consts/nativePayMethod.d.ts +12 -0
- package/lib/typescript/consts/nativePayMethod.d.ts.map +1 -0
- package/lib/typescript/consts/validation.d.ts +16 -0
- package/lib/typescript/consts/validation.d.ts.map +1 -0
- package/lib/typescript/contexts/LanguageContext/index.d.ts +12 -0
- package/lib/typescript/contexts/LanguageContext/index.d.ts.map +1 -0
- package/lib/typescript/contexts/OptionMenuContext/index.d.ts +16 -0
- package/lib/typescript/contexts/OptionMenuContext/index.d.ts.map +1 -0
- package/lib/typescript/contexts/PaymentSheetContext/index.d.ts +13 -0
- package/lib/typescript/contexts/PaymentSheetContext/index.d.ts.map +1 -0
- package/lib/typescript/contexts/StoreContext.d.ts +15 -0
- package/lib/typescript/contexts/StoreContext.d.ts.map +1 -0
- package/lib/typescript/contexts/ThemeContext.d.ts +45 -0
- package/lib/typescript/contexts/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/helpers/formatAmount/index.d.ts +2 -0
- package/lib/typescript/helpers/formatAmount/index.d.ts.map +1 -0
- package/lib/typescript/helpers/getUserAgent/index.d.ts +2 -0
- package/lib/typescript/helpers/getUserAgent/index.d.ts.map +1 -0
- package/lib/typescript/helpers/validation/paymentFields.d.ts +12 -0
- package/lib/typescript/helpers/validation/paymentFields.d.ts.map +1 -0
- package/lib/typescript/hooks/base/index.d.ts +6 -0
- package/lib/typescript/hooks/base/index.d.ts.map +1 -0
- package/lib/typescript/hooks/base/useCard/index.d.ts +3 -0
- package/lib/typescript/hooks/base/useCard/index.d.ts.map +1 -0
- package/lib/typescript/hooks/base/useCvcCode/index.d.ts +3 -0
- package/lib/typescript/hooks/base/useCvcCode/index.d.ts.map +1 -0
- package/lib/typescript/hooks/base/useExpirationDate/index.d.ts +3 -0
- package/lib/typescript/hooks/base/useExpirationDate/index.d.ts.map +1 -0
- package/lib/typescript/hooks/base/useName/index.d.ts +3 -0
- package/lib/typescript/hooks/base/useName/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useSafeArea.d.ts +7 -0
- package/lib/typescript/hooks/useSafeArea.d.ts.map +1 -0
- package/lib/typescript/hooks/useSumUp.d.ts +15 -0
- package/lib/typescript/hooks/useSumUp.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +6 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/publicApi/errors.d.ts +29 -0
- package/lib/typescript/publicApi/errors.d.ts.map +1 -0
- package/lib/typescript/services/API/ApiManager/index.d.ts +32 -0
- package/lib/typescript/services/API/ApiManager/index.d.ts.map +1 -0
- package/lib/typescript/services/API/CheckoutApiManager/index.d.ts +17 -0
- package/lib/typescript/services/API/CheckoutApiManager/index.d.ts.map +1 -0
- package/lib/typescript/services/API/CheckoutApiManager/models.d.ts +80 -0
- package/lib/typescript/services/API/CheckoutApiManager/models.d.ts.map +1 -0
- package/lib/typescript/services/API/PullingService/index.d.ts +7 -0
- package/lib/typescript/services/API/PullingService/index.d.ts.map +1 -0
- package/lib/typescript/services/ApplePayService/index.d.ts +11 -0
- package/lib/typescript/services/ApplePayService/index.d.ts.map +1 -0
- package/lib/typescript/services/GooglePayService/index.d.ts +12 -0
- package/lib/typescript/services/GooglePayService/index.d.ts.map +1 -0
- package/lib/typescript/services/Logger/index.d.ts +12 -0
- package/lib/typescript/services/Logger/index.d.ts.map +1 -0
- package/lib/typescript/services/NativePaymentsBridge/index.d.ts +34 -0
- package/lib/typescript/services/NativePaymentsBridge/index.d.ts.map +1 -0
- package/lib/typescript/stores/BaseSheetStore/index.d.ts +24 -0
- package/lib/typescript/stores/BaseSheetStore/index.d.ts.map +1 -0
- package/lib/typescript/stores/NativePaymentStore/index.d.ts +23 -0
- package/lib/typescript/stores/NativePaymentStore/index.d.ts.map +1 -0
- package/lib/typescript/stores/PaymentInstrumentsStore/index.d.ts +29 -0
- package/lib/typescript/stores/PaymentInstrumentsStore/index.d.ts.map +1 -0
- package/lib/typescript/stores/PaymentStore/index.d.ts +18 -0
- package/lib/typescript/stores/PaymentStore/index.d.ts.map +1 -0
- package/lib/typescript/stores/RootStore.d.ts +14 -0
- package/lib/typescript/stores/RootStore.d.ts.map +1 -0
- package/lib/typescript/stores/SaveCardStore/index.d.ts +17 -0
- package/lib/typescript/stores/SaveCardStore/index.d.ts.map +1 -0
- package/lib/typescript/stores/ThreeDSecureStore/index.d.ts +18 -0
- package/lib/typescript/stores/ThreeDSecureStore/index.d.ts.map +1 -0
- package/lib/typescript/styles/colors.d.ts +23 -0
- package/lib/typescript/styles/colors.d.ts.map +1 -0
- package/lib/typescript/styles/fonts.d.ts +6 -0
- package/lib/typescript/styles/fonts.d.ts.map +1 -0
- package/lib/typescript/styles/images.d.ts +16 -0
- package/lib/typescript/styles/images.d.ts.map +1 -0
- package/lib/typescript/styles/index.d.ts +5 -0
- package/lib/typescript/styles/index.d.ts.map +1 -0
- package/lib/typescript/translations/index.d.ts +2 -0
- package/lib/typescript/translations/index.d.ts.map +1 -0
- package/lib/typescript/types/ApplePay.d.ts +32 -0
- package/lib/typescript/types/ApplePay.d.ts.map +1 -0
- package/lib/typescript/types/CommonSheet.d.ts +45 -0
- package/lib/typescript/types/CommonSheet.d.ts.map +1 -0
- package/lib/typescript/types/GooglePay.d.ts +45 -0
- package/lib/typescript/types/GooglePay.d.ts.map +1 -0
- package/lib/typescript/types/PaymentSheet.d.ts +76 -0
- package/lib/typescript/types/PaymentSheet.d.ts.map +1 -0
- package/lib/typescript/types/Requests.d.ts +20 -0
- package/lib/typescript/types/Requests.d.ts.map +1 -0
- package/lib/typescript/types/SaveCardSheet.d.ts +22 -0
- package/lib/typescript/types/SaveCardSheet.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +13 -0
- package/lib/typescript/types/index.d.ts.map +1 -0
- package/package.json +164 -0
- package/src/assets/fonts/AktivGrotesk/AktivGrotesk-Bold.ttf +0 -0
- package/src/assets/fonts/SFProText/SFProText-Bold.ttf +0 -0
- package/src/assets/fonts/SFProText/SFProText-Regular.ttf +0 -0
- package/src/assets/icons/americanExpress/americanExpress@2x.png +0 -0
- package/src/assets/icons/americanExpress/americanExpress@3x.png +0 -0
- package/src/assets/icons/applePay/applePay@2x.png +0 -0
- package/src/assets/icons/applePay/applePay@3x.png +0 -0
- package/src/assets/icons/back/back@2x.png +0 -0
- package/src/assets/icons/back/back@3x.png +0 -0
- package/src/assets/icons/cardPlaceholder/cardPlaceholder@2x.png +0 -0
- package/src/assets/icons/cardPlaceholder/cardPlaceholder@3x.png +0 -0
- package/src/assets/icons/checkbox/checkbox@2x.png +0 -0
- package/src/assets/icons/checkbox/checkbox@3x.png +0 -0
- package/src/assets/icons/cross/cross@2x.png +0 -0
- package/src/assets/icons/cross/cross@3x.png +0 -0
- package/src/assets/icons/googlePay/googlePay@2x.png +0 -0
- package/src/assets/icons/googlePay/googlePay@3x.png +0 -0
- package/src/assets/icons/lock/lock@2x.png +0 -0
- package/src/assets/icons/lock/lock@3x.png +0 -0
- package/src/assets/icons/mastercard/mastercard@2x.png +0 -0
- package/src/assets/icons/mastercard/mastercard@3x.png +0 -0
- package/src/assets/icons/more/more@2x.png +0 -0
- package/src/assets/icons/more/more@3x.png +0 -0
- package/src/assets/icons/rightArrow/rightArrow@2x.png +0 -0
- package/src/assets/icons/rightArrow/rightArrow@3x.png +0 -0
- package/src/assets/icons/visa/visa@2x.png +0 -0
- package/src/assets/icons/visa/visa@3x.png +0 -0
- package/src/assets/icons/whiteCheckmark/whiteCheckmark@2x.png +0 -0
- package/src/assets/icons/whiteCheckmark/whiteCheckmark@3x.png +0 -0
- package/src/components/3DSecureSheet/index.tsx +57 -0
- package/src/components/AnimatedContainer/index.tsx +105 -0
- package/src/components/AnimatedContainer/styles.tsx +32 -0
- package/src/components/ApplePayButton/index.tsx +26 -0
- package/src/components/ApplePayButton/styles.tsx +24 -0
- package/src/components/Button/index.tsx +22 -0
- package/src/components/Button/styles.tsx +52 -0
- package/src/components/CardInformation/index.tsx +129 -0
- package/src/components/CardInformation/styles.tsx +35 -0
- package/src/components/CardSheet/index.tsx +165 -0
- package/src/components/CardSheet/styles.tsx +46 -0
- package/src/components/CardSheet/useCardSheet/index.ts +104 -0
- package/src/components/Checkbox/index.tsx +26 -0
- package/src/components/Checkbox/styles.tsx +24 -0
- package/src/components/GooglePayButton/index.tsx +26 -0
- package/src/components/GooglePayButton/styles.tsx +29 -0
- package/src/components/Header/index.tsx +37 -0
- package/src/components/Header/styles.tsx +34 -0
- package/src/components/ImageButton/index.tsx +22 -0
- package/src/components/ImageButton/styles.tsx +10 -0
- package/src/components/InputFields/BaseInputField/index.tsx +62 -0
- package/src/components/InputFields/BaseInputField/styles.tsx +37 -0
- package/src/components/InputFields/CVCInputField/index.tsx +27 -0
- package/src/components/InputFields/CVCInputField/styles.tsx +22 -0
- package/src/components/InputFields/CardInputField/index.tsx +56 -0
- package/src/components/InputFields/CardInputField/styles.tsx +25 -0
- package/src/components/InputFields/ExpirationDateInputField/index.tsx +24 -0
- package/src/components/LoadingSpinner/index.tsx +51 -0
- package/src/components/LoadingSpinner/styles.tsx +28 -0
- package/src/components/Modal/index.tsx +31 -0
- package/src/components/Modal/styles.tsx +28 -0
- package/src/components/NativePayButton/index.tsx +16 -0
- package/src/components/NoInternetConnection/index.tsx +24 -0
- package/src/components/NoInternetConnection/styles.tsx +14 -0
- package/src/components/OptionMenuModal/index.tsx +97 -0
- package/src/components/OptionMenuModal/styles.tsx +43 -0
- package/src/components/PayButton/index.tsx +55 -0
- package/src/components/PayButton/styles.tsx +24 -0
- package/src/components/PaymentMethod/index.tsx +43 -0
- package/src/components/PaymentMethod/styles.tsx +16 -0
- package/src/components/PaymentMethodFormHeaderOption/index.tsx +34 -0
- package/src/components/PaymentMethodFormHeaderOption/styles.tsx +35 -0
- package/src/components/PaymentMethodsForm/index.tsx +24 -0
- package/src/components/PaymentMethodsForm/styles.tsx +23 -0
- package/src/components/PaymentSheet/index.tsx +86 -0
- package/src/components/PrivacyPolicySheet/consts.ts +42 -0
- package/src/components/PrivacyPolicySheet/index.tsx +56 -0
- package/src/components/ProcessButton/index.tsx +75 -0
- package/src/components/ProcessButton/styles.tsx +36 -0
- package/src/components/SaveCard/index.tsx +88 -0
- package/src/components/SaveCard/styles.tsx +18 -0
- package/src/components/SaveCard/useSaveCard/index.ts +71 -0
- package/src/components/SaveCardButton/index.tsx +32 -0
- package/src/components/SaveCardButton/styles.tsx +24 -0
- package/src/components/SaveCardSheet/index.tsx +24 -0
- package/src/components/SavedCard/index.tsx +50 -0
- package/src/components/SavedCard/styles.tsx +31 -0
- package/src/components/SavedCardsSheet/index.tsx +108 -0
- package/src/components/SavedCardsSheet/styles.tsx +17 -0
- package/src/components/SumUpProvider.tsx +68 -0
- package/src/components/Switch/index.tsx +40 -0
- package/src/components/Switch/styles.tsx +48 -0
- package/src/components/Text/index.tsx +98 -0
- package/src/components/Text/styles.tsx +13 -0
- package/src/components/WebViewSheet/index.tsx +52 -0
- package/src/components/WebViewSheet/styles.tsx +45 -0
- package/src/consts/UI.ts +3 -0
- package/src/consts/errors.ts +7 -0
- package/src/consts/nativePayMethod.ts +14 -0
- package/src/consts/validation.ts +14 -0
- package/src/contexts/LanguageContext/index.tsx +47 -0
- package/src/contexts/OptionMenuContext/index.tsx +46 -0
- package/src/contexts/PaymentSheetContext/index.tsx +41 -0
- package/src/contexts/StoreContext.tsx +46 -0
- package/src/contexts/ThemeContext.tsx +9 -0
- package/src/helpers/formatAmount/index.ts +22 -0
- package/src/helpers/getUserAgent/index.ts +5 -0
- package/src/helpers/validation/paymentFields.ts +73 -0
- package/src/hooks/base/index.ts +6 -0
- package/src/hooks/base/useCard/index.ts +69 -0
- package/src/hooks/base/useCvcCode/index.ts +51 -0
- package/src/hooks/base/useExpirationDate/index.ts +71 -0
- package/src/hooks/base/useName/index.ts +51 -0
- package/src/hooks/useSafeArea.ts +12 -0
- package/src/hooks/useSumUp.ts +100 -0
- package/src/index.tsx +16 -0
- package/src/publicApi/errors.ts +155 -0
- package/src/services/API/ApiManager/index.ts +182 -0
- package/src/services/API/CheckoutApiManager/index.ts +148 -0
- package/src/services/API/CheckoutApiManager/models.ts +140 -0
- package/src/services/API/PullingService/index.ts +29 -0
- package/src/services/ApplePayService/index.ts +54 -0
- package/src/services/GooglePayService/index.ts +67 -0
- package/src/services/Logger/index.ts +28 -0
- package/src/services/NativePaymentsBridge/index.ts +44 -0
- package/src/stores/BaseSheetStore/index.ts +181 -0
- package/src/stores/NativePaymentStore/index.ts +137 -0
- package/src/stores/PaymentInstrumentsStore/index.ts +166 -0
- package/src/stores/PaymentStore/index.ts +188 -0
- package/src/stores/RootStore.ts +29 -0
- package/src/stores/SaveCardStore/index.ts +159 -0
- package/src/stores/ThreeDSecureStore/index.ts +75 -0
- package/src/styles/colors.ts +22 -0
- package/src/styles/fonts.ts +5 -0
- package/src/styles/images.ts +15 -0
- package/src/styles/index.ts +5 -0
- package/src/translations/bg-BG.json +55 -0
- package/src/translations/ca-ES.json +55 -0
- package/src/translations/cs-CZ.json +55 -0
- package/src/translations/da-DK.json +55 -0
- package/src/translations/de-AT.json +55 -0
- package/src/translations/de-CH.json +55 -0
- package/src/translations/de-DE.json +55 -0
- package/src/translations/de-LU.json +55 -0
- package/src/translations/el-CY.json +55 -0
- package/src/translations/el-GR.json +55 -0
- package/src/translations/en-AU.json +55 -0
- package/src/translations/en-GB.json +55 -0
- package/src/translations/en-IE.json +55 -0
- package/src/translations/en-MT.json +55 -0
- package/src/translations/en-US.json +55 -0
- package/src/translations/en.json +55 -0
- package/src/translations/es-CL.json +55 -0
- package/src/translations/es-CO.json +55 -0
- package/src/translations/es-ES.json +55 -0
- package/src/translations/es-LA.json +55 -0
- package/src/translations/es-PE.json +55 -0
- package/src/translations/et-EE.json +55 -0
- package/src/translations/fi-FI.json +55 -0
- package/src/translations/fr-BE.json +55 -0
- package/src/translations/fr-CH.json +55 -0
- package/src/translations/fr-FR.json +55 -0
- package/src/translations/fr-LU.json +55 -0
- package/src/translations/hr-HR.json +55 -0
- package/src/translations/hu-HU.json +55 -0
- package/src/translations/index.ts +87 -0
- package/src/translations/it-CH.json +55 -0
- package/src/translations/it-IT.json +55 -0
- package/src/translations/lt-LT.json +55 -0
- package/src/translations/lv-LV.json +55 -0
- package/src/translations/nb-NO.json +55 -0
- package/src/translations/nl-BE.json +55 -0
- package/src/translations/nl-NL.json +55 -0
- package/src/translations/pl-PL.json +55 -0
- package/src/translations/pt-BR.json +55 -0
- package/src/translations/pt-PT.json +55 -0
- package/src/translations/ro-RO.json +55 -0
- package/src/translations/sk-SK.json +55 -0
- package/src/translations/sl-SI.json +55 -0
- package/src/translations/sv-SE.json +55 -0
- package/src/types/ApplePay.ts +33 -0
- package/src/types/CommonSheet.ts +60 -0
- package/src/types/GooglePay.ts +44 -0
- package/src/types/PaymentSheet.ts +102 -0
- package/src/types/Requests.ts +20 -0
- package/src/types/SaveCardSheet.ts +24 -0
- package/src/types/index.ts +14 -0
- package/src/types/react-native-safe-area-context.d.ts +16 -0
- package/sumup-react-native.podspec +35 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from '../../contexts/ThemeContext';
|
|
3
|
+
|
|
4
|
+
export const useStyles = () => {
|
|
5
|
+
const { colors } = useTheme();
|
|
6
|
+
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
modalStyle: {
|
|
9
|
+
margin: 0,
|
|
10
|
+
},
|
|
11
|
+
safeArea: {
|
|
12
|
+
flex: 1,
|
|
13
|
+
},
|
|
14
|
+
bottomColorContainer: {
|
|
15
|
+
width: '100%',
|
|
16
|
+
height: 100,
|
|
17
|
+
backgroundColor: colors.white,
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
bottom: -100,
|
|
20
|
+
},
|
|
21
|
+
contentContainer: {
|
|
22
|
+
flex: 1,
|
|
23
|
+
paddingBottom: 16,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return styles;
|
|
28
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
import { ApplePayButton } from '../ApplePayButton';
|
|
4
|
+
import { GooglePayButton } from '../GooglePayButton';
|
|
5
|
+
|
|
6
|
+
interface NativePayButtonProps {
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const NativePayButton = (props: NativePayButtonProps) => {
|
|
11
|
+
return Platform.OS === 'ios' ? (
|
|
12
|
+
<ApplePayButton disabled={props.disabled} />
|
|
13
|
+
) : (
|
|
14
|
+
<GooglePayButton disabled={props.disabled} />
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, View } from 'react-native';
|
|
3
|
+
import { Stack } from 'react-native-spacing-system';
|
|
4
|
+
import { useStrings } from '../../contexts/LanguageContext';
|
|
5
|
+
import { useStyles } from './styles';
|
|
6
|
+
import { useNetInfo } from '@react-native-community/netinfo';
|
|
7
|
+
|
|
8
|
+
export const NoInternetConnection = () => {
|
|
9
|
+
const styles = useStyles();
|
|
10
|
+
const { strings } = useStrings();
|
|
11
|
+
|
|
12
|
+
const { isConnected } = useNetInfo();
|
|
13
|
+
|
|
14
|
+
if (isConnected) {
|
|
15
|
+
return <></>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<View>
|
|
20
|
+
<Text style={styles.text}>{strings.choosePaymentMethod.noInternet}</Text>
|
|
21
|
+
<Stack size={24} />
|
|
22
|
+
</View>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from '../../contexts/ThemeContext';
|
|
3
|
+
|
|
4
|
+
export const useStyles = () => {
|
|
5
|
+
const { colors } = useTheme();
|
|
6
|
+
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
text: {
|
|
9
|
+
color: colors.cinnabar,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
return styles;
|
|
14
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Platform, Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import ModalComponent from 'react-native-modal';
|
|
4
|
+
import { useStyles } from './styles';
|
|
5
|
+
import { useOptionMenu } from '../../contexts/OptionMenuContext';
|
|
6
|
+
import { useTheme } from '../../contexts/ThemeContext';
|
|
7
|
+
import { useStrings } from '../../contexts/LanguageContext';
|
|
8
|
+
|
|
9
|
+
const LEFT_OFFSET = 95;
|
|
10
|
+
const TOP_OFFSET_WITHOUT_USED = 36.5;
|
|
11
|
+
const TOP_OFFSET_WITH_USED = 15;
|
|
12
|
+
|
|
13
|
+
interface OptionMenuModalProps {
|
|
14
|
+
onDelete: () => void;
|
|
15
|
+
onUse: () => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type OptionType = 'regular' | 'destructive';
|
|
19
|
+
|
|
20
|
+
export const OptionMenuModal = (props: OptionMenuModalProps) => {
|
|
21
|
+
const { colors } = useTheme();
|
|
22
|
+
|
|
23
|
+
const { strings } = useStrings();
|
|
24
|
+
|
|
25
|
+
const styles = useStyles();
|
|
26
|
+
|
|
27
|
+
const { isVisible, x, y, isUsed, hide } = useOptionMenu();
|
|
28
|
+
|
|
29
|
+
const close = () => {
|
|
30
|
+
hide();
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const renderOption = (
|
|
34
|
+
text: string,
|
|
35
|
+
type: OptionType,
|
|
36
|
+
onPress: () => void
|
|
37
|
+
) => {
|
|
38
|
+
return (
|
|
39
|
+
<TouchableOpacity style={styles.optionContainer} onPress={onPress}>
|
|
40
|
+
<Text
|
|
41
|
+
style={[
|
|
42
|
+
styles.optionText,
|
|
43
|
+
{ color: type === 'destructive' ? colors.valencia : colors.black },
|
|
44
|
+
]}
|
|
45
|
+
>
|
|
46
|
+
{text}
|
|
47
|
+
</Text>
|
|
48
|
+
</TouchableOpacity>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const onDelete = () => {
|
|
53
|
+
close();
|
|
54
|
+
props.onDelete();
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const onUse = () => {
|
|
58
|
+
close();
|
|
59
|
+
props.onUse();
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<ModalComponent
|
|
64
|
+
hasBackdrop
|
|
65
|
+
animationIn={'fadeIn'}
|
|
66
|
+
animationInTiming={Platform.OS === 'android' ? 1 : undefined}
|
|
67
|
+
animationOut={'fadeOut'}
|
|
68
|
+
animationOutTiming={Platform.OS === 'android' ? 1 : undefined}
|
|
69
|
+
isVisible={isVisible}
|
|
70
|
+
onBackdropPress={close}
|
|
71
|
+
backdropOpacity={0}
|
|
72
|
+
style={styles.modalStyle}
|
|
73
|
+
>
|
|
74
|
+
<View
|
|
75
|
+
style={[
|
|
76
|
+
styles.container,
|
|
77
|
+
{
|
|
78
|
+
left: x - LEFT_OFFSET,
|
|
79
|
+
top: y - (isUsed ? TOP_OFFSET_WITH_USED : TOP_OFFSET_WITHOUT_USED),
|
|
80
|
+
},
|
|
81
|
+
]}
|
|
82
|
+
>
|
|
83
|
+
{!isUsed && (
|
|
84
|
+
<>
|
|
85
|
+
{renderOption(strings.savedCards.options.use, 'regular', onUse)}
|
|
86
|
+
<View style={styles.separator} />
|
|
87
|
+
</>
|
|
88
|
+
)}
|
|
89
|
+
{renderOption(
|
|
90
|
+
strings.savedCards.options.delete,
|
|
91
|
+
'destructive',
|
|
92
|
+
onDelete
|
|
93
|
+
)}
|
|
94
|
+
</View>
|
|
95
|
+
</ModalComponent>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from '../../contexts/ThemeContext';
|
|
3
|
+
|
|
4
|
+
export const useStyles = () => {
|
|
5
|
+
const { colors, fonts } = useTheme();
|
|
6
|
+
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
modalStyle: {
|
|
9
|
+
margin: 0,
|
|
10
|
+
},
|
|
11
|
+
container: {
|
|
12
|
+
borderRadius: 12,
|
|
13
|
+
backgroundColor: colors.white,
|
|
14
|
+
position: 'absolute',
|
|
15
|
+
shadowColor: colors.codGray,
|
|
16
|
+
shadowOffset: {
|
|
17
|
+
width: 0,
|
|
18
|
+
height: 3,
|
|
19
|
+
},
|
|
20
|
+
shadowOpacity: 0.4,
|
|
21
|
+
shadowRadius: 10,
|
|
22
|
+
|
|
23
|
+
elevation: 16,
|
|
24
|
+
},
|
|
25
|
+
separator: {
|
|
26
|
+
height: 1,
|
|
27
|
+
backgroundColor: colors.black,
|
|
28
|
+
opacity: 0.2,
|
|
29
|
+
},
|
|
30
|
+
optionContainer: {
|
|
31
|
+
width: 107,
|
|
32
|
+
paddingVertical: 11,
|
|
33
|
+
paddingHorizontal: 16,
|
|
34
|
+
},
|
|
35
|
+
optionText: {
|
|
36
|
+
fontFamily: fonts.sfProTextRegular,
|
|
37
|
+
fontSize: 17,
|
|
38
|
+
lineHeight: 22,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return styles;
|
|
43
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, Image, View } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../contexts/ThemeContext';
|
|
4
|
+
import { useStrings } from '../../contexts/LanguageContext';
|
|
5
|
+
import { useStyles } from './styles';
|
|
6
|
+
import { usePaymentStore } from '../../contexts/StoreContext';
|
|
7
|
+
import { observer } from 'mobx-react-lite';
|
|
8
|
+
import { Queue } from 'react-native-spacing-system';
|
|
9
|
+
import { ProcessButton } from '../ProcessButton';
|
|
10
|
+
|
|
11
|
+
interface PayButtonProps {
|
|
12
|
+
canStartPayment: boolean;
|
|
13
|
+
|
|
14
|
+
onPress: () => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const PayButton = observer((props: PayButtonProps) => {
|
|
18
|
+
const { amount, currency, paymentStatus } = usePaymentStore();
|
|
19
|
+
|
|
20
|
+
const { strings } = useStrings();
|
|
21
|
+
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
|
|
24
|
+
const formatDisplayAmount = () => {
|
|
25
|
+
if (!currency) {
|
|
26
|
+
return '';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return new Intl.NumberFormat(undefined, {
|
|
30
|
+
style: 'currency',
|
|
31
|
+
currency,
|
|
32
|
+
minimumFractionDigits: 2,
|
|
33
|
+
maximumFractionDigits: 2,
|
|
34
|
+
}).format(amount || 0);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const styles = useStyles();
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<ProcessButton
|
|
41
|
+
canStartPayment={props.canStartPayment}
|
|
42
|
+
paymentStatus={paymentStatus}
|
|
43
|
+
defaultContent={
|
|
44
|
+
<View style={styles.defaultContentContainer}>
|
|
45
|
+
<Image style={styles.lockImage} source={theme.images.lock} />
|
|
46
|
+
<Queue size={8} />
|
|
47
|
+
<Text
|
|
48
|
+
style={styles.text}
|
|
49
|
+
>{`${strings.choosePaymentMethod.payButton} ${formatDisplayAmount()}`}</Text>
|
|
50
|
+
</View>
|
|
51
|
+
}
|
|
52
|
+
onPress={props.onPress}
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from '../../contexts/ThemeContext';
|
|
3
|
+
|
|
4
|
+
export const useStyles = () => {
|
|
5
|
+
const { colors, fonts } = useTheme();
|
|
6
|
+
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
text: {
|
|
9
|
+
fontSize: 16,
|
|
10
|
+
lineHeight: 24,
|
|
11
|
+
color: colors.white,
|
|
12
|
+
fontFamily: fonts.aktivGroteskBold,
|
|
13
|
+
},
|
|
14
|
+
lockImage: {
|
|
15
|
+
width: 24,
|
|
16
|
+
height: 24,
|
|
17
|
+
},
|
|
18
|
+
defaultContentContainer: {
|
|
19
|
+
flexDirection: 'row',
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
return styles;
|
|
24
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import { useStyles } from './styles';
|
|
4
|
+
import { useTheme } from '../../contexts/ThemeContext';
|
|
5
|
+
import { PaymentInstrument } from '../../types/PaymentSheet';
|
|
6
|
+
import { Queue } from 'react-native-spacing-system';
|
|
7
|
+
import { Checkbox } from '../Checkbox';
|
|
8
|
+
import { SavedCard } from '../SavedCard';
|
|
9
|
+
import { ImageButton } from '../ImageButton';
|
|
10
|
+
|
|
11
|
+
interface PaymentMethodProps {
|
|
12
|
+
item: PaymentInstrument;
|
|
13
|
+
selected: boolean;
|
|
14
|
+
|
|
15
|
+
onSelect: () => void;
|
|
16
|
+
onOptionsPress: (x: number, y: number) => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const PaymentMethod = (props: PaymentMethodProps) => {
|
|
20
|
+
const { images } = useTheme();
|
|
21
|
+
|
|
22
|
+
const styles = useStyles();
|
|
23
|
+
|
|
24
|
+
const optionsContainerRef = useRef<View>(null);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<TouchableOpacity style={styles.optionContainer} onPress={props.onSelect}>
|
|
28
|
+
<Checkbox selected={props.selected} />
|
|
29
|
+
<Queue size={16} />
|
|
30
|
+
<View style={styles.savedCardContainer}>
|
|
31
|
+
<SavedCard paymentInstrument={props.item} />
|
|
32
|
+
</View>
|
|
33
|
+
<View ref={optionsContainerRef}>
|
|
34
|
+
<ImageButton
|
|
35
|
+
source={images.more}
|
|
36
|
+
onPress={() => {
|
|
37
|
+
optionsContainerRef.current?.measureInWindow(props.onOptionsPress);
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
</View>
|
|
41
|
+
</TouchableOpacity>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export const useStyles = () => {
|
|
4
|
+
const styles = StyleSheet.create({
|
|
5
|
+
optionContainer: {
|
|
6
|
+
flexDirection: 'row',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
paddingVertical: 14,
|
|
9
|
+
},
|
|
10
|
+
savedCardContainer: {
|
|
11
|
+
flex: 1,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
return styles;
|
|
16
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { useStyles } from './styles';
|
|
4
|
+
import { Checkbox } from '../Checkbox';
|
|
5
|
+
import { Queue } from 'react-native-spacing-system';
|
|
6
|
+
|
|
7
|
+
interface PaymentMethodFormHeaderOptionProps {
|
|
8
|
+
selected: boolean;
|
|
9
|
+
title: string;
|
|
10
|
+
rightChildren: JSX.Element | JSX.Element[] | undefined;
|
|
11
|
+
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
|
|
14
|
+
onSelect?: () => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const PaymentMethodFormHeaderOption = (
|
|
18
|
+
props: PaymentMethodFormHeaderOptionProps
|
|
19
|
+
) => {
|
|
20
|
+
const styles = useStyles();
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<TouchableOpacity
|
|
24
|
+
disabled={props.disabled}
|
|
25
|
+
style={styles.optionContainer}
|
|
26
|
+
onPress={props.onSelect}
|
|
27
|
+
>
|
|
28
|
+
<Checkbox selected={props.selected} />
|
|
29
|
+
<Queue size={16} />
|
|
30
|
+
<Text style={styles.title}>{props.title}</Text>
|
|
31
|
+
{props.rightChildren}
|
|
32
|
+
</TouchableOpacity>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from '../../contexts/ThemeContext';
|
|
3
|
+
|
|
4
|
+
export const useStyles = () => {
|
|
5
|
+
const { colors, fonts } = useTheme();
|
|
6
|
+
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
container: {
|
|
9
|
+
borderColor: colors.mercury,
|
|
10
|
+
borderWidth: 2,
|
|
11
|
+
borderRadius: 16,
|
|
12
|
+
paddingHorizontal: 16,
|
|
13
|
+
},
|
|
14
|
+
title: {
|
|
15
|
+
fontWeight: '700',
|
|
16
|
+
fontSize: 14,
|
|
17
|
+
lineHeight: 20,
|
|
18
|
+
color: colors.codGray,
|
|
19
|
+
flex: 1,
|
|
20
|
+
fontFamily: fonts.sfProTextBold,
|
|
21
|
+
},
|
|
22
|
+
image: {
|
|
23
|
+
width: 32,
|
|
24
|
+
height: 24,
|
|
25
|
+
},
|
|
26
|
+
optionContainer: {
|
|
27
|
+
backgroundColor: colors.white,
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
paddingVertical: 12,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return styles;
|
|
35
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useStyles } from './styles';
|
|
4
|
+
|
|
5
|
+
interface PaymentMethodsFormProps {
|
|
6
|
+
methods: JSX.Element[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const PaymentMethodsForm = (props: PaymentMethodsFormProps) => {
|
|
10
|
+
const styles = useStyles();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<View style={styles.container}>
|
|
14
|
+
{props.methods.map((item, index) => (
|
|
15
|
+
<Fragment key={index}>
|
|
16
|
+
{item}
|
|
17
|
+
{props.methods.length - 1 > index && (
|
|
18
|
+
<View style={styles.separator} />
|
|
19
|
+
)}
|
|
20
|
+
</Fragment>
|
|
21
|
+
))}
|
|
22
|
+
</View>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from '../../contexts/ThemeContext';
|
|
3
|
+
|
|
4
|
+
export const useStyles = () => {
|
|
5
|
+
const { colors } = useTheme();
|
|
6
|
+
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
container: {
|
|
9
|
+
borderColor: colors.mercury,
|
|
10
|
+
borderWidth: 2,
|
|
11
|
+
borderRadius: 16,
|
|
12
|
+
paddingHorizontal: 16,
|
|
13
|
+
},
|
|
14
|
+
separator: {
|
|
15
|
+
height: 1,
|
|
16
|
+
backgroundColor: colors.mercury,
|
|
17
|
+
marginLeft: 40,
|
|
18
|
+
marginRight: -16,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return styles;
|
|
23
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { Modal } from '../Modal';
|
|
3
|
+
import { ThreeDSecureSheet } from '../3DSecureSheet';
|
|
4
|
+
import { usePaymentStore } from '../../contexts/StoreContext';
|
|
5
|
+
import { observer } from 'mobx-react-lite';
|
|
6
|
+
import { CardSheet } from '../CardSheet';
|
|
7
|
+
import {
|
|
8
|
+
AnimatedContainer,
|
|
9
|
+
AnimatedContainerHandler,
|
|
10
|
+
} from '../AnimatedContainer';
|
|
11
|
+
import { SavedCardsSheet } from '../SavedCardsSheet';
|
|
12
|
+
import { usePaymentSheet } from '../../contexts/PaymentSheetContext';
|
|
13
|
+
|
|
14
|
+
export const PaymentSheet = observer(() => {
|
|
15
|
+
const sheetId = useRef<string>();
|
|
16
|
+
|
|
17
|
+
const { isSheetVisible, hidePaymentSheet } = usePaymentStore();
|
|
18
|
+
const { currentId, init, deinit } = usePaymentSheet();
|
|
19
|
+
|
|
20
|
+
const [sheetHeight, setSheetHeight] = useState(0);
|
|
21
|
+
|
|
22
|
+
const cardSheetRef = useRef<AnimatedContainerHandler>(null);
|
|
23
|
+
const savedCardsSheetRef = useRef<AnimatedContainerHandler>(null);
|
|
24
|
+
|
|
25
|
+
const stack = useRef<React.RefObject<AnimatedContainerHandler>[]>([]);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
stack.current = [cardSheetRef];
|
|
29
|
+
sheetId.current = init();
|
|
30
|
+
|
|
31
|
+
return () => {
|
|
32
|
+
if (sheetId.current) {
|
|
33
|
+
close();
|
|
34
|
+
deinit(sheetId.current);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
+
}, []);
|
|
39
|
+
|
|
40
|
+
const handleCardPress = () => {
|
|
41
|
+
stack.current.push(savedCardsSheetRef);
|
|
42
|
+
show();
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const show = () => {
|
|
46
|
+
stack.current[stack.current.length - 1]?.current?.show();
|
|
47
|
+
stack.current[stack.current.length - 2]?.current?.goToBack();
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const goBack = () => {
|
|
51
|
+
stack.current[stack.current.length - 2]?.current?.show();
|
|
52
|
+
stack.current[stack.current.length - 1]?.current?.hide();
|
|
53
|
+
stack.current.pop();
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const close = () => {
|
|
57
|
+
stack.current = [stack.current[0]!];
|
|
58
|
+
hidePaymentSheet(true);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
if (currentId !== sheetId.current || !sheetId.current) {
|
|
62
|
+
return <></>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<Modal isVisible={isSheetVisible} onClose={close}>
|
|
67
|
+
{isSheetVisible ? (
|
|
68
|
+
<>
|
|
69
|
+
<AnimatedContainer
|
|
70
|
+
ref={cardSheetRef}
|
|
71
|
+
initWithoutAnimation
|
|
72
|
+
onHeightChanged={setSheetHeight}
|
|
73
|
+
>
|
|
74
|
+
<CardSheet onClose={close} onCardPress={handleCardPress} />
|
|
75
|
+
</AnimatedContainer>
|
|
76
|
+
<AnimatedContainer ref={savedCardsSheetRef} height={sheetHeight}>
|
|
77
|
+
<SavedCardsSheet onClose={close} onBack={goBack} />
|
|
78
|
+
</AnimatedContainer>
|
|
79
|
+
</>
|
|
80
|
+
) : (
|
|
81
|
+
<></>
|
|
82
|
+
)}
|
|
83
|
+
<ThreeDSecureSheet />
|
|
84
|
+
</Modal>
|
|
85
|
+
);
|
|
86
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const PRIVACY_POLICY_LINKS = {
|
|
2
|
+
AT: 'sumup.at',
|
|
3
|
+
BE: 'nl.sumup.be',
|
|
4
|
+
BG: 'sumup.bg',
|
|
5
|
+
HR: 'sumup.hr',
|
|
6
|
+
CY: 'sumup.com.cy',
|
|
7
|
+
CZ: 'sumup.cz',
|
|
8
|
+
DK: 'sumup.dk',
|
|
9
|
+
EE: 'sumup.ee',
|
|
10
|
+
FI: 'sumup.fi',
|
|
11
|
+
FR: 'sumup.fr',
|
|
12
|
+
DE: 'sumup.de',
|
|
13
|
+
GR: 'sumup.gr',
|
|
14
|
+
HU: 'sumup.hu',
|
|
15
|
+
IT: 'sumup.it',
|
|
16
|
+
LV: 'sumup.lv',
|
|
17
|
+
LT: 'sumup.lt',
|
|
18
|
+
LU: 'fr.sumup.lu',
|
|
19
|
+
MT: 'sumup.com.mt',
|
|
20
|
+
NL: 'sumup.nl',
|
|
21
|
+
PL: 'sumup.pl',
|
|
22
|
+
PT: 'sumup.pt',
|
|
23
|
+
RO: 'sumup.ro',
|
|
24
|
+
SK: 'sumup.sk',
|
|
25
|
+
SI: 'sumup.si',
|
|
26
|
+
ES: 'sumup.es',
|
|
27
|
+
SE: 'sumup.se',
|
|
28
|
+
GB: 'sumup.co.uk',
|
|
29
|
+
CH: 'ch-de.sumup.com',
|
|
30
|
+
NO: 'sumup.no',
|
|
31
|
+
AR: 'sumup.com.ar',
|
|
32
|
+
BR: 'sumup.com.br',
|
|
33
|
+
CL: 'sumup.cl',
|
|
34
|
+
CO: 'sumup.co',
|
|
35
|
+
PE: 'sumup.pe',
|
|
36
|
+
CA: 'sumup.ca',
|
|
37
|
+
AU: 'sumup.com.au',
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const DEFAULT_PRIVACY_POLICY_LINK = 'sumup.com';
|
|
41
|
+
|
|
42
|
+
export const PRIVACY_URL_KEY = '/privacy';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useMemo,
|
|
5
|
+
useState,
|
|
6
|
+
} from 'react';
|
|
7
|
+
import { WebViewSheet } from '../WebViewSheet';
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_PRIVACY_POLICY_LINK,
|
|
10
|
+
PRIVACY_POLICY_LINKS,
|
|
11
|
+
PRIVACY_URL_KEY,
|
|
12
|
+
} from './consts';
|
|
13
|
+
|
|
14
|
+
export interface PrivacyPolicySheetHandler {
|
|
15
|
+
show: () => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface PrivacyPolicySheetProps {
|
|
19
|
+
countryCode: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const PrivacyPolicySheet = forwardRef<
|
|
23
|
+
PrivacyPolicySheetHandler,
|
|
24
|
+
PrivacyPolicySheetProps
|
|
25
|
+
>((props, ref) => {
|
|
26
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
27
|
+
|
|
28
|
+
const countryCode = props.countryCode as keyof typeof PRIVACY_POLICY_LINKS;
|
|
29
|
+
const uri = useMemo(() => {
|
|
30
|
+
return (
|
|
31
|
+
'https://' +
|
|
32
|
+
(PRIVACY_POLICY_LINKS[countryCode] || DEFAULT_PRIVACY_POLICY_LINK) +
|
|
33
|
+
PRIVACY_URL_KEY
|
|
34
|
+
);
|
|
35
|
+
}, [countryCode]);
|
|
36
|
+
|
|
37
|
+
useImperativeHandle(ref, () => ({
|
|
38
|
+
show: () => {
|
|
39
|
+
setIsVisible(true);
|
|
40
|
+
},
|
|
41
|
+
}));
|
|
42
|
+
|
|
43
|
+
const onClose = () => {
|
|
44
|
+
setIsVisible(false);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<WebViewSheet
|
|
49
|
+
isVisible={isVisible}
|
|
50
|
+
onClose={onClose}
|
|
51
|
+
source={{
|
|
52
|
+
uri,
|
|
53
|
+
}}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
});
|