@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,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
export class BusinessService {
|
|
6
|
+
BASE_PATH = '/api/v1/payments/business';
|
|
7
|
+
constructor(http) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Fetches business information from the API
|
|
13
|
+
* @param signal Optional AbortSignal for request cancellation
|
|
14
|
+
* @returns Business information
|
|
15
|
+
* @throws {TonderError} If the request fails
|
|
16
|
+
*/
|
|
17
|
+
async fetchBusiness(signal) {
|
|
18
|
+
try {
|
|
19
|
+
return await this.http.get(`${this.BASE_PATH}/${this.http.getApiKey()}`, {
|
|
20
|
+
signal
|
|
21
|
+
});
|
|
22
|
+
} catch (error) {
|
|
23
|
+
throw new TonderError({
|
|
24
|
+
code: ErrorKeyEnum.FETCH_BUSINESS_ERROR,
|
|
25
|
+
details: error
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=BusinessService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","ErrorKeyEnum","BusinessService","BASE_PATH","constructor","http","fetchBusiness","signal","get","getApiKey","error","code","FETCH_BUSINESS_ERROR","details"],"sourceRoot":"../../../src","sources":["services/BusinessService.ts"],"mappings":";;AACA,OAAOA,WAAW,MAAM,sBAAsB;AAE9C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,eAAe,CAAC;EACVC,SAAS,GAAG,2BAA2B;EAGxDC,WAAWA,CAACC,IAAgB,EAAE;IAC5B,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,MAAMC,aAAaA,CAACC,MAAoB,EAAgC;IACtE,IAAI;MACF,OAAO,MAAM,IAAI,CAACF,IAAI,CAACG,GAAG,CACxB,GAAG,IAAI,CAACL,SAAS,IAAI,IAAI,CAACE,IAAI,CAACI,SAAS,CAAC,CAAC,EAAE,EAC5C;QAAEF;MAAO,CACX,CAAC;IACH,CAAC,CAAC,OAAOG,KAAK,EAAE;MACd,MAAM,IAAIV,WAAW,CAAC;QACpBW,IAAI,EAAEV,YAAY,CAACW,oBAAoB;QACvCC,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { MESSAGES_EN } from '@shared/constants';
|
|
5
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
6
|
+
export class CardService {
|
|
7
|
+
BASE_PATH = '/api/v1/business';
|
|
8
|
+
constructor(http) {
|
|
9
|
+
this.http = http;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fetches customer cards from the API
|
|
13
|
+
* @throws {TonderError} If the request fails
|
|
14
|
+
*/
|
|
15
|
+
async fetchCustomerCards(customerToken, secureToken, businessId) {
|
|
16
|
+
this.validateSecureToken(secureToken);
|
|
17
|
+
try {
|
|
18
|
+
return await this.http.get(`${this.BASE_PATH}/${businessId}/cards/`, {
|
|
19
|
+
headers: this.buildAuthHeaders(secureToken, customerToken)
|
|
20
|
+
});
|
|
21
|
+
} catch (error) {
|
|
22
|
+
throw new TonderError({
|
|
23
|
+
code: ErrorKeyEnum.FETCH_CARDS_ERROR,
|
|
24
|
+
details: error
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Saves a customer card
|
|
31
|
+
* @throws {TonderError} If the request fails
|
|
32
|
+
*/
|
|
33
|
+
async saveCustomerCard(customerToken, secureToken, businessId, cardData) {
|
|
34
|
+
this.validateSecureToken(secureToken);
|
|
35
|
+
try {
|
|
36
|
+
return await this.http.post(`${this.BASE_PATH}/${businessId}/cards/`, cardData, {
|
|
37
|
+
headers: this.buildAuthHeaders(secureToken, customerToken)
|
|
38
|
+
});
|
|
39
|
+
} catch (error) {
|
|
40
|
+
throw new TonderError({
|
|
41
|
+
code: ErrorKeyEnum.SAVE_CARD_ERROR,
|
|
42
|
+
details: error
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Removes a customer card
|
|
49
|
+
* @throws {TonderError} If the request fails
|
|
50
|
+
*/
|
|
51
|
+
async removeCustomerCard(customerToken, secureToken, skyflowId, businessId) {
|
|
52
|
+
this.validateSecureToken(secureToken);
|
|
53
|
+
try {
|
|
54
|
+
await this.http.delete(`${this.BASE_PATH}/${businessId}/cards/${skyflowId}/`, {
|
|
55
|
+
headers: this.buildAuthHeaders(secureToken, customerToken)
|
|
56
|
+
});
|
|
57
|
+
return MESSAGES_EN.REMOVE_CARD;
|
|
58
|
+
} catch (error) {
|
|
59
|
+
throw new TonderError({
|
|
60
|
+
code: ErrorKeyEnum.REMOVE_CARD_ERROR,
|
|
61
|
+
details: error
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
validateSecureToken(token) {
|
|
66
|
+
if (!token) {
|
|
67
|
+
throw new TonderError({
|
|
68
|
+
code: ErrorKeyEnum.SECURE_TOKEN_INVALID
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Builds authentication headers for card operations
|
|
75
|
+
*/
|
|
76
|
+
buildAuthHeaders(secureToken, customerToken) {
|
|
77
|
+
return {
|
|
78
|
+
'Authorization': `Bearer ${secureToken}`,
|
|
79
|
+
'User-token': customerToken
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=CardService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","MESSAGES_EN","ErrorKeyEnum","CardService","BASE_PATH","constructor","http","fetchCustomerCards","customerToken","secureToken","businessId","validateSecureToken","get","headers","buildAuthHeaders","error","code","FETCH_CARDS_ERROR","details","saveCustomerCard","cardData","post","SAVE_CARD_ERROR","removeCustomerCard","skyflowId","delete","REMOVE_CARD","REMOVE_CARD_ERROR","token","SECURE_TOKEN_INVALID"],"sourceRoot":"../../../src","sources":["services/CardService.ts"],"mappings":";;AAKA,OAAOA,WAAW,MAAM,sBAAsB;AAE9C,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,WAAW,CAAC;EACNC,SAAS,GAAG,kBAAkB;EAG/CC,WAAWA,CAACC,IAAgB,EAAE;IAC5B,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;EACA;AACF;AACA;AACA;EACE,MAAMC,kBAAkBA,CACtBC,aAAqB,EACrBC,WAAmB,EACnBC,UAA2B,EACM;IACjC,IAAI,CAACC,mBAAmB,CAACF,WAAW,CAAC;IACrC,IAAI;MACF,OAAO,MAAM,IAAI,CAACH,IAAI,CAACM,GAAG,CACxB,GAAG,IAAI,CAACR,SAAS,IAAIM,UAAU,SAAS,EACxC;QACEG,OAAO,EAAE,IAAI,CAACC,gBAAgB,CAACL,WAAW,EAAED,aAAa;MAC3D,CACF,CAAC;IACH,CAAC,CAAC,OAAOO,KAAK,EAAE;MACd,MAAM,IAAIf,WAAW,CAAC;QACpBgB,IAAI,EAAEd,YAAY,CAACe,iBAAiB;QACpCC,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;;EAEA;AACF;AACA;AACA;EACE,MAAMI,gBAAgBA,CACpBX,aAAqB,EACrBC,WAAmB,EACnBC,UAA2B,EAC3BU,QAAiC,EACL;IAC5B,IAAI,CAACT,mBAAmB,CAACF,WAAW,CAAC;IAErC,IAAI;MACF,OAAO,MAAM,IAAI,CAACH,IAAI,CAACe,IAAI,CACzB,GAAG,IAAI,CAACjB,SAAS,IAAIM,UAAU,SAAS,EACxCU,QAAQ,EACR;QACEP,OAAO,EAAE,IAAI,CAACC,gBAAgB,CAACL,WAAW,EAAED,aAAa;MAC3D,CACF,CAAC;IACH,CAAC,CAAC,OAAOO,KAAK,EAAE;MACd,MAAM,IAAIf,WAAW,CAAC;QACpBgB,IAAI,EAAEd,YAAY,CAACoB,eAAe;QAClCJ,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;;EAEA;AACF;AACA;AACA;EACE,MAAMQ,kBAAkBA,CACtBf,aAAqB,EACrBC,WAAmB,EACnBe,SAAiB,EACjBd,UAA2B,EACV;IACjB,IAAI,CAACC,mBAAmB,CAACF,WAAW,CAAC;IAErC,IAAI;MACF,MAAM,IAAI,CAACH,IAAI,CAACmB,MAAM,CACpB,GAAG,IAAI,CAACrB,SAAS,IAAIM,UAAU,UAAUc,SAAS,GAAG,EACrD;QACEX,OAAO,EAAE,IAAI,CAACC,gBAAgB,CAACL,WAAW,EAAED,aAAa;MAC3D,CACF,CAAC;MAED,OAAOP,WAAW,CAACyB,WAAW;IAChC,CAAC,CAAC,OAAOX,KAAK,EAAE;MACd,MAAM,IAAIf,WAAW,CAAC;QACpBgB,IAAI,EAAEd,YAAY,CAACyB,iBAAiB;QACpCT,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;EAEQJ,mBAAmBA,CAACiB,KAAa,EAAQ;IAC/C,IAAI,CAACA,KAAK,EAAE;MACV,MAAM,IAAI5B,WAAW,CAAC;QAAEgB,IAAI,EAAEd,YAAY,CAAC2B;MAAqB,CAAC,CAAC;IACpE;EACF;;EAEA;AACF;AACA;EACUf,gBAAgBA,CACtBL,WAAmB,EACnBD,aAAqB,EACG;IACxB,OAAO;MACL,eAAe,EAAE,UAAUC,WAAW,EAAE;MACxC,YAAY,EAAED;IAChB,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
export class CheckoutService {
|
|
6
|
+
BASE_PATHS = {
|
|
7
|
+
orders: '/api/v1/orders/',
|
|
8
|
+
payments: '/api/v1/business',
|
|
9
|
+
checkout: '/api/v1/checkout-router/'
|
|
10
|
+
};
|
|
11
|
+
constructor(http) {
|
|
12
|
+
this.http = http;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new order
|
|
16
|
+
* @param orderItems Order data to create
|
|
17
|
+
* @throws {TonderError} If order creation fails
|
|
18
|
+
*/
|
|
19
|
+
async createOrder(orderItems) {
|
|
20
|
+
try {
|
|
21
|
+
this.validateOrderData(orderItems);
|
|
22
|
+
return await this.http.post(this.BASE_PATHS.orders, orderItems);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
throw new TonderError({
|
|
25
|
+
code: ErrorKeyEnum.CREATE_ORDER_ERROR,
|
|
26
|
+
details: error
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new payment
|
|
33
|
+
* @param paymentItems Payment data to create
|
|
34
|
+
* @throws {TonderError} If payment creation fails
|
|
35
|
+
*/
|
|
36
|
+
async createPayment(paymentItems) {
|
|
37
|
+
try {
|
|
38
|
+
this.validatePaymentData(paymentItems);
|
|
39
|
+
return await this.http.post(`${this.BASE_PATHS.payments}/${paymentItems.business_pk}/payments/`, paymentItems);
|
|
40
|
+
} catch (error) {
|
|
41
|
+
throw new TonderError({
|
|
42
|
+
code: ErrorKeyEnum.CREATE_PAYMENT_ERROR,
|
|
43
|
+
details: error
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Starts or continues a checkout process
|
|
50
|
+
* @param routerItems Checkout data or checkout ID
|
|
51
|
+
* @param deviceSessionId Optional device session ID for MercadoPago
|
|
52
|
+
* @throws {TonderError} If checkout process fails
|
|
53
|
+
*/
|
|
54
|
+
async startCheckoutRouter(routerItems, deviceSessionId) {
|
|
55
|
+
try {
|
|
56
|
+
const payload = {
|
|
57
|
+
...routerItems,
|
|
58
|
+
...(deviceSessionId ? {
|
|
59
|
+
mp_device_session_id: deviceSessionId
|
|
60
|
+
} : {})
|
|
61
|
+
};
|
|
62
|
+
return await this.http.post(this.BASE_PATHS.checkout, payload);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
throw new TonderError({
|
|
65
|
+
code: ErrorKeyEnum.START_CHECKOUT_ERROR,
|
|
66
|
+
details: error
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Validates order data before creation
|
|
73
|
+
* @throws {TonderError} If order data is invalid
|
|
74
|
+
*/
|
|
75
|
+
validateOrderData(orderItems) {
|
|
76
|
+
if (!orderItems.business) {
|
|
77
|
+
throw new TonderError({
|
|
78
|
+
code: ErrorKeyEnum.BUSINESS_ID_REQUIRED
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
if (!orderItems.amount || orderItems.amount <= 0) {
|
|
82
|
+
throw new TonderError({
|
|
83
|
+
code: ErrorKeyEnum.INVALID_AMOUNT
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
if (!orderItems.items?.length) {
|
|
87
|
+
throw new TonderError({
|
|
88
|
+
code: ErrorKeyEnum.INVALID_ITEMS
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Validates payment data before creation
|
|
95
|
+
* @throws {TonderError} If payment data is invalid
|
|
96
|
+
*/
|
|
97
|
+
validatePaymentData(paymentItems) {
|
|
98
|
+
if (!paymentItems.business_pk) {
|
|
99
|
+
throw new TonderError({
|
|
100
|
+
code: ErrorKeyEnum.BUSINESS_ID_REQUIRED
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (!paymentItems.client_id) {
|
|
104
|
+
throw new TonderError({
|
|
105
|
+
code: ErrorKeyEnum.CLIENT_ID_REQUIRED
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
if (!paymentItems.amount || paymentItems.amount <= 0) {
|
|
109
|
+
throw new TonderError({
|
|
110
|
+
code: ErrorKeyEnum.INVALID_AMOUNT
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=CheckoutService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","ErrorKeyEnum","CheckoutService","BASE_PATHS","orders","payments","checkout","constructor","http","createOrder","orderItems","validateOrderData","post","error","code","CREATE_ORDER_ERROR","details","createPayment","paymentItems","validatePaymentData","business_pk","CREATE_PAYMENT_ERROR","startCheckoutRouter","routerItems","deviceSessionId","payload","mp_device_session_id","START_CHECKOUT_ERROR","business","BUSINESS_ID_REQUIRED","amount","INVALID_AMOUNT","items","length","INVALID_ITEMS","client_id","CLIENT_ID_REQUIRED"],"sourceRoot":"../../../src","sources":["services/CheckoutService.ts"],"mappings":";;AASA,OAAOA,WAAW,MAAM,sBAAsB;AAE9C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,eAAe,CAAC;EACVC,UAAU,GAAG;IAC5BC,MAAM,EAAE,iBAAiB;IACzBC,QAAQ,EAAE,kBAAkB;IAC5BC,QAAQ,EAAE;EACZ,CAAC;EAIDC,WAAWA,CAACC,IAAgB,EAAE;IAC5B,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;EACA;AACF;AACA;AACA;AACA;EACE,MAAMC,WAAWA,CACfC,UAA+B,EACA;IAC/B,IAAI;MACF,IAAI,CAACC,iBAAiB,CAACD,UAAU,CAAC;MAElC,OAAO,MAAM,IAAI,CAACF,IAAI,CAACI,IAAI,CACzB,IAAI,CAACT,UAAU,CAACC,MAAM,EACtBM,UACF,CAAC;IACH,CAAC,CAAC,OAAOG,KAAK,EAAE;MACd,MAAM,IAAIb,WAAW,CAAC;QACpBc,IAAI,EAAEb,YAAY,CAACc,kBAAkB;QACrCC,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;;EAEA;AACF;AACA;AACA;AACA;EACE,MAAMI,aAAaA,CACjBC,YAAmC,EACF;IACjC,IAAI;MACF,IAAI,CAACC,mBAAmB,CAACD,YAAY,CAAC;MAEtC,OAAO,MAAM,IAAI,CAACV,IAAI,CAACI,IAAI,CACzB,GAAG,IAAI,CAACT,UAAU,CAACE,QAAQ,IAAIa,YAAY,CAACE,WAAW,YAAY,EACnEF,YACF,CAAC;IACH,CAAC,CAAC,OAAOL,KAAK,EAAE;MACd,MAAM,IAAIb,WAAW,CAAC;QACpBc,IAAI,EAAEb,YAAY,CAACoB,oBAAoB;QACvCL,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,MAAMS,mBAAmBA,CACvBC,WAA4D,EAC5DC,eAAwB,EACI;IAC5B,IAAI;MACF,MAAMC,OAAO,GAAG;QACd,GAAGF,WAAW;QACd,IAAIC,eAAe,GAAG;UAAEE,oBAAoB,EAAEF;QAAgB,CAAC,GAAG,CAAC,CAAC;MACtE,CAAC;MAED,OAAO,MAAM,IAAI,CAAChB,IAAI,CAACI,IAAI,CACzB,IAAI,CAACT,UAAU,CAACG,QAAQ,EACxBmB,OACF,CAAC;IACH,CAAC,CAAC,OAAOZ,KAAK,EAAE;MACd,MAAM,IAAIb,WAAW,CAAC;QACpBc,IAAI,EAAEb,YAAY,CAAC0B,oBAAoB;QACvCX,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;;EAEA;AACF;AACA;AACA;EACUF,iBAAiBA,CAACD,UAA+B,EAAQ;IAC/D,IAAI,CAACA,UAAU,CAACkB,QAAQ,EAAE;MACxB,MAAM,IAAI5B,WAAW,CAAC;QAAEc,IAAI,EAAEb,YAAY,CAAC4B;MAAqB,CAAC,CAAC;IACpE;IAEA,IAAI,CAACnB,UAAU,CAACoB,MAAM,IAAIpB,UAAU,CAACoB,MAAM,IAAI,CAAC,EAAE;MAChD,MAAM,IAAI9B,WAAW,CAAC;QAAEc,IAAI,EAAEb,YAAY,CAAC8B;MAAe,CAAC,CAAC;IAC9D;IAEA,IAAI,CAACrB,UAAU,CAACsB,KAAK,EAAEC,MAAM,EAAE;MAC7B,MAAM,IAAIjC,WAAW,CAAC;QAAEc,IAAI,EAAEb,YAAY,CAACiC;MAAc,CAAC,CAAC;IAC7D;EACF;;EAEA;AACF;AACA;AACA;EACUf,mBAAmBA,CAACD,YAAmC,EAAQ;IACrE,IAAI,CAACA,YAAY,CAACE,WAAW,EAAE;MAC7B,MAAM,IAAIpB,WAAW,CAAC;QAAEc,IAAI,EAAEb,YAAY,CAAC4B;MAAqB,CAAC,CAAC;IACpE;IAEA,IAAI,CAACX,YAAY,CAACiB,SAAS,EAAE;MAC3B,MAAM,IAAInC,WAAW,CAAC;QAAEc,IAAI,EAAEb,YAAY,CAACmC;MAAmB,CAAC,CAAC;IAClE;IAEA,IAAI,CAAClB,YAAY,CAACY,MAAM,IAAIZ,YAAY,CAACY,MAAM,IAAI,CAAC,EAAE;MACpD,MAAM,IAAI9B,WAAW,CAAC;QAAEc,IAAI,EAAEb,YAAY,CAAC8B;MAAe,CAAC,CAAC;IAC9D;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
export class CustomerService {
|
|
6
|
+
BASE_PATH = '/api/v1/customer/';
|
|
7
|
+
constructor(http) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Registers a new customer or fetches existing one
|
|
12
|
+
* @param customer Customer data
|
|
13
|
+
* @param signal Optional AbortSignal for request cancellation
|
|
14
|
+
* @throws {TonderError} If registration/fetch fails or validation fails
|
|
15
|
+
*/
|
|
16
|
+
async registerOrFetchCustomer(customer, signal) {
|
|
17
|
+
try {
|
|
18
|
+
this.validateCustomerData(customer);
|
|
19
|
+
return await this.http.post(this.BASE_PATH, customer, {
|
|
20
|
+
signal
|
|
21
|
+
});
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.error('CUSTOMER_OPERATION_ERROR', error);
|
|
24
|
+
throw new TonderError({
|
|
25
|
+
code: ErrorKeyEnum.CUSTOMER_OPERATION_ERROR,
|
|
26
|
+
details: error
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Validates customer data before processing
|
|
33
|
+
* @throws {TonderError} If customer data is invalid
|
|
34
|
+
*/
|
|
35
|
+
validateCustomerData(customer) {
|
|
36
|
+
if (!customer.email) {
|
|
37
|
+
throw new TonderError({
|
|
38
|
+
code: ErrorKeyEnum.INVALID_EMAIL
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (!this.isValidEmail(customer.email)) {
|
|
42
|
+
throw new TonderError({
|
|
43
|
+
code: ErrorKeyEnum.INVALID_EMAIL
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Validates email format
|
|
50
|
+
*/
|
|
51
|
+
isValidEmail(email) {
|
|
52
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
53
|
+
return emailRegex.test(email);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=CustomerService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","ErrorKeyEnum","CustomerService","BASE_PATH","constructor","http","registerOrFetchCustomer","customer","signal","validateCustomerData","post","error","console","code","CUSTOMER_OPERATION_ERROR","details","email","INVALID_EMAIL","isValidEmail","emailRegex","test"],"sourceRoot":"../../../src","sources":["services/CustomerService.ts"],"mappings":";;AACA,OAAOA,WAAW,MAAM,sBAAsB;AAE9C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,eAAe,CAAC;EACVC,SAAS,GAAG,mBAAmB;EAGhDC,WAAWA,CAACC,IAAgB,EAAE;IAC5B,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;EACA;AACF;AACA;AACA;AACA;AACA;EACE,MAAMC,uBAAuBA,CAC3BC,QAAmB,EACnBC,MAAoB,EACQ;IAC5B,IAAI;MACF,IAAI,CAACC,oBAAoB,CAACF,QAAQ,CAAC;MAEnC,OAAO,MAAM,IAAI,CAACF,IAAI,CAACK,IAAI,CAAoB,IAAI,CAACP,SAAS,EAAEI,QAAQ,EAAE;QACvEC;MACF,CAAgB,CAAC;IACnB,CAAC,CAAC,OAAOG,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,0BAA0B,EAAEA,KAAK,CAAC;MAChD,MAAM,IAAIX,WAAW,CAAC;QACpBa,IAAI,EAAEZ,YAAY,CAACa,wBAAwB;QAC3CC,OAAO,EAAEJ;MACX,CAAC,CAAC;IACJ;EACF;;EAEA;AACF;AACA;AACA;EACUF,oBAAoBA,CAACF,QAAmB,EAAQ;IACtD,IAAI,CAACA,QAAQ,CAACS,KAAK,EAAE;MACnB,MAAM,IAAIhB,WAAW,CAAC;QAAEa,IAAI,EAAEZ,YAAY,CAACgB;MAAc,CAAC,CAAC;IAC7D;IAEA,IAAI,CAAC,IAAI,CAACC,YAAY,CAACX,QAAQ,CAACS,KAAK,CAAC,EAAE;MACtC,MAAM,IAAIhB,WAAW,CAAC;QAAEa,IAAI,EAAEZ,YAAY,CAACgB;MAAc,CAAC,CAAC;IAC7D;EACF;;EAEA;AACF;AACA;EACUC,YAAYA,CAACF,KAAa,EAAW;IAC3C,MAAMG,UAAU,GAAG,4BAA4B;IAC/C,OAAOA,UAAU,CAACC,IAAI,CAACJ,KAAK,CAAC;EAC/B;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export class MercadoPagoService {
|
|
4
|
+
injectMercadoPagoSecurity() {
|
|
5
|
+
// TODO: IMPLEMENT
|
|
6
|
+
// try {
|
|
7
|
+
// const script = document.createElement('script');
|
|
8
|
+
// script.src = 'https://www.mercadopago.com/v2/security.js';
|
|
9
|
+
// script.setAttribute('view', '');
|
|
10
|
+
// script.onload = () => {
|
|
11
|
+
// console.log('Mercado Pago script loaded successfully.');
|
|
12
|
+
// };
|
|
13
|
+
// script.onerror = (error) => {
|
|
14
|
+
// console.error('Error loading Mercado Pago script:', error);
|
|
15
|
+
// };
|
|
16
|
+
// document.head.appendChild(script);
|
|
17
|
+
// } catch (error) {
|
|
18
|
+
// console.error('Error attempting to inject Mercado Pago script:', error);
|
|
19
|
+
// }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=MercadoPagoService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MercadoPagoService","injectMercadoPagoSecurity"],"sourceRoot":"../../../src","sources":["services/MercadoPagoService.ts"],"mappings":";;AAAA,OAAO,MAAMA,kBAAkB,CAAC;EAC9BC,yBAAyBA,CAAA,EAAG;IAC1B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EAAA;AAEJ","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
|
|
5
|
+
export class OpenPayService {
|
|
6
|
+
async getDeviceSessionId(merchantId, publicKey, isSandbox = true, signal) {
|
|
7
|
+
// var openpay = new Openpay(' your merchant id ', ' your private key ', [ isProduction ]);
|
|
8
|
+
// if (typeof global.OpenPay === 'undefined') {
|
|
9
|
+
// throw new Error('OpenPay scripts must be loaded first');
|
|
10
|
+
// }
|
|
11
|
+
//
|
|
12
|
+
// const openpay = global.OpenPay;
|
|
13
|
+
// openpay.setId(merchantId);
|
|
14
|
+
// openpay.setApiKey(publicKey);
|
|
15
|
+
// openpay.setSandboxMode(isSandbox);
|
|
16
|
+
// return await openpay.deviceData.setup({ signal });
|
|
17
|
+
return new Promise(r => r(''));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=OpenPayService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OpenPayService","getDeviceSessionId","merchantId","publicKey","isSandbox","signal","Promise","r"],"sourceRoot":"../../../src","sources":["services/OpenPayService.ts"],"mappings":";;AAAA;;AAEA,OAAO,MAAMA,cAAc,CAAC;EAC1B,MAAMC,kBAAkBA,CACtBC,UAAkB,EAClBC,SAAiB,EACjBC,SAAkB,GAAG,IAAI,EACzBC,MAAoB,EACH;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,OAAO,IAAIC,OAAO,CAAEC,CAAC,IAAKA,CAAC,CAAC,EAAE,CAAC,CAAC;EAClC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
export class PaymentMethodService {
|
|
6
|
+
BASE_PATH = '/api/v1/payment_methods';
|
|
7
|
+
DEFAULT_PAGE_SIZE = '10000';
|
|
8
|
+
constructor(http) {
|
|
9
|
+
this.http = http;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fetches available payment methods
|
|
13
|
+
* @param params Optional parameters for filtering payment methods
|
|
14
|
+
* @throws {TonderError} If the request fails
|
|
15
|
+
*/
|
|
16
|
+
async fetchPaymentMethods(params = {
|
|
17
|
+
status: 'active',
|
|
18
|
+
pagesize: this.DEFAULT_PAGE_SIZE
|
|
19
|
+
}) {
|
|
20
|
+
try {
|
|
21
|
+
const queryString = new URLSearchParams(params).toString();
|
|
22
|
+
return await this.http.get(`${this.BASE_PATH}?${queryString}`);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
throw new TonderError({
|
|
25
|
+
code: ErrorKeyEnum.FETCH_PAYMENT_METHODS_ERROR,
|
|
26
|
+
details: error
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=PaymentMethodService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","ErrorKeyEnum","PaymentMethodService","BASE_PATH","DEFAULT_PAGE_SIZE","constructor","http","fetchPaymentMethods","params","status","pagesize","queryString","URLSearchParams","toString","get","error","code","FETCH_PAYMENT_METHODS_ERROR","details"],"sourceRoot":"../../../src","sources":["services/PaymentMethodService.ts"],"mappings":";;AACA,OAAOA,WAAW,MAAM,sBAAsB;AAE9C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,oBAAoB,CAAC;EACfC,SAAS,GAAG,yBAAyB;EACrCC,iBAAiB,GAAG,OAAO;EAG5CC,WAAWA,CAACC,IAAgB,EAAE;IAC5B,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;EACA;AACF;AACA;AACA;AACA;EACE,MAAMC,mBAAmBA,CACvBC,MAA8B,GAAG;IAC/BC,MAAM,EAAE,QAAQ;IAChBC,QAAQ,EAAE,IAAI,CAACN;EACjB,CAAC,EACgC;IACjC,IAAI;MACF,MAAMO,WAAW,GAAG,IAAIC,eAAe,CAACJ,MAAM,CAAC,CAACK,QAAQ,CAAC,CAAC;MAE1D,OAAO,MAAM,IAAI,CAACP,IAAI,CAACQ,GAAG,CACxB,GAAG,IAAI,CAACX,SAAS,IAAIQ,WAAW,EAClC,CAAC;IACH,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAM,IAAIf,WAAW,CAAC;QACpBgB,IAAI,EAAEf,YAAY,CAACgB,2BAA2B;QAC9CC,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
import { Env, LogLevel } from 'skyflow-react-native';
|
|
6
|
+
export class SkyflowService {
|
|
7
|
+
BASE_PATH = '/api/v1/vault-token';
|
|
8
|
+
constructor(http) {
|
|
9
|
+
this.http = http;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Gets a Skyflow vault token
|
|
14
|
+
* @param signal Optional AbortSignal for request cancellation
|
|
15
|
+
* @throws {TonderError} If token fetch fails
|
|
16
|
+
*/
|
|
17
|
+
async getVaultToken(signal) {
|
|
18
|
+
try {
|
|
19
|
+
const response = await this.http.get(this.BASE_PATH, {
|
|
20
|
+
signal
|
|
21
|
+
});
|
|
22
|
+
if (!response.token) {
|
|
23
|
+
throw new TonderError({
|
|
24
|
+
code: ErrorKeyEnum.INVALID_VAULT_TOKEN
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return response.token;
|
|
28
|
+
} catch (error) {
|
|
29
|
+
throw new TonderError({
|
|
30
|
+
code: ErrorKeyEnum.VAULT_TOKEN_ERROR,
|
|
31
|
+
details: error
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async createSkyflowConfig(merchantData) {
|
|
36
|
+
return {
|
|
37
|
+
vaultID: merchantData.vault_id,
|
|
38
|
+
vaultURL: merchantData.vault_url,
|
|
39
|
+
options: {
|
|
40
|
+
logLevel: LogLevel.ERROR,
|
|
41
|
+
env: Env.DEV
|
|
42
|
+
},
|
|
43
|
+
getBearerToken: async () => await this.getVaultToken()
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=SkyflowService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","ErrorKeyEnum","Env","LogLevel","SkyflowService","BASE_PATH","constructor","http","getVaultToken","signal","response","get","token","code","INVALID_VAULT_TOKEN","error","VAULT_TOKEN_ERROR","details","createSkyflowConfig","merchantData","vaultID","vault_id","vaultURL","vault_url","options","logLevel","ERROR","env","DEV","getBearerToken"],"sourceRoot":"../../../src","sources":["services/SkyflowService.ts"],"mappings":";;AAAA,OAAOA,WAAW,MAAM,sBAAsB;AAE9C,SAASC,YAAY,QAAQ,cAAc;AAE3C,SAASC,GAAG,EAAEC,QAAQ,QAAQ,sBAAsB;AAEpD,OAAO,MAAMC,cAAc,CAAC;EACTC,SAAS,GAAG,qBAAqB;EAGlDC,WAAWA,CAACC,IAAgB,EAAE;IAC5B,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;;EAEA;AACF;AACA;AACA;AACA;EACE,MAAMC,aAAaA,CAACC,MAAoB,EAAmB;IACzD,IAAI;MACF,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACH,IAAI,CAACI,GAAG,CAAoB,IAAI,CAACN,SAAS,EAAE;QACtEI;MACF,CAAgB,CAAC;MAEjB,IAAI,CAACC,QAAQ,CAACE,KAAK,EAAE;QACnB,MAAM,IAAIZ,WAAW,CAAC;UAAEa,IAAI,EAAEZ,YAAY,CAACa;QAAoB,CAAC,CAAC;MACnE;MAEA,OAAOJ,QAAQ,CAACE,KAAK;IACvB,CAAC,CAAC,OAAOG,KAAK,EAAE;MACd,MAAM,IAAIf,WAAW,CAAC;QACpBa,IAAI,EAAEZ,YAAY,CAACe,iBAAiB;QACpCC,OAAO,EAAEF;MACX,CAAC,CAAC;IACJ;EACF;EAEA,MAAMG,mBAAmBA,CAACC,YAAiB,EAAoB;IAC7D,OAAO;MACLC,OAAO,EAAED,YAAY,CAACE,QAAQ;MAC9BC,QAAQ,EAAEH,YAAY,CAACI,SAAS;MAChCC,OAAO,EAAE;QACPC,QAAQ,EAAEtB,QAAQ,CAACuB,KAAK;QACxBC,GAAG,EAAEzB,GAAG,CAAC0B;MACX,CAAC;MACDC,cAAc,EAAE,MAAAA,CAAA,KAAY,MAAM,IAAI,CAACrB,aAAa,CAAC;IACvD,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
4
|
+
export class StorageService {
|
|
5
|
+
constructor() {}
|
|
6
|
+
async setItem(key, data, expirationMinutes = 20) {
|
|
7
|
+
try {
|
|
8
|
+
const item = {
|
|
9
|
+
data,
|
|
10
|
+
expires: new Date().getTime() + expirationMinutes * 60 * 1000
|
|
11
|
+
};
|
|
12
|
+
await AsyncStorage.setItem(key, JSON.stringify(item));
|
|
13
|
+
} catch (error) {
|
|
14
|
+
console.error('Storage set error:', error);
|
|
15
|
+
throw error;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
async getItemWithExpires(key) {
|
|
19
|
+
try {
|
|
20
|
+
const value = await AsyncStorage.getItem(key);
|
|
21
|
+
if (!value) return null;
|
|
22
|
+
const item = JSON.parse(value);
|
|
23
|
+
const now = new Date().getTime();
|
|
24
|
+
if (now > item.expires) {
|
|
25
|
+
await this.removeItem(key);
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return item.data;
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error('Storage get error:', error);
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async removeItem(key) {
|
|
35
|
+
try {
|
|
36
|
+
await AsyncStorage.setItem(key, '');
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.error('Storage remove error:', error);
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=StorageService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AsyncStorage","StorageService","constructor","setItem","key","data","expirationMinutes","item","expires","Date","getTime","JSON","stringify","error","console","getItemWithExpires","value","getItem","parse","now","removeItem"],"sourceRoot":"../../../src","sources":["services/StorageService.ts"],"mappings":";;AAAA,OAAOA,YAAY,MAAM,2CAA2C;AAOpE,OAAO,MAAMC,cAAc,CAAC;EAC1BC,WAAWA,CAAA,EAAG,CAAC;EAEf,MAAMC,OAAOA,CACXC,GAAW,EACXC,IAAO,EACPC,iBAAyB,GAAG,EAAE,EACf;IACf,IAAI;MACF,MAAMC,IAAoB,GAAG;QAC3BF,IAAI;QACJG,OAAO,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC,GAAGJ,iBAAiB,GAAG,EAAE,GAAG;MAC3D,CAAC;MACD,MAAMN,YAAY,CAACG,OAAO,CAACC,GAAG,EAAEO,IAAI,CAACC,SAAS,CAACL,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC,OAAOM,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,oBAAoB,EAAEA,KAAK,CAAC;MAC1C,MAAMA,KAAK;IACb;EACF;EAEA,MAAME,kBAAkBA,CAAIX,GAAW,EAAqB;IAC1D,IAAI;MACF,MAAMY,KAAK,GAAG,MAAMhB,YAAY,CAACiB,OAAO,CAACb,GAAG,CAAC;MAC7C,IAAI,CAACY,KAAK,EAAE,OAAO,IAAI;MAEvB,MAAMT,IAAoB,GAAGI,IAAI,CAACO,KAAK,CAACF,KAAK,CAAC;MAC9C,MAAMG,GAAG,GAAG,IAAIV,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;MAEhC,IAAIS,GAAG,GAAGZ,IAAI,CAACC,OAAO,EAAE;QACtB,MAAM,IAAI,CAACY,UAAU,CAAChB,GAAG,CAAC;QAC1B,OAAO,IAAI;MACb;MAEA,OAAOG,IAAI,CAACF,IAAI;IAClB,CAAC,CAAC,OAAOQ,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,oBAAoB,EAAEA,KAAK,CAAC;MAC1C,MAAMA,KAAK;IACb;EACF;EAEA,MAAMO,UAAUA,CAAChB,GAAW,EAAiB;IAC3C,IAAI;MACF,MAAMJ,YAAY,CAACG,OAAO,CAACC,GAAG,EAAE,EAAE,CAAC;IACrC,CAAC,CAAC,OAAOS,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,uBAAuB,EAAEA,KAAK,CAAC;MAC7C,MAAMA,KAAK;IACb;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
export class TokenService {
|
|
6
|
+
BASE_PATH = '/api/secure-token/';
|
|
7
|
+
constructor(http) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Gets a secure token for authenticated operations
|
|
12
|
+
* @param secretApiKey Authorization token
|
|
13
|
+
* @param signal Optional AbortSignal for request cancellation
|
|
14
|
+
* @throws {TonderError} If secure token fetch fails
|
|
15
|
+
*/
|
|
16
|
+
async getSecureToken(secretApiKey, signal) {
|
|
17
|
+
try {
|
|
18
|
+
this.validateToken(secretApiKey);
|
|
19
|
+
return await this.http.post(this.BASE_PATH, {}, {
|
|
20
|
+
headers: {
|
|
21
|
+
Authorization: `Token ${secretApiKey}`
|
|
22
|
+
},
|
|
23
|
+
signal
|
|
24
|
+
});
|
|
25
|
+
} catch (error) {
|
|
26
|
+
throw new TonderError({
|
|
27
|
+
code: ErrorKeyEnum.SECURE_TOKEN_ERROR,
|
|
28
|
+
details: error
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
validateToken(token) {
|
|
33
|
+
if (!token) {
|
|
34
|
+
throw new TonderError({
|
|
35
|
+
code: ErrorKeyEnum.INVALID_SECRET_API_KEY
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=TokenService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","ErrorKeyEnum","TokenService","BASE_PATH","constructor","http","getSecureToken","secretApiKey","signal","validateToken","post","headers","Authorization","error","code","SECURE_TOKEN_ERROR","details","token","INVALID_SECRET_API_KEY"],"sourceRoot":"../../../src","sources":["services/TokenService.ts"],"mappings":";;AACA,OAAOA,WAAW,MAAM,sBAAsB;AAE9C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,YAAY,CAAC;EACPC,SAAS,GAAG,oBAAoB;EAGjDC,WAAWA,CAACC,IAAgB,EAAE;IAC5B,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;EACA;AACF;AACA;AACA;AACA;AACA;EACE,MAAMC,cAAcA,CAClBC,YAAoB,EACpBC,MAAoB,EACc;IAClC,IAAI;MACF,IAAI,CAACC,aAAa,CAACF,YAAY,CAAC;MAEhC,OAAO,MAAM,IAAI,CAACF,IAAI,CAACK,IAAI,CAA0B,IAAI,CAACP,SAAS,EAAE,CAAC,CAAC,EAAE;QACvEQ,OAAO,EAAE;UACPC,aAAa,EAAE,SAASL,YAAY;QACtC,CAAC;QACDC;MACF,CAAgB,CAAC;IACnB,CAAC,CAAC,OAAOK,KAAK,EAAE;MACd,MAAM,IAAIb,WAAW,CAAC;QACpBc,IAAI,EAAEb,YAAY,CAACc,kBAAkB;QACrCC,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;EAEQJ,aAAaA,CAACQ,KAAa,EAAQ;IACzC,IAAI,CAACA,KAAK,EAAE;MACV,MAAM,IAAIjB,WAAW,CAAC;QAAEc,IAAI,EAAEb,YAAY,CAACiB;MAAuB,CAAC,CAAC;IACtE;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import TonderError from '@shared/utils/errors';
|
|
4
|
+
import { ErrorKeyEnum } from '@shared/enum';
|
|
5
|
+
export class TransactionService {
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
async verifyTransactionStatus(verifyUrl) {
|
|
10
|
+
try {
|
|
11
|
+
return await this.http.get(`${verifyUrl}`);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
throw new TonderError({
|
|
14
|
+
code: ErrorKeyEnum.FETCH_TRANSACTION_ERROR,
|
|
15
|
+
details: error
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=TransactionService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TonderError","ErrorKeyEnum","TransactionService","constructor","http","verifyTransactionStatus","verifyUrl","get","error","code","FETCH_TRANSACTION_ERROR","details"],"sourceRoot":"../../../src","sources":["services/TransactionService.ts"],"mappings":";;AACA,OAAOA,WAAW,MAAM,sBAAsB;AAE9C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,kBAAkB,CAAC;EAG9BC,WAAWA,CAACC,IAAgB,EAAE;IAC5B,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;EAEA,MAAMC,uBAAuBA,CAACC,SAAiB,EAAyB;IACtE,IAAI;MACF,OAAO,MAAM,IAAI,CAACF,IAAI,CAACG,GAAG,CAAe,GAAGD,SAAS,EAAE,CAAC;IAC1D,CAAC,CAAC,OAAOE,KAAK,EAAE;MACd,MAAM,IAAIR,WAAW,CAAC;QACpBS,IAAI,EAAER,YAAY,CAACS,uBAAuB;QAC1CC,OAAO,EAAEH;MACX,CAAC,CAAC;IACJ;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export * from "./CardService.js";
|
|
4
|
+
export * from "./TokenService.js";
|
|
5
|
+
export * from "./SkyflowService.js";
|
|
6
|
+
export * from "./OpenPayService.js";
|
|
7
|
+
export * from "./CardService.js";
|
|
8
|
+
export * from "./CheckoutService.js";
|
|
9
|
+
export * from "./CustomerService.js";
|
|
10
|
+
export * from "./PaymentMethodService.js";
|
|
11
|
+
export * from "./BusinessService.js";
|
|
12
|
+
export * from "./MercadoPagoService.js";
|
|
13
|
+
export * from "./TransactionService.js";
|
|
14
|
+
export * from "./StorageService.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["services/index.ts"],"mappings":";;AAAA,cAAc,kBAAe;AAC7B,cAAc,mBAAgB;AAC9B,cAAc,qBAAkB;AAChC,cAAc,qBAAkB;AAChC,cAAc,kBAAe;AAC7B,cAAc,sBAAmB;AACjC,cAAc,sBAAmB;AACjC,cAAc,2BAAwB;AACtC,cAAc,sBAAmB;AACjC,cAAc,yBAAsB;AACpC,cAAc,yBAAsB;AACpC,cAAc,qBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { clearSpace } from '@shared/utils/stringUtils';
|
|
4
|
+
const CARD_BRAND_CATALOG = {
|
|
5
|
+
visa: 'https://d35a75syrgujp0.cloudfront.net/cards/visa.png',
|
|
6
|
+
mastercard: 'https://d35a75syrgujp0.cloudfront.net/cards/mastercard.png',
|
|
7
|
+
americanexpress: 'https://d35a75syrgujp0.cloudfront.net/cards/american_express.png',
|
|
8
|
+
default: 'https://d35a75syrgujp0.cloudfront.net/cards/default_card.png'
|
|
9
|
+
};
|
|
10
|
+
export const getCardType = scheme => {
|
|
11
|
+
const scheme_clean = clearSpace(scheme).toLowerCase();
|
|
12
|
+
return CARD_BRAND_CATALOG[scheme_clean] || CARD_BRAND_CATALOG.default;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=cardBrandCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["clearSpace","CARD_BRAND_CATALOG","visa","mastercard","americanexpress","default","getCardType","scheme","scheme_clean","toLowerCase"],"sourceRoot":"../../../../src","sources":["shared/catalog/cardBrandCatalog.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,2BAA2B;AAEtD,MAAMC,kBAEL,GAAG;EACFC,IAAI,EAAE,sDAAsD;EAC5DC,UAAU,EAAE,4DAA4D;EACxEC,eAAe,EACb,kEAAkE;EACpEC,OAAO,EAAE;AACX,CAAC;AAED,OAAO,MAAMC,WAAW,GAAIC,MAAc,IAAK;EAC7C,MAAMC,YAAY,GAAGR,UAAU,CAACO,MAAM,CAAC,CAACE,WAAW,CAAC,CAAC;EACrD,OAAOR,kBAAkB,CAACO,YAAY,CAAC,IAAIP,kBAAkB,CAACI,OAAO;AACvE,CAAC","ignoreList":[]}
|