@tonder.io/rn-sdk 0.1.0-beta.DEV1355.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 +20 -0
- package/README.md +33 -0
- package/lib/commonjs/core/3DSHandler.js +108 -0
- package/lib/commonjs/core/3DSHandler.js.map +1 -0
- package/lib/commonjs/core/BaseCheckout/index.js +337 -0
- package/lib/commonjs/core/BaseCheckout/index.js.map +1 -0
- package/lib/commonjs/core/BaseEnrollment/index.js +86 -0
- package/lib/commonjs/core/BaseEnrollment/index.js.map +1 -0
- package/lib/commonjs/core/BaseSDK/index.js +75 -0
- package/lib/commonjs/core/BaseSDK/index.js.map +1 -0
- package/lib/commonjs/core/EnrollmentContainer/index.js +87 -0
- package/lib/commonjs/core/EnrollmentContainer/index.js.map +1 -0
- package/lib/commonjs/core/PaymentInlineContainer/index.js +111 -0
- package/lib/commonjs/core/PaymentInlineContainer/index.js.map +1 -0
- package/lib/commonjs/core/PaymentLiteContainer/index.js +158 -0
- package/lib/commonjs/core/PaymentLiteContainer/index.js.map +1 -0
- package/lib/commonjs/core/Tonder/index.js +134 -0
- package/lib/commonjs/core/Tonder/index.js.map +1 -0
- package/lib/commonjs/hooks/useTonder/index-old.js +37 -0
- package/lib/commonjs/hooks/useTonder/index-old.js.map +1 -0
- package/lib/commonjs/hooks/useTonder/index.js +16 -0
- package/lib/commonjs/hooks/useTonder/index.js.map +1 -0
- package/lib/commonjs/index.js +121 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/infrastructure/HttpClient.js +108 -0
- package/lib/commonjs/infrastructure/HttpClient.js.map +1 -0
- package/lib/commonjs/infrastructure/ServiceManager.js +32 -0
- package/lib/commonjs/infrastructure/ServiceManager.js.map +1 -0
- package/lib/commonjs/infrastructure/index.js +28 -0
- package/lib/commonjs/infrastructure/index.js.map +1 -0
- package/lib/commonjs/services/BusinessService.js +36 -0
- package/lib/commonjs/services/BusinessService.js.map +1 -0
- package/lib/commonjs/services/CardService.js +89 -0
- package/lib/commonjs/services/CardService.js.map +1 -0
- package/lib/commonjs/services/CheckoutService.js +121 -0
- package/lib/commonjs/services/CheckoutService.js.map +1 -0
- package/lib/commonjs/services/CustomerService.js +62 -0
- package/lib/commonjs/services/CustomerService.js.map +1 -0
- package/lib/commonjs/services/MercadoPagoService.js +27 -0
- package/lib/commonjs/services/MercadoPagoService.js.map +1 -0
- package/lib/commonjs/services/OpenPayService.js +25 -0
- package/lib/commonjs/services/OpenPayService.js.map +1 -0
- package/lib/commonjs/services/PaymentMethodService.js +37 -0
- package/lib/commonjs/services/PaymentMethodService.js.map +1 -0
- package/lib/commonjs/services/SkyflowService.js +53 -0
- package/lib/commonjs/services/SkyflowService.js.map +1 -0
- package/lib/commonjs/services/StorageService.js +49 -0
- package/lib/commonjs/services/StorageService.js.map +1 -0
- package/lib/commonjs/services/TokenService.js +46 -0
- package/lib/commonjs/services/TokenService.js.map +1 -0
- package/lib/commonjs/services/TransactionService.js +26 -0
- package/lib/commonjs/services/TransactionService.js.map +1 -0
- package/lib/commonjs/services/index.js +127 -0
- package/lib/commonjs/services/index.js.map +1 -0
- package/lib/commonjs/shared/catalog/cardBrandCatalog.js +19 -0
- package/lib/commonjs/shared/catalog/cardBrandCatalog.js.map +1 -0
- package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js +252 -0
- package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js.map +1 -0
- package/lib/commonjs/shared/constants/environments.js +13 -0
- package/lib/commonjs/shared/constants/environments.js.map +1 -0
- package/lib/commonjs/shared/constants/index.js +28 -0
- package/lib/commonjs/shared/constants/index.js.map +1 -0
- package/lib/commonjs/shared/constants/messages.js +101 -0
- package/lib/commonjs/shared/constants/messages.js.map +1 -0
- package/lib/commonjs/shared/constants/paymentMethods.js +68 -0
- package/lib/commonjs/shared/constants/paymentMethods.js.map +1 -0
- package/lib/commonjs/shared/constants/skyflow.js +47 -0
- package/lib/commonjs/shared/constants/skyflow.js.map +1 -0
- package/lib/commonjs/shared/enum/ErrorKeyEnum.js +55 -0
- package/lib/commonjs/shared/enum/ErrorKeyEnum.js.map +1 -0
- package/lib/commonjs/shared/enum/index.js +17 -0
- package/lib/commonjs/shared/enum/index.js.map +1 -0
- package/lib/commonjs/shared/index.js +39 -0
- package/lib/commonjs/shared/index.js.map +1 -0
- package/lib/commonjs/shared/utils/common.js +47 -0
- package/lib/commonjs/shared/utils/common.js.map +1 -0
- package/lib/commonjs/shared/utils/errors.js +21 -0
- package/lib/commonjs/shared/utils/errors.js.map +1 -0
- package/lib/commonjs/shared/utils/numberUtils.js +17 -0
- package/lib/commonjs/shared/utils/numberUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/paymentMethodUtils.js +21 -0
- package/lib/commonjs/shared/utils/paymentMethodUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/stringUtils.js +11 -0
- package/lib/commonjs/shared/utils/stringUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/styleUtils.js +21 -0
- package/lib/commonjs/shared/utils/styleUtils.js.map +1 -0
- package/lib/commonjs/types/base.js +14 -0
- package/lib/commonjs/types/base.js.map +1 -0
- package/lib/commonjs/types/baseCheckout.js +6 -0
- package/lib/commonjs/types/baseCheckout.js.map +1 -0
- package/lib/commonjs/types/baseEnrollment.js +6 -0
- package/lib/commonjs/types/baseEnrollment.js.map +1 -0
- package/lib/commonjs/types/baseSDK.js +6 -0
- package/lib/commonjs/types/baseSDK.js.map +1 -0
- package/lib/commonjs/types/business.js +2 -0
- package/lib/commonjs/types/business.js.map +1 -0
- package/lib/commonjs/types/card.js +2 -0
- package/lib/commonjs/types/card.js.map +1 -0
- package/lib/commonjs/types/checkout.js +6 -0
- package/lib/commonjs/types/checkout.js.map +1 -0
- package/lib/commonjs/types/common.js +6 -0
- package/lib/commonjs/types/common.js.map +1 -0
- package/lib/commonjs/types/customer.js +2 -0
- package/lib/commonjs/types/customer.js.map +1 -0
- package/lib/commonjs/types/enrollment.js +6 -0
- package/lib/commonjs/types/enrollment.js.map +1 -0
- package/lib/commonjs/types/index.js +204 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/types/inlineCheckout.js +6 -0
- package/lib/commonjs/types/inlineCheckout.js.map +1 -0
- package/lib/commonjs/types/input.js +6 -0
- package/lib/commonjs/types/input.js.map +1 -0
- package/lib/commonjs/types/liteCheckout.js +6 -0
- package/lib/commonjs/types/liteCheckout.js.map +1 -0
- package/lib/commonjs/types/openpay-react-native.d.js +2 -0
- package/lib/commonjs/types/openpay-react-native.d.js.map +1 -0
- package/lib/commonjs/types/openpay.js +2 -0
- package/lib/commonjs/types/openpay.js.map +1 -0
- package/lib/commonjs/types/payment.js +6 -0
- package/lib/commonjs/types/payment.js.map +1 -0
- package/lib/commonjs/types/secure.js +2 -0
- package/lib/commonjs/types/secure.js.map +1 -0
- package/lib/commonjs/types/skyflow-react-native.d.js +2 -0
- package/lib/commonjs/types/skyflow-react-native.d.js.map +1 -0
- package/lib/commonjs/types/threeDSHandler.js +6 -0
- package/lib/commonjs/types/threeDSHandler.js.map +1 -0
- package/lib/commonjs/types/transaction.js +2 -0
- package/lib/commonjs/types/transaction.js.map +1 -0
- package/lib/commonjs/ui/components/Button/ProcessButton.js +50 -0
- package/lib/commonjs/ui/components/Button/ProcessButton.js.map +1 -0
- package/lib/commonjs/ui/components/CardForm/index.js +80 -0
- package/lib/commonjs/ui/components/CardForm/index.js.map +1 -0
- package/lib/commonjs/ui/components/Checkbox/Checkbox.js +62 -0
- package/lib/commonjs/ui/components/Checkbox/Checkbox.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardCVVInput.js +83 -0
- package/lib/commonjs/ui/components/Input/CardCVVInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js +91 -0
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js +84 -0
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js +84 -0
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardHolderInput.js +83 -0
- package/lib/commonjs/ui/components/Input/CardHolderInput.js.map +1 -0
- package/lib/commonjs/ui/components/Input/CardNumberInput.js +83 -0
- package/lib/commonjs/ui/components/Input/CardNumberInput.js.map +1 -0
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js +105 -0
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js.map +1 -0
- package/lib/commonjs/ui/components/RadioButton/index.js +57 -0
- package/lib/commonjs/ui/components/RadioButton/index.js.map +1 -0
- package/lib/commonjs/ui/components/SavedCardsList/index.js +126 -0
- package/lib/commonjs/ui/components/SavedCardsList/index.js.map +1 -0
- package/lib/commonjs/ui/components/Skeleton/CardFormSkeleton.js +102 -0
- package/lib/commonjs/ui/components/Skeleton/CardFormSkeleton.js.map +1 -0
- package/lib/commonjs/ui/components/WebView/ThreeDSWebView.js +105 -0
- package/lib/commonjs/ui/components/WebView/ThreeDSWebView.js.map +1 -0
- package/lib/commonjs/ui/features/TonderEnrollment/index.js +119 -0
- package/lib/commonjs/ui/features/TonderEnrollment/index.js.map +1 -0
- package/lib/commonjs/ui/features/TonderPayment/index.js +195 -0
- package/lib/commonjs/ui/features/TonderPayment/index.js.map +1 -0
- package/lib/commonjs/ui/providers/InnerProvider/index.js +25 -0
- package/lib/commonjs/ui/providers/InnerProvider/index.js.map +1 -0
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js +31 -0
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js.map +1 -0
- package/lib/commonjs/ui/providers/TonderProvider/context.js +16 -0
- package/lib/commonjs/ui/providers/TonderProvider/context.js.map +1 -0
- package/lib/commonjs/ui/providers/TonderProvider/hook.js +15 -0
- package/lib/commonjs/ui/providers/TonderProvider/hook.js.map +1 -0
- package/lib/commonjs/ui/providers/TonderProvider/index.js +96 -0
- package/lib/commonjs/ui/providers/TonderProvider/index.js.map +1 -0
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js +61 -0
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js.map +1 -0
- package/lib/commonjs/ui/styles/payment.js +27 -0
- package/lib/commonjs/ui/styles/payment.js.map +1 -0
- package/lib/commonjs/ui/styles/skyflow.js +54 -0
- package/lib/commonjs/ui/styles/skyflow.js.map +1 -0
- package/lib/module/core/3DSHandler.js +102 -0
- package/lib/module/core/3DSHandler.js.map +1 -0
- package/lib/module/core/BaseCheckout/index.js +332 -0
- package/lib/module/core/BaseCheckout/index.js.map +1 -0
- package/lib/module/core/BaseEnrollment/index.js +81 -0
- package/lib/module/core/BaseEnrollment/index.js.map +1 -0
- package/lib/module/core/BaseSDK/index.js +70 -0
- package/lib/module/core/BaseSDK/index.js.map +1 -0
- package/lib/module/core/EnrollmentContainer/index.js +81 -0
- package/lib/module/core/EnrollmentContainer/index.js.map +1 -0
- package/lib/module/core/PaymentInlineContainer/index.js +106 -0
- package/lib/module/core/PaymentInlineContainer/index.js.map +1 -0
- package/lib/module/core/PaymentLiteContainer/index.js +153 -0
- package/lib/module/core/PaymentLiteContainer/index.js.map +1 -0
- package/lib/module/core/Tonder/index.js +129 -0
- package/lib/module/core/Tonder/index.js.map +1 -0
- package/lib/module/hooks/useTonder/index-old.js +37 -0
- package/lib/module/hooks/useTonder/index-old.js.map +1 -0
- package/lib/module/hooks/useTonder/index.js +11 -0
- package/lib/module/hooks/useTonder/index.js.map +1 -0
- package/lib/module/index.js +14 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/infrastructure/HttpClient.js +102 -0
- package/lib/module/infrastructure/HttpClient.js.map +1 -0
- package/lib/module/infrastructure/ServiceManager.js +27 -0
- package/lib/module/infrastructure/ServiceManager.js.map +1 -0
- package/lib/module/infrastructure/index.js +5 -0
- package/lib/module/infrastructure/index.js.map +1 -0
- package/lib/module/services/BusinessService.js +30 -0
- package/lib/module/services/BusinessService.js.map +1 -0
- package/lib/module/services/CardService.js +83 -0
- package/lib/module/services/CardService.js.map +1 -0
- package/lib/module/services/CheckoutService.js +115 -0
- package/lib/module/services/CheckoutService.js.map +1 -0
- package/lib/module/services/CustomerService.js +56 -0
- package/lib/module/services/CustomerService.js.map +1 -0
- package/lib/module/services/MercadoPagoService.js +22 -0
- package/lib/module/services/MercadoPagoService.js.map +1 -0
- package/lib/module/services/OpenPayService.js +20 -0
- package/lib/module/services/OpenPayService.js.map +1 -0
- package/lib/module/services/PaymentMethodService.js +31 -0
- package/lib/module/services/PaymentMethodService.js.map +1 -0
- package/lib/module/services/SkyflowService.js +47 -0
- package/lib/module/services/SkyflowService.js.map +1 -0
- package/lib/module/services/StorageService.js +43 -0
- package/lib/module/services/StorageService.js.map +1 -0
- package/lib/module/services/TokenService.js +40 -0
- package/lib/module/services/TokenService.js.map +1 -0
- package/lib/module/services/TransactionService.js +20 -0
- package/lib/module/services/TransactionService.js.map +1 -0
- package/lib/module/services/index.js +15 -0
- package/lib/module/services/index.js.map +1 -0
- package/lib/module/shared/catalog/cardBrandCatalog.js +14 -0
- package/lib/module/shared/catalog/cardBrandCatalog.js.map +1 -0
- package/lib/module/shared/catalog/paymentMethodsCatalog.js +247 -0
- package/lib/module/shared/catalog/paymentMethodsCatalog.js.map +1 -0
- package/lib/module/shared/constants/environments.js +10 -0
- package/lib/module/shared/constants/environments.js.map +1 -0
- package/lib/module/shared/constants/index.js +5 -0
- package/lib/module/shared/constants/index.js.map +1 -0
- package/lib/module/shared/constants/messages.js +97 -0
- package/lib/module/shared/constants/messages.js.map +1 -0
- package/lib/module/shared/constants/paymentMethods.js +65 -0
- package/lib/module/shared/constants/paymentMethods.js.map +1 -0
- package/lib/module/shared/constants/skyflow.js +43 -0
- package/lib/module/shared/constants/skyflow.js.map +1 -0
- package/lib/module/shared/enum/ErrorKeyEnum.js +51 -0
- package/lib/module/shared/enum/ErrorKeyEnum.js.map +1 -0
- package/lib/module/shared/enum/index.js +4 -0
- package/lib/module/shared/enum/index.js.map +1 -0
- package/lib/module/shared/index.js +6 -0
- package/lib/module/shared/index.js.map +1 -0
- package/lib/module/shared/utils/common.js +41 -0
- package/lib/module/shared/utils/common.js.map +1 -0
- package/lib/module/shared/utils/errors.js +17 -0
- package/lib/module/shared/utils/errors.js.map +1 -0
- package/lib/module/shared/utils/numberUtils.js +13 -0
- package/lib/module/shared/utils/numberUtils.js.map +1 -0
- package/lib/module/shared/utils/paymentMethodUtils.js +16 -0
- package/lib/module/shared/utils/paymentMethodUtils.js.map +1 -0
- package/lib/module/shared/utils/stringUtils.js +6 -0
- package/lib/module/shared/utils/stringUtils.js.map +1 -0
- package/lib/module/shared/utils/styleUtils.js +17 -0
- package/lib/module/shared/utils/styleUtils.js.map +1 -0
- package/lib/module/types/base.js +13 -0
- package/lib/module/types/base.js.map +1 -0
- package/lib/module/types/baseCheckout.js +4 -0
- package/lib/module/types/baseCheckout.js.map +1 -0
- package/lib/module/types/baseEnrollment.js +4 -0
- package/lib/module/types/baseEnrollment.js.map +1 -0
- package/lib/module/types/baseSDK.js +4 -0
- package/lib/module/types/baseSDK.js.map +1 -0
- package/lib/module/types/business.js +2 -0
- package/lib/module/types/business.js.map +1 -0
- package/lib/module/types/card.js +2 -0
- package/lib/module/types/card.js.map +1 -0
- package/lib/module/types/checkout.js +4 -0
- package/lib/module/types/checkout.js.map +1 -0
- package/lib/module/types/common.js +4 -0
- package/lib/module/types/common.js.map +1 -0
- package/lib/module/types/customer.js +2 -0
- package/lib/module/types/customer.js.map +1 -0
- package/lib/module/types/enrollment.js +4 -0
- package/lib/module/types/enrollment.js.map +1 -0
- package/lib/module/types/index.js +21 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/inlineCheckout.js +4 -0
- package/lib/module/types/inlineCheckout.js.map +1 -0
- package/lib/module/types/input.js +4 -0
- package/lib/module/types/input.js.map +1 -0
- package/lib/module/types/liteCheckout.js +4 -0
- package/lib/module/types/liteCheckout.js.map +1 -0
- package/lib/module/types/openpay-react-native.d.js +2 -0
- package/lib/module/types/openpay-react-native.d.js.map +1 -0
- package/lib/module/types/openpay.js +2 -0
- package/lib/module/types/openpay.js.map +1 -0
- package/lib/module/types/payment.js +4 -0
- package/lib/module/types/payment.js.map +1 -0
- package/lib/module/types/secure.js +2 -0
- package/lib/module/types/secure.js.map +1 -0
- package/lib/module/types/skyflow-react-native.d.js +2 -0
- package/lib/module/types/skyflow-react-native.d.js.map +1 -0
- package/lib/module/types/threeDSHandler.js +4 -0
- package/lib/module/types/threeDSHandler.js.map +1 -0
- package/lib/module/types/transaction.js +2 -0
- package/lib/module/types/transaction.js.map +1 -0
- package/lib/module/ui/components/Button/ProcessButton.js +44 -0
- package/lib/module/ui/components/Button/ProcessButton.js.map +1 -0
- package/lib/module/ui/components/CardForm/index.js +74 -0
- package/lib/module/ui/components/CardForm/index.js.map +1 -0
- package/lib/module/ui/components/Checkbox/Checkbox.js +56 -0
- package/lib/module/ui/components/Checkbox/Checkbox.js.map +1 -0
- package/lib/module/ui/components/Input/CardCVVInput.js +75 -0
- package/lib/module/ui/components/Input/CardCVVInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardExpirationDateInput.js +84 -0
- package/lib/module/ui/components/Input/CardExpirationDateInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js +77 -0
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardExpirationYearInput.js +76 -0
- package/lib/module/ui/components/Input/CardExpirationYearInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardHolderInput.js +75 -0
- package/lib/module/ui/components/Input/CardHolderInput.js.map +1 -0
- package/lib/module/ui/components/Input/CardNumberInput.js +75 -0
- package/lib/module/ui/components/Input/CardNumberInput.js.map +1 -0
- package/lib/module/ui/components/PaymentMethodsList/index.js +100 -0
- package/lib/module/ui/components/PaymentMethodsList/index.js.map +1 -0
- package/lib/module/ui/components/RadioButton/index.js +50 -0
- package/lib/module/ui/components/RadioButton/index.js.map +1 -0
- package/lib/module/ui/components/SavedCardsList/index.js +121 -0
- package/lib/module/ui/components/SavedCardsList/index.js.map +1 -0
- package/lib/module/ui/components/Skeleton/CardFormSkeleton.js +97 -0
- package/lib/module/ui/components/Skeleton/CardFormSkeleton.js.map +1 -0
- package/lib/module/ui/components/WebView/ThreeDSWebView.js +96 -0
- package/lib/module/ui/components/WebView/ThreeDSWebView.js.map +1 -0
- package/lib/module/ui/features/TonderEnrollment/index.js +114 -0
- package/lib/module/ui/features/TonderEnrollment/index.js.map +1 -0
- package/lib/module/ui/features/TonderPayment/index.js +188 -0
- package/lib/module/ui/features/TonderPayment/index.js.map +1 -0
- package/lib/module/ui/providers/InnerProvider/index.js +19 -0
- package/lib/module/ui/providers/InnerProvider/index.js.map +1 -0
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js +24 -0
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js.map +1 -0
- package/lib/module/ui/providers/TonderProvider/context.js +10 -0
- package/lib/module/ui/providers/TonderProvider/context.js.map +1 -0
- package/lib/module/ui/providers/TonderProvider/hook.js +10 -0
- package/lib/module/ui/providers/TonderProvider/hook.js.map +1 -0
- package/lib/module/ui/providers/TonderProvider/index.js +88 -0
- package/lib/module/ui/providers/TonderProvider/index.js.map +1 -0
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js +57 -0
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js.map +1 -0
- package/lib/module/ui/styles/payment.js +25 -0
- package/lib/module/ui/styles/payment.js.map +1 -0
- package/lib/module/ui/styles/skyflow.js +52 -0
- package/lib/module/ui/styles/skyflow.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts +23 -0
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts +28 -0
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts +16 -0
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts +19 -0
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts +15 -0
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/Tonder/index.d.ts +33 -0
- package/lib/typescript/commonjs/src/core/Tonder/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useTonder/index-old.d.ts +1 -0
- package/lib/typescript/commonjs/src/hooks/useTonder/index-old.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useTonder/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/hooks/useTonder/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +12 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts +20 -0
- package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/infrastructure/ServiceManager.d.ts +19 -0
- package/lib/typescript/commonjs/src/infrastructure/ServiceManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/infrastructure/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/infrastructure/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/BusinessService.d.ts +15 -0
- package/lib/typescript/commonjs/src/services/BusinessService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/CardService.d.ts +28 -0
- package/lib/typescript/commonjs/src/services/CardService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/CheckoutService.d.ts +37 -0
- package/lib/typescript/commonjs/src/services/CheckoutService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/CustomerService.d.ts +24 -0
- package/lib/typescript/commonjs/src/services/CustomerService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/MercadoPagoService.d.ts +4 -0
- package/lib/typescript/commonjs/src/services/MercadoPagoService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/OpenPayService.d.ts +4 -0
- package/lib/typescript/commonjs/src/services/OpenPayService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/PaymentMethodService.d.ts +15 -0
- package/lib/typescript/commonjs/src/services/PaymentMethodService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts +15 -0
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/StorageService.d.ts +7 -0
- package/lib/typescript/commonjs/src/services/StorageService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/TokenService.d.ts +16 -0
- package/lib/typescript/commonjs/src/services/TokenService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/TransactionService.d.ts +8 -0
- package/lib/typescript/commonjs/src/services/TransactionService.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/services/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/services/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/catalog/cardBrandCatalog.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/catalog/cardBrandCatalog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/catalog/paymentMethodsCatalog.d.ts +5 -0
- package/lib/typescript/commonjs/src/shared/catalog/paymentMethodsCatalog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/environments.d.ts +8 -0
- package/lib/typescript/commonjs/src/shared/constants/environments.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/shared/constants/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/messages.d.ts +94 -0
- package/lib/typescript/commonjs/src/shared/constants/messages.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/paymentMethods.d.ts +63 -0
- package/lib/typescript/commonjs/src/shared/constants/paymentMethods.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/constants/skyflow.d.ts +38 -0
- package/lib/typescript/commonjs/src/shared/constants/skyflow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/enum/ErrorKeyEnum.d.ts +48 -0
- package/lib/typescript/commonjs/src/shared/enum/ErrorKeyEnum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/enum/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/enum/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/shared/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/common.d.ts +9 -0
- package/lib/typescript/commonjs/src/shared/utils/common.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/errors.d.ts +16 -0
- package/lib/typescript/commonjs/src/shared/utils/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/numberUtils.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/utils/numberUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/paymentMethodUtils.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/utils/paymentMethodUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/stringUtils.d.ts +2 -0
- package/lib/typescript/commonjs/src/shared/utils/stringUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shared/utils/styleUtils.d.ts +8 -0
- package/lib/typescript/commonjs/src/shared/utils/styleUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/base.d.ts +48 -0
- package/lib/typescript/commonjs/src/types/base.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts +29 -0
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts +11 -0
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts +10 -0
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/business.d.ts +36 -0
- package/lib/typescript/commonjs/src/types/business.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/card.d.ts +33 -0
- package/lib/typescript/commonjs/src/types/card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/checkout.d.ts +150 -0
- package/lib/typescript/commonjs/src/types/checkout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/common.d.ts +60 -0
- package/lib/typescript/commonjs/src/types/common.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/customer.d.ts +28 -0
- package/lib/typescript/commonjs/src/types/customer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/enrollment.d.ts +66 -0
- package/lib/typescript/commonjs/src/types/enrollment.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/index.d.ts +19 -0
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts +78 -0
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/input.d.ts +13 -0
- package/lib/typescript/commonjs/src/types/input.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts +90 -0
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/openpay.d.ts +11 -0
- package/lib/typescript/commonjs/src/types/openpay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/payment.d.ts +59 -0
- package/lib/typescript/commonjs/src/types/payment.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/secure.d.ts +4 -0
- package/lib/typescript/commonjs/src/types/secure.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts +7 -0
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/transaction.d.ts +103 -0
- package/lib/typescript/commonjs/src/types/transaction.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Button/ProcessButton.d.ts +11 -0
- package/lib/typescript/commonjs/src/ui/components/Button/ProcessButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Checkbox/Checkbox.d.ts +9 -0
- package/lib/typescript/commonjs/src/ui/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts +10 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/RadioButton/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/ui/components/RadioButton/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/Skeleton/CardFormSkeleton.d.ts +5 -0
- package/lib/typescript/commonjs/src/ui/components/Skeleton/CardFormSkeleton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/WebView/ThreeDSWebView.d.ts +9 -0
- package/lib/typescript/commonjs/src/ui/components/WebView/ThreeDSWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/features/TonderEnrollment/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/ui/features/TonderEnrollment/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/features/TonderPayment/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/ui/features/TonderPayment/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/context.d.ts +5 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/hook.d.ts +4 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/hook.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/uiWrapper.d.ts +10 -0
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/styles/payment.d.ts +20 -0
- package/lib/typescript/commonjs/src/ui/styles/payment.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/styles/skyflow.d.ts +44 -0
- package/lib/typescript/commonjs/src/ui/styles/skyflow.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/core/3DSHandler.d.ts +23 -0
- package/lib/typescript/module/src/core/3DSHandler.d.ts.map +1 -0
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts +28 -0
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts +16 -0
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts +19 -0
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts +15 -0
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts +17 -0
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts +21 -0
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/Tonder/index.d.ts +33 -0
- package/lib/typescript/module/src/core/Tonder/index.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useTonder/index-old.d.ts +1 -0
- package/lib/typescript/module/src/hooks/useTonder/index-old.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useTonder/index.d.ts +4 -0
- package/lib/typescript/module/src/hooks/useTonder/index.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +12 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/infrastructure/HttpClient.d.ts +20 -0
- package/lib/typescript/module/src/infrastructure/HttpClient.d.ts.map +1 -0
- package/lib/typescript/module/src/infrastructure/ServiceManager.d.ts +19 -0
- package/lib/typescript/module/src/infrastructure/ServiceManager.d.ts.map +1 -0
- package/lib/typescript/module/src/infrastructure/index.d.ts +3 -0
- package/lib/typescript/module/src/infrastructure/index.d.ts.map +1 -0
- package/lib/typescript/module/src/services/BusinessService.d.ts +15 -0
- package/lib/typescript/module/src/services/BusinessService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/CardService.d.ts +28 -0
- package/lib/typescript/module/src/services/CardService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/CheckoutService.d.ts +37 -0
- package/lib/typescript/module/src/services/CheckoutService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/CustomerService.d.ts +24 -0
- package/lib/typescript/module/src/services/CustomerService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/MercadoPagoService.d.ts +4 -0
- package/lib/typescript/module/src/services/MercadoPagoService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/OpenPayService.d.ts +4 -0
- package/lib/typescript/module/src/services/OpenPayService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/PaymentMethodService.d.ts +15 -0
- package/lib/typescript/module/src/services/PaymentMethodService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/SkyflowService.d.ts +15 -0
- package/lib/typescript/module/src/services/SkyflowService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/StorageService.d.ts +7 -0
- package/lib/typescript/module/src/services/StorageService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/TokenService.d.ts +16 -0
- package/lib/typescript/module/src/services/TokenService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/TransactionService.d.ts +8 -0
- package/lib/typescript/module/src/services/TransactionService.d.ts.map +1 -0
- package/lib/typescript/module/src/services/index.d.ts +13 -0
- package/lib/typescript/module/src/services/index.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/catalog/cardBrandCatalog.d.ts +2 -0
- package/lib/typescript/module/src/shared/catalog/cardBrandCatalog.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/catalog/paymentMethodsCatalog.d.ts +5 -0
- package/lib/typescript/module/src/shared/catalog/paymentMethodsCatalog.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/environments.d.ts +8 -0
- package/lib/typescript/module/src/shared/constants/environments.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/index.d.ts +3 -0
- package/lib/typescript/module/src/shared/constants/index.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/messages.d.ts +94 -0
- package/lib/typescript/module/src/shared/constants/messages.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/paymentMethods.d.ts +63 -0
- package/lib/typescript/module/src/shared/constants/paymentMethods.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/constants/skyflow.d.ts +38 -0
- package/lib/typescript/module/src/shared/constants/skyflow.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/enum/ErrorKeyEnum.d.ts +48 -0
- package/lib/typescript/module/src/shared/enum/ErrorKeyEnum.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/enum/index.d.ts +2 -0
- package/lib/typescript/module/src/shared/enum/index.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/index.d.ts +4 -0
- package/lib/typescript/module/src/shared/index.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/common.d.ts +9 -0
- package/lib/typescript/module/src/shared/utils/common.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/errors.d.ts +16 -0
- package/lib/typescript/module/src/shared/utils/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/numberUtils.d.ts +2 -0
- package/lib/typescript/module/src/shared/utils/numberUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/paymentMethodUtils.d.ts +2 -0
- package/lib/typescript/module/src/shared/utils/paymentMethodUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/stringUtils.d.ts +2 -0
- package/lib/typescript/module/src/shared/utils/stringUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/shared/utils/styleUtils.d.ts +8 -0
- package/lib/typescript/module/src/shared/utils/styleUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/types/base.d.ts +48 -0
- package/lib/typescript/module/src/types/base.d.ts.map +1 -0
- package/lib/typescript/module/src/types/baseCheckout.d.ts +29 -0
- package/lib/typescript/module/src/types/baseCheckout.d.ts.map +1 -0
- package/lib/typescript/module/src/types/baseEnrollment.d.ts +11 -0
- package/lib/typescript/module/src/types/baseEnrollment.d.ts.map +1 -0
- package/lib/typescript/module/src/types/baseSDK.d.ts +10 -0
- package/lib/typescript/module/src/types/baseSDK.d.ts.map +1 -0
- package/lib/typescript/module/src/types/business.d.ts +36 -0
- package/lib/typescript/module/src/types/business.d.ts.map +1 -0
- package/lib/typescript/module/src/types/card.d.ts +33 -0
- package/lib/typescript/module/src/types/card.d.ts.map +1 -0
- package/lib/typescript/module/src/types/checkout.d.ts +150 -0
- package/lib/typescript/module/src/types/checkout.d.ts.map +1 -0
- package/lib/typescript/module/src/types/common.d.ts +60 -0
- package/lib/typescript/module/src/types/common.d.ts.map +1 -0
- package/lib/typescript/module/src/types/customer.d.ts +28 -0
- package/lib/typescript/module/src/types/customer.d.ts.map +1 -0
- package/lib/typescript/module/src/types/enrollment.d.ts +66 -0
- package/lib/typescript/module/src/types/enrollment.d.ts.map +1 -0
- package/lib/typescript/module/src/types/index.d.ts +19 -0
- package/lib/typescript/module/src/types/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types/inlineCheckout.d.ts +78 -0
- package/lib/typescript/module/src/types/inlineCheckout.d.ts.map +1 -0
- package/lib/typescript/module/src/types/input.d.ts +13 -0
- package/lib/typescript/module/src/types/input.d.ts.map +1 -0
- package/lib/typescript/module/src/types/liteCheckout.d.ts +90 -0
- package/lib/typescript/module/src/types/liteCheckout.d.ts.map +1 -0
- package/lib/typescript/module/src/types/openpay.d.ts +11 -0
- package/lib/typescript/module/src/types/openpay.d.ts.map +1 -0
- package/lib/typescript/module/src/types/payment.d.ts +59 -0
- package/lib/typescript/module/src/types/payment.d.ts.map +1 -0
- package/lib/typescript/module/src/types/secure.d.ts +4 -0
- package/lib/typescript/module/src/types/secure.d.ts.map +1 -0
- package/lib/typescript/module/src/types/threeDSHandler.d.ts +7 -0
- package/lib/typescript/module/src/types/threeDSHandler.d.ts.map +1 -0
- package/lib/typescript/module/src/types/transaction.d.ts +103 -0
- package/lib/typescript/module/src/types/transaction.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Button/ProcessButton.d.ts +11 -0
- package/lib/typescript/module/src/ui/components/Button/ProcessButton.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts +13 -0
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Checkbox/Checkbox.d.ts +9 -0
- package/lib/typescript/module/src/ui/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts +10 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts +4 -0
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts +11 -0
- package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/RadioButton/index.d.ts +14 -0
- package/lib/typescript/module/src/ui/components/RadioButton/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts +14 -0
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/Skeleton/CardFormSkeleton.d.ts +5 -0
- package/lib/typescript/module/src/ui/components/Skeleton/CardFormSkeleton.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/WebView/ThreeDSWebView.d.ts +9 -0
- package/lib/typescript/module/src/ui/components/WebView/ThreeDSWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/features/TonderEnrollment/index.d.ts +6 -0
- package/lib/typescript/module/src/ui/features/TonderEnrollment/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/features/TonderPayment/index.d.ts +6 -0
- package/lib/typescript/module/src/ui/features/TonderPayment/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts +10 -0
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts +10 -0
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/context.d.ts +5 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/context.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/hook.d.ts +4 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/hook.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts +8 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/uiWrapper.d.ts +10 -0
- package/lib/typescript/module/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/styles/payment.d.ts +20 -0
- package/lib/typescript/module/src/ui/styles/payment.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/styles/skyflow.d.ts +44 -0
- package/lib/typescript/module/src/ui/styles/skyflow.d.ts.map +1 -0
- package/package.json +206 -0
- package/src/core/3DSHandler.ts +140 -0
- package/src/core/BaseCheckout/index.ts +420 -0
- package/src/core/BaseEnrollment/index.ts +99 -0
- package/src/core/BaseSDK/index.ts +93 -0
- package/src/core/EnrollmentContainer/index.ts +105 -0
- package/src/core/PaymentInlineContainer/index.ts +127 -0
- package/src/core/PaymentLiteContainer/index.ts +201 -0
- package/src/core/Tonder/index.ts +147 -0
- package/src/hooks/useTonder/index-old.ts +35 -0
- package/src/hooks/useTonder/index.ts +10 -0
- package/src/index.tsx +11 -0
- package/src/infrastructure/HttpClient.ts +121 -0
- package/src/infrastructure/ServiceManager.ts +54 -0
- package/src/infrastructure/index.ts +2 -0
- package/src/services/BusinessService.ts +33 -0
- package/src/services/CardService.ts +118 -0
- package/src/services/CheckoutService.ts +135 -0
- package/src/services/CustomerService.ts +59 -0
- package/src/services/MercadoPagoService.ts +19 -0
- package/src/services/OpenPayService.ts +22 -0
- package/src/services/PaymentMethodService.ts +38 -0
- package/src/services/SkyflowService.ts +50 -0
- package/src/services/StorageService.ts +56 -0
- package/src/services/TokenService.ts +45 -0
- package/src/services/TransactionService.ts +23 -0
- package/src/services/index.ts +12 -0
- package/src/shared/catalog/cardBrandCatalog.ts +16 -0
- package/src/shared/catalog/paymentMethodsCatalog.ts +252 -0
- package/src/shared/constants/environments.ts +8 -0
- package/src/shared/constants/index.ts +2 -0
- package/src/shared/constants/messages.ts +119 -0
- package/src/shared/constants/paymentMethods.ts +63 -0
- package/src/shared/constants/skyflow.ts +60 -0
- package/src/shared/enum/ErrorKeyEnum.ts +47 -0
- package/src/shared/enum/index.ts +1 -0
- package/src/shared/index.ts +3 -0
- package/src/shared/utils/common.ts +46 -0
- package/src/shared/utils/errors.ts +25 -0
- package/src/shared/utils/numberUtils.ts +10 -0
- package/src/shared/utils/paymentMethodUtils.ts +17 -0
- package/src/shared/utils/stringUtils.ts +3 -0
- package/src/shared/utils/styleUtils.ts +11 -0
- package/src/types/base.ts +79 -0
- package/src/types/baseCheckout.ts +42 -0
- package/src/types/baseEnrollment.ts +17 -0
- package/src/types/baseSDK.ts +10 -0
- package/src/types/business.ts +34 -0
- package/src/types/card.ts +38 -0
- package/src/types/checkout.ts +157 -0
- package/src/types/common.ts +68 -0
- package/src/types/customer.ts +29 -0
- package/src/types/enrollment.ts +70 -0
- package/src/types/index.ts +18 -0
- package/src/types/inlineCheckout.ts +96 -0
- package/src/types/input.ts +17 -0
- package/src/types/liteCheckout.ts +108 -0
- package/src/types/openpay-react-native.d.ts +3 -0
- package/src/types/openpay.ts +8 -0
- package/src/types/payment.ts +66 -0
- package/src/types/secure.ts +3 -0
- package/src/types/skyflow-react-native.d.ts +81 -0
- package/src/types/threeDSHandler.ts +10 -0
- package/src/types/transaction.ts +106 -0
- package/src/ui/components/Button/ProcessButton.tsx +57 -0
- package/src/ui/components/CardForm/index.tsx +91 -0
- package/src/ui/components/Checkbox/Checkbox.tsx +56 -0
- package/src/ui/components/Input/CardCVVInput.tsx +91 -0
- package/src/ui/components/Input/CardExpirationDateInput.tsx +95 -0
- package/src/ui/components/Input/CardExpirationMonthInput.tsx +90 -0
- package/src/ui/components/Input/CardExpirationYearInput.tsx +91 -0
- package/src/ui/components/Input/CardHolderInput.tsx +91 -0
- package/src/ui/components/Input/CardNumberInput.tsx +90 -0
- package/src/ui/components/PaymentMethodsList/index.tsx +103 -0
- package/src/ui/components/RadioButton/index.tsx +57 -0
- package/src/ui/components/SavedCardsList/index.tsx +137 -0
- package/src/ui/components/Skeleton/CardFormSkeleton.tsx +109 -0
- package/src/ui/components/WebView/ThreeDSWebView.tsx +110 -0
- package/src/ui/features/TonderEnrollment/index.tsx +141 -0
- package/src/ui/features/TonderPayment/index.tsx +243 -0
- package/src/ui/providers/InnerProvider/index.tsx +24 -0
- package/src/ui/providers/SkyflowContainerWrapper/index.tsx +35 -0
- package/src/ui/providers/TonderProvider/context.tsx +11 -0
- package/src/ui/providers/TonderProvider/hook.ts +10 -0
- package/src/ui/providers/TonderProvider/index.tsx +110 -0
- package/src/ui/providers/TonderProvider/uiWrapper.ts +67 -0
- package/src/ui/styles/payment.ts +23 -0
- package/src/ui/styles/skyflow.ts +58 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { GetBusinessResponse } from '@types';
|
|
2
|
+
import TonderError from '@shared/utils/errors';
|
|
3
|
+
import { HttpClient } from '@infrastructure/HttpClient';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
|
|
6
|
+
export class BusinessService {
|
|
7
|
+
private readonly BASE_PATH = '/api/v1/payments/business';
|
|
8
|
+
private readonly http: HttpClient;
|
|
9
|
+
|
|
10
|
+
constructor(http: HttpClient) {
|
|
11
|
+
this.http = http;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Fetches business information from the API
|
|
16
|
+
* @param signal Optional AbortSignal for request cancellation
|
|
17
|
+
* @returns Business information
|
|
18
|
+
* @throws {TonderError} If the request fails
|
|
19
|
+
*/
|
|
20
|
+
async fetchBusiness(signal?: AbortSignal): Promise<GetBusinessResponse> {
|
|
21
|
+
try {
|
|
22
|
+
return await this.http.get<GetBusinessResponse>(
|
|
23
|
+
`${this.BASE_PATH}/${this.http.getApiKey()}`,
|
|
24
|
+
{ signal } as RequestInit
|
|
25
|
+
);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
throw new TonderError({
|
|
28
|
+
code: ErrorKeyEnum.FETCH_BUSINESS_ERROR,
|
|
29
|
+
details: error,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ICustomerCardsResponse,
|
|
3
|
+
ISaveCardResponse,
|
|
4
|
+
ISaveCardSkyflowRequest,
|
|
5
|
+
} from '@types';
|
|
6
|
+
import TonderError from '@shared/utils/errors';
|
|
7
|
+
import { HttpClient } from '@infrastructure/HttpClient';
|
|
8
|
+
import { MESSAGES_EN } from '@shared/constants';
|
|
9
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
10
|
+
|
|
11
|
+
export class CardService {
|
|
12
|
+
private readonly BASE_PATH = '/api/v1/business';
|
|
13
|
+
private readonly http: HttpClient;
|
|
14
|
+
|
|
15
|
+
constructor(http: HttpClient) {
|
|
16
|
+
this.http = http;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Fetches customer cards from the API
|
|
20
|
+
* @throws {TonderError} If the request fails
|
|
21
|
+
*/
|
|
22
|
+
async fetchCustomerCards(
|
|
23
|
+
customerToken: string,
|
|
24
|
+
secureToken: string,
|
|
25
|
+
businessId: string | number
|
|
26
|
+
): Promise<ICustomerCardsResponse> {
|
|
27
|
+
this.validateSecureToken(secureToken);
|
|
28
|
+
try {
|
|
29
|
+
return await this.http.get<ICustomerCardsResponse>(
|
|
30
|
+
`${this.BASE_PATH}/${businessId}/cards/`,
|
|
31
|
+
{
|
|
32
|
+
headers: this.buildAuthHeaders(secureToken, customerToken),
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
} catch (error) {
|
|
36
|
+
throw new TonderError({
|
|
37
|
+
code: ErrorKeyEnum.FETCH_CARDS_ERROR,
|
|
38
|
+
details: error,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Saves a customer card
|
|
45
|
+
* @throws {TonderError} If the request fails
|
|
46
|
+
*/
|
|
47
|
+
async saveCustomerCard(
|
|
48
|
+
customerToken: string,
|
|
49
|
+
secureToken: string,
|
|
50
|
+
businessId: string | number,
|
|
51
|
+
cardData: ISaveCardSkyflowRequest
|
|
52
|
+
): Promise<ISaveCardResponse> {
|
|
53
|
+
this.validateSecureToken(secureToken);
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
return await this.http.post<ISaveCardResponse>(
|
|
57
|
+
`${this.BASE_PATH}/${businessId}/cards/`,
|
|
58
|
+
cardData,
|
|
59
|
+
{
|
|
60
|
+
headers: this.buildAuthHeaders(secureToken, customerToken),
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
throw new TonderError({
|
|
65
|
+
code: ErrorKeyEnum.SAVE_CARD_ERROR,
|
|
66
|
+
details: error,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Removes a customer card
|
|
73
|
+
* @throws {TonderError} If the request fails
|
|
74
|
+
*/
|
|
75
|
+
async removeCustomerCard(
|
|
76
|
+
customerToken: string,
|
|
77
|
+
secureToken: string,
|
|
78
|
+
skyflowId: string,
|
|
79
|
+
businessId: string | number
|
|
80
|
+
): Promise<string> {
|
|
81
|
+
this.validateSecureToken(secureToken);
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
await this.http.delete(
|
|
85
|
+
`${this.BASE_PATH}/${businessId}/cards/${skyflowId}/`,
|
|
86
|
+
{
|
|
87
|
+
headers: this.buildAuthHeaders(secureToken, customerToken),
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
return MESSAGES_EN.REMOVE_CARD;
|
|
92
|
+
} catch (error) {
|
|
93
|
+
throw new TonderError({
|
|
94
|
+
code: ErrorKeyEnum.REMOVE_CARD_ERROR,
|
|
95
|
+
details: error,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private validateSecureToken(token: string): void {
|
|
101
|
+
if (!token) {
|
|
102
|
+
throw new TonderError({ code: ErrorKeyEnum.SECURE_TOKEN_INVALID });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Builds authentication headers for card operations
|
|
108
|
+
*/
|
|
109
|
+
private buildAuthHeaders(
|
|
110
|
+
secureToken: string,
|
|
111
|
+
customerToken: string
|
|
112
|
+
): Record<string, string> {
|
|
113
|
+
return {
|
|
114
|
+
'Authorization': `Bearer ${secureToken}`,
|
|
115
|
+
'User-token': customerToken,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IStartCheckoutRequest,
|
|
3
|
+
IStartCheckoutIdRequest,
|
|
4
|
+
ICreateOrderResponse,
|
|
5
|
+
ICreatePaymentResponse,
|
|
6
|
+
ICheckoutResponse,
|
|
7
|
+
ICreatePaymentRequest,
|
|
8
|
+
ICreateOrderRequest,
|
|
9
|
+
} from '@types';
|
|
10
|
+
import TonderError from '@shared/utils/errors';
|
|
11
|
+
import { HttpClient } from '@infrastructure/HttpClient';
|
|
12
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
13
|
+
|
|
14
|
+
export class CheckoutService {
|
|
15
|
+
private readonly BASE_PATHS = {
|
|
16
|
+
orders: '/api/v1/orders/',
|
|
17
|
+
payments: '/api/v1/business',
|
|
18
|
+
checkout: '/api/v1/checkout-router/',
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
private readonly http: HttpClient;
|
|
22
|
+
|
|
23
|
+
constructor(http: HttpClient) {
|
|
24
|
+
this.http = http;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new order
|
|
28
|
+
* @param orderItems Order data to create
|
|
29
|
+
* @throws {TonderError} If order creation fails
|
|
30
|
+
*/
|
|
31
|
+
async createOrder(
|
|
32
|
+
orderItems: ICreateOrderRequest
|
|
33
|
+
): Promise<ICreateOrderResponse> {
|
|
34
|
+
try {
|
|
35
|
+
this.validateOrderData(orderItems);
|
|
36
|
+
|
|
37
|
+
return await this.http.post<ICreateOrderResponse>(
|
|
38
|
+
this.BASE_PATHS.orders,
|
|
39
|
+
orderItems
|
|
40
|
+
);
|
|
41
|
+
} catch (error) {
|
|
42
|
+
throw new TonderError({
|
|
43
|
+
code: ErrorKeyEnum.CREATE_ORDER_ERROR,
|
|
44
|
+
details: error,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Creates a new payment
|
|
51
|
+
* @param paymentItems Payment data to create
|
|
52
|
+
* @throws {TonderError} If payment creation fails
|
|
53
|
+
*/
|
|
54
|
+
async createPayment(
|
|
55
|
+
paymentItems: ICreatePaymentRequest
|
|
56
|
+
): Promise<ICreatePaymentResponse> {
|
|
57
|
+
try {
|
|
58
|
+
this.validatePaymentData(paymentItems);
|
|
59
|
+
|
|
60
|
+
return await this.http.post<ICreatePaymentResponse>(
|
|
61
|
+
`${this.BASE_PATHS.payments}/${paymentItems.business_pk}/payments/`,
|
|
62
|
+
paymentItems
|
|
63
|
+
);
|
|
64
|
+
} catch (error) {
|
|
65
|
+
throw new TonderError({
|
|
66
|
+
code: ErrorKeyEnum.CREATE_PAYMENT_ERROR,
|
|
67
|
+
details: error,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Starts or continues a checkout process
|
|
74
|
+
* @param routerItems Checkout data or checkout ID
|
|
75
|
+
* @param deviceSessionId Optional device session ID for MercadoPago
|
|
76
|
+
* @throws {TonderError} If checkout process fails
|
|
77
|
+
*/
|
|
78
|
+
async startCheckoutRouter(
|
|
79
|
+
routerItems: IStartCheckoutRequest | IStartCheckoutIdRequest,
|
|
80
|
+
deviceSessionId?: string
|
|
81
|
+
): Promise<ICheckoutResponse> {
|
|
82
|
+
try {
|
|
83
|
+
const payload = {
|
|
84
|
+
...routerItems,
|
|
85
|
+
...(deviceSessionId ? { mp_device_session_id: deviceSessionId } : {}),
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
return await this.http.post<ICheckoutResponse>(
|
|
89
|
+
this.BASE_PATHS.checkout,
|
|
90
|
+
payload
|
|
91
|
+
);
|
|
92
|
+
} catch (error) {
|
|
93
|
+
throw new TonderError({
|
|
94
|
+
code: ErrorKeyEnum.START_CHECKOUT_ERROR,
|
|
95
|
+
details: error,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Validates order data before creation
|
|
102
|
+
* @throws {TonderError} If order data is invalid
|
|
103
|
+
*/
|
|
104
|
+
private validateOrderData(orderItems: ICreateOrderRequest): void {
|
|
105
|
+
if (!orderItems.business) {
|
|
106
|
+
throw new TonderError({ code: ErrorKeyEnum.BUSINESS_ID_REQUIRED });
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (!orderItems.amount || orderItems.amount <= 0) {
|
|
110
|
+
throw new TonderError({ code: ErrorKeyEnum.INVALID_AMOUNT });
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (!orderItems.items?.length) {
|
|
114
|
+
throw new TonderError({ code: ErrorKeyEnum.INVALID_ITEMS });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Validates payment data before creation
|
|
120
|
+
* @throws {TonderError} If payment data is invalid
|
|
121
|
+
*/
|
|
122
|
+
private validatePaymentData(paymentItems: ICreatePaymentRequest): void {
|
|
123
|
+
if (!paymentItems.business_pk) {
|
|
124
|
+
throw new TonderError({ code: ErrorKeyEnum.BUSINESS_ID_REQUIRED });
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (!paymentItems.client_id) {
|
|
128
|
+
throw new TonderError({ code: ErrorKeyEnum.CLIENT_ID_REQUIRED });
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (!paymentItems.amount || paymentItems.amount <= 0) {
|
|
132
|
+
throw new TonderError({ code: ErrorKeyEnum.INVALID_AMOUNT });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ICustomer, ICustomerResponse } from '@types';
|
|
2
|
+
import TonderError from '@shared/utils/errors';
|
|
3
|
+
import { HttpClient } from '@infrastructure/HttpClient';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
|
|
6
|
+
export class CustomerService {
|
|
7
|
+
private readonly BASE_PATH = '/api/v1/customer/';
|
|
8
|
+
private readonly http: HttpClient;
|
|
9
|
+
|
|
10
|
+
constructor(http: HttpClient) {
|
|
11
|
+
this.http = http;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Registers a new customer or fetches existing one
|
|
15
|
+
* @param customer Customer data
|
|
16
|
+
* @param signal Optional AbortSignal for request cancellation
|
|
17
|
+
* @throws {TonderError} If registration/fetch fails or validation fails
|
|
18
|
+
*/
|
|
19
|
+
async registerOrFetchCustomer(
|
|
20
|
+
customer: ICustomer,
|
|
21
|
+
signal?: AbortSignal
|
|
22
|
+
): Promise<ICustomerResponse> {
|
|
23
|
+
try {
|
|
24
|
+
this.validateCustomerData(customer);
|
|
25
|
+
|
|
26
|
+
return await this.http.post<ICustomerResponse>(this.BASE_PATH, customer, {
|
|
27
|
+
signal,
|
|
28
|
+
} as RequestInit);
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error('CUSTOMER_OPERATION_ERROR', error);
|
|
31
|
+
throw new TonderError({
|
|
32
|
+
code: ErrorKeyEnum.CUSTOMER_OPERATION_ERROR,
|
|
33
|
+
details: error,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Validates customer data before processing
|
|
40
|
+
* @throws {TonderError} If customer data is invalid
|
|
41
|
+
*/
|
|
42
|
+
private validateCustomerData(customer: ICustomer): void {
|
|
43
|
+
if (!customer.email) {
|
|
44
|
+
throw new TonderError({ code: ErrorKeyEnum.INVALID_EMAIL });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!this.isValidEmail(customer.email)) {
|
|
48
|
+
throw new TonderError({ code: ErrorKeyEnum.INVALID_EMAIL });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Validates email format
|
|
54
|
+
*/
|
|
55
|
+
private isValidEmail(email: string): boolean {
|
|
56
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
57
|
+
return emailRegex.test(email);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class MercadoPagoService {
|
|
2
|
+
injectMercadoPagoSecurity() {
|
|
3
|
+
// TODO: IMPLEMENT
|
|
4
|
+
// try {
|
|
5
|
+
// const script = document.createElement('script');
|
|
6
|
+
// script.src = 'https://www.mercadopago.com/v2/security.js';
|
|
7
|
+
// script.setAttribute('view', '');
|
|
8
|
+
// script.onload = () => {
|
|
9
|
+
// console.log('Mercado Pago script loaded successfully.');
|
|
10
|
+
// };
|
|
11
|
+
// script.onerror = (error) => {
|
|
12
|
+
// console.error('Error loading Mercado Pago script:', error);
|
|
13
|
+
// };
|
|
14
|
+
// document.head.appendChild(script);
|
|
15
|
+
// } catch (error) {
|
|
16
|
+
// console.error('Error attempting to inject Mercado Pago script:', error);
|
|
17
|
+
// }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
export class OpenPayService {
|
|
4
|
+
async getDeviceSessionId(
|
|
5
|
+
merchantId: string,
|
|
6
|
+
publicKey: string,
|
|
7
|
+
isSandbox: boolean = true,
|
|
8
|
+
signal?: AbortSignal
|
|
9
|
+
): Promise<string> {
|
|
10
|
+
// var openpay = new Openpay(' your merchant id ', ' your private key ', [ isProduction ]);
|
|
11
|
+
// if (typeof global.OpenPay === 'undefined') {
|
|
12
|
+
// throw new Error('OpenPay scripts must be loaded first');
|
|
13
|
+
// }
|
|
14
|
+
//
|
|
15
|
+
// const openpay = global.OpenPay;
|
|
16
|
+
// openpay.setId(merchantId);
|
|
17
|
+
// openpay.setApiKey(publicKey);
|
|
18
|
+
// openpay.setSandboxMode(isSandbox);
|
|
19
|
+
// return await openpay.deviceData.setup({ signal });
|
|
20
|
+
return new Promise((r) => r(''));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { IPaymentMethodResponse } from '@types';
|
|
2
|
+
import TonderError from '@shared/utils/errors';
|
|
3
|
+
import { HttpClient } from '@infrastructure/HttpClient';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
|
|
6
|
+
export class PaymentMethodService {
|
|
7
|
+
private readonly BASE_PATH = '/api/v1/payment_methods';
|
|
8
|
+
private readonly DEFAULT_PAGE_SIZE = '10000';
|
|
9
|
+
private readonly http: HttpClient;
|
|
10
|
+
|
|
11
|
+
constructor(http: HttpClient) {
|
|
12
|
+
this.http = http;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Fetches available payment methods
|
|
16
|
+
* @param params Optional parameters for filtering payment methods
|
|
17
|
+
* @throws {TonderError} If the request fails
|
|
18
|
+
*/
|
|
19
|
+
async fetchPaymentMethods(
|
|
20
|
+
params: Record<string, string> = {
|
|
21
|
+
status: 'active',
|
|
22
|
+
pagesize: this.DEFAULT_PAGE_SIZE,
|
|
23
|
+
}
|
|
24
|
+
): Promise<IPaymentMethodResponse> {
|
|
25
|
+
try {
|
|
26
|
+
const queryString = new URLSearchParams(params).toString();
|
|
27
|
+
|
|
28
|
+
return await this.http.get<IPaymentMethodResponse>(
|
|
29
|
+
`${this.BASE_PATH}?${queryString}`
|
|
30
|
+
);
|
|
31
|
+
} catch (error) {
|
|
32
|
+
throw new TonderError({
|
|
33
|
+
code: ErrorKeyEnum.FETCH_PAYMENT_METHODS_ERROR,
|
|
34
|
+
details: error,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import TonderError from '@shared/utils/errors';
|
|
2
|
+
import { HttpClient } from '@infrastructure/HttpClient';
|
|
3
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
4
|
+
import type { IConfig } from 'skyflow-react-native';
|
|
5
|
+
import { Env, LogLevel } from 'skyflow-react-native';
|
|
6
|
+
|
|
7
|
+
export class SkyflowService {
|
|
8
|
+
private readonly BASE_PATH = '/api/v1/vault-token';
|
|
9
|
+
private readonly http: HttpClient;
|
|
10
|
+
|
|
11
|
+
constructor(http: HttpClient) {
|
|
12
|
+
this.http = http;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Gets a Skyflow vault token
|
|
17
|
+
* @param signal Optional AbortSignal for request cancellation
|
|
18
|
+
* @throws {TonderError} If token fetch fails
|
|
19
|
+
*/
|
|
20
|
+
async getVaultToken(signal?: AbortSignal): Promise<string> {
|
|
21
|
+
try {
|
|
22
|
+
const response = await this.http.get<{ token: string }>(this.BASE_PATH, {
|
|
23
|
+
signal,
|
|
24
|
+
} as RequestInit);
|
|
25
|
+
|
|
26
|
+
if (!response.token) {
|
|
27
|
+
throw new TonderError({ code: ErrorKeyEnum.INVALID_VAULT_TOKEN });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return response.token;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
throw new TonderError({
|
|
33
|
+
code: ErrorKeyEnum.VAULT_TOKEN_ERROR,
|
|
34
|
+
details: error,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async createSkyflowConfig(merchantData: any): Promise<IConfig> {
|
|
40
|
+
return {
|
|
41
|
+
vaultID: merchantData.vault_id,
|
|
42
|
+
vaultURL: merchantData.vault_url,
|
|
43
|
+
options: {
|
|
44
|
+
logLevel: LogLevel.ERROR,
|
|
45
|
+
env: Env.DEV,
|
|
46
|
+
},
|
|
47
|
+
getBearerToken: async () => await this.getVaultToken(),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
|
+
|
|
3
|
+
interface StorageItem<T> {
|
|
4
|
+
data: T;
|
|
5
|
+
expires: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class StorageService {
|
|
9
|
+
constructor() {}
|
|
10
|
+
|
|
11
|
+
async setItem<T>(
|
|
12
|
+
key: string,
|
|
13
|
+
data: T,
|
|
14
|
+
expirationMinutes: number = 20
|
|
15
|
+
): Promise<void> {
|
|
16
|
+
try {
|
|
17
|
+
const item: StorageItem<T> = {
|
|
18
|
+
data,
|
|
19
|
+
expires: new Date().getTime() + expirationMinutes * 60 * 1000,
|
|
20
|
+
};
|
|
21
|
+
await AsyncStorage.setItem(key, JSON.stringify(item));
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.error('Storage set error:', error);
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async getItemWithExpires<T>(key: string): Promise<T | null> {
|
|
29
|
+
try {
|
|
30
|
+
const value = await AsyncStorage.getItem(key);
|
|
31
|
+
if (!value) return null;
|
|
32
|
+
|
|
33
|
+
const item: StorageItem<T> = JSON.parse(value);
|
|
34
|
+
const now = new Date().getTime();
|
|
35
|
+
|
|
36
|
+
if (now > item.expires) {
|
|
37
|
+
await this.removeItem(key);
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return item.data;
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error('Storage get error:', error);
|
|
44
|
+
throw error;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async removeItem(key: string): Promise<void> {
|
|
49
|
+
try {
|
|
50
|
+
await AsyncStorage.setItem(key, '');
|
|
51
|
+
} catch (error) {
|
|
52
|
+
console.error('Storage remove error:', error);
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { IGetSecureTokenResponse } from '@types';
|
|
2
|
+
import TonderError from '@shared/utils/errors';
|
|
3
|
+
import { HttpClient } from '@infrastructure/HttpClient';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
|
|
6
|
+
export class TokenService {
|
|
7
|
+
private readonly BASE_PATH = '/api/secure-token/';
|
|
8
|
+
private readonly http: HttpClient;
|
|
9
|
+
|
|
10
|
+
constructor(http: HttpClient) {
|
|
11
|
+
this.http = http;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Gets a secure token for authenticated operations
|
|
15
|
+
* @param secretApiKey Authorization token
|
|
16
|
+
* @param signal Optional AbortSignal for request cancellation
|
|
17
|
+
* @throws {TonderError} If secure token fetch fails
|
|
18
|
+
*/
|
|
19
|
+
async getSecureToken(
|
|
20
|
+
secretApiKey: string,
|
|
21
|
+
signal?: AbortSignal
|
|
22
|
+
): Promise<IGetSecureTokenResponse> {
|
|
23
|
+
try {
|
|
24
|
+
this.validateToken(secretApiKey);
|
|
25
|
+
|
|
26
|
+
return await this.http.post<IGetSecureTokenResponse>(this.BASE_PATH, {}, {
|
|
27
|
+
headers: {
|
|
28
|
+
Authorization: `Token ${secretApiKey}`,
|
|
29
|
+
},
|
|
30
|
+
signal,
|
|
31
|
+
} as RequestInit);
|
|
32
|
+
} catch (error) {
|
|
33
|
+
throw new TonderError({
|
|
34
|
+
code: ErrorKeyEnum.SECURE_TOKEN_ERROR,
|
|
35
|
+
details: error,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private validateToken(token: string): void {
|
|
41
|
+
if (!token) {
|
|
42
|
+
throw new TonderError({ code: ErrorKeyEnum.INVALID_SECRET_API_KEY });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ITransaction } from '@types';
|
|
2
|
+
import TonderError from '@shared/utils/errors';
|
|
3
|
+
import { HttpClient } from '@infrastructure/HttpClient';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
|
|
6
|
+
export class TransactionService {
|
|
7
|
+
private readonly http: HttpClient;
|
|
8
|
+
|
|
9
|
+
constructor(http: HttpClient) {
|
|
10
|
+
this.http = http;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async verifyTransactionStatus(verifyUrl: string): Promise<ITransaction> {
|
|
14
|
+
try {
|
|
15
|
+
return await this.http.get<ITransaction>(`${verifyUrl}`);
|
|
16
|
+
} catch (error) {
|
|
17
|
+
throw new TonderError({
|
|
18
|
+
code: ErrorKeyEnum.FETCH_TRANSACTION_ERROR,
|
|
19
|
+
details: error,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './CardService';
|
|
2
|
+
export * from './TokenService';
|
|
3
|
+
export * from './SkyflowService';
|
|
4
|
+
export * from './OpenPayService';
|
|
5
|
+
export * from './CardService';
|
|
6
|
+
export * from './CheckoutService';
|
|
7
|
+
export * from './CustomerService';
|
|
8
|
+
export * from './PaymentMethodService';
|
|
9
|
+
export * from './BusinessService';
|
|
10
|
+
export * from './MercadoPagoService';
|
|
11
|
+
export * from './TransactionService';
|
|
12
|
+
export * from './StorageService';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { clearSpace } from '@shared/utils/stringUtils';
|
|
2
|
+
|
|
3
|
+
const CARD_BRAND_CATALOG: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
} = {
|
|
6
|
+
visa: 'https://d35a75syrgujp0.cloudfront.net/cards/visa.png',
|
|
7
|
+
mastercard: 'https://d35a75syrgujp0.cloudfront.net/cards/mastercard.png',
|
|
8
|
+
americanexpress:
|
|
9
|
+
'https://d35a75syrgujp0.cloudfront.net/cards/american_express.png',
|
|
10
|
+
default: 'https://d35a75syrgujp0.cloudfront.net/cards/default_card.png',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const getCardType = (scheme: string) => {
|
|
14
|
+
const scheme_clean = clearSpace(scheme).toLowerCase();
|
|
15
|
+
return CARD_BRAND_CATALOG[scheme_clean] || CARD_BRAND_CATALOG.default;
|
|
16
|
+
};
|