@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,243 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Image, StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import SavedCardsList from '@components/SavedCardsList';
|
|
4
|
+
import { ProcessButton } from '@components/Button/ProcessButton';
|
|
5
|
+
import PaymentMethodsList from '@components/PaymentMethodsList';
|
|
6
|
+
import { NewCardForm } from '@components/CardForm';
|
|
7
|
+
import { RadioButton } from '@components/RadioButton';
|
|
8
|
+
import { getCardType } from '@shared/catalog/cardBrandCatalog';
|
|
9
|
+
import CardFormSkeleton from '@components/Skeleton/CardFormSkeleton';
|
|
10
|
+
import { DEFAULT_PAYMENT_CONTAINER } from '@ui/styles/payment';
|
|
11
|
+
import { buildBaseStyleText } from '@shared/utils/styleUtils';
|
|
12
|
+
import { toCurrency } from '@shared/utils/numberUtils';
|
|
13
|
+
import useTonderContext from '@ui/providers/TonderProvider/hook';
|
|
14
|
+
import { SDKType } from '@types';
|
|
15
|
+
|
|
16
|
+
export interface ITonderPaymentProps {}
|
|
17
|
+
const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
18
|
+
const { uiWrapper, sdk, state } = useTonderContext<SDKType.INLINE>();
|
|
19
|
+
const [deletingCards, setDelitingCards] = useState<string[]>([]);
|
|
20
|
+
|
|
21
|
+
const handleMethodSelect = (methodId: string, type: string) => {
|
|
22
|
+
const value =
|
|
23
|
+
type === 'card'
|
|
24
|
+
? methodId
|
|
25
|
+
: type === 'payment_method'
|
|
26
|
+
? state.uiData?.paymentMethods.find((it) => it.id === methodId)
|
|
27
|
+
?.payment_method || ''
|
|
28
|
+
: '';
|
|
29
|
+
uiWrapper.updateMethod(type, value);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const handleSaveCardChange = (value: boolean) => {
|
|
33
|
+
uiWrapper.updateSaveCard(value);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const onDeleteCard = async (cardId: string) => {
|
|
37
|
+
try {
|
|
38
|
+
setDelitingCards((prev) => [...prev, ...[cardId]]);
|
|
39
|
+
await uiWrapper.removeCustomerCard(cardId);
|
|
40
|
+
setDelitingCards((prev) => {
|
|
41
|
+
return prev.filter((it) => it !== cardId);
|
|
42
|
+
});
|
|
43
|
+
} catch (error) {
|
|
44
|
+
setDelitingCards((prev) => {
|
|
45
|
+
return prev.filter((it) => it !== cardId);
|
|
46
|
+
});
|
|
47
|
+
console.error('[TonderPayment | onDeleteCard | ERROR]', error);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const onPayment = async () => {
|
|
52
|
+
try {
|
|
53
|
+
await sdk.payment();
|
|
54
|
+
} catch (error) {
|
|
55
|
+
console.error('[TonderPayment | onPayment | Error]: ', error);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
if (!state?.isCreating && !state?.isCreated) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<View style={styles.container}>
|
|
65
|
+
{state?.isCreating && <CardFormSkeleton message={state?.message} />}
|
|
66
|
+
<View
|
|
67
|
+
style={{
|
|
68
|
+
...DEFAULT_PAYMENT_CONTAINER.base,
|
|
69
|
+
...(state?.isCreating ? { minHeight: 210 } : {}),
|
|
70
|
+
...(state?.customization?.styles?.sdkCard?.base || {}),
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
{state?.customization?.saveCards?.showSaved && (
|
|
74
|
+
<SavedCardsList
|
|
75
|
+
style={state?.customization?.styles?.savedCards}
|
|
76
|
+
cards={state.uiData?.cards}
|
|
77
|
+
selectedMethod={state?.uiData?.card || ''}
|
|
78
|
+
onMethodSelect={(methodId) => {
|
|
79
|
+
handleMethodSelect(methodId, 'card');
|
|
80
|
+
}}
|
|
81
|
+
onDeleteCard={onDeleteCard}
|
|
82
|
+
deletingCards={deletingCards}
|
|
83
|
+
showDeleteButton={state?.customization?.saveCards?.showDeleteOption}
|
|
84
|
+
/>
|
|
85
|
+
)}
|
|
86
|
+
|
|
87
|
+
{state?.customization?.cardForm?.show && (
|
|
88
|
+
<View
|
|
89
|
+
style={{
|
|
90
|
+
...styles.newCardSection,
|
|
91
|
+
...state?.customization?.styles?.paymentRadio?.base,
|
|
92
|
+
}}
|
|
93
|
+
>
|
|
94
|
+
<RadioButton
|
|
95
|
+
value="new"
|
|
96
|
+
selected={state?.uiData?.selectedMethod === 'new'}
|
|
97
|
+
onSelect={() => handleMethodSelect('new', '')}
|
|
98
|
+
style={{
|
|
99
|
+
base: state?.customization?.styles?.paymentRadio?.radioBase,
|
|
100
|
+
selected:
|
|
101
|
+
state?.customization?.styles?.paymentRadio?.radioSelected,
|
|
102
|
+
inner: state?.customization?.styles?.paymentRadio?.radioInner,
|
|
103
|
+
}}
|
|
104
|
+
/>
|
|
105
|
+
<Image
|
|
106
|
+
source={{ uri: getCardType('') }}
|
|
107
|
+
style={{
|
|
108
|
+
...styles.cardImage,
|
|
109
|
+
...(state?.customization?.styles?.paymentRadio?.cardIcon || {}),
|
|
110
|
+
}}
|
|
111
|
+
/>
|
|
112
|
+
<Text
|
|
113
|
+
style={{
|
|
114
|
+
...styles.newCardText,
|
|
115
|
+
...buildBaseStyleText(
|
|
116
|
+
state?.customization?.styles?.paymentRadio
|
|
117
|
+
),
|
|
118
|
+
}}
|
|
119
|
+
>
|
|
120
|
+
Pagar con tarjeta
|
|
121
|
+
</Text>
|
|
122
|
+
</View>
|
|
123
|
+
)}
|
|
124
|
+
|
|
125
|
+
{state?.uiData?.selectedMethod === 'new' &&
|
|
126
|
+
state?.isCreated &&
|
|
127
|
+
state?.customization?.cardForm?.show && (
|
|
128
|
+
<NewCardForm
|
|
129
|
+
showSaveOption={
|
|
130
|
+
state?.customization?.saveCards?.showSaveCardOption
|
|
131
|
+
}
|
|
132
|
+
saveCard={state?.uiData?.saveCard || false}
|
|
133
|
+
onSaveCardChange={handleSaveCardChange}
|
|
134
|
+
style={state?.customization?.styles?.cardForm}
|
|
135
|
+
labels={state?.customization?.labels}
|
|
136
|
+
placeholders={state?.customization?.placeholders}
|
|
137
|
+
/>
|
|
138
|
+
)}
|
|
139
|
+
{state?.customization?.showMessages &&
|
|
140
|
+
state?.message &&
|
|
141
|
+
state?.message !== '' &&
|
|
142
|
+
state?.error && (
|
|
143
|
+
<View
|
|
144
|
+
style={{
|
|
145
|
+
...styles.messageContainer,
|
|
146
|
+
...(state?.customization?.styles?.errorMessage?.base || {}),
|
|
147
|
+
}}
|
|
148
|
+
>
|
|
149
|
+
<Text
|
|
150
|
+
style={{
|
|
151
|
+
...styles.errorText,
|
|
152
|
+
...buildBaseStyleText(
|
|
153
|
+
state?.customization?.styles?.errorMessage
|
|
154
|
+
),
|
|
155
|
+
}}
|
|
156
|
+
>
|
|
157
|
+
{state?.message}
|
|
158
|
+
</Text>
|
|
159
|
+
</View>
|
|
160
|
+
)}
|
|
161
|
+
|
|
162
|
+
{state?.customization?.showMessages &&
|
|
163
|
+
state?.message &&
|
|
164
|
+
state?.message !== '' &&
|
|
165
|
+
!state?.error && (
|
|
166
|
+
<View
|
|
167
|
+
style={{
|
|
168
|
+
...styles.messageContainer,
|
|
169
|
+
...(state?.customization?.styles?.successMessage?.base || {}),
|
|
170
|
+
}}
|
|
171
|
+
>
|
|
172
|
+
<Text
|
|
173
|
+
style={{
|
|
174
|
+
...styles.successText,
|
|
175
|
+
...buildBaseStyleText(
|
|
176
|
+
state?.customization?.styles?.successMessage
|
|
177
|
+
),
|
|
178
|
+
}}
|
|
179
|
+
>
|
|
180
|
+
{state?.message}
|
|
181
|
+
</Text>
|
|
182
|
+
</View>
|
|
183
|
+
)}
|
|
184
|
+
{state?.customization?.paymentMethods?.show && (
|
|
185
|
+
<PaymentMethodsList
|
|
186
|
+
methods={state?.uiData.paymentMethods}
|
|
187
|
+
selectedMethod={state?.uiData?.payment_method || ''}
|
|
188
|
+
onMethodSelect={(methodId) => {
|
|
189
|
+
handleMethodSelect(methodId, 'payment_method');
|
|
190
|
+
}}
|
|
191
|
+
style={state?.customization?.styles?.paymentMethods}
|
|
192
|
+
/>
|
|
193
|
+
)}
|
|
194
|
+
|
|
195
|
+
{state?.customization?.paymentButton?.show && (
|
|
196
|
+
<ProcessButton
|
|
197
|
+
text={`${state?.customization?.paymentButton?.text || 'Pagar'} ${state?.paymentData.cart.total && state?.customization?.paymentButton?.showAmount ? toCurrency(state?.paymentData.cart.total) : ''}`}
|
|
198
|
+
style={state?.customization?.styles?.paymentButton}
|
|
199
|
+
onPress={onPayment}
|
|
200
|
+
isLoading={state?.isProcessing}
|
|
201
|
+
/>
|
|
202
|
+
)}
|
|
203
|
+
</View>
|
|
204
|
+
</View>
|
|
205
|
+
);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
const styles = StyleSheet.create({
|
|
209
|
+
container: {
|
|
210
|
+
position: 'relative',
|
|
211
|
+
},
|
|
212
|
+
newCardSection: {
|
|
213
|
+
flexDirection: 'row',
|
|
214
|
+
alignItems: 'center',
|
|
215
|
+
paddingVertical: 10,
|
|
216
|
+
paddingHorizontal: 20,
|
|
217
|
+
borderBottomWidth: 1,
|
|
218
|
+
borderBottomColor: '#e2e8f0',
|
|
219
|
+
},
|
|
220
|
+
cardImage: {
|
|
221
|
+
width: 32,
|
|
222
|
+
height: 20,
|
|
223
|
+
marginLeft: 15,
|
|
224
|
+
},
|
|
225
|
+
newCardText: {
|
|
226
|
+
fontSize: 12,
|
|
227
|
+
color: '#1D1D1D',
|
|
228
|
+
marginLeft: 15,
|
|
229
|
+
},
|
|
230
|
+
messageContainer: {
|
|
231
|
+
paddingHorizontal: 20,
|
|
232
|
+
},
|
|
233
|
+
errorText: {
|
|
234
|
+
color: 'red',
|
|
235
|
+
fontSize: 12,
|
|
236
|
+
},
|
|
237
|
+
successText: {
|
|
238
|
+
color: '#3bc635',
|
|
239
|
+
fontSize: 12,
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
export default TonderPayment;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ITonderContext, SDKType } from '@types';
|
|
4
|
+
import { tonderContext } from '@ui/providers/TonderProvider/context';
|
|
5
|
+
|
|
6
|
+
interface InnerProviderProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
container: any;
|
|
9
|
+
contextValue: ITonderContext<SDKType>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const InnerProvider = ({ children, contextValue }: InnerProviderProps) => {
|
|
13
|
+
return (
|
|
14
|
+
<tonderContext.Provider
|
|
15
|
+
value={{
|
|
16
|
+
...contextValue,
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</tonderContext.Provider>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default InnerProvider;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useCollectContainer } from 'skyflow-react-native';
|
|
3
|
+
import InnerProvider from '@ui/providers/InnerProvider';
|
|
4
|
+
import type { ITonderContext } from '@types';
|
|
5
|
+
import { SDKType } from '@types';
|
|
6
|
+
|
|
7
|
+
interface SkyflowContainerWrapperProps {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
contextValue: ITonderContext<SDKType>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const SkyflowContainerWrapper = ({
|
|
13
|
+
children,
|
|
14
|
+
contextValue,
|
|
15
|
+
}: SkyflowContainerWrapperProps) => {
|
|
16
|
+
const container = useCollectContainer();
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (contextValue?.state?.isCreated && container) {
|
|
20
|
+
contextValue.uiWrapper.setSkyFlowContainer(container);
|
|
21
|
+
}
|
|
22
|
+
}, [
|
|
23
|
+
contextValue?.state?.isCreated,
|
|
24
|
+
contextValue.sdk,
|
|
25
|
+
contextValue.uiWrapper,
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<InnerProvider container={container} contextValue={contextValue}>
|
|
30
|
+
{children}
|
|
31
|
+
</InnerProvider>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default SkyflowContainerWrapper;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ITonderContext, SDKInstance } from '@types';
|
|
4
|
+
import { SDKType } from '@types';
|
|
5
|
+
import { IUIWrapper } from '@ui/providers/TonderProvider/uiWrapper';
|
|
6
|
+
|
|
7
|
+
export const tonderContext = React.createContext<ITonderContext<SDKType>>({
|
|
8
|
+
sdk: {} as SDKInstance<SDKType>,
|
|
9
|
+
state: {},
|
|
10
|
+
uiWrapper: {} as IUIWrapper,
|
|
11
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import { ITonderContext, SDKType } from '@types';
|
|
4
|
+
import { tonderContext } from '@ui/providers/TonderProvider/context';
|
|
5
|
+
|
|
6
|
+
const useTonderContext = <T extends SDKType>(): ITonderContext<T> => {
|
|
7
|
+
return useContext(tonderContext);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default useTonderContext;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import Tonder from '@core/Tonder';
|
|
4
|
+
import type { ISDKBaseConfig, SDKInstance } from '@types';
|
|
5
|
+
import { SDKType } from '@types';
|
|
6
|
+
import { SkyflowProvider } from 'skyflow-react-native';
|
|
7
|
+
import SkyflowContainerWrapper from '@ui/providers/SkyflowContainerWrapper';
|
|
8
|
+
import { ThreeDSWebView } from '@components/WebView/ThreeDSWebView';
|
|
9
|
+
import { EnrollmentContainer } from '@core/EnrollmentContainer';
|
|
10
|
+
import PaymentLiteContainer from '@core/PaymentLiteContainer';
|
|
11
|
+
import PaymentInlineContainer from '@core/PaymentInlineContainer';
|
|
12
|
+
import uiWrapper from '@ui/providers/TonderProvider/uiWrapper';
|
|
13
|
+
import { tonderContext } from '@ui/providers/TonderProvider/context';
|
|
14
|
+
|
|
15
|
+
export interface ITonderProvider {
|
|
16
|
+
config: ISDKBaseConfig;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const TonderProvider: React.FC<React.PropsWithChildren<ITonderProvider>> = <
|
|
20
|
+
T extends SDKType,
|
|
21
|
+
>({
|
|
22
|
+
children,
|
|
23
|
+
config,
|
|
24
|
+
}) => {
|
|
25
|
+
const [skyflowConfig, setSkyflowConfig] = useState<any | null>(null);
|
|
26
|
+
const [state, setState] = useState<Readonly<any>>(() => {});
|
|
27
|
+
const [threeDSConfig, setThreeDSConfig] = useState<{
|
|
28
|
+
url?: string;
|
|
29
|
+
onComplete?: () => void;
|
|
30
|
+
returnURL?: string;
|
|
31
|
+
}>({});
|
|
32
|
+
|
|
33
|
+
const tonder = useMemo(() => new Tonder(config), [config]);
|
|
34
|
+
const sdk: SDKInstance<T> = useMemo(() => {
|
|
35
|
+
if (config.type === SDKType.ENROLLMENT) {
|
|
36
|
+
return new EnrollmentContainer(
|
|
37
|
+
tonder,
|
|
38
|
+
setSkyflowConfig
|
|
39
|
+
) as SDKInstance<T>;
|
|
40
|
+
}
|
|
41
|
+
if (config.type === SDKType.LITE) {
|
|
42
|
+
return new PaymentLiteContainer(
|
|
43
|
+
tonder,
|
|
44
|
+
setSkyflowConfig
|
|
45
|
+
) as SDKInstance<T>;
|
|
46
|
+
}
|
|
47
|
+
return new PaymentInlineContainer(
|
|
48
|
+
tonder,
|
|
49
|
+
setSkyflowConfig
|
|
50
|
+
) as SDKInstance<T>;
|
|
51
|
+
}, [tonder, setSkyflowConfig]);
|
|
52
|
+
const uiSDKWrapper = useMemo(() => uiWrapper(tonder), [tonder]);
|
|
53
|
+
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
const unsubscribe = tonder.subscribe(() => {
|
|
56
|
+
setState(tonder.getState());
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
return () => {
|
|
60
|
+
unsubscribe();
|
|
61
|
+
};
|
|
62
|
+
}, [tonder]);
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (!tonder) return;
|
|
66
|
+
|
|
67
|
+
const unsubscribeShow = tonder.on(
|
|
68
|
+
'show3DS',
|
|
69
|
+
({ url, onComplete, returnURL }) => {
|
|
70
|
+
setThreeDSConfig({ url, onComplete, returnURL });
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
const unsubscribeHide = tonder.on('hide3DS', ({}) => {
|
|
74
|
+
setThreeDSConfig({ url: '' });
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
return () => {
|
|
78
|
+
unsubscribeShow();
|
|
79
|
+
unsubscribeHide();
|
|
80
|
+
};
|
|
81
|
+
}, [tonder]);
|
|
82
|
+
|
|
83
|
+
const contextValue = useMemo(
|
|
84
|
+
() => ({
|
|
85
|
+
sdk: sdk as SDKInstance<T>,
|
|
86
|
+
uiWrapper: uiSDKWrapper,
|
|
87
|
+
state,
|
|
88
|
+
}),
|
|
89
|
+
[sdk, state, uiSDKWrapper]
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<tonderContext.Provider value={contextValue}>
|
|
94
|
+
<SkyflowProvider config={skyflowConfig}>
|
|
95
|
+
<SkyflowContainerWrapper contextValue={contextValue}>
|
|
96
|
+
<ThreeDSWebView
|
|
97
|
+
url={threeDSConfig.url}
|
|
98
|
+
onComplete={() => {
|
|
99
|
+
threeDSConfig.onComplete?.();
|
|
100
|
+
}}
|
|
101
|
+
returnURL={threeDSConfig.returnURL!}
|
|
102
|
+
/>
|
|
103
|
+
{children}
|
|
104
|
+
</SkyflowContainerWrapper>
|
|
105
|
+
</SkyflowProvider>
|
|
106
|
+
</tonderContext.Provider>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export default React.memo(TonderProvider);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type Tonder from '@core/Tonder';
|
|
2
|
+
import { executeCallback } from '@shared/utils/common';
|
|
3
|
+
import { MESSAGES_EN } from '@shared/constants';
|
|
4
|
+
|
|
5
|
+
export interface IUIWrapper {
|
|
6
|
+
removeCustomerCard: (cardId: string) => Promise<void>;
|
|
7
|
+
updateMethod: (method: string, value: string) => void;
|
|
8
|
+
updateSaveCard: (value: boolean) => void;
|
|
9
|
+
setSkyFlowContainer: (value: any) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const uiWrapper = (tonder: Tonder): IUIWrapper => ({
|
|
13
|
+
removeCustomerCard: async (cardId: string) => {
|
|
14
|
+
const callbacks = tonder.getState().callbacks;
|
|
15
|
+
try {
|
|
16
|
+
await executeCallback({
|
|
17
|
+
callbacks,
|
|
18
|
+
callback: 'beforeDeleteCard',
|
|
19
|
+
throwError: true,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
await tonder
|
|
23
|
+
.getService()
|
|
24
|
+
.card.removeCustomerCard(
|
|
25
|
+
tonder.getCustomerAuthToken(),
|
|
26
|
+
tonder.getSecureToken(),
|
|
27
|
+
cardId,
|
|
28
|
+
tonder.getBusinessPK()
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
tonder.updateUIState({
|
|
32
|
+
cards: tonder
|
|
33
|
+
.getState()
|
|
34
|
+
.uiData.cards.filter((card: any) => card.id !== cardId),
|
|
35
|
+
});
|
|
36
|
+
await executeCallback({
|
|
37
|
+
callbacks,
|
|
38
|
+
callback: 'onFinishDeleteCard',
|
|
39
|
+
data: { response: MESSAGES_EN.REMOVE_CARD },
|
|
40
|
+
});
|
|
41
|
+
} catch (error) {
|
|
42
|
+
await executeCallback({
|
|
43
|
+
callbacks,
|
|
44
|
+
callback: 'onFinishDeleteCard',
|
|
45
|
+
data: { error: error },
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
updateMethod: (method: string, value: string) => {
|
|
50
|
+
tonder.updateUIState({
|
|
51
|
+
...(method === 'card'
|
|
52
|
+
? { card: value }
|
|
53
|
+
: method === 'payment_method'
|
|
54
|
+
? { paymentMethod: value }
|
|
55
|
+
: {}),
|
|
56
|
+
selectedMethod: method === '' ? 'new' : method,
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
updateSaveCard: (value: boolean) => {
|
|
60
|
+
tonder.updateUIState({ saveCard: value });
|
|
61
|
+
},
|
|
62
|
+
setSkyFlowContainer: (value: any) => {
|
|
63
|
+
tonder.setState({ skyflowContainer: value });
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export default uiWrapper;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
// TODO: CHECK INTER FAMILY
|
|
4
|
+
const DEFAULT_INPUT_CONTAINER_STYLES = StyleSheet.create({
|
|
5
|
+
base: {
|
|
6
|
+
display: 'flex',
|
|
7
|
+
flexDirection: 'column',
|
|
8
|
+
justifyContent: 'flex-start',
|
|
9
|
+
flex: 1,
|
|
10
|
+
marginVertical: 5,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const DEFAULT_PAYMENT_CONTAINER = StyleSheet.create({
|
|
15
|
+
base: {
|
|
16
|
+
backgroundColor: '#F9F9F9',
|
|
17
|
+
borderWidth: 1,
|
|
18
|
+
borderColor: '#e3e3e3',
|
|
19
|
+
width: '100%',
|
|
20
|
+
marginBottom: 10,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
export { DEFAULT_INPUT_CONTAINER_STYLES, DEFAULT_PAYMENT_CONTAINER };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
// TODO: CHECK INTER FAMILY
|
|
4
|
+
const DEFAULT_SKYFLOW_INPUT_STYLES = StyleSheet.create({
|
|
5
|
+
base: {
|
|
6
|
+
borderWidth: 1,
|
|
7
|
+
borderColor: '#e0e0e0',
|
|
8
|
+
fontSize: 12,
|
|
9
|
+
paddingVertical: 0,
|
|
10
|
+
paddingHorizontal: 5,
|
|
11
|
+
borderRadius: 5,
|
|
12
|
+
color: '#1d1d1d',
|
|
13
|
+
backgroundColor: 'white',
|
|
14
|
+
// fontFamily: 'Inter',
|
|
15
|
+
},
|
|
16
|
+
complete: {
|
|
17
|
+
color: '#4caf50',
|
|
18
|
+
},
|
|
19
|
+
invalid: {
|
|
20
|
+
borderWidth: 1,
|
|
21
|
+
borderColor: 'f44336',
|
|
22
|
+
},
|
|
23
|
+
empty: {},
|
|
24
|
+
focus: {},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const DEFAULT_SKYFLOW_lABEL_STYLES = {
|
|
28
|
+
base: {
|
|
29
|
+
fontSize: 12,
|
|
30
|
+
fontWeight: 500,
|
|
31
|
+
// fontFamily: 'Inter',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const DEFAULT_SKYFLOW_ERROR_TEXT_STYLES = StyleSheet.create({
|
|
36
|
+
base: {
|
|
37
|
+
fontWeight: 500,
|
|
38
|
+
color: '#f44336',
|
|
39
|
+
marginTop: 0,
|
|
40
|
+
paddingVertical: 0,
|
|
41
|
+
fontSize: 12,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const SKYFLOW_HIDDEN_ERROR_TEXT_STYLES = {
|
|
46
|
+
base: {
|
|
47
|
+
color: 'transparent',
|
|
48
|
+
display: 'none',
|
|
49
|
+
// fontFamily: 'Inter',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
DEFAULT_SKYFLOW_INPUT_STYLES,
|
|
55
|
+
DEFAULT_SKYFLOW_lABEL_STYLES,
|
|
56
|
+
DEFAULT_SKYFLOW_ERROR_TEXT_STYLES,
|
|
57
|
+
SKYFLOW_HIDDEN_ERROR_TEXT_STYLES,
|
|
58
|
+
};
|