@tonder.io/rn-sdk 0.1.0-beta.DEV1355.6 → 0.1.0-beta.DEV1355.7
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/README.md +4 -3
- package/android/build.gradle +99 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/tonderio/rnsdk/RnSdkModule.kt +25 -0
- package/android/src/main/java/com/tonderio/rnsdk/RnSdkPackage.kt +17 -0
- package/ios/RnSdk-Bridging-Header.h +2 -0
- package/ios/RnSdk.mm +14 -0
- package/ios/RnSdk.swift +8 -0
- package/lib/commonjs/core/3DSHandler.js +17 -12
- package/lib/commonjs/core/3DSHandler.js.map +1 -1
- package/lib/commonjs/core/BaseCheckout/index.js +21 -22
- package/lib/commonjs/core/BaseCheckout/index.js.map +1 -1
- package/lib/commonjs/core/BaseEnrollment/index.js +8 -9
- package/lib/commonjs/core/BaseEnrollment/index.js.map +1 -1
- package/lib/commonjs/core/BaseSDK/index.js +3 -3
- package/lib/commonjs/core/BaseSDK/index.js.map +1 -1
- package/lib/commonjs/core/EnrollmentContainer/index.js +9 -10
- package/lib/commonjs/core/EnrollmentContainer/index.js.map +1 -1
- package/lib/commonjs/core/PaymentInlineContainer/index.js +5 -5
- package/lib/commonjs/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/commonjs/core/PaymentLiteContainer/index.js +12 -12
- package/lib/commonjs/core/PaymentLiteContainer/index.js.map +1 -1
- package/lib/commonjs/core/Tonder/index.js +5 -5
- package/lib/commonjs/core/Tonder/index.js.map +1 -1
- package/lib/commonjs/hooks/useTonder/index.js +1 -1
- package/lib/commonjs/hooks/useTonder/index.js.map +1 -1
- package/lib/commonjs/index.js +15 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/infrastructure/HttpClient.js +7 -8
- package/lib/commonjs/infrastructure/HttpClient.js.map +1 -1
- package/lib/commonjs/infrastructure/ServiceManager.js +12 -13
- package/lib/commonjs/infrastructure/ServiceManager.js.map +1 -1
- package/lib/commonjs/services/BusinessService.js +3 -3
- package/lib/commonjs/services/BusinessService.js.map +1 -1
- package/lib/commonjs/services/CardService.js +7 -8
- package/lib/commonjs/services/CardService.js.map +1 -1
- package/lib/commonjs/services/CheckoutService.js +11 -11
- package/lib/commonjs/services/CheckoutService.js.map +1 -1
- package/lib/commonjs/services/CustomerService.js +5 -5
- package/lib/commonjs/services/CustomerService.js.map +1 -1
- package/lib/commonjs/services/PaymentMethodService.js +3 -3
- package/lib/commonjs/services/PaymentMethodService.js.map +1 -1
- package/lib/commonjs/services/SkyflowService.js +4 -4
- package/lib/commonjs/services/SkyflowService.js.map +1 -1
- package/lib/commonjs/services/TokenService.js +4 -4
- package/lib/commonjs/services/TokenService.js.map +1 -1
- package/lib/commonjs/services/TransactionService.js +3 -3
- package/lib/commonjs/services/TransactionService.js.map +1 -1
- package/lib/commonjs/services/index.js +0 -11
- package/lib/commonjs/services/index.js.map +1 -1
- package/lib/commonjs/shared/catalog/cardBrandCatalog.js +1 -1
- package/lib/commonjs/shared/catalog/paymentMethodsCatalog.js +2 -2
- package/lib/commonjs/shared/constants/messages.js +90 -90
- package/lib/commonjs/shared/constants/messages.js.map +1 -1
- package/lib/commonjs/shared/utils/errors.js +2 -2
- package/lib/commonjs/shared/utils/errors.js.map +1 -1
- package/lib/commonjs/shared/utils/paymentMethodUtils.js +3 -3
- package/lib/commonjs/shared/utils/paymentMethodUtils.js.map +1 -1
- package/lib/commonjs/shared/utils/stringUtils.js +17 -1
- package/lib/commonjs/shared/utils/stringUtils.js.map +1 -1
- package/lib/commonjs/types/srn-temp.d.js +2 -0
- package/lib/commonjs/types/srn-temp.d.js.map +1 -0
- package/lib/commonjs/ui/components/Button/ProcessButton.js +1 -1
- package/lib/commonjs/ui/components/Button/ProcessButton.js.map +1 -1
- package/lib/commonjs/ui/components/CardForm/index.js +5 -5
- package/lib/commonjs/ui/components/CardForm/index.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardCVVInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js +5 -5
- package/lib/commonjs/ui/components/Input/CardExpirationDateInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardHolderInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardNumberInput.js +6 -4
- package/lib/commonjs/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js +4 -4
- package/lib/commonjs/ui/components/PaymentMethodsList/index.js.map +1 -1
- package/lib/commonjs/ui/components/SavedCardsList/index.js +6 -4
- package/lib/commonjs/ui/components/SavedCardsList/index.js.map +1 -1
- package/lib/commonjs/ui/features/TonderEnrollment/index.js +7 -7
- package/lib/commonjs/ui/features/TonderEnrollment/index.js.map +1 -1
- package/lib/commonjs/ui/features/TonderPayment/index.js +15 -15
- package/lib/commonjs/ui/features/TonderPayment/index.js.map +1 -1
- package/lib/commonjs/ui/providers/InnerProvider/index.js +1 -1
- package/lib/commonjs/ui/providers/InnerProvider/index.js.map +1 -1
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js +2 -2
- package/lib/commonjs/ui/providers/SkyflowContainerWrapper/index.js.map +1 -1
- package/lib/commonjs/ui/providers/TonderProvider/hook.js +1 -1
- package/lib/commonjs/ui/providers/TonderProvider/index.js +16 -16
- package/lib/commonjs/ui/providers/TonderProvider/index.js.map +1 -1
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js +3 -3
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js.map +1 -1
- package/lib/commonjs/ui/styles/skyflow.js +1 -1
- package/lib/module/core/3DSHandler.js +16 -11
- package/lib/module/core/3DSHandler.js.map +1 -1
- package/lib/module/core/BaseCheckout/index.js +8 -9
- package/lib/module/core/BaseCheckout/index.js.map +1 -1
- package/lib/module/core/BaseEnrollment/index.js +3 -4
- package/lib/module/core/BaseEnrollment/index.js.map +1 -1
- package/lib/module/core/BaseSDK/index.js +2 -2
- package/lib/module/core/BaseSDK/index.js.map +1 -1
- package/lib/module/core/EnrollmentContainer/index.js +4 -5
- package/lib/module/core/EnrollmentContainer/index.js.map +1 -1
- package/lib/module/core/PaymentInlineContainer/index.js +3 -3
- package/lib/module/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/module/core/PaymentLiteContainer/index.js +6 -6
- package/lib/module/core/PaymentLiteContainer/index.js.map +1 -1
- package/lib/module/core/Tonder/index.js +3 -3
- package/lib/module/core/Tonder/index.js.map +1 -1
- package/lib/module/hooks/useTonder/index.js +1 -1
- package/lib/module/hooks/useTonder/index.js.map +1 -1
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/infrastructure/HttpClient.js +2 -3
- package/lib/module/infrastructure/HttpClient.js.map +1 -1
- package/lib/module/infrastructure/ServiceManager.js +2 -3
- package/lib/module/infrastructure/ServiceManager.js.map +1 -1
- package/lib/module/services/BusinessService.js +2 -2
- package/lib/module/services/BusinessService.js.map +1 -1
- package/lib/module/services/CardService.js +2 -3
- package/lib/module/services/CardService.js.map +1 -1
- package/lib/module/services/CheckoutService.js +2 -2
- package/lib/module/services/CheckoutService.js.map +1 -1
- package/lib/module/services/CustomerService.js +2 -2
- package/lib/module/services/CustomerService.js.map +1 -1
- package/lib/module/services/PaymentMethodService.js +2 -2
- package/lib/module/services/PaymentMethodService.js.map +1 -1
- package/lib/module/services/SkyflowService.js +2 -2
- package/lib/module/services/SkyflowService.js.map +1 -1
- package/lib/module/services/TokenService.js +2 -2
- package/lib/module/services/TokenService.js.map +1 -1
- package/lib/module/services/TransactionService.js +2 -2
- package/lib/module/services/TransactionService.js.map +1 -1
- package/lib/module/services/index.js +0 -1
- package/lib/module/services/index.js.map +1 -1
- package/lib/module/shared/catalog/cardBrandCatalog.js +1 -1
- package/lib/module/shared/catalog/cardBrandCatalog.js.map +1 -1
- package/lib/module/shared/catalog/paymentMethodsCatalog.js +2 -2
- package/lib/module/shared/catalog/paymentMethodsCatalog.js.map +1 -1
- package/lib/module/shared/constants/messages.js +1 -1
- package/lib/module/shared/constants/messages.js.map +1 -1
- package/lib/module/shared/utils/errors.js +1 -1
- package/lib/module/shared/utils/errors.js.map +1 -1
- package/lib/module/shared/utils/paymentMethodUtils.js +2 -2
- package/lib/module/shared/utils/paymentMethodUtils.js.map +1 -1
- package/lib/module/shared/utils/stringUtils.js +15 -0
- package/lib/module/shared/utils/stringUtils.js.map +1 -1
- package/lib/module/types/srn-temp.d.js +2 -0
- package/lib/module/types/srn-temp.d.js.map +1 -0
- package/lib/module/ui/components/Button/ProcessButton.js +1 -1
- package/lib/module/ui/components/Button/ProcessButton.js.map +1 -1
- package/lib/module/ui/components/CardForm/index.js +5 -5
- package/lib/module/ui/components/CardForm/index.js.map +1 -1
- package/lib/module/ui/components/Input/CardCVVInput.js +5 -4
- package/lib/module/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationDateInput.js +5 -5
- package/lib/module/ui/components/Input/CardExpirationDateInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js +6 -5
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationYearInput.js +5 -4
- package/lib/module/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardHolderInput.js +5 -4
- package/lib/module/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardNumberInput.js +5 -4
- package/lib/module/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/module/ui/components/PaymentMethodsList/index.js +3 -3
- package/lib/module/ui/components/PaymentMethodsList/index.js.map +1 -1
- package/lib/module/ui/components/SavedCardsList/index.js +4 -3
- package/lib/module/ui/components/SavedCardsList/index.js.map +1 -1
- package/lib/module/ui/features/TonderEnrollment/index.js +6 -6
- package/lib/module/ui/features/TonderEnrollment/index.js.map +1 -1
- package/lib/module/ui/features/TonderPayment/index.js +11 -11
- package/lib/module/ui/features/TonderPayment/index.js.map +1 -1
- package/lib/module/ui/providers/InnerProvider/index.js +1 -1
- package/lib/module/ui/providers/InnerProvider/index.js.map +1 -1
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js +1 -1
- package/lib/module/ui/providers/SkyflowContainerWrapper/index.js.map +1 -1
- package/lib/module/ui/providers/TonderProvider/hook.js +1 -1
- package/lib/module/ui/providers/TonderProvider/hook.js.map +1 -1
- package/lib/module/ui/providers/TonderProvider/index.js +9 -9
- package/lib/module/ui/providers/TonderProvider/index.js.map +1 -1
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js +2 -2
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js.map +1 -1
- package/lib/module/ui/styles/skyflow.js +1 -1
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts +4 -4
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts +5 -5
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts +5 -5
- package/lib/typescript/commonjs/src/core/BaseEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/core/BaseSDK/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/core/EnrollmentContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/core/PaymentLiteContainer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/Tonder/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/core/Tonder/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useTonder/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/hooks/useTonder/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts +1 -1
- package/lib/typescript/commonjs/src/infrastructure/HttpClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/infrastructure/ServiceManager.d.ts +2 -3
- package/lib/typescript/commonjs/src/infrastructure/ServiceManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/BusinessService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/BusinessService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/CardService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/CardService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/CheckoutService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/CheckoutService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/CustomerService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/CustomerService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/PaymentMethodService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/PaymentMethodService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts +1 -1
- package/lib/typescript/commonjs/src/services/SkyflowService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/TokenService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/TokenService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/TransactionService.d.ts +2 -2
- package/lib/typescript/commonjs/src/services/TransactionService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/index.d.ts +0 -1
- package/lib/typescript/commonjs/src/services/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/shared/utils/common.d.ts +1 -1
- package/lib/typescript/commonjs/src/shared/utils/common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/shared/utils/stringUtils.d.ts +3 -0
- package/lib/typescript/commonjs/src/shared/utils/stringUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/shared/utils/styleUtils.d.ts +1 -1
- package/lib/typescript/commonjs/src/shared/utils/styleUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/base.d.ts +5 -5
- package/lib/typescript/commonjs/src/types/base.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/baseEnrollment.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/baseSDK.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/common.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/enrollment.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/enrollment.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts +3 -3
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts +3 -3
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Button/ProcessButton.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Button/ProcessButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/CardForm/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/RadioButton/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/RadioButton/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/SavedCardsList/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/providers/InnerProvider/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/context.d.ts +2 -2
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/hook.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/hook.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/uiWrapper.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/core/3DSHandler.d.ts +4 -4
- package/lib/typescript/module/src/core/3DSHandler.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts +5 -5
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts +5 -5
- package/lib/typescript/module/src/core/BaseEnrollment/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts +2 -2
- package/lib/typescript/module/src/core/BaseSDK/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts +4 -4
- package/lib/typescript/module/src/core/EnrollmentContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts +4 -4
- package/lib/typescript/module/src/core/PaymentInlineContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts +4 -4
- package/lib/typescript/module/src/core/PaymentLiteContainer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/Tonder/index.d.ts +2 -2
- package/lib/typescript/module/src/core/Tonder/index.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useTonder/index.d.ts +2 -2
- package/lib/typescript/module/src/hooks/useTonder/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/infrastructure/HttpClient.d.ts +1 -1
- package/lib/typescript/module/src/infrastructure/HttpClient.d.ts.map +1 -1
- package/lib/typescript/module/src/infrastructure/ServiceManager.d.ts +2 -3
- package/lib/typescript/module/src/infrastructure/ServiceManager.d.ts.map +1 -1
- package/lib/typescript/module/src/services/BusinessService.d.ts +2 -2
- package/lib/typescript/module/src/services/BusinessService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/CardService.d.ts +2 -2
- package/lib/typescript/module/src/services/CardService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/CheckoutService.d.ts +2 -2
- package/lib/typescript/module/src/services/CheckoutService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/CustomerService.d.ts +2 -2
- package/lib/typescript/module/src/services/CustomerService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/PaymentMethodService.d.ts +2 -2
- package/lib/typescript/module/src/services/PaymentMethodService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/SkyflowService.d.ts +1 -1
- package/lib/typescript/module/src/services/SkyflowService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/TokenService.d.ts +2 -2
- package/lib/typescript/module/src/services/TokenService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/TransactionService.d.ts +2 -2
- package/lib/typescript/module/src/services/TransactionService.d.ts.map +1 -1
- package/lib/typescript/module/src/services/index.d.ts +0 -1
- package/lib/typescript/module/src/services/index.d.ts.map +1 -1
- package/lib/typescript/module/src/shared/utils/common.d.ts +1 -1
- package/lib/typescript/module/src/shared/utils/common.d.ts.map +1 -1
- package/lib/typescript/module/src/shared/utils/stringUtils.d.ts +3 -0
- package/lib/typescript/module/src/shared/utils/stringUtils.d.ts.map +1 -1
- package/lib/typescript/module/src/shared/utils/styleUtils.d.ts +1 -1
- package/lib/typescript/module/src/shared/utils/styleUtils.d.ts.map +1 -1
- package/lib/typescript/module/src/types/base.d.ts +5 -5
- package/lib/typescript/module/src/types/base.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseCheckout.d.ts +2 -2
- package/lib/typescript/module/src/types/baseCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseEnrollment.d.ts +2 -2
- package/lib/typescript/module/src/types/baseEnrollment.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseSDK.d.ts +2 -2
- package/lib/typescript/module/src/types/baseSDK.d.ts.map +1 -1
- package/lib/typescript/module/src/types/common.d.ts +1 -1
- package/lib/typescript/module/src/types/common.d.ts.map +1 -1
- package/lib/typescript/module/src/types/enrollment.d.ts +1 -1
- package/lib/typescript/module/src/types/enrollment.d.ts.map +1 -1
- package/lib/typescript/module/src/types/inlineCheckout.d.ts +3 -3
- package/lib/typescript/module/src/types/inlineCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/liteCheckout.d.ts +3 -3
- package/lib/typescript/module/src/types/liteCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/threeDSHandler.d.ts +2 -2
- package/lib/typescript/module/src/types/threeDSHandler.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Button/ProcessButton.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Button/ProcessButton.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/CardForm/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationDateInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/PaymentMethodsList/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/RadioButton/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/RadioButton/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/SavedCardsList/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/providers/InnerProvider/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts +2 -2
- package/lib/typescript/module/src/ui/providers/SkyflowContainerWrapper/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/context.d.ts +2 -2
- package/lib/typescript/module/src/ui/providers/TonderProvider/context.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/hook.d.ts +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/hook.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/uiWrapper.d.ts +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -1
- package/package.json +24 -30
- package/src/core/3DSHandler.ts +23 -17
- package/src/core/BaseCheckout/index.ts +10 -11
- package/src/core/BaseEnrollment/index.ts +6 -7
- package/src/core/BaseSDK/index.ts +4 -4
- package/src/core/EnrollmentContainer/index.ts +7 -8
- package/src/core/PaymentInlineContainer/index.ts +6 -6
- package/src/core/PaymentLiteContainer/index.ts +9 -9
- package/src/core/Tonder/index.ts +4 -5
- package/src/hooks/useTonder/index.ts +2 -2
- package/src/index.tsx +23 -0
- package/src/infrastructure/HttpClient.ts +3 -4
- package/src/infrastructure/ServiceManager.ts +3 -6
- package/src/services/BusinessService.ts +4 -4
- package/src/services/CardService.ts +4 -5
- package/src/services/CheckoutService.ts +4 -4
- package/src/services/CustomerService.ts +4 -4
- package/src/services/PaymentMethodService.ts +4 -4
- package/src/services/SkyflowService.ts +3 -3
- package/src/services/TokenService.ts +4 -4
- package/src/services/TransactionService.ts +4 -4
- package/src/services/index.ts +0 -1
- package/src/shared/catalog/cardBrandCatalog.ts +1 -1
- package/src/shared/catalog/paymentMethodsCatalog.ts +2 -2
- package/src/shared/constants/messages.ts +1 -1
- package/src/shared/utils/common.ts +1 -1
- package/src/shared/utils/errors.ts +1 -1
- package/src/shared/utils/paymentMethodUtils.ts +2 -2
- package/src/shared/utils/stringUtils.ts +24 -0
- package/src/shared/utils/styleUtils.ts +1 -1
- package/src/types/base.ts +5 -5
- package/src/types/baseCheckout.ts +2 -3
- package/src/types/baseEnrollment.ts +2 -2
- package/src/types/baseSDK.ts +2 -2
- package/src/types/common.ts +1 -1
- package/src/types/enrollment.ts +1 -1
- package/src/types/inlineCheckout.ts +3 -3
- package/src/types/liteCheckout.ts +3 -3
- package/src/types/{skyflow-react-native.d.ts → srn-temp.d.ts} +1 -1
- package/src/types/threeDSHandler.ts +2 -2
- package/src/ui/components/Button/ProcessButton.tsx +2 -2
- package/src/ui/components/CardForm/index.tsx +6 -6
- package/src/ui/components/Input/CardCVVInput.tsx +6 -5
- package/src/ui/components/Input/CardExpirationDateInput.tsx +6 -6
- package/src/ui/components/Input/CardExpirationMonthInput.tsx +10 -6
- package/src/ui/components/Input/CardExpirationYearInput.tsx +6 -5
- package/src/ui/components/Input/CardHolderInput.tsx +6 -5
- package/src/ui/components/Input/CardNumberInput.tsx +6 -5
- package/src/ui/components/PaymentMethodsList/index.tsx +4 -4
- package/src/ui/components/RadioButton/index.tsx +1 -1
- package/src/ui/components/SavedCardsList/index.tsx +5 -4
- package/src/ui/features/TonderEnrollment/index.tsx +7 -7
- package/src/ui/features/TonderPayment/index.tsx +12 -12
- package/src/ui/providers/InnerProvider/index.tsx +2 -2
- package/src/ui/providers/SkyflowContainerWrapper/index.tsx +3 -3
- package/src/ui/providers/TonderProvider/context.tsx +3 -3
- package/src/ui/providers/TonderProvider/hook.ts +2 -2
- package/src/ui/providers/TonderProvider/index.tsx +10 -10
- package/src/ui/providers/TonderProvider/uiWrapper.ts +3 -3
- package/src/ui/styles/skyflow.ts +1 -1
- package/tonder-io-rn-sdk.podspec +41 -0
- package/.yarn/patches/skyflow-react-native-npm-1.7.0-0841655e49.patch +0 -13
- package/lib/commonjs/services/StorageService.js +0 -49
- package/lib/commonjs/services/StorageService.js.map +0 -1
- package/lib/commonjs/types/skyflow-react-native.d.js +0 -2
- package/lib/commonjs/types/skyflow-react-native.d.js.map +0 -1
- package/lib/module/services/StorageService.js +0 -43
- package/lib/module/services/StorageService.js.map +0 -1
- package/lib/module/types/skyflow-react-native.d.js +0 -2
- package/lib/module/types/skyflow-react-native.d.js.map +0 -1
- package/lib/typescript/commonjs/src/services/StorageService.d.ts +0 -7
- package/lib/typescript/commonjs/src/services/StorageService.d.ts.map +0 -1
- package/lib/typescript/module/src/services/StorageService.d.ts +0 -7
- package/lib/typescript/module/src/services/StorageService.d.ts.map +0 -1
- package/src/services/StorageService.ts +0 -56
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ICustomer, ICustomerResponse } from '
|
|
2
|
-
import TonderError from '
|
|
3
|
-
import { HttpClient } from '
|
|
4
|
-
import { ErrorKeyEnum } from '
|
|
1
|
+
import type { ICustomer, ICustomerResponse } from '../types';
|
|
2
|
+
import TonderError from '../shared/utils/errors';
|
|
3
|
+
import { HttpClient } from '../infrastructure';
|
|
4
|
+
import { ErrorKeyEnum } from '../shared';
|
|
5
5
|
|
|
6
6
|
export class CustomerService {
|
|
7
7
|
private readonly BASE_PATH = '/api/v1/customer/';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IPaymentMethodResponse } from '
|
|
2
|
-
import TonderError from '
|
|
3
|
-
import { HttpClient } from '
|
|
4
|
-
import { ErrorKeyEnum } from '
|
|
1
|
+
import type { IPaymentMethodResponse } from '../types';
|
|
2
|
+
import TonderError from '../shared/utils/errors';
|
|
3
|
+
import { HttpClient } from '../infrastructure';
|
|
4
|
+
import { ErrorKeyEnum } from '../shared';
|
|
5
5
|
|
|
6
6
|
export class PaymentMethodService {
|
|
7
7
|
private readonly BASE_PATH = '/api/v1/payment_methods';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import TonderError from '
|
|
2
|
-
import { HttpClient } from '
|
|
3
|
-
import { ErrorKeyEnum } from '
|
|
1
|
+
import TonderError from '../shared/utils/errors';
|
|
2
|
+
import { HttpClient } from '../infrastructure';
|
|
3
|
+
import { ErrorKeyEnum } from '../shared';
|
|
4
4
|
import type { IConfig } from 'skyflow-react-native';
|
|
5
5
|
import { Env, LogLevel } from 'skyflow-react-native';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IGetSecureTokenResponse } from '
|
|
2
|
-
import TonderError from '
|
|
3
|
-
import { HttpClient } from '
|
|
4
|
-
import { ErrorKeyEnum } from '
|
|
1
|
+
import type { IGetSecureTokenResponse } from '../types';
|
|
2
|
+
import TonderError from '../shared/utils/errors';
|
|
3
|
+
import { HttpClient } from '../infrastructure';
|
|
4
|
+
import { ErrorKeyEnum } from '../shared';
|
|
5
5
|
|
|
6
6
|
export class TokenService {
|
|
7
7
|
private readonly BASE_PATH = '/api/secure-token/';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ITransaction } from '
|
|
2
|
-
import TonderError from '
|
|
3
|
-
import { HttpClient } from '
|
|
4
|
-
import { ErrorKeyEnum } from '
|
|
1
|
+
import type { ITransaction } from '../types';
|
|
2
|
+
import TonderError from '../shared/utils/errors';
|
|
3
|
+
import { HttpClient } from '../infrastructure';
|
|
4
|
+
import { ErrorKeyEnum } from '../shared';
|
|
5
5
|
|
|
6
6
|
export class TransactionService {
|
|
7
7
|
private readonly http: HttpClient;
|
package/src/services/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PAYMENT_METHODS } from '
|
|
2
|
-
import { clearSpace } from '
|
|
1
|
+
import { PAYMENT_METHODS } from '../constants/paymentMethods';
|
|
2
|
+
import { clearSpace } from '../utils/stringUtils';
|
|
3
3
|
|
|
4
4
|
const PAYMENT_METHODS_CATALOG: {
|
|
5
5
|
[key: string]: { label: string; icon: string };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getPaymentMethodDetails } from '../catalog/paymentMethodsCatalog';
|
|
2
|
+
import { defaultTo, get } from './stringUtils';
|
|
3
3
|
|
|
4
4
|
export const getPaymentMethodsWithDetails = (response) => {
|
|
5
5
|
return defaultTo(get(response, 'results'), [])
|
|
@@ -1,3 +1,27 @@
|
|
|
1
1
|
export const clearSpace = (text: string) => {
|
|
2
2
|
return text.trim().replace(/\s+/g, '');
|
|
3
3
|
};
|
|
4
|
+
|
|
5
|
+
const defaultTo = (value, defaultValue) => {
|
|
6
|
+
return value == null || value === undefined ? defaultValue : value;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const get = (object, path, defaultValue = undefined) => {
|
|
11
|
+
if (object == null || object == undefined) return defaultValue;
|
|
12
|
+
|
|
13
|
+
const parts = Array.isArray(path)
|
|
14
|
+
? path
|
|
15
|
+
: path.split('.').reduce((parts, part) => {
|
|
16
|
+
part.replace(/\[([^\]]+)\]/g, '.$1').split('.').forEach(p => parts.push(p));
|
|
17
|
+
return parts;
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
const result = parts.reduce((obj, key) => {
|
|
21
|
+
return obj != null ? obj[key] : undefined;
|
|
22
|
+
}, object);
|
|
23
|
+
|
|
24
|
+
return result === undefined ? defaultValue : result;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { defaultTo, get };
|
package/src/types/base.ts
CHANGED
|
@@ -8,11 +8,11 @@ import type {
|
|
|
8
8
|
ILiteCheckoutState,
|
|
9
9
|
IPaymentInlineContainer,
|
|
10
10
|
IPaymentLiteContainer,
|
|
11
|
-
} from '
|
|
12
|
-
import type TonderError from '
|
|
13
|
-
import type PaymentInlineContainer from '
|
|
14
|
-
import type PaymentLiteContainer from '
|
|
15
|
-
import type { EnrollmentContainer } from '
|
|
11
|
+
} from '.';
|
|
12
|
+
import type TonderError from '../shared/utils/errors';
|
|
13
|
+
import type PaymentInlineContainer from '../core/PaymentInlineContainer';
|
|
14
|
+
import type PaymentLiteContainer from '../core/PaymentLiteContainer';
|
|
15
|
+
import type { EnrollmentContainer } from '../core/EnrollmentContainer';
|
|
16
16
|
|
|
17
17
|
export type Environment = 'production' | 'sandbox' | 'stage' | 'development';
|
|
18
18
|
|
|
@@ -11,10 +11,9 @@ import type {
|
|
|
11
11
|
ILiteCustomizationOptions,
|
|
12
12
|
IProcessPaymentRequest,
|
|
13
13
|
ITransaction,
|
|
14
|
-
} from '
|
|
14
|
+
} from '.';
|
|
15
15
|
import type { IConfig } from 'skyflow-react-native';
|
|
16
|
-
import { SDKType } from '
|
|
17
|
-
import type TonderError from '@shared/utils/errors';
|
|
16
|
+
import { SDKType } from './base';
|
|
18
17
|
|
|
19
18
|
export interface IBaseUIState {
|
|
20
19
|
card?: string;
|
|
@@ -4,9 +4,9 @@ import type {
|
|
|
4
4
|
ICustomer,
|
|
5
5
|
ICustomerResponse,
|
|
6
6
|
IEnrollmentCallbacks,
|
|
7
|
-
} from '
|
|
7
|
+
} from '.';
|
|
8
8
|
import type { IConfig } from 'skyflow-react-native';
|
|
9
|
-
import { SDKType } from '
|
|
9
|
+
import { SDKType } from './base';
|
|
10
10
|
|
|
11
11
|
export interface IBaseEnrollmentState extends IBaseState<SDKType.ENROLLMENT> {
|
|
12
12
|
customer?: ICustomer;
|
package/src/types/baseSDK.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Business, IBaseState, ICustomerResponse } from '
|
|
1
|
+
import type { Business, IBaseState, ICustomerResponse } from '.';
|
|
2
2
|
import type { IConfig } from 'skyflow-react-native';
|
|
3
|
-
import { SDKType } from '
|
|
3
|
+
import { SDKType } from './base';
|
|
4
4
|
|
|
5
5
|
export interface IBaseSDKState<T extends SDKType> extends IBaseState<T> {
|
|
6
6
|
customerData?: ICustomerResponse;
|
package/src/types/common.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IUIWrapper } from '
|
|
1
|
+
import type { IUIWrapper } from '../ui/providers/TonderProvider/uiWrapper';
|
|
2
2
|
import type { Environment, SDKInstance } from './base';
|
|
3
3
|
import type { IElementStyle } from './input';
|
|
4
4
|
import { SDKType } from './base';
|
package/src/types/enrollment.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { SDKType } from './base';
|
|
|
4
4
|
import type { ISaveCardResponse } from './card';
|
|
5
5
|
import type { IFormLabels, IFormPlaceholder, IStyles } from './common';
|
|
6
6
|
import type { ICustomer } from './customer';
|
|
7
|
-
import TonderError from '
|
|
7
|
+
import TonderError from '../shared/utils/errors';
|
|
8
8
|
|
|
9
9
|
export interface IEnrollmentOptions extends IBaseCreateOptions {
|
|
10
10
|
customer?: ICustomer;
|
|
@@ -11,9 +11,9 @@ import type {
|
|
|
11
11
|
IBaseProcessPaymentRequest,
|
|
12
12
|
IBaseCallback,
|
|
13
13
|
IBaseResponse,
|
|
14
|
-
} from '
|
|
15
|
-
import { SDKType } from '
|
|
16
|
-
import TonderError from '
|
|
14
|
+
} from '.';
|
|
15
|
+
import { SDKType } from './base';
|
|
16
|
+
import TonderError from '../shared/utils/errors';
|
|
17
17
|
|
|
18
18
|
export interface IInlineCheckoutOptions extends IBaseCreateOptions {
|
|
19
19
|
paymentData: IBaseProcessPaymentRequest;
|
|
@@ -10,9 +10,9 @@ import type {
|
|
|
10
10
|
IBaseCallback,
|
|
11
11
|
IInlineCallbacks,
|
|
12
12
|
IBaseResponse,
|
|
13
|
-
} from '
|
|
14
|
-
import { SDKType } from '
|
|
15
|
-
import TonderError from '
|
|
13
|
+
} from '.';
|
|
14
|
+
import { SDKType } from './base';
|
|
15
|
+
import TonderError from '../shared/utils/errors';
|
|
16
16
|
|
|
17
17
|
export interface ILiteCheckoutOptions extends IBaseCreateOptions {
|
|
18
18
|
paymentData: IProcessPaymentRequest;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ICheckoutResponse, ITransaction } from '
|
|
2
|
-
import type TonderError from '
|
|
1
|
+
import type { ICheckoutResponse, ITransaction } from '.';
|
|
2
|
+
import type TonderError from '../shared/utils/errors';
|
|
3
3
|
|
|
4
4
|
export interface IThreeDSHandler {
|
|
5
5
|
verifyTransaction(): Promise<ITransaction>;
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
ActivityIndicator,
|
|
6
6
|
StyleSheet,
|
|
7
7
|
} from 'react-native';
|
|
8
|
-
import type { StylesBaseVariant } from '
|
|
9
|
-
import { buildBaseStyleText } from '
|
|
8
|
+
import type { StylesBaseVariant } from '../../../types';
|
|
9
|
+
import { buildBaseStyleText } from '../../../shared/utils/styleUtils';
|
|
10
10
|
|
|
11
11
|
interface PayButtonProps {
|
|
12
12
|
text: string;
|
|
@@ -5,12 +5,12 @@ import type {
|
|
|
5
5
|
IFormLabels,
|
|
6
6
|
IFormPlaceholder,
|
|
7
7
|
StylesBaseVariant,
|
|
8
|
-
} from '
|
|
9
|
-
import { CardHolderInput } from '
|
|
10
|
-
import { CardNumberInput } from '
|
|
11
|
-
import { CardCVVInput } from '
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
} from '../../../types';
|
|
9
|
+
import { CardHolderInput } from '../Input/CardHolderInput';
|
|
10
|
+
import { CardNumberInput } from '../Input/CardNumberInput';
|
|
11
|
+
import { CardCVVInput } from '../Input/CardCVVInput';
|
|
12
|
+
import { CardExpirationDateInput } from '../Input/CardExpirationDateInput';
|
|
13
|
+
import { CheckBox } from '../Checkbox/Checkbox';
|
|
14
14
|
|
|
15
15
|
interface NewCardFormProps {
|
|
16
16
|
showSaveOption?: boolean;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { CvvElement } from 'skyflow-react-native';
|
|
2
3
|
import React, { useState } from 'react';
|
|
3
|
-
import type { InputProps } from '
|
|
4
|
+
import type { InputProps } from '../../../types';
|
|
4
5
|
import {
|
|
5
6
|
DEFAULT_SKYFLOW_lABELS,
|
|
6
7
|
DEFAULT_SKYFLOW_PLACEHOLDERS,
|
|
7
8
|
getErrorField,
|
|
8
9
|
regexMatchRule,
|
|
9
|
-
} from '
|
|
10
|
+
} from '../../../shared/constants/skyflow';
|
|
10
11
|
import { Text, View } from 'react-native';
|
|
11
|
-
import { DEFAULT_INPUT_CONTAINER_STYLES } from '
|
|
12
|
+
import { DEFAULT_INPUT_CONTAINER_STYLES } from '../../styles/payment';
|
|
12
13
|
import {
|
|
13
14
|
DEFAULT_SKYFLOW_ERROR_TEXT_STYLES,
|
|
14
15
|
DEFAULT_SKYFLOW_INPUT_STYLES,
|
|
15
16
|
DEFAULT_SKYFLOW_lABEL_STYLES,
|
|
16
17
|
SKYFLOW_HIDDEN_ERROR_TEXT_STYLES,
|
|
17
|
-
} from '
|
|
18
|
-
import useTonderContext from '
|
|
18
|
+
} from '../../styles/skyflow';
|
|
19
|
+
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
19
20
|
|
|
20
21
|
export const CardCVVInput: React.FC<InputProps> = ({
|
|
21
22
|
placeholder = DEFAULT_SKYFLOW_PLACEHOLDERS.cvvPlaceholder,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { IElementStyle } from '
|
|
3
|
+
import type { IElementStyle } from '../../../types';
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_SKYFLOW_lABELS,
|
|
6
6
|
DEFAULT_SKYFLOW_PLACEHOLDERS,
|
|
7
|
-
} from '
|
|
7
|
+
} from '../../../shared/constants/skyflow';
|
|
8
8
|
import { StyleSheet, Text, View } from 'react-native';
|
|
9
9
|
import type { StyleProp, TextStyle } from 'react-native';
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_SKYFLOW_INPUT_STYLES,
|
|
12
12
|
DEFAULT_SKYFLOW_lABEL_STYLES,
|
|
13
|
-
} from '
|
|
14
|
-
import { DEFAULT_INPUT_CONTAINER_STYLES } from '
|
|
15
|
-
import { CardExpirationMonthInput } from '
|
|
16
|
-
import { CardExpirationYearInput } from '
|
|
13
|
+
} from '../../styles/skyflow';
|
|
14
|
+
import { DEFAULT_INPUT_CONTAINER_STYLES } from '../../styles/payment';
|
|
15
|
+
import { CardExpirationMonthInput } from './CardExpirationMonthInput';
|
|
16
|
+
import { CardExpirationYearInput } from './CardExpirationYearInput';
|
|
17
17
|
|
|
18
18
|
export interface InputExpiryDateProps {
|
|
19
19
|
label?: string;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
|
-
import type { InputProps } from '
|
|
3
|
+
import type { InputProps } from '../../../types';
|
|
3
4
|
import { ExpirationMonthElement } from 'skyflow-react-native';
|
|
4
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
getErrorField,
|
|
7
|
+
regexMatchRule,
|
|
8
|
+
} from '../../../shared/constants/skyflow';
|
|
5
9
|
import {
|
|
6
10
|
DEFAULT_SKYFLOW_lABELS,
|
|
7
11
|
DEFAULT_SKYFLOW_PLACEHOLDERS,
|
|
8
|
-
} from '
|
|
12
|
+
} from '../../../shared/constants/skyflow';
|
|
9
13
|
import { Text, View } from 'react-native';
|
|
10
|
-
import { DEFAULT_INPUT_CONTAINER_STYLES } from '
|
|
14
|
+
import { DEFAULT_INPUT_CONTAINER_STYLES } from '../../styles/payment';
|
|
11
15
|
import {
|
|
12
16
|
DEFAULT_SKYFLOW_ERROR_TEXT_STYLES,
|
|
13
17
|
DEFAULT_SKYFLOW_INPUT_STYLES,
|
|
14
18
|
DEFAULT_SKYFLOW_lABEL_STYLES,
|
|
15
19
|
SKYFLOW_HIDDEN_ERROR_TEXT_STYLES,
|
|
16
|
-
} from '
|
|
17
|
-
import useTonderContext from '
|
|
20
|
+
} from '../../styles/skyflow';
|
|
21
|
+
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
18
22
|
|
|
19
23
|
export const CardExpirationMonthInput: React.FC<InputProps> = ({
|
|
20
24
|
placeholder = DEFAULT_SKYFLOW_PLACEHOLDERS.expiryMonthPlaceholder,
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
|
-
import type { InputProps } from '
|
|
3
|
+
import type { InputProps } from '../../../types';
|
|
3
4
|
import { ExpirationYearElement } from 'skyflow-react-native';
|
|
4
5
|
import {
|
|
5
6
|
getErrorField,
|
|
6
7
|
regexMatchRule,
|
|
7
8
|
DEFAULT_SKYFLOW_lABELS,
|
|
8
9
|
DEFAULT_SKYFLOW_PLACEHOLDERS,
|
|
9
|
-
} from '
|
|
10
|
+
} from '../../../shared/constants/skyflow';
|
|
10
11
|
import { Text, View } from 'react-native';
|
|
11
|
-
import { DEFAULT_INPUT_CONTAINER_STYLES } from '
|
|
12
|
+
import { DEFAULT_INPUT_CONTAINER_STYLES } from '../../styles/payment';
|
|
12
13
|
import {
|
|
13
14
|
DEFAULT_SKYFLOW_ERROR_TEXT_STYLES,
|
|
14
15
|
DEFAULT_SKYFLOW_INPUT_STYLES,
|
|
15
16
|
DEFAULT_SKYFLOW_lABEL_STYLES,
|
|
16
17
|
SKYFLOW_HIDDEN_ERROR_TEXT_STYLES,
|
|
17
|
-
} from '
|
|
18
|
-
import useTonderContext from '
|
|
18
|
+
} from '../../styles/skyflow';
|
|
19
|
+
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
19
20
|
|
|
20
21
|
export const CardExpirationYearInput: React.FC<InputProps> = ({
|
|
21
22
|
placeholder = DEFAULT_SKYFLOW_PLACEHOLDERS.expiryYearPlaceholder,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
|
-
import type { InputProps } from '
|
|
3
|
+
import type { InputProps } from '../../../types';
|
|
3
4
|
import {
|
|
4
5
|
getErrorField,
|
|
5
6
|
lengthMatchRule,
|
|
6
7
|
regexMatchRule,
|
|
7
8
|
DEFAULT_SKYFLOW_lABELS,
|
|
8
9
|
DEFAULT_SKYFLOW_PLACEHOLDERS,
|
|
9
|
-
} from '
|
|
10
|
+
} from '../../../shared/constants/skyflow';
|
|
10
11
|
import { Text, View } from 'react-native';
|
|
11
12
|
import { CardHolderNameElement } from 'skyflow-react-native';
|
|
12
13
|
import {
|
|
@@ -14,9 +15,9 @@ import {
|
|
|
14
15
|
DEFAULT_SKYFLOW_INPUT_STYLES,
|
|
15
16
|
DEFAULT_SKYFLOW_lABEL_STYLES,
|
|
16
17
|
SKYFLOW_HIDDEN_ERROR_TEXT_STYLES,
|
|
17
|
-
} from '
|
|
18
|
-
import { DEFAULT_INPUT_CONTAINER_STYLES } from '
|
|
19
|
-
import useTonderContext from '
|
|
18
|
+
} from '../../styles/skyflow';
|
|
19
|
+
import { DEFAULT_INPUT_CONTAINER_STYLES } from '../../styles/payment';
|
|
20
|
+
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
20
21
|
|
|
21
22
|
export const CardHolderInput: React.FC<InputProps> = ({
|
|
22
23
|
placeholder = DEFAULT_SKYFLOW_PLACEHOLDERS.namePlaceholder,
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
|
-
import type { InputProps } from '
|
|
3
|
+
import type { InputProps } from '../../../types';
|
|
3
4
|
import { CardNumberElement } from 'skyflow-react-native';
|
|
4
5
|
import {
|
|
5
6
|
getErrorField,
|
|
6
7
|
regexMatchRule,
|
|
7
8
|
DEFAULT_SKYFLOW_lABELS,
|
|
8
9
|
DEFAULT_SKYFLOW_PLACEHOLDERS,
|
|
9
|
-
} from '
|
|
10
|
+
} from '../../../shared/constants/skyflow';
|
|
10
11
|
import { Text, View } from 'react-native';
|
|
11
|
-
import { DEFAULT_INPUT_CONTAINER_STYLES } from '
|
|
12
|
+
import { DEFAULT_INPUT_CONTAINER_STYLES } from '../../styles/payment';
|
|
12
13
|
import {
|
|
13
14
|
DEFAULT_SKYFLOW_ERROR_TEXT_STYLES,
|
|
14
15
|
DEFAULT_SKYFLOW_INPUT_STYLES,
|
|
15
16
|
DEFAULT_SKYFLOW_lABEL_STYLES,
|
|
16
17
|
SKYFLOW_HIDDEN_ERROR_TEXT_STYLES,
|
|
17
|
-
} from '
|
|
18
|
-
import useTonderContext from '
|
|
18
|
+
} from '../../styles/skyflow';
|
|
19
|
+
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
19
20
|
|
|
20
21
|
export const CardNumberInput: React.FC<InputProps> = ({
|
|
21
22
|
placeholder = DEFAULT_SKYFLOW_PLACEHOLDERS.cardPlaceholder,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, StyleSheet, Text, Image, ScrollView } from 'react-native';
|
|
3
|
-
import type { IPaymentMethod, StylesSelectVariant } from '
|
|
4
|
-
import { getPaymentMethodDetails } from '
|
|
5
|
-
import { RadioButton } from '
|
|
6
|
-
import { buildBaseStyleText } from '
|
|
3
|
+
import type { IPaymentMethod, StylesSelectVariant } from '../../../types';
|
|
4
|
+
import { getPaymentMethodDetails } from '../../../shared/catalog/paymentMethodsCatalog';
|
|
5
|
+
import { RadioButton } from '../RadioButton';
|
|
6
|
+
import { buildBaseStyleText } from '../../../shared/utils/styleUtils';
|
|
7
7
|
|
|
8
8
|
interface PaymentMethodsListProps {
|
|
9
9
|
methods: IPaymentMethod[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// RadioButton.tsx
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { View, TouchableOpacity, StyleSheet } from 'react-native';
|
|
4
|
-
import type { StylesBaseVariant } from '
|
|
4
|
+
import type { StylesBaseVariant } from '../../../types';
|
|
5
5
|
|
|
6
6
|
interface RadioButtonProps {
|
|
7
7
|
value: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import {
|
|
3
4
|
View,
|
|
@@ -7,11 +8,11 @@ import {
|
|
|
7
8
|
Image,
|
|
8
9
|
ActivityIndicator,
|
|
9
10
|
} from 'react-native';
|
|
10
|
-
import { getCardType } from '
|
|
11
|
-
import { RadioButton } from '
|
|
12
|
-
import type { ICard, StylesSavedCardsVariant } from '
|
|
11
|
+
import { getCardType } from '../../../shared/catalog/cardBrandCatalog';
|
|
12
|
+
import { RadioButton } from '../RadioButton';
|
|
13
|
+
import type { ICard, StylesSavedCardsVariant } from '../../../types';
|
|
13
14
|
import { Trash2 } from 'lucide-react-native';
|
|
14
|
-
import { buildBaseStyleText } from '
|
|
15
|
+
import { buildBaseStyleText } from '../../../shared/utils/styleUtils';
|
|
15
16
|
|
|
16
17
|
interface SavedCardsListProps {
|
|
17
18
|
cards: ICard[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
-
import { ProcessButton } from '
|
|
4
|
-
import { NewCardForm } from '
|
|
5
|
-
import CardFormSkeleton from '
|
|
6
|
-
import { DEFAULT_PAYMENT_CONTAINER } from '
|
|
7
|
-
import { buildBaseStyleText } from '
|
|
8
|
-
import useTonderContext from '
|
|
9
|
-
import { SDKType } from '
|
|
3
|
+
import { ProcessButton } from '../../components/Button/ProcessButton';
|
|
4
|
+
import { NewCardForm } from '../../components/CardForm';
|
|
5
|
+
import CardFormSkeleton from '../../components/Skeleton/CardFormSkeleton';
|
|
6
|
+
import { DEFAULT_PAYMENT_CONTAINER } from '../../styles/payment';
|
|
7
|
+
import { buildBaseStyleText } from '../../../shared/utils/styleUtils';
|
|
8
|
+
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
9
|
+
import { SDKType } from '../../../types';
|
|
10
10
|
|
|
11
11
|
export interface ITonderEnrollmentProps {}
|
|
12
12
|
const TonderEnrollment: React.FC<ITonderEnrollmentProps> = () => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Image, StyleSheet, Text, View } from 'react-native';
|
|
3
|
-
import SavedCardsList from '
|
|
4
|
-
import { ProcessButton } from '
|
|
5
|
-
import PaymentMethodsList from '
|
|
6
|
-
import { NewCardForm } from '
|
|
7
|
-
import { RadioButton } from '
|
|
8
|
-
import { getCardType } from '
|
|
9
|
-
import CardFormSkeleton from '
|
|
10
|
-
import { DEFAULT_PAYMENT_CONTAINER } from '
|
|
11
|
-
import { buildBaseStyleText } from '
|
|
12
|
-
import { toCurrency } from '
|
|
13
|
-
import useTonderContext from '
|
|
14
|
-
import { SDKType } from '
|
|
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 '../../styles/payment';
|
|
11
|
+
import { buildBaseStyleText } from '../../../shared/utils/styleUtils';
|
|
12
|
+
import { toCurrency } from '../../../shared/utils/numberUtils';
|
|
13
|
+
import useTonderContext from '../../providers/TonderProvider/hook';
|
|
14
|
+
import { SDKType } from '../../../types';
|
|
15
15
|
|
|
16
16
|
export interface ITonderPaymentProps {}
|
|
17
17
|
const TonderPayment: React.FC<ITonderPaymentProps> = () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ITonderContext, SDKType } from '
|
|
4
|
-
import { tonderContext } from '
|
|
3
|
+
import { ITonderContext, SDKType } from '../../../types';
|
|
4
|
+
import { tonderContext } from '../TonderProvider/context';
|
|
5
5
|
|
|
6
6
|
interface InnerProviderProps {
|
|
7
7
|
children: React.ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { useCollectContainer } from 'skyflow-react-native';
|
|
3
|
-
import InnerProvider from '
|
|
4
|
-
import type { ITonderContext } from '
|
|
5
|
-
import { SDKType } from '
|
|
3
|
+
import InnerProvider from '../InnerProvider';
|
|
4
|
+
import type { ITonderContext } from '../../../types';
|
|
5
|
+
import { SDKType } from '../../../types';
|
|
6
6
|
|
|
7
7
|
interface SkyflowContainerWrapperProps {
|
|
8
8
|
children: React.ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { ITonderContext, SDKInstance } from '
|
|
4
|
-
import { SDKType } from '
|
|
5
|
-
import { IUIWrapper } from '
|
|
3
|
+
import type { ITonderContext, SDKInstance } from '../../../types';
|
|
4
|
+
import { SDKType } from '../../../types';
|
|
5
|
+
import { IUIWrapper } from './uiWrapper';
|
|
6
6
|
|
|
7
7
|
export const tonderContext = React.createContext<ITonderContext<SDKType>>({
|
|
8
8
|
sdk: {} as SDKInstance<SDKType>,
|