@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 @@
|
|
|
1
|
+
{"version":3,"names":["logger","ERROR_CODES","ApiError","Error","constructor","params","message","errorCode","detail","param","title","RequestType","getRequestString","requestType","myProfile","listPaymentInstruments","deletePaymentInstrument","checkoutById","retrieveCheckout","getRequestType","getVersion","getDomain","createBody","body","JSON","stringify","createAuthHeader","publicKey","request","headers","authHeader","paramsString","urlParams","key","value","Object","entries","undefined","Array","isArray","forEach","item","length","url","domain","log","data","Promise","resolve","reject","fetch","method","then","response","responseNotExpected","json","status","error_message","error_code","catch","error","unknown"],"sourceRoot":"../../../../../src","sources":["services/API/ApiManager/index.ts"],"mappings":"AAAA,OAAOA,MAAM,MAAM,0BAA0B;AAC7C,SAASC,WAAW,QAAQ,wBAAwB;AAEpD,OAAO,MAAMC,QAAQ,SAASC,KAAK,CAAC;EAMlCC,WAAWA,CAACC,MAMX,EAAE;IACD,KAAK,CAACA,MAAM,CAACC,OAAO,CAAC;IACrB,IAAI,CAACC,SAAS,GAAGF,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AAIH,QAAQ,CAACG,MAAM,GAAG,GAAG,EAAE;QACnDP,MAAM,CACJ,IAAI/C,QAAQ,CAAC;UACXI,OAAO,EAAEwC,IAAI,CAACW,aAAa,IAAIX,IAAI,CAACtC,MAAM,IAAIsC,IAAI,CAACxC,OAAO;UAC1DC,SAAS,EAAEuC,IAAI,CAACY,UAAU;UAC1BlD,MAAM,EAAEsC,IAAI,CAACtC,MAAM;UACnBE,KAAK,EAAEoC,IAAI,CAACpC,KAAK;UACjBD,KAAK,EAAEqC,IAAI,CAACrC;QACd,CAAC,CACH,CAAC;QAED;MACF;MAEAuC,OAAO,CAACF,IAAI,CAAC;IACf,CAAC,CAAC,CACDa,KAAK,CAAEC,KAAK,IAAK;MAChB5D,MAAM,CAAC6C,GAAG,CAAE,wBAAuB,EAAE;QAAEe;MAAM,CAAC,CAAC;MAC/CX,MAAM,CACJ,IAAI/C,QAAQ,CAAC;QACXI,OAAO,EAAEsD,KAAK,CAACtD,OAAO;QACtBC,SAAS,EAAEN,WAAW,CAAC4D;MACzB,CAAC,CACH,CAAC;IACH,CAAC,CAAC;EACN,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { request, RequestType } from '../ApiManager';
|
|
2
|
+
import { PullingService } from '../PullingService';
|
|
3
|
+
export class CheckoutApiManager {
|
|
4
|
+
constructor(publicKey, domain) {
|
|
5
|
+
this.domain = domain;
|
|
6
|
+
this.publicKey = publicKey;
|
|
7
|
+
}
|
|
8
|
+
getListPaymentInstruments = async (checkoutId, customerId) => {
|
|
9
|
+
const response = await request(RequestType.listPaymentInstruments, this.publicKey, {
|
|
10
|
+
domain: this.domain,
|
|
11
|
+
params: [checkoutId, customerId]
|
|
12
|
+
});
|
|
13
|
+
return response.filter(item => {
|
|
14
|
+
var _item$mandate;
|
|
15
|
+
return item.active && item.type === 'CARD' && ((_item$mandate = item.mandate) === null || _item$mandate === void 0 ? void 0 : _item$mandate.status) === 'active';
|
|
16
|
+
}).map(item => ({
|
|
17
|
+
token: item.token,
|
|
18
|
+
type: item.card.type,
|
|
19
|
+
lastDigits: item.card.last_4_digits
|
|
20
|
+
}));
|
|
21
|
+
};
|
|
22
|
+
getMyProfile = async () => {
|
|
23
|
+
const response = await request(RequestType.myProfile, this.publicKey, {
|
|
24
|
+
domain: this.domain
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
merchantId: response.merchant.code,
|
|
28
|
+
merchantName: response.merchant.name,
|
|
29
|
+
countryCode: response.merchant.country
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
getCheckout = async checkoutId => {
|
|
33
|
+
const response = await request(RequestType.retrieveCheckout, this.publicKey, {
|
|
34
|
+
domain: this.domain,
|
|
35
|
+
params: [checkoutId]
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
id: checkoutId,
|
|
39
|
+
status: response.status,
|
|
40
|
+
amount: response.amount,
|
|
41
|
+
currency: response.currency,
|
|
42
|
+
purpose: response.purpose
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
handlePayment = async (checkoutId, model) => {
|
|
46
|
+
const response = await request(RequestType.checkoutById, this.publicKey, {
|
|
47
|
+
domain: this.domain,
|
|
48
|
+
params: [checkoutId],
|
|
49
|
+
body: model
|
|
50
|
+
});
|
|
51
|
+
if ('next_step' in response) {
|
|
52
|
+
return {
|
|
53
|
+
url: response.next_step.url,
|
|
54
|
+
method: response.next_step.method,
|
|
55
|
+
payload: response.next_step.payload
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if (response.status === 'PENDING') {
|
|
59
|
+
const pullResponse = await PullingService.pull(() => this.getCheckout(checkoutId), checkout => checkout.status !== 'PENDING');
|
|
60
|
+
return {
|
|
61
|
+
status: pullResponse.status
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
status: response.status
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
deletePaymentInstrument = async (checkoutId, customerId, token) => {
|
|
69
|
+
return await request(RequestType.deletePaymentInstrument, this.publicKey, {
|
|
70
|
+
domain: this.domain,
|
|
71
|
+
params: [checkoutId, customerId, token],
|
|
72
|
+
responseNotExpected: true
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["request","RequestType","PullingService","CheckoutApiManager","constructor","publicKey","domain","getListPaymentInstruments","checkoutId","customerId","response","listPaymentInstruments","params","filter","item","_item$mandate","active","type","mandate","status","map","token","card","lastDigits","last_4_digits","getMyProfile","myProfile","merchantId","merchant","code","merchantName","name","countryCode","country","getCheckout","retrieveCheckout","id","amount","currency","purpose","handlePayment","model","checkoutById","body","url","next_step","method","payload","pullResponse","pull","checkout","deletePaymentInstrument","responseNotExpected"],"sourceRoot":"../../../../../src","sources":["services/API/CheckoutApiManager/index.ts"],"mappings":"AAMA,SAASA,OAAO,EAAEC,WAAW,QAAQ,eAAe;AACpD,SAASC,cAAc,QAAQ,mBAAmB;AAclD,OAAO,MAAMC,kBAAkB,CAAC;EAI9BC,WAAWA,CAACC,SAAiB,EAAEC,MAAe,EAAE;IAC9C,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACD,SAAS,GAAGA,SAAS;EAC5B;EAEAE,yBAAyB,GAAG,MAAAA,CAC1BC,UAAkB,EAClBC,UAAkB,KACe;IACjC,MAAMC,QAAQ,GAAG,MAAMV,OAAO,CAC5BC,WAAW,CAACU,sBAAsB,EAClC,IAAI,CAACN,SAAS,EACd;MACEC,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBM,MAAM,EAAE,CAACJ,UAAU,EAAEC,UAAU;IACjC,CACF,CAAC;IAED,OAAOC,QAAQ,CACZG,MAAM,CACJC,IAAI;MAAA,IAAAC,aAAA;MAAA,OACHD,IAAI,CAACE,MAAM,IACXF,IAAI,CAACG,IAAI,KAAK,MAAM,IACpB,EAAA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,MAAMV,OAAO,CAE5BC,WAAW,CAACyC,YAAY,EAAE,IAAI,CAACrC,SAAS,EAAE;MAC1CC,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBM,MAAM,EAAE,CAACJ,UAAU,CAAC;MACpBmC,IAAI,EAAEF;IACR,CAAC,CAAC;IAEF,IAAI,WAAW,IAAI/B,QAAQ,EAAE;MAC3B,OAAO;QACLkC,GAAG,EAAElC,QAAQ,CAACmC,SAAS,CAACD,GAAG;QAC3BE,MAAM,EAAEpC,QAAQ,CAACmC,SAAS,CAACC,MAAM;QACjCC,OAAO,EAAErC,QAAQ,CAACmC,SAAS,CAACE;MAC9B,CAAC;IACH;IAEA,IAAIrC,QAAQ,CAACS,MAAM,KAAK,SAAS,EAAE;MACjC,MAAM6B,YAAY,GAAG,MAAM9C,cAAc,CAAC+C,IAAI,CAC5C,MAAM,IAAI,CAACf,WAAW,CAAC1B,UAAU,CAAC,EACjC0C,QAAQ,IAAKA,QAAQ,CAAC/B,MAAM,KAAK,SACpC,CAAC;MAED,OAAO;QACLA,MAAM,EAAE6B,YAAY,CAAC7B;MACvB,CAAC;IACH;IAEA,OAAO;MACLA,MAAM,EAAET,QAAQ,CAACS;IACnB,CAAC;EACH,CAAC;EAEDgC,uBAAuB,GAAG,MAAAA,CACxB3C,UAAkB,EAClBC,UAAkB,EAClBY,KAAa,KACV;IACH,OAAO,MAAMrB,OAAO,CAClBC,WAAW,CAACkD,uBAAuB,EACnC,IAAI,CAAC9C,SAAS,EACd;MACEC,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBM,MAAM,EAAE,CAACJ,UAAU,EAAEC,UAAU,EAAEY,KAAK,CAAC;MACvC+B,mBAAmB,EAAE;IACvB,CACF,CAAC;EACH,CAAC;AACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["services/API/CheckoutApiManager/models.ts"],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const DEFAULT_INTERVAL = 1000;
|
|
2
|
+
const DEFAULT_MAX_REPEAT_TIMES = 30;
|
|
3
|
+
export class PullingService {
|
|
4
|
+
static pull = async (request, condition, config) => {
|
|
5
|
+
const maxRepeatTimes = (config === null || config === void 0 ? void 0 : config.maxRepeatTimes) || DEFAULT_MAX_REPEAT_TIMES;
|
|
6
|
+
const interval = (config === null || config === void 0 ? void 0 : config.defaultInterval) || DEFAULT_INTERVAL;
|
|
7
|
+
for (let counter = 0; counter < maxRepeatTimes; counter++) {
|
|
8
|
+
const response = await request();
|
|
9
|
+
if (condition(response)) {
|
|
10
|
+
return response;
|
|
11
|
+
}
|
|
12
|
+
if (counter < maxRepeatTimes - 1) {
|
|
13
|
+
await new Promise(resolve => setTimeout(resolve, interval));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
throw new Error('Polling timeout');
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_INTERVAL","DEFAULT_MAX_REPEAT_TIMES","PullingService","pull","request","condition","config","maxRepeatTimes","interval","defaultInterval","counter","response","Promise","resolve","setTimeout","Error"],"sourceRoot":"../../../../../src","sources":["services/API/PullingService/index.ts"],"mappings":"AAAA,MAAMA,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,wBAAwB,GAAG,EAAE;AAEnC,OAAO,MAAMC,cAAc,CAAC;EAC1B,OAAOC,IAAI,GAAG,MAAAA,CACZC,OAAyB,EACzBC,SAA+B,EAC/BC,MAGC,KACc;IACf,MAAMC,cAAc,GAAG,CAAAD,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEC,cAAc,KAAIN,wBAAwB;IACzE,MAAMO,QAAQ,GAAG,CAAAF,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEG,eAAe,KAAIT,gBAAgB;IAE5D,KAAK,IAAIU,OAAO,GAAG,CAAC,EAAEA,OAAO,GAAGH,cAAc,EAAEG,OAAO,EAAE,EAAE;MACzD,MAAMC,QAAQ,GAAG,MAAMP,OAAO,CAAC,CAAC;MAChC,IAAIC,SAAS,CAACM,QAAQ,CAAC,EAAE;QACvB,OAAOA,QAAQ;MACjB;MAEA,IAAID,OAAO,GAAGH,cAAc,GAAG,CAAC,EAAE;QAChC,MAAM,IAAIK,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAEL,QAAQ,CAAC,CAAC;MAC/D;IACF;IAEA,MAAM,IAAIO,KAAK,CAAC,iBAAiB,CAAC;EACpC,CAAC;AACH"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import consts from '../../consts/nativePayMethod';
|
|
2
|
+
import logger from '../Logger';
|
|
3
|
+
import { getNativePaymentsBridge } from '../NativePaymentsBridge';
|
|
4
|
+
export class ApplePayService {
|
|
5
|
+
applePayNative = getNativePaymentsBridge();
|
|
6
|
+
isConfigured = false;
|
|
7
|
+
configure = async props => {
|
|
8
|
+
this.applePayNative.configure({
|
|
9
|
+
countryCode: props.countryCode,
|
|
10
|
+
currencyCode: props.currencyCode,
|
|
11
|
+
supportedNetworks: consts.supportedCardTypesIOS,
|
|
12
|
+
merchantIdentifier: props.merchantIdentifier
|
|
13
|
+
}, {
|
|
14
|
+
total: {
|
|
15
|
+
label: props.label,
|
|
16
|
+
amount: props.amount
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
this.isConfigured = true;
|
|
20
|
+
};
|
|
21
|
+
canMakePayments = async () => {
|
|
22
|
+
return !this.isConfigured ? false : await this.applePayNative.canMakePayments();
|
|
23
|
+
};
|
|
24
|
+
present = async () => {
|
|
25
|
+
try {
|
|
26
|
+
const response = await this.applePayNative.presentApplePay();
|
|
27
|
+
return {
|
|
28
|
+
paymentMethod: response.paymentMethod,
|
|
29
|
+
transactionIdentifier: response.transactionIdentifier,
|
|
30
|
+
paymentData: JSON.parse(response.paymentData)
|
|
31
|
+
};
|
|
32
|
+
} catch (error) {
|
|
33
|
+
logger.log('[ApplePay] Error:', {
|
|
34
|
+
error
|
|
35
|
+
});
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const applePayService = new ApplePayService();
|
|
41
|
+
export default applePayService;
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["consts","logger","getNativePaymentsBridge","ApplePayService","applePayNative","isConfigured","configure","props","countryCode","currencyCode","supportedNetworks","supportedCardTypesIOS","merchantIdentifier","total","label","amount","canMakePayments","present","response","presentApplePay","paymentMethod","transactionIdentifier","paymentData","JSON","parse","error","log","applePayService"],"sourceRoot":"../../../../src","sources":["services/ApplePayService/index.ts"],"mappings":"AACA,OAAOA,MAAM,MAAM,8BAA8B;AACjD,OAAOC,MAAM,MAAM,WAAW;AAC9B,SAASC,uBAAuB,QAAQ,yBAAyB;AAEjE,OAAO,MAAMC,eAAe,CAAC;EACnBC,cAAc,GAAGF,uBAAuB,CAAC,CAAC;EAE1CG,YAAY,GAAG,KAAK;EAE5BC,SAAS,GAAG,MAAOC,KAAiC,IAAK;IACvD,IAAI,CAACH,cAAc,CAACE,SAAS,CAC3B;MACEE,WAAW,EAAED,KAAK,CAACC,WAAW;MAC9BC,YAAY,EAAEF,KAAK,CAACE,YAAY;MAChCC,iBAAiB,EAAEV,MAAM,CAACW,qBAAqB;MAC/CC,kBAAkB,EAAEL,KAAK,CAACK;IAC5B,CAAC,EACD;MACEC,KAAK,EAAE;QACLC,KAAK,EAAEP,KAAK,CAACO,KAAK;QAClBC,MAAM,EAAER,KAAK,CAACQ;MAChB;IACF,CACF,CAAC;IAED,IAAI,CAACV,YAAY,GAAG,IAAI;EAC1B,CAAC;EAEDW,eAAe,GAAG,MAAAA,CAAA,KAA8B;IAC9C,OAAO,CAAC,IAAI,CAACX,YAAY,GACrB,KAAK,GACL,MAAM,IAAI,CAACD,cAAc,CAACY,eAAe,CAAC,CAAC;EACjD,CAAC;EAEDC,OAAO,GAAG,MAAAA,CAAA,KAA2D;IACnE,IAAI;MACF,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACd,cAAc,CAACe,eAAe,CAAC,CAAC;MAE5D,OAAO;QACLC,aAAa,EAAEF,QAAQ,CAACE,aAAa;QACrCC,qBAAqB,EAAEH,QAAQ,CAACG,qBAAqB;QACrDC,WAAW,EAAEC,IAAI,CAACC,KAAK,CAACN,QAAQ,CAACI,WAAW;MAC9C,CAAC;IACH,CAAC,CAAC,OAAOG,KAAK,EAAE;MACdxB,MAAM,CAACyB,GAAG,CAAC,mBAAmB,EAAE;QAAED;MAAM,CAAC,CAAC;MAC1C;IACF;EACF,CAAC;AACH;AAEA,MAAME,eAAe,GAAG,IAAIxB,eAAe,CAAC,CAAC;AAE7C,eAAewB,eAAe"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import consts from '../../consts/nativePayMethod';
|
|
2
|
+
import logger from '../Logger';
|
|
3
|
+
import { getNativePaymentsBridge } from '../NativePaymentsBridge';
|
|
4
|
+
export class GooglePayService {
|
|
5
|
+
googlePayNative = getNativePaymentsBridge();
|
|
6
|
+
isReady = false;
|
|
7
|
+
configure = async props => {
|
|
8
|
+
const allowedCardNetworks = consts.supportedCardTypesAndroid;
|
|
9
|
+
const allowedCardAuthMethods = consts.android.allowedCardAuthMethods;
|
|
10
|
+
this.requestData = {
|
|
11
|
+
cardPaymentMethod: {
|
|
12
|
+
tokenizationSpecification: {
|
|
13
|
+
type: consts.android.type,
|
|
14
|
+
gateway: consts.android.gateway,
|
|
15
|
+
gatewayMerchantId: props.gatewayMerchantId
|
|
16
|
+
},
|
|
17
|
+
allowedCardNetworks,
|
|
18
|
+
allowedCardAuthMethods
|
|
19
|
+
},
|
|
20
|
+
transaction: {
|
|
21
|
+
totalPrice: props.amount.toString(),
|
|
22
|
+
totalPriceStatus: consts.android.totalPriceStatus,
|
|
23
|
+
currencyCode: props.currencyCode
|
|
24
|
+
},
|
|
25
|
+
merchantName: props.merchantName
|
|
26
|
+
};
|
|
27
|
+
this.googlePayNative.setEnvironment(props.isProductionEnvironment ? this.googlePayNative.ENVIRONMENT_PRODUCTION : this.googlePayNative.ENVIRONMENT_TEST);
|
|
28
|
+
this.isReady = await this.googlePayNative.isReadyToPay(allowedCardNetworks, allowedCardAuthMethods);
|
|
29
|
+
};
|
|
30
|
+
canMakePayments = async () => {
|
|
31
|
+
return this.isReady;
|
|
32
|
+
};
|
|
33
|
+
present = async () => {
|
|
34
|
+
if (this.requestData) {
|
|
35
|
+
try {
|
|
36
|
+
return JSON.parse(await this.googlePayNative.requestPayment(this.requestData));
|
|
37
|
+
} catch (error) {
|
|
38
|
+
logger.log('[GooglePay] Error:', {
|
|
39
|
+
error
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const googlePayService = new GooglePayService();
|
|
47
|
+
export default googlePayService;
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["consts","logger","getNativePaymentsBridge","GooglePayService","googlePayNative","isReady","configure","props","allowedCardNetworks","supportedCardTypesAndroid","allowedCardAuthMethods","android","requestData","cardPaymentMethod","tokenizationSpecification","type","gateway","gatewayMerchantId","transaction","totalPrice","amount","toString","totalPriceStatus","currencyCode","merchantName","setEnvironment","isProductionEnvironment","ENVIRONMENT_PRODUCTION","ENVIRONMENT_TEST","isReadyToPay","canMakePayments","present","JSON","parse","requestPayment","error","log","googlePayService"],"sourceRoot":"../../../../src","sources":["services/GooglePayService/index.ts"],"mappings":"AACA,OAAOA,MAAM,MAAM,8BAA8B;AACjD,OAAOC,MAAM,MAAM,WAAW;AAC9B,SAASC,uBAAuB,QAAQ,yBAAyB;AAEjE,OAAO,MAAMC,gBAAgB,CAAC;EACpBC,eAAe,GAAGF,uBAAuB,CAAC,CAAC;EAG3CG,OAA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,OAAOuB,KAAK,EAAE;QACdlC,MAAM,CAACmC,GAAG,CAAC,oBAAoB,EAAE;UAAED;QAAM,CAAC,CAAC;MAC7C;IACF;IAEA;EACF,CAAC;AACH;AAEA,MAAME,gBAAgB,GAAG,IAAIlC,gBAAgB,CAAC,CAAC;AAE/C,eAAekC,gBAAgB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
class Logger {
|
|
2
|
+
baseParams = {};
|
|
3
|
+
setup = params => {
|
|
4
|
+
this.baseParams = params;
|
|
5
|
+
};
|
|
6
|
+
reset = () => {
|
|
7
|
+
this.baseParams = {};
|
|
8
|
+
};
|
|
9
|
+
setupCallback = onLogCallback => {
|
|
10
|
+
this.onLog = onLogCallback;
|
|
11
|
+
this.log('logs configured', {});
|
|
12
|
+
};
|
|
13
|
+
log = (message, model) => {
|
|
14
|
+
var _this$onLog;
|
|
15
|
+
(_this$onLog = this.onLog) === null || _this$onLog === void 0 ? void 0 : _this$onLog.call(this, `[SDK] ${message}`, model, this.baseParams);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const logger = new Logger();
|
|
19
|
+
export default logger;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Logger","baseParams","setup","params","reset","setupCallback","onLogCallback","onLog","log","message","model","_this$onLog","call","logger"],"sourceRoot":"../../../../src","sources":["services/Logger/index.ts"],"mappings":"AAEA,MAAMA,MAAM,CAAC;EAGHC,UAAU,GAA2B,CAAC,CAAC;EAE/CC,KAAK,GAAIC,MAA2B,IAAK;IACvC,IAAI,CAACF,UAAU,GAAGE,MAAM;EAC1B,CAAC;EAEDC,KAAK,GAAGA,CAAA,KAAM;IACZ,IAAI,CAACH,UAAU,GAAG,CAAC,CAAC;EACtB,CAAC;EAEDI,aAAa,GAAIC,aAA4B,IAAK;IAChD,IAAI,CAACC,KAAK,GAAGD,aAAa;IAE1B,IAAI,CAACE,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;EACjC,CAAC;EAEDA,GAAG,GAAGA,CAACC,OAAe,EAAEC,KAAmB,KAAK;IAAA,IAAAC,WAAA;IAC9C,CAAAA,WAAA,OAAI,CAACJ,KAAK,cAAAI,WAAA,uBAAVA,WAAA,CAAAC,IAAA,KAAI,EAAU,SAAQH,OAAQ,EAAC,EAAEC,KAAK,EAAE,IAAI,CAACT,UAAU,CAAC;EAC1D,CAAC;AACH;AAEA,MAAMY,MAAM,GAAG,IAAIb,MAAM,CAAC,CAAC;AAC3B,eAAea,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","getNativePaymentsBridge","SumupReactNative"],"sourceRoot":"../../../../src","sources":["services/NativePaymentsBridge/index.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AA0C5C,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KACrCD,aAAa,CAACE,gBAA0C"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { ApiError } from '../../services/API/ApiManager';
|
|
2
|
+
import { CheckoutApiManager } from '../../services/API/CheckoutApiManager';
|
|
3
|
+
import { Alert } from 'react-native';
|
|
4
|
+
import en from '../../translations/en-GB.json';
|
|
5
|
+
import { ERROR_CODES } from '../../consts/errors';
|
|
6
|
+
import logger from '../../services/Logger';
|
|
7
|
+
const DELAY_TO_HIDE_PAYMENT_SHEET_AFTER_SUCCESS_PAYMENT = 1500;
|
|
8
|
+
export class BaseSheetStore {
|
|
9
|
+
isSheetVisible = false;
|
|
10
|
+
paymentStatus = 'default';
|
|
11
|
+
constructor(rootStore, publicKey, domain, onReset) {
|
|
12
|
+
this.rootStore = rootStore;
|
|
13
|
+
this.checkoutApi = new CheckoutApiManager(publicKey, domain);
|
|
14
|
+
this.onReset = onReset;
|
|
15
|
+
}
|
|
16
|
+
setIsSheetVisible = isVisible => {
|
|
17
|
+
this.isSheetVisible = isVisible;
|
|
18
|
+
};
|
|
19
|
+
setPaymentStatus = paymentStatus => {
|
|
20
|
+
this.paymentStatus = paymentStatus;
|
|
21
|
+
};
|
|
22
|
+
handlePayment = async (validCheckoutId, model) => {
|
|
23
|
+
this.setPaymentStatus('processing');
|
|
24
|
+
try {
|
|
25
|
+
const response = await this.checkoutApi.handlePayment(validCheckoutId, model);
|
|
26
|
+
if (response && 'url' in response) {
|
|
27
|
+
this.rootStore.threeDSecureStore.show(response);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (response.status === 'PAID') {
|
|
31
|
+
logger.log('the checkout is paid', {});
|
|
32
|
+
this.proceedSuccessfulPayment();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this.handleFailedTransaction();
|
|
36
|
+
} catch (err) {
|
|
37
|
+
if (err instanceof ApiError) {
|
|
38
|
+
var _this$presentSheetRes;
|
|
39
|
+
if (err.errorCode === ERROR_CODES.checkoutProcessed) {
|
|
40
|
+
logger.log('the checkout is already processed', {});
|
|
41
|
+
this.proceedSuccessfulPayment();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.setPaymentStatus('failed');
|
|
45
|
+
if (err.errorCode === ERROR_CODES.invalid) {
|
|
46
|
+
logger.log('validation error', {
|
|
47
|
+
error: err
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
message: err.title || err.message,
|
|
51
|
+
param: err.param || ''
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
logger.log('API error while processing the checkout', {
|
|
55
|
+
error: err
|
|
56
|
+
});
|
|
57
|
+
this.setIsSheetVisible(false);
|
|
58
|
+
(_this$presentSheetRes = this.presentSheetResolveCallback) === null || _this$presentSheetRes === void 0 ? void 0 : _this$presentSheetRes.call(this, {
|
|
59
|
+
error: {
|
|
60
|
+
status: 'failure',
|
|
61
|
+
message: err.message,
|
|
62
|
+
errorCode: err.errorCode
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.handleFailedTransaction();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
getAndValidateCheckout = async checkoutId => {
|
|
71
|
+
if (!checkoutId) {
|
|
72
|
+
return {
|
|
73
|
+
error: {
|
|
74
|
+
status: 'failure',
|
|
75
|
+
message: 'checkoutId field is required'
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const checkout = await this.checkoutApi.getCheckout(checkoutId);
|
|
80
|
+
if (checkout.status === 'PAID') {
|
|
81
|
+
return {
|
|
82
|
+
error: {
|
|
83
|
+
status: 'failure',
|
|
84
|
+
message: 'The checkout was already paid.'
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (checkout.status === 'EXPIRED') {
|
|
89
|
+
return {
|
|
90
|
+
error: {
|
|
91
|
+
status: 'failure',
|
|
92
|
+
message: 'The checkout is expired.'
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return checkout;
|
|
97
|
+
};
|
|
98
|
+
handleFailedTransaction = () => {
|
|
99
|
+
this.setPaymentStatus('failed');
|
|
100
|
+
Alert.alert(en.common.alerts.failedTransaction.title);
|
|
101
|
+
};
|
|
102
|
+
proceedSuccessfulPayment = () => {
|
|
103
|
+
this.setPaymentStatus('success');
|
|
104
|
+
setTimeout(() => {
|
|
105
|
+
var _this$presentSheetRes2, _this$onReset;
|
|
106
|
+
this.setIsSheetVisible(false);
|
|
107
|
+
(_this$presentSheetRes2 = this.presentSheetResolveCallback) === null || _this$presentSheetRes2 === void 0 ? void 0 : _this$presentSheetRes2.call(this, {});
|
|
108
|
+
(_this$onReset = this.onReset) === null || _this$onReset === void 0 ? void 0 : _this$onReset.call(this);
|
|
109
|
+
}, DELAY_TO_HIDE_PAYMENT_SHEET_AFTER_SUCCESS_PAYMENT);
|
|
110
|
+
};
|
|
111
|
+
baseReset = () => {
|
|
112
|
+
this.checkoutId = undefined;
|
|
113
|
+
this.setPaymentStatus('default');
|
|
114
|
+
this.rootStore.paymentInstrumentsStore.reset();
|
|
115
|
+
this.rootStore.nativePaymentStore.reset();
|
|
116
|
+
this.rootStore.threeDSecureStore.reset();
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ApiError","CheckoutApiManager","Alert","en","ERROR_CODES","logger","DELAY_TO_HIDE_PAYMENT_SHEET_AFTER_SUCCESS_PAYMENT","BaseSheetStore","isSheetVisible","paymentStatus","constructor","rootStore","publicKey","domain","onReset","checkoutApi","setIsSheetVisible","isVisible","setPaymentStatus","handlePayment","validCheckoutId","model","response","threeDSecureStore","show","status","log","proceedSuccessfulPayment","handleFailedTransaction","err","_this$presentSheetRes","errorCode","checkoutProcessed","invalid","error","message","title","param","presentSheetResolveCallback","call","getAndValidateCheckout","checkoutId","checkout","getCheckout","alert","common","alerts","failedTransaction","setTimeout","_this$presentSheetRes2","_this$onReset","baseReset","undefined","paymentInstrumentsStore","reset","nativePaymentStore"],"sourceRoot":"../../../../src","sources":["stores/BaseSheetStore/index.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,kBAAkB,QAAQ,uCAAuC;AAG1E,SAASC,KAAK,QAAQ,cAAc;AACpC,OAAOC,EAAE,MAAM,+BAA+B;AAC9C,SAASC,WAAW,QAAQ,qBAAqB;AACjD,OAAOC,MAAM,MAAM,uBAAuB;AAU1C,MAAMC,iDAAiD,GAAG,IAAI;AAM9D,OAAO,MAAMC,cAAc,CAAC;EAa1BC,cAAc,GAAG,KAAK;EACtBC,aAAa,GAAkB,SAAS;EAExCC,WAAWA,CACTC,SAAoB,EACpBC,SAAiB,EACjBC,MAAe,EACfC,OAAuB,EACvB;IACA,IAAI,CAACH,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACI,WAAW,GAAG,IAAId,kBAAkB,CAACW,SAAS,EAAEC,MAAM,CAAC;IAC5D,IAA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,CAAC;IAC/BhB,KAAK,CAAC0C,KAAK,CAACzC,EAAE,CAAC0C,MAAM,CAACC,MAAM,CAACC,iBAAiB,CAACX,KAAK,CAAC;EACvD,CAAC;EAEST,wBAAwB,GAAGA,CAAA,KAAM;IACzC,IAAI,CAACT,gBAAgB,CAAC,SAAS,CAAC;IAEhC8B,UAAU,CAAC,MAAM;MAAA,IAAAC,sBAAA,EAAAC,aAAA;MACf,IAAI,CAAClC,iBAAiB,CAAC,KAAK,CAAC;MAC7B,CAAAiC,sBAAA,OAAI,CAACX,2BAA2B,cAAAW,sBAAA,uBAAhCA,sBAAA,CAAAV,IAAA,KAAI,EAA+B,CAAC,CAAC,CAAC;MACtC,CAAAW,aAAA,OAAI,CAACpC,OAAO,cAAAoC,aAAA,uBAAZA,aAAA,CAAAX,IAAA,KAAe,CAAC;IAClB,CAAC,EAAEjC,iDAAiD,CAAC;EACvD,CAAC;EAES6C,SAAS,GAAGA,CAAA,KAAM;IAC1B,IAAI,CAACV,UAAU,GAAGW,SAAS;IAC3B,IAAI,CAAClC,gBAAgB,CAAC,SAAS,CAAC;IAEhC,IAAI,CAACP,SAAS,CAAC0C,uBAAuB,CAACC,KAAK,CAAC,CAAC;IAC9C,IAAI,CAAC3C,SAAS,CAAC4C,kBAAkB,CAACD,KAAK,CAAC,CAAC;IACzC,IAAI,CAAC3C,SAAS,CAACY,iBAAiB,CAAC+B,KAAK,CAAC,CAAC;EAC1C,CAAC;AACH"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import applePayService from '../../services/ApplePayService';
|
|
3
|
+
import googlePayService from '../../services/GooglePayService';
|
|
4
|
+
import { makeAutoObservable } from 'mobx';
|
|
5
|
+
import { ApiError } from '../../services/API/ApiManager';
|
|
6
|
+
import logger from '../../services/Logger';
|
|
7
|
+
export class NativePaymentStore {
|
|
8
|
+
canPayWithNativeView = false;
|
|
9
|
+
constructor(rootStore) {
|
|
10
|
+
this.rootStore = rootStore;
|
|
11
|
+
makeAutoObservable(this);
|
|
12
|
+
}
|
|
13
|
+
setCanPayWithNativeView = canPayWithNativeView => {
|
|
14
|
+
this.canPayWithNativeView = canPayWithNativeView;
|
|
15
|
+
};
|
|
16
|
+
configure = async params => {
|
|
17
|
+
this.reset();
|
|
18
|
+
if (!(params.applePay && Platform.OS === 'ios' || params.googlePay && Platform.OS === 'android' || !params.myProfile)) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
logger.log('[NativePayment] configuring native store', {
|
|
22
|
+
data: params
|
|
23
|
+
});
|
|
24
|
+
try {
|
|
25
|
+
if (params.applePay && Platform.OS === 'ios') {
|
|
26
|
+
await applePayService.configure({
|
|
27
|
+
countryCode: params.myProfile.countryCode,
|
|
28
|
+
currencyCode: params.checkout.currency,
|
|
29
|
+
merchantIdentifier: params.applePay.merchantIdentifier,
|
|
30
|
+
label: params.myProfile.merchantName,
|
|
31
|
+
amount: params.checkout.amount
|
|
32
|
+
});
|
|
33
|
+
this.setCanPayWithNativeView(await applePayService.canMakePayments());
|
|
34
|
+
}
|
|
35
|
+
if (params.googlePay && Platform.OS === 'android') {
|
|
36
|
+
await googlePayService.configure({
|
|
37
|
+
isProductionEnvironment: params.googlePay.isProductionEnvironment,
|
|
38
|
+
currencyCode: params.checkout.currency,
|
|
39
|
+
amount: params.checkout.amount,
|
|
40
|
+
gatewayMerchantId: params.myProfile.merchantId,
|
|
41
|
+
merchantName: params.myProfile.merchantName
|
|
42
|
+
});
|
|
43
|
+
this.setCanPayWithNativeView(await googlePayService.canMakePayments());
|
|
44
|
+
}
|
|
45
|
+
this.checkoutId = params.checkout.id;
|
|
46
|
+
} catch (err) {
|
|
47
|
+
logger.log('[NativePayment] failed to configure', {
|
|
48
|
+
error: err
|
|
49
|
+
});
|
|
50
|
+
if (err instanceof ApiError) {
|
|
51
|
+
return {
|
|
52
|
+
error: {
|
|
53
|
+
status: 'failure',
|
|
54
|
+
message: err.message
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return;
|
|
60
|
+
};
|
|
61
|
+
presentApplePay = async () => {
|
|
62
|
+
if (!this.checkoutId) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const model = await applePayService.present();
|
|
66
|
+
logger.log('[ApplePay] Model:', {
|
|
67
|
+
data: model
|
|
68
|
+
});
|
|
69
|
+
if (!model) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
this.rootStore.paymentStore.handlePayment(this.checkoutId, {
|
|
73
|
+
payment_type: 'apple_pay',
|
|
74
|
+
apple_pay: {
|
|
75
|
+
token: model
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
presentGooglePay = async () => {
|
|
80
|
+
if (!this.checkoutId) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const model = await googlePayService.present();
|
|
84
|
+
logger.log('[GooglePay] Model:', {
|
|
85
|
+
data: model
|
|
86
|
+
});
|
|
87
|
+
if (!model) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.rootStore.paymentStore.handlePayment(this.checkoutId, {
|
|
91
|
+
payment_type: 'google_pay',
|
|
92
|
+
google_pay: model
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
reset = () => {
|
|
96
|
+
this.checkoutId = undefined;
|
|
97
|
+
this.setCanPayWithNativeView(false);
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","applePayService","googlePayService","makeAutoObservable","ApiError","logger","NativePaymentStore","canPayWithNativeView","constructor","rootStore","setCanPayWithNativeView","configure","params","reset","applePay","OS","googlePay","myProfile","log","data","countryCode","currencyCode","checkout","currency","merchantIdentifier","label","merchantName","amount","canMakePayments","isProductionEnvironment","gatewayMerchantId","merchantId","checkoutId","id","err","error","status","message","presentApplePay","model","present","paymentStore","handlePayment","payment_type","apple_pay","token","presentGooglePay","google_pay","undefined"],"sourceRoot":"../../../../src","sources":["stores/NativePaymentStore/index.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAKvC,OAAOC,eAAe,MAAM,gCAAgC;AAC5D,OAAOC,gBAAgB,MAAM,iCAAiC;AAE9D,SAASC,kBAAkB,QAAQ,MAAM;AACzC,SAASC,QAAQ,QAAQ,+BAA+B;AAExD,OAAOC,MAAM,MAAM,uBAAuB;AAU1C,OAAO,MAAMC,kBAAkB,CAAC;EAK9BC,oBAAoB,GAAG,KAAK;EAE5BC,WAAWA,CAACC,SAAoB,EAAE;IAChC,IAAI,CAACA,SAAS,GAAGA,SAAS;IAE1BN,kBAAkB,CAAC,IAAI,CAAC;EAC1B;EAEAO,uBAAuB,GAAIH,oBAA6B,IAAK;IAC3D,IAAI,CAACA,oBAAoB,GAAGA,oBAAoB;EAClD,CAAC;EAEDI,SAAS,GAAG,MACVC,MAAmC,IAC0B;IAC7D,IAAI,CAACC,KAAK,CAAC,CAAC;IAEZ,IACE,EACGD,MAAM,CAACE,QAAQ,IAAId,QAAQ,CAACe,EAAE,KAAK,KAAK,IACxCH,MAAM,CAACI,SAAS,IAAIhB,QAAQ,CAACe,EAAE,KAAK,SAAU,IAC/C,CAACH,MAAM,CAACK,SAAS,CAClB,EACD;MACA;IACF;IAEAZ,MAAM,CAACa,GAAG,CAAC,0CAA0C,EAAE;MAAEC,IAAI,EAAEP;IAAO,CAAC,CAAC;IAExE,IAAI;MACF,IAAIA,MAAM,CAACE,QAAQ,IAAId,QAAQ,CAACe,EAAE,KAAK,KAAK,EAAE;QAC5C,MAAMd,eAAe,CAACU,SAAS,CAAC;UAC9BS,WAAW,EAAER,MAAM,CAACK,SAAS,CAACG,WAAW;UACzCC,YAAY,EAAET,MAAM,CAACU,QAAQ,CAACC,QAAQ;UACtCC,kBAAkB,EAAEZ,MAAM,CAACE,QAAQ,CAACU,kBAAkB;UACtDC,K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AmB,EAAE;MAAEC,IAAI,EAAEoB;IAAM,CAAC,CAAC;IAChD,IAAI,CAACA,KAAK,EAAE;MACV;IACF;IAEA,IAAI,CAAC9B,SAAS,CAACgC,YAAY,CAACC,aAAa,CAAC,IAAI,CAACV,UAAU,EAAE;MACzDW,YAAY,EAAE,WAAW;MACzBC,SAAS,EAAE;QAAEC,KAAK,EAAEN;MAAM;IAC5B,CAAC,CAAC;EACJ,CAAC;EAEDO,gBAAgB,GAAG,MAAAA,CAAA,KAAY;IAC7B,IAAI,CAAC,IAAI,CAACd,UAAU,EAAE;MACpB;IACF;IAEA,MAAMO,KAAK,GAAG,MAAMrC,gBAAgB,CAACsC,OAAO,CAAC,CAAC;IAC9CnC,MAAM,CAACa,GAAG,CAAC,oBAAoB,EAAE;MAAEC,IAAI,EAAEoB;IAAM,CAAC,CAAC;IACjD,IAAI,CAACA,KAAK,EAAE;MACV;IACF;IAEA,IAAI,CAAC9B,SAAS,CAACgC,YAAY,CAACC,aAAa,CAAC,IAAI,CAACV,UAAU,EAAE;MACzDW,YAAY,EAAE,YAAY;MAC1BI,UAAU,EAAER;IACd,CAAC,CAAC;EACJ,CAAC;EAED1B,KAAK,GAAGA,CAAA,KAAM;IACZ,IAAI,CAACmB,UAAU,GAAGgB,SAAS;IAE3B,IAAI,CAACtC,uBAAuB,CAAC,KAAK,CAAC;EACrC,CAAC;AACH"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { CheckoutApiManager } from '../../services/API/CheckoutApiManager';
|
|
2
|
+
import { makeAutoObservable } from 'mobx';
|
|
3
|
+
import { ApiError } from '../../services/API/ApiManager';
|
|
4
|
+
import logger from '../../services/Logger';
|
|
5
|
+
export class PaymentInstrumentsStore {
|
|
6
|
+
selectedPaymentInstrument = null;
|
|
7
|
+
paymentInstruments = null;
|
|
8
|
+
canCardBeSavedForFuturePayments = false;
|
|
9
|
+
constructor(rootStore, publicKey, domain) {
|
|
10
|
+
this.rootStore = rootStore;
|
|
11
|
+
this.checkoutApi = new CheckoutApiManager(publicKey, domain);
|
|
12
|
+
makeAutoObservable(this);
|
|
13
|
+
}
|
|
14
|
+
setCanCardBeSavedForFuturePayments = canCardBeSavedForFuturePayments => {
|
|
15
|
+
this.canCardBeSavedForFuturePayments = canCardBeSavedForFuturePayments;
|
|
16
|
+
};
|
|
17
|
+
setSelectedPaymentInstruments = selectedPaymentInstrument => {
|
|
18
|
+
this.selectedPaymentInstrument = selectedPaymentInstrument;
|
|
19
|
+
};
|
|
20
|
+
setPaymentInstruments = paymentInstruments => {
|
|
21
|
+
this.paymentInstruments = paymentInstruments;
|
|
22
|
+
};
|
|
23
|
+
getPaymentInstrumentByToken = token => {
|
|
24
|
+
var _this$paymentInstrume;
|
|
25
|
+
return (_this$paymentInstrume = this.paymentInstruments) === null || _this$paymentInstrume === void 0 ? void 0 : _this$paymentInstrume.find(item => item.token === token);
|
|
26
|
+
};
|
|
27
|
+
configure = async params => {
|
|
28
|
+
this.reset();
|
|
29
|
+
if (!params.customerId) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
logger.log('[Instruments] configuring store', {});
|
|
33
|
+
this.setCanCardBeSavedForFuturePayments(true);
|
|
34
|
+
try {
|
|
35
|
+
const paymentInstruments = await this.checkoutApi.getListPaymentInstruments(params.checkout.id, params.customerId);
|
|
36
|
+
if (paymentInstruments.length > 0) {
|
|
37
|
+
this.setSelectedPaymentInstruments(paymentInstruments[0]);
|
|
38
|
+
this.setPaymentInstruments(paymentInstruments);
|
|
39
|
+
this.customerId = params.customerId;
|
|
40
|
+
this.checkoutId = params.checkout.id;
|
|
41
|
+
}
|
|
42
|
+
} catch (err) {
|
|
43
|
+
logger.log('[Instruments] failed to configure', {
|
|
44
|
+
error: err
|
|
45
|
+
});
|
|
46
|
+
if (err instanceof ApiError) {
|
|
47
|
+
return {
|
|
48
|
+
error: {
|
|
49
|
+
status: 'failure',
|
|
50
|
+
message: err.message
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return;
|
|
56
|
+
};
|
|
57
|
+
selectPaymentInstrument = token => {
|
|
58
|
+
var _this$paymentInstrume2;
|
|
59
|
+
const paymentInstrument = (_this$paymentInstrume2 = this.paymentInstruments) === null || _this$paymentInstrume2 === void 0 ? void 0 : _this$paymentInstrume2.find(item => item.token === token);
|
|
60
|
+
if (paymentInstrument) {
|
|
61
|
+
this.setSelectedPaymentInstruments(paymentInstrument);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
deletePaymentInstrument = async token => {
|
|
65
|
+
if (!this.checkoutId || !this.customerId || !this.paymentInstruments) {
|
|
66
|
+
throw Error('SDK is not configured');
|
|
67
|
+
}
|
|
68
|
+
logger.log('[Instruments] deleting instrument', {
|
|
69
|
+
data: {
|
|
70
|
+
token
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
try {
|
|
74
|
+
await this.checkoutApi.deletePaymentInstrument(this.checkoutId, this.customerId, token);
|
|
75
|
+
let copyPaymentInstruments = [...this.paymentInstruments];
|
|
76
|
+
copyPaymentInstruments = copyPaymentInstruments.filter(item => item.token !== token);
|
|
77
|
+
if (copyPaymentInstruments.length === 0) {
|
|
78
|
+
this.setPaymentInstruments(null);
|
|
79
|
+
this.setSelectedPaymentInstruments(null);
|
|
80
|
+
} else {
|
|
81
|
+
var _this$selectedPayment;
|
|
82
|
+
if (((_this$selectedPayment = this.selectedPaymentInstrument) === null || _this$selectedPayment === void 0 ? void 0 : _this$selectedPayment.token) === token) {
|
|
83
|
+
this.setSelectedPaymentInstruments(copyPaymentInstruments[0]);
|
|
84
|
+
}
|
|
85
|
+
this.setPaymentInstruments(copyPaymentInstruments);
|
|
86
|
+
}
|
|
87
|
+
return copyPaymentInstruments;
|
|
88
|
+
} catch (err) {
|
|
89
|
+
logger.log('[Instruments] failed to delete instrument', {
|
|
90
|
+
error: err
|
|
91
|
+
});
|
|
92
|
+
return this.paymentInstruments;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
payWithToken = async token => {
|
|
96
|
+
if (!this.checkoutId || !this.customerId) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
return this.rootStore.paymentStore.handlePayment(this.checkoutId, {
|
|
100
|
+
payment_type: 'card',
|
|
101
|
+
token,
|
|
102
|
+
customer_id: this.customerId
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
reset = () => {
|
|
106
|
+
this.checkoutId = undefined;
|
|
107
|
+
this.customerId = undefined;
|
|
108
|
+
this.setSelectedPaymentInstruments(null);
|
|
109
|
+
this.setPaymentInstruments(null);
|
|
110
|
+
this.setCanCardBeSavedForFuturePayments(false);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CheckoutApiManager","makeAutoObservable","ApiError","logger","PaymentInstrumentsStore","selectedPaymentInstrument","paymentInstruments","canCardBeSavedForFuturePayments","constructor","rootStore","publicKey","domain","checkoutApi","setCanCardBeSavedForFuturePayments","setSelectedPaymentInstruments","setPaymentInstruments","getPaymentInstrumentByToken","token","_this$paymentInstrume","find","item","configure","params","reset","customerId","log","getListPaymentInstruments","checkout","id","length","checkoutId","err","error","status","message","selectPaymentInstrument","_this$paymentInstrume2","paymentInstrument","deletePaymentInstrument","Error","data","copyPaymentInstruments","filter","_this$selectedPayment","payWithToken","paymentStore","handlePayment","payment_type","customer_id","undefined"],"sourceRoot":"../../../../src","sources":["stores/PaymentInstrumentsStore/index.ts"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,uCAAuC;AAC1E,SAASC,kBAAkB,QAAQ,MAAM;AAEzC,SAASC,QAAQ,QAAQ,+BAA+B;AAExD,OAAOC,MAAM,MAAM,uBAAuB;AAQ1C,OAAO,MAAMC,uBAAuB,CAAC;EASnCC,yBAAyB,GAA6B,IAAI;EAC1DC,kBAAkB,GAA+B,IAAI;EACrDC,+BAA+B,GAAG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