@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
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Tonder
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @tonder.io/rn-sdk
|
|
2
|
+
|
|
3
|
+
Tonder react native sdk
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install @tonder.io/rn-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
import { multiply } from '@tonder.io/rn-sdk';
|
|
16
|
+
|
|
17
|
+
// ...
|
|
18
|
+
|
|
19
|
+
const result = await multiply(3, 7);
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Contributing
|
|
24
|
+
|
|
25
|
+
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
26
|
+
|
|
27
|
+
## License
|
|
28
|
+
|
|
29
|
+
MIT
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ThreeDSHandler = void 0;
|
|
7
|
+
var _errors = _interopRequireDefault(require("@shared/utils/errors"));
|
|
8
|
+
var _enum = require("@shared/enum");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class ThreeDSHandler {
|
|
11
|
+
STORAGE_KEY = 'verify_transaction_status_url';
|
|
12
|
+
constructor(config, service, emit3DS, resumeCheckout) {
|
|
13
|
+
this.config = config;
|
|
14
|
+
this.service = service;
|
|
15
|
+
this.emit3DS = emit3DS;
|
|
16
|
+
this.resumeCheckout = resumeCheckout;
|
|
17
|
+
this.returnURL = config.returnURL;
|
|
18
|
+
}
|
|
19
|
+
async verifyTransaction() {
|
|
20
|
+
const verifyUrl = await this.service.storage.getItemWithExpires(this.STORAGE_KEY);
|
|
21
|
+
try {
|
|
22
|
+
return await this.service.transaction.verifyTransactionStatus(verifyUrl);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async handle3DS(payload, onFinish) {
|
|
28
|
+
try {
|
|
29
|
+
this.onFinish = onFinish;
|
|
30
|
+
await this.setPayload(payload);
|
|
31
|
+
// const iframe = this.payload?.next_action?.iframe_resources?.iframe;
|
|
32
|
+
// const threeDsChallenge = this.payload?.next_action?.three_ds_challenge;
|
|
33
|
+
|
|
34
|
+
// if (iframe) {
|
|
35
|
+
// // TODO: PENDING IMPLEMENT FOR IFRAMES - LIKE WEB SDK - JOIN TO handleRedirect
|
|
36
|
+
// await this.loadIframe();
|
|
37
|
+
// return;
|
|
38
|
+
// } else if (threeDsChallenge) {
|
|
39
|
+
// // TODO: PENDING IMPLEMENT FOR IFRAMES - LIKE WEB SDK - JOIN TO handleRedirect
|
|
40
|
+
// await this.handle3dsChallenge();
|
|
41
|
+
// return;
|
|
42
|
+
// } else {
|
|
43
|
+
// return await this.handleRedirect();
|
|
44
|
+
// }
|
|
45
|
+
|
|
46
|
+
await this.saveVerifyTransactionUrl();
|
|
47
|
+
const url = this.getRedirectUrl();
|
|
48
|
+
const trx_response = await this.verifyTransaction();
|
|
49
|
+
if (!url) {
|
|
50
|
+
this.emit3DS('hide3DS', {});
|
|
51
|
+
await this.removeVerifyTransactionUrl();
|
|
52
|
+
await this.onFinish(trx_response);
|
|
53
|
+
return trx_response;
|
|
54
|
+
}
|
|
55
|
+
this.emit3DS('show3DS', {
|
|
56
|
+
url,
|
|
57
|
+
returnURL: this.returnURL,
|
|
58
|
+
onComplete: async () => {
|
|
59
|
+
const response = await this.verifyTransaction();
|
|
60
|
+
const transaction_status = response?.transaction_status || '';
|
|
61
|
+
if (response?.decline?.error_type === 'Hard' || response?.checkout.is_route_finished || ['Success', 'Authorized'].includes(transaction_status)) {
|
|
62
|
+
this.emit3DS('hide3DS', {});
|
|
63
|
+
await this.removeVerifyTransactionUrl();
|
|
64
|
+
await this.onFinish(response);
|
|
65
|
+
} else {
|
|
66
|
+
try {
|
|
67
|
+
const retry_checkout = await this.resumeCheckout(response?.checkout.id);
|
|
68
|
+
await this.handle3DS(retry_checkout, this.onFinish);
|
|
69
|
+
} catch (error) {
|
|
70
|
+
this.emit3DS('hide3DS', {});
|
|
71
|
+
await this.removeVerifyTransactionUrl();
|
|
72
|
+
await this.onFinish(error);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return trx_response;
|
|
78
|
+
} catch (error) {
|
|
79
|
+
await this.removeVerifyTransactionUrl();
|
|
80
|
+
const err = new _errors.default({
|
|
81
|
+
code: _enum.ErrorKeyEnum.THREEDS_REDIRECTION_ERROR,
|
|
82
|
+
details: error
|
|
83
|
+
});
|
|
84
|
+
this.emit3DS('hide3DS', {});
|
|
85
|
+
await this.onFinish(err);
|
|
86
|
+
throw err;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
async setPayload(payload) {
|
|
90
|
+
this.payload = payload;
|
|
91
|
+
}
|
|
92
|
+
getRedirectUrl() {
|
|
93
|
+
return this.payload?.next_action?.redirect_to_url?.url;
|
|
94
|
+
}
|
|
95
|
+
async saveVerifyTransactionUrl() {
|
|
96
|
+
const url = this.payload?.next_action?.redirect_to_url?.verify_transaction_status_url || this.payload?.next_action?.iframe_resources?.verify_transaction_status_url;
|
|
97
|
+
if (url) {
|
|
98
|
+
await this.service.storage.setItem(this.STORAGE_KEY, url);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async removeVerifyTransactionUrl() {
|
|
102
|
+
await this.service.storage.removeItem(this.STORAGE_KEY);
|
|
103
|
+
}
|
|
104
|
+
async loadIframe() {}
|
|
105
|
+
async handle3dsChallenge() {}
|
|
106
|
+
}
|
|
107
|
+
exports.ThreeDSHandler = ThreeDSHandler;
|
|
108
|
+
//# sourceMappingURL=3DSHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_errors","_interopRequireDefault","require","_enum","e","__esModule","default","ThreeDSHandler","STORAGE_KEY","constructor","config","service","emit3DS","resumeCheckout","returnURL","verifyTransaction","verifyUrl","storage","getItemWithExpires","transaction","verifyTransactionStatus","error","handle3DS","payload","onFinish","setPayload","saveVerifyTransactionUrl","url","getRedirectUrl","trx_response","removeVerifyTransactionUrl","onComplete","response","transaction_status","decline","error_type","checkout","is_route_finished","includes","retry_checkout","id","err","TonderError","code","ErrorKeyEnum","THREEDS_REDIRECTION_ERROR","details","next_action","redirect_to_url","verify_transaction_status_url","iframe_resources","setItem","removeItem","loadIframe","handle3dsChallenge","exports"],"sourceRoot":"../../../src","sources":["core/3DSHandler.ts"],"mappings":";;;;;;AAOA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAA4C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErC,MAAMG,cAAc,CAA4B;EAGpCC,WAAW,GAAG,+BAA+B;EAK9DC,WAAWA,CACUC,MAAsB,EACzCC,OAAuB,EACvBC,OAA+C,EAC/CC,cAAkE,EAClE;IAAA,KAJmBH,MAAsB,GAAtBA,MAAsB;IAKzC,IAAI,CAACC,OAAO,GAAGA,OAAO;IACtB,IAA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AAI,CAACA,OAAO,GAAGA,OAAO;EACxB;EAEQK,cAAcA,CAAA,EAAuB;IAC3C,OAAO,IAAI,CAACL,OAAO,EAAEwB,WAAW,EAAEC,eAAe,EAAErB,GAAG;EACxD;EACA,MAAcD,wBAAwBA,CAAA,EAAkB;IACtD,MAAMC,GAAG,GACP,IAAI,CAACJ,OAAO,EAAEwB,WAAW,EAAEC,eAAe,EACtCC,6BAA6B,IACjC,IAAI,CAAC1B,OAAO,EAAEwB,WAAW,EAAEG,gBAAgB,EACvCD,6BAA6B;IAEnC,IAAItB,GAAG,EAAE;MACP,MAAM,IAAI,CAAChB,OAAO,CAACM,OAAO,CAACkC,OAAO,CAAC,IAAI,CAAC3C,WAAW,EAAEmB,GAAG,CAAC;IAC3D;EACF;EAEA,MAAcG,0BAA0BA,CAAA,EAAkB;IACxD,MAAM,IAAI,CAACnB,OAAO,CAACM,OAAO,CAACmC,UAAU,CAAC,IAAI,CAAC5C,WAAW,CAAC;EACzD;EAEA,MAAc6C,UAAUA,CAAA,EAAG,CAAC;EAC5B,MAAcC,kBAAkBA,CAAA,EAAG,CAAC;AACtC;AAACC,OAAA,CAAAhD,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _BaseSDK = _interopRequireDefault(require("@core/BaseSDK"));
|
|
8
|
+
var _types = require("@types");
|
|
9
|
+
var _common = require("@shared/utils/common");
|
|
10
|
+
var _lodash = require("lodash");
|
|
11
|
+
var _constants = require("@shared/constants");
|
|
12
|
+
var _errors = _interopRequireDefault(require("@shared/utils/errors"));
|
|
13
|
+
var _enum = require("@shared/enum");
|
|
14
|
+
var _DSHandler = require("@core/3DSHandler");
|
|
15
|
+
var _paymentMethodsCatalog = require("@shared/catalog/paymentMethodsCatalog");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
class BaseCheckout extends _BaseSDK.default {
|
|
18
|
+
#process3ds;
|
|
19
|
+
constructor(tonderClient, getState, setState, setSkyflowConfig) {
|
|
20
|
+
super(tonderClient, getState, setState, setSkyflowConfig);
|
|
21
|
+
this.#process3ds = new _DSHandler.ThreeDSHandler(this.tonderClient.getConfig(), this.tonderClient.getService(), (eventName, data) => this.tonderClient.emit(eventName, data), checkoutId => this.resumeCheckout(checkoutId));
|
|
22
|
+
}
|
|
23
|
+
create = async () => {
|
|
24
|
+
try {
|
|
25
|
+
await this.getInitialData();
|
|
26
|
+
await this.initializeProviders();
|
|
27
|
+
if (this.tonderClient.getConfig().type === _types.SDKType.INLINE) {
|
|
28
|
+
await this.getUIData({});
|
|
29
|
+
}
|
|
30
|
+
this.setState({
|
|
31
|
+
isCreated: true,
|
|
32
|
+
isCreating: false
|
|
33
|
+
});
|
|
34
|
+
return {};
|
|
35
|
+
} catch (error) {
|
|
36
|
+
const err = error instanceof _errors.default ? error : new _errors.default({
|
|
37
|
+
code: _enum.ErrorKeyEnum.CREATE_ERROR,
|
|
38
|
+
details: error
|
|
39
|
+
});
|
|
40
|
+
await this.setState({
|
|
41
|
+
error: err
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
error: err
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
setupPaymentFlow = async data => {
|
|
49
|
+
await this.setState({
|
|
50
|
+
isProcessing: true
|
|
51
|
+
});
|
|
52
|
+
const callbacks = this.getState().callbacks;
|
|
53
|
+
|
|
54
|
+
// Execute user callbacks
|
|
55
|
+
await (0, _common.executeCallback)({
|
|
56
|
+
callbacks,
|
|
57
|
+
callback: 'beforePayment',
|
|
58
|
+
throwError: true
|
|
59
|
+
});
|
|
60
|
+
const payment_data = await this.prepareCheckoutData(data);
|
|
61
|
+
await this.setState({
|
|
62
|
+
customer: payment_data.customer,
|
|
63
|
+
internalPaymentData: payment_data
|
|
64
|
+
});
|
|
65
|
+
await this.getOrRegisterCustomer(this.getState().internalPaymentData?.customer);
|
|
66
|
+
|
|
67
|
+
// Save card based on the configuration or card selector for future payments.
|
|
68
|
+
await this.validateAndSaveCard(payment_data.card?.skyflow_id, this.getState().customization?.saveCards?.autoSave || this.getState().uiData?.saveCard);
|
|
69
|
+
|
|
70
|
+
// Refresh customer cards.
|
|
71
|
+
try {
|
|
72
|
+
this.getUIData({
|
|
73
|
+
cards: true,
|
|
74
|
+
paymentMethods: false
|
|
75
|
+
});
|
|
76
|
+
} catch (e) {}
|
|
77
|
+
|
|
78
|
+
// Make init checkout
|
|
79
|
+
const response = await this.handleCheckout({
|
|
80
|
+
card: payment_data.card,
|
|
81
|
+
payment_method: payment_data.payment_method
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// Execute 3DS flow
|
|
85
|
+
return await this.handle3DSFlow(response);
|
|
86
|
+
};
|
|
87
|
+
async prepareCheckoutData(data) {
|
|
88
|
+
let card_data = (0, _lodash.defaultTo)(data.card, '');
|
|
89
|
+
let card_tokens = {};
|
|
90
|
+
let payment_method_data = (0, _lodash.defaultTo)(data.payment_method, '');
|
|
91
|
+
if (card_data === '' && payment_method_data === '') {
|
|
92
|
+
const cardFields = await this.getState().skyflowContainer.collect();
|
|
93
|
+
card_tokens = cardFields?.records[0]?.fields;
|
|
94
|
+
}
|
|
95
|
+
if (card_data !== '') {
|
|
96
|
+
card_tokens = {
|
|
97
|
+
skyflow_id: card_data
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
...data,
|
|
102
|
+
...(Object.keys(card_tokens).length > 0 ? {
|
|
103
|
+
card: card_tokens
|
|
104
|
+
} : {
|
|
105
|
+
payment_method: payment_method_data
|
|
106
|
+
}),
|
|
107
|
+
currency: data.currency || 'mxn',
|
|
108
|
+
metadata: data.metadata || {}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
validateAndSaveCard = async (cardId, saveCard) => {
|
|
112
|
+
if (cardId && saveCard) {
|
|
113
|
+
const {
|
|
114
|
+
customerToken,
|
|
115
|
+
secureToken,
|
|
116
|
+
businessId
|
|
117
|
+
} = this.getDataForCards();
|
|
118
|
+
const response = await this.tonderClient.getService().card.saveCustomerCard(customerToken, secureToken, businessId, {
|
|
119
|
+
skyflow_id: cardId
|
|
120
|
+
});
|
|
121
|
+
await this.setState({
|
|
122
|
+
message: _constants.MESSAGES_ES.CARD_SAVED_SUCCESSFULLY
|
|
123
|
+
});
|
|
124
|
+
return response;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
async handleCheckout({
|
|
128
|
+
card,
|
|
129
|
+
payment_method
|
|
130
|
+
}) {
|
|
131
|
+
try {
|
|
132
|
+
const orderResponse = await this.createOrder();
|
|
133
|
+
const paymentResponse = await this.createPayment(orderResponse.id);
|
|
134
|
+
return await this.startCheckoutRouter(orderResponse.id, paymentResponse.pk, payment_method, card);
|
|
135
|
+
} catch (error) {
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
async createOrder() {
|
|
140
|
+
const state = this.getState();
|
|
141
|
+
const orderItems = {
|
|
142
|
+
business: this.tonderClient.getConfig().apiKey,
|
|
143
|
+
client: state.customerData?.auth_token,
|
|
144
|
+
billing_address_id: null,
|
|
145
|
+
shipping_address_id: null,
|
|
146
|
+
amount: state.internalPaymentData.cart.total,
|
|
147
|
+
status: 'A',
|
|
148
|
+
reference: state.merchantData?.reference,
|
|
149
|
+
is_oneclick: true,
|
|
150
|
+
items: state.internalPaymentData.cart.items
|
|
151
|
+
};
|
|
152
|
+
return await this.tonderClient.getService().checkout.createOrder(orderItems);
|
|
153
|
+
}
|
|
154
|
+
async createPayment(orderId) {
|
|
155
|
+
const state = this.getState();
|
|
156
|
+
const now = new Date();
|
|
157
|
+
const dateString = now.toISOString();
|
|
158
|
+
const request = {
|
|
159
|
+
business_pk: state.merchantData?.business.pk,
|
|
160
|
+
client_id: state.customerData?.id,
|
|
161
|
+
amount: state.internalPaymentData.cart.total,
|
|
162
|
+
date: dateString,
|
|
163
|
+
order_id: orderId
|
|
164
|
+
};
|
|
165
|
+
return await this.tonderClient.getService().checkout.createPayment(request);
|
|
166
|
+
}
|
|
167
|
+
async startCheckoutRouter(orderId, paymentPK, paymentMethod, card) {
|
|
168
|
+
const state = this.getState();
|
|
169
|
+
const {
|
|
170
|
+
openpay_keys,
|
|
171
|
+
business
|
|
172
|
+
} = state.merchantData;
|
|
173
|
+
let deviceSessionIdTonder = '';
|
|
174
|
+
if (openpay_keys.merchant_id && openpay_keys.public_key) {
|
|
175
|
+
deviceSessionIdTonder = await this.tonderClient.getService().openPay.getDeviceSessionId(openpay_keys.merchant_id, openpay_keys.public_key, true);
|
|
176
|
+
}
|
|
177
|
+
const routerItems = {
|
|
178
|
+
name: state.internalPaymentData?.customer?.firstName || '',
|
|
179
|
+
last_name: state.internalPaymentData?.customer?.lastName || '',
|
|
180
|
+
email_client: state.internalPaymentData?.customer?.email || '',
|
|
181
|
+
phone_number: state.internalPaymentData?.customer?.phone || '',
|
|
182
|
+
return_url: this.tonderClient.getConfig().returnURL,
|
|
183
|
+
id_product: 'no_id',
|
|
184
|
+
quantity_product: 1,
|
|
185
|
+
id_ship: '0',
|
|
186
|
+
instance_id_ship: '0',
|
|
187
|
+
amount: state.internalPaymentData.cart.total,
|
|
188
|
+
title_ship: 'shipping',
|
|
189
|
+
description: 'transaction',
|
|
190
|
+
device_session_id: deviceSessionIdTonder,
|
|
191
|
+
token_id: '',
|
|
192
|
+
order_id: orderId,
|
|
193
|
+
business_id: business.pk,
|
|
194
|
+
payment_id: paymentPK,
|
|
195
|
+
source: 'rn-sdk',
|
|
196
|
+
metadata: state.internalPaymentData.metadata,
|
|
197
|
+
browser_info: (0, _common.getAppInfo)(),
|
|
198
|
+
currency: state.internalPaymentData.currency,
|
|
199
|
+
...(paymentMethod ? {
|
|
200
|
+
payment_method: paymentMethod
|
|
201
|
+
} : {
|
|
202
|
+
card: card
|
|
203
|
+
})
|
|
204
|
+
};
|
|
205
|
+
return await this.tonderClient.getService().checkout.startCheckoutRouter(routerItems);
|
|
206
|
+
}
|
|
207
|
+
handle3DSFlow(response) {
|
|
208
|
+
return new Promise((resolve, reject) => {
|
|
209
|
+
this.#process3ds.handle3DS(response, async finalResponse => {
|
|
210
|
+
try {
|
|
211
|
+
await this.setState({
|
|
212
|
+
isProcessing: false
|
|
213
|
+
});
|
|
214
|
+
if (finalResponse instanceof _errors.default) {
|
|
215
|
+
reject(new _errors.default({
|
|
216
|
+
code: _enum.ErrorKeyEnum.PAYMENT_PROCESS_ERROR,
|
|
217
|
+
details: finalResponse?.details || finalResponse
|
|
218
|
+
}));
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
await (0, _common.executeCallback)({
|
|
222
|
+
callbacks: this.getState().callbacks,
|
|
223
|
+
callback: 'onFinishPayment',
|
|
224
|
+
data: {
|
|
225
|
+
response: finalResponse
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
resolve(finalResponse);
|
|
229
|
+
} catch (error) {
|
|
230
|
+
reject(error);
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
async handlePaymentError(error) {
|
|
236
|
+
let err;
|
|
237
|
+
let message = _constants.MESSAGES_ES.PAYMENT_PROCESS_ERROR;
|
|
238
|
+
if ((error?.message || '').includes('Incomplete inputs')) {
|
|
239
|
+
err = new _errors.default({
|
|
240
|
+
code: _enum.ErrorKeyEnum.INVALID_CARD_DATA,
|
|
241
|
+
details: error
|
|
242
|
+
});
|
|
243
|
+
message = _constants.MESSAGES_ES.INVALID_CARD_DATA;
|
|
244
|
+
} else {
|
|
245
|
+
err = error instanceof _errors.default ? error : new _errors.default({
|
|
246
|
+
code: _enum.ErrorKeyEnum.PAYMENT_PROCESS_ERROR,
|
|
247
|
+
details: error
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
await this.setState({
|
|
251
|
+
error: error,
|
|
252
|
+
isProcessing: false,
|
|
253
|
+
message: message
|
|
254
|
+
});
|
|
255
|
+
await (0, _common.executeCallback)({
|
|
256
|
+
callbacks: this.getState().callbacks,
|
|
257
|
+
callback: 'onFinishPayment',
|
|
258
|
+
data: {
|
|
259
|
+
error: err
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
return err;
|
|
263
|
+
}
|
|
264
|
+
async resumeCheckout(checkoutId) {
|
|
265
|
+
return await this.tonderClient.getService().checkout.startCheckoutRouter({
|
|
266
|
+
checkout_id: checkoutId
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
async getUIData(data) {
|
|
270
|
+
const {
|
|
271
|
+
cards = true,
|
|
272
|
+
paymentMethods = true
|
|
273
|
+
} = data;
|
|
274
|
+
const tasks = [];
|
|
275
|
+
if (cards && this.getState().customization?.saveCards?.showSaved) {
|
|
276
|
+
tasks.push(this.getCards());
|
|
277
|
+
}
|
|
278
|
+
if (paymentMethods && this.getState().customization?.paymentMethods?.show) {
|
|
279
|
+
tasks.push(this.getPaymentMethods());
|
|
280
|
+
}
|
|
281
|
+
await Promise.allSettled(tasks);
|
|
282
|
+
}
|
|
283
|
+
async getCards() {
|
|
284
|
+
try {
|
|
285
|
+
const {
|
|
286
|
+
customerToken,
|
|
287
|
+
secureToken,
|
|
288
|
+
businessId
|
|
289
|
+
} = this.getDataForCards();
|
|
290
|
+
const response = await this.tonderClient.getService().card.fetchCustomerCards(customerToken, secureToken, businessId);
|
|
291
|
+
await this.tonderClient.updateUIState({
|
|
292
|
+
...(response ? {
|
|
293
|
+
cards: response.cards || []
|
|
294
|
+
} : {})
|
|
295
|
+
});
|
|
296
|
+
return response.cards;
|
|
297
|
+
} catch (e) {
|
|
298
|
+
console.warn('[BaseCheckout | getCards | ERROR]', e);
|
|
299
|
+
return [];
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
async getPaymentMethods() {
|
|
303
|
+
try {
|
|
304
|
+
const response = await this.tonderClient.getService().paymentMethod.fetchPaymentMethods();
|
|
305
|
+
const pym = (0, _lodash.defaultTo)((0, _lodash.get)(response, 'results'), []).filter(pmItem => pmItem.category.toLowerCase() !== 'cards').map(pmItem => {
|
|
306
|
+
return {
|
|
307
|
+
id: pmItem.pk,
|
|
308
|
+
payment_method: pmItem.payment_method,
|
|
309
|
+
priority: pmItem.priority,
|
|
310
|
+
category: pmItem.category,
|
|
311
|
+
...(0, _paymentMethodsCatalog.getPaymentMethodDetails)(pmItem.payment_method)
|
|
312
|
+
};
|
|
313
|
+
}).sort((a, b) => a.priority - b.priority);
|
|
314
|
+
await this.tonderClient.updateUIState({
|
|
315
|
+
...(pym ? {
|
|
316
|
+
paymentMethods: pym
|
|
317
|
+
} : {})
|
|
318
|
+
});
|
|
319
|
+
return pym;
|
|
320
|
+
} catch (e) {
|
|
321
|
+
console.warn('[BaseCheckout | getPaymentMethods | ERROR]', e);
|
|
322
|
+
return [];
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
getDataForCards() {
|
|
326
|
+
const secureToken = this.tonderClient.getSecureToken();
|
|
327
|
+
const businessId = this.tonderClient.getBusinessPK();
|
|
328
|
+
const customerToken = this.tonderClient.getCustomerAuthToken();
|
|
329
|
+
return {
|
|
330
|
+
secureToken,
|
|
331
|
+
businessId,
|
|
332
|
+
customerToken
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
var _default = exports.default = BaseCheckout;
|
|
337
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_BaseSDK","_interopRequireDefault","require","_types","_common","_lodash","_constants","_errors","_enum","_DSHandler","_paymentMethodsCatalog","e","__esModule","default","BaseCheckout","BaseSDK","process3ds","constructor","tonderClient","getState","setState","setSkyflowConfig","ThreeDSHandler","getConfig","getService","eventName","data","emit","checkoutId","resumeCheckout","create","getInitialData","initializeProviders","type","SDKType","INLINE","getUIData","isCreated","isCreating","error","err","TonderError","code","ErrorKeyEnum","CREATE_ERROR","details","setupPaymentFlow","isProcessing","callbacks","executeCallback","callback","throwError","payment_data","prepareCheckoutData","customer","internalPaymentData","getOrRegisterCustomer","validateAndSaveCard","card","skyflow_id","customization","saveCards","autoSave","uiData","saveCard","cards","paymentMethods","response","handleCheckout","payment_method","handle3DSFlow","card_data","defaultTo","card_tokens","payment_method_data","cardFields","skyflowContainer","collect","records","fields","Object","keys","length","currency","metadata","cardId","customerToken","secureToken","businessId","getDataForCards","saveCustomerCard","message","MESSAGES_ES","CARD_SAVED_SUCCESSFULLY","orderResponse","createOrder","paymentResponse","createPayment","id","startCheckoutRouter","pk","state","orderItems","business","apiKey","client","customerData","auth_token","billing_address_id","shipping_address_id","amount","cart","total","status","reference","merchantData","is_oneclick","items","checkout","orderId","now","Date","dateString","toISOString","request","business_pk","client_id","date","order_id","paymentPK","paymentMethod","openpay_keys","deviceSessionIdTonder","merchant_id","public_key","openPay","getDeviceSessionId","routerItems","name","firstName","last_name","lastName","email_client","email","phone_number","phone","return_url","returnURL","id_product","quantity_product","id_ship","instance_id_ship","title_ship","description","device_session_id","token_id","business_id","payment_id","source","browser_info","getAppInfo","Promise","resolve","reject","handle3DS","finalResponse","PAYMENT_PROCESS_ERROR","handlePaymentError","includes","INVALID_CARD_DATA","checkout_id","tasks","showSaved","push","getCards","show","getPaymentMethods","allSettled","fetchCustomerCards","updateUIState","console","warn","fetchPaymentMethods","pym","get","filter","pmItem","category","toLowerCase","map","priority","getPaymentMethodDetails","sort","a","b","getSecureToken","getBusinessPK","getCustomerAuthToken","_default","exports"],"sourceRoot":"../../../../src","sources":["core/BaseCheckout/index.ts"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAcA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,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ports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _errors = _interopRequireDefault(require("@shared/utils/errors"));
|
|
8
|
+
var _constants = require("@shared/constants");
|
|
9
|
+
var _enum = require("@shared/enum");
|
|
10
|
+
var _BaseSDK = _interopRequireDefault(require("@core/BaseSDK"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
class BaseEnrollment extends _BaseSDK.default {
|
|
13
|
+
#defaultCustomization = {
|
|
14
|
+
saveButton: {
|
|
15
|
+
show: true,
|
|
16
|
+
text: 'Guardar'
|
|
17
|
+
},
|
|
18
|
+
showMessages: true
|
|
19
|
+
};
|
|
20
|
+
constructor(tonderClient, getState, setState, setSkyflowConfig) {
|
|
21
|
+
super(tonderClient, getState, setState, setSkyflowConfig);
|
|
22
|
+
}
|
|
23
|
+
create = async data => {
|
|
24
|
+
try {
|
|
25
|
+
await this.setState({
|
|
26
|
+
...data,
|
|
27
|
+
isCreated: false,
|
|
28
|
+
isCreating: true,
|
|
29
|
+
customization: {
|
|
30
|
+
...this.#defaultCustomization,
|
|
31
|
+
...(data.customization || {}),
|
|
32
|
+
saveButton: {
|
|
33
|
+
...this.#defaultCustomization.saveButton,
|
|
34
|
+
...(data.customization?.saveButton || {})
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
...(data.customer ? {
|
|
38
|
+
customer: data.customer
|
|
39
|
+
} : {}),
|
|
40
|
+
...(data.secureToken ? {
|
|
41
|
+
secureToken: data.secureToken
|
|
42
|
+
} : {})
|
|
43
|
+
});
|
|
44
|
+
await this.getInitialData();
|
|
45
|
+
await this.initializeProviders({
|
|
46
|
+
mercadoPago: false
|
|
47
|
+
});
|
|
48
|
+
await this.setState({
|
|
49
|
+
isCreated: true,
|
|
50
|
+
isCreating: false
|
|
51
|
+
});
|
|
52
|
+
return {};
|
|
53
|
+
} catch (error) {
|
|
54
|
+
const err = error instanceof _errors.default ? error : new _errors.default({
|
|
55
|
+
code: _enum.ErrorKeyEnum.CREATE_ERROR,
|
|
56
|
+
details: error
|
|
57
|
+
});
|
|
58
|
+
await this.setState({
|
|
59
|
+
error: error,
|
|
60
|
+
message: _constants.MESSAGES_ES[_enum.ErrorKeyEnum.ERROR_LOAD_ENROLLMENT_FORM]
|
|
61
|
+
});
|
|
62
|
+
return {
|
|
63
|
+
error: err
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
saveCard = async cardId => {
|
|
68
|
+
if (cardId) {
|
|
69
|
+
const secureToken = this.tonderClient.getSecureToken();
|
|
70
|
+
const businessId = this.tonderClient.getBusinessPK();
|
|
71
|
+
const customerToken = this.tonderClient.getCustomerAuthToken();
|
|
72
|
+
const response = await this.tonderClient.getService().card.saveCustomerCard(customerToken, secureToken, businessId, {
|
|
73
|
+
skyflow_id: cardId
|
|
74
|
+
});
|
|
75
|
+
await this.setState({
|
|
76
|
+
message: _constants.MESSAGES_ES.CARD_SAVED_SUCCESSFULLY
|
|
77
|
+
});
|
|
78
|
+
return response;
|
|
79
|
+
}
|
|
80
|
+
throw new _errors.default({
|
|
81
|
+
code: _enum.ErrorKeyEnum.INVALID_CARD_DATA
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
var _default = exports.default = BaseEnrollment;
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_errors","_interopRequireDefault","require","_constants","_enum","_BaseSDK","e","__esModule","default","BaseEnrollment","BaseSDK","defaultCustomization","saveButton","show","text","showMessages","constructor","tonderClient","getState","setState","setSkyflowConfig","create","data","isCreated","isCreating","customization","customer","secureToken","getInitialData","initializeProviders","mercadoPago","error","err","TonderError","code","ErrorKeyEnum","CREATE_ERROR","details","message","MESSAGES_ES","ERROR_LOAD_ENROLLMENT_FORM","saveCard","cardId","getSecureToken","businessId","getBusinessPK","customerToken","getCustomerAuthToken","response","getService","card","saveCustomerCard","skyflow_id","CARD_SAVED_SUCCESSFULLY","INVALID_CARD_DATA","_default","exports"],"sourceRoot":"../../../../src","sources":["core/BaseEnrollment/index.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAIpC,MAAMG,cAAc,SAASC,gBAAO,CAAC;EACnC,CAACC,oBAAoB,GAAoC;IACvDC,UAAU,EAAE;MACVC,IAAI,EAAE,IAAI;MACVC,IAAI,EAAE;IACR,CAAC;IACDC,YAAY,EAAE;EAChB,CAAC;EACDC,WAAWA,CACTC,YAAoB,EACpBC,QAA6B,EAC7BC,QAA0C,EAC1CC,gBAA2D,EAC3D;IACA,KAAK,CAACH,YAAY,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,gBAAgB,CAAC;EAC3D;EAEOC,MAAM,GAAG,MACdC,IAAoC,IACC;IACrC,IAAI;MACF,MAAM,IAAI,CAACH,QAAQ,CAAC;QAClB,GAAGG,IAAI;QACPC,SAAS,EAAE,KAAK;QAChBC,UAAU,EAAE,IAAI;QAChBC,aAAa,EAAE;UACb,GAAG,IAAI,CAAC,CAACd,oBAAoB;UAC7B,IAAIW,IAAI,CAACG,aAAa,IAAI,CAAC,CAAC,CAAC;UAC7Bb,UAAU,EAAE;YACV,GAAG,IAAI,CAAC,CAACD,oBAAoB,CAACC,UAAU;YACxC,IAAIU,IAAI,CAACG,aAAa,EAAEb,UAAU,IAAI,CAAC,CAAC;UAC1C;QACF,CAAC;QACD,IAAIU,IAAI,CAACI,QAAQ,GAAG;UAAEA,QAAQ,EAAEJ,IAAI,CAAC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