@paykka/card-checkout-ui 0.17.0 → 0.21.0
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/dist/card-checkout-ui.js +22 -22
- package/dist/card-checkout-ui.umd.cjs +22 -22
- package/dist/es/api/http.js +1 -0
- package/dist/es/api/index.js +1 -0
- package/dist/es/api/modules/checkout/map.js +12 -15
- package/dist/es/api/modules/get-browser-params.js +1 -1
- package/dist/es/api/modules/index.js +1 -0
- package/dist/es/api/utils/index.js +1 -0
- package/dist/es/components/AccordionItem/AccordionItem.js +1 -0
- package/dist/es/components/AddressField/index.js +1 -0
- package/dist/es/components/ApplePay/index.js +1 -0
- package/dist/es/components/CPFField/index.js +1 -0
- package/dist/es/components/Card/index.js +62 -46
- package/dist/es/components/CardBrands/index.js +1 -0
- package/dist/es/components/CardExpireDateField/index.js +1 -0
- package/dist/es/components/CardHolderNameField/index.js +1 -0
- package/dist/es/components/CardNo/index.js +1 -0
- package/dist/es/components/CardNumberField/index.js +1 -0
- package/dist/es/components/CardSecurityCodeField/index.js +1 -0
- package/dist/es/components/CardSelector/index.js +1 -0
- package/dist/es/components/CombinedCardInfo/index.js +1 -0
- package/dist/es/components/DropIn/index.js +87 -7
- package/dist/es/components/EmailField/EmailField.js +11 -1
- package/dist/es/components/EncryptedCard/index.js +1 -0
- package/dist/es/components/GooglePay/index.js +1 -0
- package/dist/es/components/GuideCard/index.js +8 -43
- package/dist/es/components/{CardIBANField → IBANField}/index.js +7 -5
- package/dist/es/components/PaymentButton/index.js +1 -0
- package/dist/es/components/SecuredFieldsProvider/index.js +1 -0
- package/dist/es/components/Sepa/index.js +142 -250
- package/dist/es/components/SubmitButton/index.js +1 -0
- package/dist/es/components/ThreeDS/index.js +1 -0
- package/dist/es/components/Tip/index.js +1 -0
- package/dist/es/components/business/BlikCodeField/BlikCodeField.js +2 -1
- package/dist/es/components/business/BlikCodeField/index.js +2 -1
- package/dist/es/components/business/NameField/NameField.js +1 -0
- package/dist/es/components/business/NameField/index.js +1 -0
- package/dist/es/components/business/{BlikConfirmModal/BlikConfirmModal.js → PaymentConfirmModal/PaymentConfirmModal.js} +8 -7
- package/dist/es/components/business/{BlikConfirmModal → PaymentConfirmModal}/index.js +2 -1
- package/dist/es/components/business/PhoneField/PhoneField.js +52 -27
- package/dist/es/components/business/PhoneField/area-codes.js +458 -0
- package/dist/es/components/business/PhoneField/config.js +2 -1
- package/dist/es/components/business/PhoneField/index.js +1 -0
- package/dist/es/components/business/QRCodeContent/QRCodeContent.js +68 -0
- package/dist/es/components/business/QRCodeContent/index.js +8 -0
- package/dist/es/components/business/QRCodeModal/QRCodeModal.js +6 -44
- package/dist/es/components/business/QRCodeModal/index.js +3 -1
- package/dist/es/components/business/SegmentedDigitInput/format.js +1 -0
- package/dist/es/components/business/SegmentedDigitInput/index.js +1 -0
- package/dist/es/components/business/Tooltip/{Tooltip.js → Tooltip2.js} +2 -1
- package/dist/es/components/business/Tooltip/index.js +2 -1
- package/dist/es/components/business/index.js +5 -3
- package/dist/es/components/index.js +11 -1
- package/dist/es/components/internal/Accordion/accordionTransition.js +1 -0
- package/dist/es/components/internal/Accordion/index.js +1 -0
- package/dist/es/components/internal/Button/Button2.js +3 -2
- package/dist/es/components/internal/Button/index.js +1 -0
- package/dist/es/components/internal/CheckBox/CheckBox.js +1 -0
- package/dist/es/components/internal/CheckBox/index.js +1 -0
- package/dist/es/components/internal/Form/Form.js +1 -0
- package/dist/es/components/internal/Form/FormItem.js +1 -0
- package/dist/es/components/internal/Form/type.js +1 -0
- package/dist/es/components/internal/Info/Info.js +1 -0
- package/dist/es/components/internal/Info/index.js +1 -0
- package/dist/es/components/internal/Input/Input.js +1 -0
- package/dist/es/components/internal/Input/type.js +1 -0
- package/dist/es/components/internal/Loading/Loading2.js +1 -0
- package/dist/es/components/internal/Loading/index.js +1 -0
- package/dist/es/components/internal/LoadingCheck/LoadingCheck.js +1 -0
- package/dist/es/components/internal/LoadingCheck/index.js +1 -0
- package/dist/es/components/internal/Modal/Modal.js +1 -0
- package/dist/es/components/internal/QRCode/QRCode.js +1 -0
- package/dist/es/components/internal/QRCode/index.js +1 -0
- package/dist/es/components/internal/Select/Select.js +1 -0
- package/dist/es/components/internal/Select/SelectMenu.js +1 -0
- package/dist/es/components/internal/Select/SelectMenuItem.js +1 -0
- package/dist/es/components/internal/icons/Icon3DSFail.js +1 -0
- package/dist/es/components/internal/icons/Icon3DSInfo.js +1 -0
- package/dist/es/components/internal/icons/Icon3DSSuccess.js +1 -0
- package/dist/es/components/internal/icons/IconAdd.js +1 -0
- package/dist/es/components/internal/icons/IconAlipay.js +43 -0
- package/dist/es/components/internal/icons/IconAlipayHK.js +66 -0
- package/dist/es/components/internal/icons/IconAlipayPlus.js +1 -0
- package/dist/es/components/internal/icons/IconAmex.js +1 -0
- package/dist/es/components/internal/icons/IconArrowDown.js +1 -0
- package/dist/es/components/internal/icons/IconBancomatPay.js +1 -0
- package/dist/es/components/internal/icons/IconBancontact.js +16 -71
- package/dist/es/components/internal/icons/IconBizum.js +1 -0
- package/dist/es/components/internal/icons/IconBlik.js +60 -542
- package/dist/es/components/internal/icons/IconBoost.js +14 -40
- package/dist/es/components/internal/icons/IconCard.js +1 -0
- package/dist/es/components/internal/icons/IconCard2.js +1 -0
- package/dist/es/components/internal/icons/IconCardNo.js +1 -0
- package/dist/es/components/internal/icons/IconDinnersClub.js +1 -0
- package/dist/es/components/internal/icons/IconDiscover.js +1 -0
- package/dist/es/components/internal/icons/IconDoku.js +31 -0
- package/dist/es/components/internal/icons/IconDragonPay.js +1 -0
- package/dist/es/components/internal/icons/IconEPS.js +1 -0
- package/dist/es/components/internal/icons/IconError.js +1 -0
- package/dist/es/components/internal/icons/IconFpx.js +31 -15
- package/dist/es/components/internal/icons/IconGCash.js +1 -0
- package/dist/es/components/internal/icons/IconGcashComplete.js +1 -0
- package/dist/es/components/internal/icons/IconGoPay.js +31 -0
- package/dist/es/components/internal/icons/IconGrabPay.js +1 -0
- package/dist/es/components/internal/icons/IconIdeal.js +1 -0
- package/dist/es/components/internal/icons/IconInfo.js +1 -0
- package/dist/es/components/internal/icons/IconJcb.js +1 -0
- package/dist/es/components/internal/icons/IconJenius.js +28 -0
- package/dist/es/components/internal/icons/IconLinePay.js +1 -0
- package/dist/es/components/internal/icons/IconLinkAja.js +44 -0
- package/dist/es/components/internal/icons/IconMasterCard.js +1 -0
- package/dist/es/components/internal/icons/IconMayBankQRPay.js +1 -0
- package/dist/es/components/internal/icons/IconMbWay.js +1 -0
- package/dist/es/components/internal/icons/IconMultibanco.js +1 -0
- package/dist/es/components/internal/icons/IconMyBank.js +2 -1
- package/dist/es/components/internal/icons/IconNinePay.js +1 -0
- package/dist/es/components/internal/icons/IconNuPay.js +31 -0
- package/dist/es/components/internal/icons/IconOnlineBankingEstonia.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingFinland.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingIndonesia.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingLatvia.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingLithuania.js +1 -0
- package/dist/es/components/internal/icons/IconOnlineBankingThailand.js +1 -0
- package/dist/es/components/internal/icons/IconOpayWallet.js +1 -0
- package/dist/es/components/internal/icons/IconOvo.js +1 -0
- package/dist/es/components/internal/icons/IconP24.js +1 -0
- package/dist/es/components/internal/icons/IconPagaWallet.js +1 -0
- package/dist/es/components/internal/icons/IconPayByBank.js +3 -17
- package/dist/es/components/internal/icons/IconPayU.js +1 -0
- package/dist/es/components/internal/icons/IconPaymaya.js +1 -0
- package/dist/es/components/internal/icons/IconPhone.js +1 -0
- package/dist/es/components/internal/icons/IconPicPay.js +1 -0
- package/dist/es/components/internal/icons/IconPix.js +1 -0
- package/dist/es/components/internal/icons/IconRedirect.js +1 -0
- package/dist/es/components/internal/icons/IconSafe.js +1 -0
- package/dist/es/components/internal/icons/IconSatispay.js +1 -0
- package/dist/es/components/internal/icons/IconScan.js +1 -0
- package/dist/es/components/internal/icons/IconSepa.js +36 -0
- package/dist/es/components/internal/icons/IconShopeePay.js +1 -0
- package/dist/es/components/internal/icons/IconSkrill.js +1 -0
- package/dist/es/components/internal/icons/IconSuccess.js +1 -0
- package/dist/es/components/internal/icons/IconSwish.js +35 -0
- package/dist/es/components/internal/icons/IconSwitch.js +1 -0
- package/dist/es/components/internal/icons/IconTNGWallet.js +1 -0
- package/dist/es/components/internal/icons/IconTick.js +1 -0
- package/dist/es/components/internal/icons/IconTrustly.js +1 -0
- package/dist/es/components/internal/icons/IconTwint.js +54 -0
- package/dist/es/components/internal/icons/IconUnionPay.js +1 -0
- package/dist/es/components/internal/icons/IconUpi.js +6 -15
- package/dist/es/components/internal/icons/IconVietqr.js +1 -0
- package/dist/es/components/internal/icons/IconVietqrComplete.js +1 -0
- package/dist/es/components/internal/icons/IconVisa.js +1 -0
- package/dist/es/components/internal/icons/IconWechatPayGlobal.js +1 -0
- package/dist/es/components/internal/icons/IconWechatPayGlobalComplete.js +1 -0
- package/dist/es/components/internal/icons/IconZalopay.js +1 -0
- package/dist/es/components/internal/icons/IconZalopayComplete.js +1 -0
- package/dist/es/components/internal/icons/iconChecked.js +1 -0
- package/dist/es/components/internal/icons/index.js +1 -0
- package/dist/es/components/wallets/Alipay/Alipay.js +148 -0
- package/dist/es/components/wallets/Alipay/index.js +1 -0
- package/dist/es/components/wallets/Alipay/type.js +1 -0
- package/dist/es/components/wallets/AlipayHK/AlipayHK.js +148 -0
- package/dist/es/components/wallets/AlipayHK/alipay-hk.js +1 -0
- package/dist/es/components/wallets/AlipayHK/index.js +1 -0
- package/dist/es/components/wallets/AlipayHK/type.js +1 -0
- package/dist/es/components/wallets/{AliPay/AliPay.js → AlipayPlus/AlipayPlus.js} +18 -19
- package/dist/es/components/wallets/AlipayPlus/ali-pay-plus.js +1 -0
- package/dist/es/components/wallets/AlipayPlus/index.js +1 -0
- package/dist/es/components/wallets/AlipayPlus/type.js +1 -0
- package/dist/es/components/wallets/BancomatPay/BancomatPay.js +9 -9
- package/dist/es/components/wallets/Bancontact/Bancontact.js +18 -17
- package/dist/es/components/wallets/Bizum/Bizum.js +9 -9
- package/dist/es/components/wallets/Blik/Blik.js +20 -19
- package/dist/es/components/wallets/Boost/Boost.js +10 -10
- package/dist/es/components/wallets/Doku/Doku.js +208 -0
- package/dist/es/components/wallets/Doku/doku2.js +1 -0
- package/dist/es/components/wallets/Doku/index.js +1 -0
- package/dist/es/components/wallets/Doku/type.js +1 -0
- package/dist/es/components/wallets/DragonPay/DragonPay.js +10 -10
- package/dist/es/components/wallets/EPS/EPS.js +24 -29
- package/dist/es/components/wallets/Fpx/Fpx.js +10 -10
- package/dist/es/components/wallets/GCash/GCash.js +15 -13
- package/dist/es/components/wallets/GoPay/GoPay.js +197 -0
- package/dist/es/components/wallets/GoPay/go-pay.js +1 -0
- package/dist/es/components/wallets/GoPay/index.js +1 -0
- package/dist/es/components/wallets/GoPay/type.js +1 -0
- package/dist/es/components/wallets/GrabPay/GrabPay.js +10 -10
- package/dist/es/components/wallets/IDeal/IDeal.js +21 -19
- package/dist/es/components/wallets/Jenius/Jenius.js +208 -0
- package/dist/es/components/wallets/Jenius/index.js +1 -0
- package/dist/es/components/wallets/Jenius/jenius2.js +1 -0
- package/dist/es/components/wallets/Jenius/type.js +1 -0
- package/dist/es/components/wallets/LinePay/LinePay.js +10 -10
- package/dist/es/components/wallets/LinkAja/LinkAja.js +208 -0
- package/dist/es/components/wallets/LinkAja/index.js +1 -0
- package/dist/es/components/wallets/LinkAja/link-aja.js +1 -0
- package/dist/es/components/wallets/LinkAja/type.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +10 -10
- package/dist/es/components/wallets/MbWay/MbWay.js +10 -10
- package/dist/es/components/wallets/Multibanco/Multibanco.js +10 -10
- package/dist/es/components/wallets/MyBank/MyBank.js +11 -11
- package/dist/es/components/wallets/NinePay/NinePay.js +10 -10
- package/dist/es/components/wallets/NuPay/NuPay.js +298 -0
- package/dist/es/components/wallets/NuPay/index.js +1 -0
- package/dist/es/components/wallets/NuPay/nu-pay.js +1 -0
- package/dist/es/components/wallets/NuPay/type.js +1 -0
- package/dist/es/components/wallets/OVO/OVO.js +21 -19
- package/dist/es/components/wallets/OnlineBankingEstonia/OnlineBankingEstonia.js +10 -10
- package/dist/es/components/wallets/OnlineBankingFinland/OnlineBankingFinland.js +10 -10
- package/dist/es/components/wallets/OnlineBankingIndonesia/OnlineBankingIndonesia.js +10 -10
- package/dist/es/components/wallets/OnlineBankingLatvia/OnlineBankingLatvia.js +10 -10
- package/dist/es/components/wallets/OnlineBankingLithuania/OnlineBankingLithuania.js +10 -10
- package/dist/es/components/wallets/OnlineBankingThailand/OnlineBankingThailand.js +10 -10
- package/dist/es/components/wallets/OpayWallet/OpayWallet.js +10 -10
- package/dist/es/components/wallets/P24/P24.js +16 -15
- package/dist/es/components/wallets/PagaWallet/PagaWallet.js +10 -10
- package/dist/es/components/wallets/PayByBank/PayByBank.js +17 -21
- package/dist/es/components/wallets/PayU/PayU.js +19 -21
- package/dist/es/components/wallets/Paymaya/Paymaya.js +10 -10
- package/dist/es/components/wallets/PicPay/PicPay.js +11 -11
- package/dist/es/components/wallets/Pix/Pix.js +11 -11
- package/dist/es/components/wallets/Satispay/Satispay.js +10 -10
- package/dist/es/components/wallets/ShopeePay/ShopeePay.js +9 -9
- package/dist/es/components/wallets/Skrill/Skrill.js +15 -14
- package/dist/es/components/wallets/Swish/Swish.js +180 -0
- package/dist/es/components/wallets/Swish/index.js +1 -0
- package/dist/es/components/wallets/Swish/swish2.js +1 -0
- package/dist/es/components/wallets/Swish/type.js +1 -0
- package/dist/es/components/wallets/TNGWallet/TNGWallet.js +9 -9
- package/dist/es/components/wallets/Trustly/Trustly.js +14 -13
- package/dist/es/components/wallets/Twint/Twint.js +197 -0
- package/dist/es/components/wallets/Twint/index.js +1 -0
- package/dist/es/components/wallets/Twint/twint2.js +1 -0
- package/dist/es/components/wallets/Twint/type.js +1 -0
- package/dist/es/components/wallets/Upi/Upi.js +10 -10
- package/dist/es/components/wallets/Vietqr/Vietqr.js +15 -13
- package/dist/es/components/wallets/WechatPay/WechatPay.js +17 -15
- package/dist/es/components/wallets/Zalopay/Zalopay.js +15 -13
- package/dist/es/components/wallets/index.js +10 -1
- package/dist/es/config.js +1 -0
- package/dist/es/constant.js +63 -7
- package/dist/es/core/address.js +1 -0
- package/dist/es/core/create.js +1 -0
- package/dist/es/core/environment.js +17 -3
- package/dist/es/core/index.js +1 -0
- package/dist/es/core/logger.js +27 -12
- package/dist/es/core/payment.js +1 -0
- package/dist/es/core/theme.js +1 -0
- package/dist/es/core.js +30 -30
- package/dist/es/hooks/index.js +1 -0
- package/dist/es/hooks/useBEM.js +1 -0
- package/dist/es/hooks/useBaseWallet.js +21 -7
- package/dist/es/hooks/useI18n.js +1 -0
- package/dist/es/hooks/usePayState.js +1 -0
- package/dist/es/hooks/useRetry.js +6 -0
- package/dist/es/i18n/I18n.js +1 -0
- package/dist/es/i18n/index.js +1 -0
- package/dist/es/i18n/locales/cs-CZ.js +153 -0
- package/dist/es/i18n/locales/da-DK.js +153 -0
- package/dist/es/i18n/locales/de-DE.js +21 -18
- package/dist/es/i18n/locales/en-GB.js +21 -18
- package/dist/es/i18n/locales/es-ES.js +21 -18
- package/dist/es/i18n/locales/fi-FI.js +153 -0
- package/dist/es/i18n/locales/fil-PH.js +153 -0
- package/dist/es/i18n/locales/fr-FR.js +21 -18
- package/dist/es/i18n/locales/hi-IN.js +153 -0
- package/dist/es/i18n/locales/id-ID.js +153 -0
- package/dist/es/i18n/locales/index.js +30 -3
- package/dist/es/i18n/locales/it-IT.js +153 -0
- package/dist/es/i18n/locales/ja-JP.js +21 -18
- package/dist/es/i18n/locales/ko-KR.js +21 -18
- package/dist/es/i18n/locales/ms-MY.js +153 -0
- package/dist/es/i18n/locales/nb-NO.js +153 -0
- package/dist/es/i18n/locales/nl-NL.js +21 -18
- package/dist/es/i18n/locales/pl-PL.js +153 -0
- package/dist/es/i18n/locales/pt-PT.js +21 -18
- package/dist/es/i18n/locales/ru-RU.js +21 -18
- package/dist/es/i18n/locales/sv-SE.js +153 -0
- package/dist/es/i18n/locales/th-TH.js +153 -0
- package/dist/es/i18n/locales/zh-CN.js +21 -18
- package/dist/es/i18n/locales/zh-HK.js +21 -18
- package/dist/es/i18n/locales/zh-TW.js +21 -18
- package/dist/es/i18n/util.js +12 -8
- package/dist/es/index.js +22 -3
- package/dist/es/out/base-fraud-detection.js +1 -0
- package/dist/es/out/config.js +2 -2
- package/dist/es/out/paykka-detection.js +1 -0
- package/dist/es/out/stripe-radar.js +2 -1
- package/dist/es/out/worldpay-ddc.js +1 -0
- package/dist/es/style.css +1 -1
- package/dist/es/utils/bem.js +1 -0
- package/dist/es/utils/card-brand/brands.js +1 -0
- package/dist/es/utils/date.js +5 -1
- package/dist/es/utils/index.js +1 -0
- package/dist/style.css +1 -1
- package/dist/types/api/modules/checkout/map.d.ts +7 -0
- package/dist/types/api/modules/checkout/type.d.ts +2 -1
- package/dist/types/components/ApplePay/hooks/useApplePay.d.ts +1 -0
- package/dist/types/components/ApplePay/type.d.ts +1 -0
- package/dist/types/components/DropIn/type.d.ts +1 -1
- package/dist/types/components/EmailField/type.d.ts +1 -1
- package/dist/types/components/IBANField/IBANField.d.ts +2 -0
- package/dist/types/components/{CardIBANField → IBANField}/type.d.ts +1 -1
- package/dist/types/components/Sepa/Sepa.d.ts +5 -0
- package/dist/types/components/Sepa/type.d.ts +4 -12
- package/dist/types/components/business/PaymentConfirmModal/PaymentConfirmModal.d.ts +6 -0
- package/dist/types/components/business/PaymentConfirmModal/index.d.ts +2 -0
- package/dist/types/components/business/{BlikConfirmModal → PaymentConfirmModal}/type.d.ts +1 -1
- package/dist/types/components/business/PhoneField/area-codes.d.ts +253 -0
- package/dist/types/components/business/PhoneField/index.d.ts +1 -0
- package/dist/types/components/business/PhoneField/type.d.ts +4 -0
- package/dist/types/components/business/QRCodeContent/QRCodeContent.d.ts +3 -0
- package/dist/types/components/business/QRCodeContent/index.d.ts +2 -0
- package/dist/types/components/business/QRCodeContent/type.d.ts +23 -0
- package/dist/types/components/business/QRCodeModal/QRCodeModal.d.ts +0 -1
- package/dist/types/components/business/QRCodeModal/type.d.ts +2 -28
- package/dist/types/components/business/index.d.ts +2 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/internal/Button/type.d.ts +1 -0
- package/dist/types/components/internal/icons/IconAlipay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconAlipayHK.d.ts +2 -0
- package/dist/types/components/internal/icons/IconDoku.d.ts +2 -0
- package/dist/types/components/internal/icons/IconGoPay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconJenius.d.ts +2 -0
- package/dist/types/components/internal/icons/IconLinkAja.d.ts +2 -0
- package/dist/types/components/internal/icons/IconNuPay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconSepa.d.ts +2 -0
- package/dist/types/components/internal/icons/IconSwish.d.ts +2 -0
- package/dist/types/components/internal/icons/IconTwint.d.ts +2 -0
- package/dist/types/components/internal/icons/index.d.ts +10 -0
- package/dist/types/components/wallets/Alipay/Alipay.d.ts +15 -0
- package/dist/types/components/wallets/Alipay/index.d.ts +2 -0
- package/dist/types/components/wallets/{AliPay → Alipay}/type.d.ts +2 -2
- package/dist/types/components/wallets/AlipayHK/AlipayHK.d.ts +15 -0
- package/dist/types/components/wallets/AlipayHK/index.d.ts +2 -0
- package/dist/types/components/wallets/AlipayHK/type.d.ts +7 -0
- package/dist/types/components/wallets/AlipayPlus/AlipayPlus.d.ts +15 -0
- package/dist/types/components/wallets/AlipayPlus/index.d.ts +2 -0
- package/dist/types/components/wallets/AlipayPlus/type.d.ts +7 -0
- package/dist/types/components/wallets/Doku/Doku.d.ts +15 -0
- package/dist/types/components/wallets/Doku/index.d.ts +2 -0
- package/dist/types/components/wallets/Doku/type.d.ts +7 -0
- package/dist/types/components/wallets/DragonPay/DragonPay.d.ts +1 -1
- package/dist/types/components/wallets/EPS/EPS.d.ts +1 -1
- package/dist/types/components/wallets/GoPay/GoPay.d.ts +16 -0
- package/dist/types/components/wallets/GoPay/index.d.ts +2 -0
- package/dist/types/components/wallets/GoPay/type.d.ts +7 -0
- package/dist/types/components/wallets/IDeal/IDeal.d.ts +1 -1
- package/dist/types/components/wallets/Jenius/Jenius.d.ts +15 -0
- package/dist/types/components/wallets/Jenius/index.d.ts +2 -0
- package/dist/types/components/wallets/Jenius/type.d.ts +7 -0
- package/dist/types/components/wallets/LinkAja/LinkAja.d.ts +15 -0
- package/dist/types/components/wallets/LinkAja/index.d.ts +2 -0
- package/dist/types/components/wallets/LinkAja/type.d.ts +7 -0
- package/dist/types/components/wallets/MyBank/MyBank.d.ts +1 -0
- package/dist/types/components/wallets/NuPay/NuPay.d.ts +15 -0
- package/dist/types/components/wallets/NuPay/index.d.ts +2 -0
- package/dist/types/components/wallets/NuPay/type.d.ts +7 -0
- package/dist/types/components/wallets/OnlineBankingEstonia/OnlineBankingEstonia.d.ts +1 -0
- package/dist/types/components/wallets/OnlineBankingFinland/OnlineBankingFinland.d.ts +1 -0
- package/dist/types/components/wallets/PayByBank/PayByBank.d.ts +1 -1
- package/dist/types/components/wallets/PayU/PayU.d.ts +2 -2
- package/dist/types/components/wallets/Swish/Swish.d.ts +15 -0
- package/dist/types/components/wallets/Swish/index.d.ts +2 -0
- package/dist/types/components/wallets/Swish/type.d.ts +7 -0
- package/dist/types/components/wallets/Twint/Twint.d.ts +16 -0
- package/dist/types/components/wallets/Twint/index.d.ts +2 -0
- package/dist/types/components/wallets/Twint/type.d.ts +7 -0
- package/dist/types/components/wallets/index.d.ts +10 -1
- package/dist/types/constant.d.ts +27 -9
- package/dist/types/core/logger.d.ts +1 -0
- package/dist/types/hooks/useBaseWallet.d.ts +19 -1
- package/dist/types/hooks/useRetry.d.ts +2 -0
- package/dist/types/i18n/locales/cs-CZ.d.ts +135 -0
- package/dist/types/i18n/locales/da-DK.d.ts +135 -0
- package/dist/types/i18n/locales/de-DE.d.ts +19 -15
- package/dist/types/i18n/locales/en-GB.d.ts +19 -15
- package/dist/types/i18n/locales/es-ES.d.ts +19 -15
- package/dist/types/i18n/locales/fi-FI.d.ts +135 -0
- package/dist/types/i18n/locales/fil-PH.d.ts +135 -0
- package/dist/types/i18n/locales/fr-FR.d.ts +19 -15
- package/dist/types/i18n/locales/hi-IN.d.ts +135 -0
- package/dist/types/i18n/locales/id-ID.d.ts +135 -0
- package/dist/types/i18n/locales/index.d.ts +24 -0
- package/dist/types/i18n/locales/it-IT.d.ts +135 -0
- package/dist/types/i18n/locales/ja-JP.d.ts +19 -15
- package/dist/types/i18n/locales/ko-KR.d.ts +19 -15
- package/dist/types/i18n/locales/ms-MY.d.ts +135 -0
- package/dist/types/i18n/locales/nb-NO.d.ts +135 -0
- package/dist/types/i18n/locales/nl-NL.d.ts +19 -15
- package/dist/types/i18n/locales/pl-PL.d.ts +135 -0
- package/dist/types/i18n/locales/pt-PT.d.ts +19 -15
- package/dist/types/i18n/locales/ru-RU.d.ts +19 -15
- package/dist/types/i18n/locales/sv-SE.d.ts +135 -0
- package/dist/types/i18n/locales/th-TH.d.ts +135 -0
- package/dist/types/i18n/locales/zh-CN.d.ts +19 -15
- package/dist/types/i18n/locales/zh-HK.d.ts +19 -15
- package/dist/types/i18n/locales/zh-TW.d.ts +19 -15
- package/dist/types/i18n/util.d.ts +1 -1
- package/dist/types/out/config.d.ts +4 -4
- package/dist/types/utils/date.d.ts +1 -0
- package/package.json +1 -1
- package/dist/es/components/AccountNameField/index.js +0 -50
- package/dist/es/components/RecurringTip/index.js +0 -20
- package/dist/es/components/wallets/AliPay/index.js +0 -1
- package/dist/types/components/AccountNameField/AccountNameField.d.ts +0 -2
- package/dist/types/components/AccountNameField/index.d.ts +0 -2
- package/dist/types/components/AccountNameField/type.d.ts +0 -4
- package/dist/types/components/CardIBANField/IBANField.d.ts +0 -2
- package/dist/types/components/RecurringTip/RecurringTip.d.ts +0 -2
- package/dist/types/components/RecurringTip/index.d.ts +0 -1
- package/dist/types/components/business/BlikConfirmModal/BlikConfirmModal.d.ts +0 -6
- package/dist/types/components/business/BlikConfirmModal/index.d.ts +0 -2
- package/dist/types/components/wallets/AliPay/AliPay.d.ts +0 -15
- package/dist/types/components/wallets/AliPay/index.d.ts +0 -2
- /package/dist/es/components/business/{BlikConfirmModal/blik-confirm-modal.js → PaymentConfirmModal/payment-confirm-modal.js} +0 -0
- /package/dist/es/components/business/{BlikConfirmModal → PaymentConfirmModal}/type.js +0 -0
- /package/dist/es/components/business/{QRCodeModal/qr-code-modal.js → QRCodeContent/qr-code-content.js} +0 -0
- /package/dist/es/components/{wallets/AliPay → business/QRCodeContent}/type.js +0 -0
- /package/dist/es/components/business/Tooltip/{tooltip2.js → tooltip.js} +0 -0
- /package/dist/es/components/wallets/{AliPay → Alipay}/ali-pay.js +0 -0
- /package/dist/types/components/{CardIBANField → IBANField}/index.d.ts +0 -0
package/dist/es/api/http.js
CHANGED
|
@@ -5,6 +5,7 @@ import { safeStringify } from "../utils/index.js";
|
|
|
5
5
|
import { getFetch } from "./fetch.js";
|
|
6
6
|
import { PayKKaError, EPayKKaError } from "../core/error.js";
|
|
7
7
|
import "../out/fraud-detection.js";
|
|
8
|
+
import "../core/logger.js";
|
|
8
9
|
import { getBrowserInfo } from "../utils/system-info/get-browser-info.js";
|
|
9
10
|
const request = async (method, url, params, { timeout = 2e4, headers, locale, signal } = {}) => {
|
|
10
11
|
const abortController = new AbortController();
|
package/dist/es/api/index.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { PaymentMethod } from "../../../constant.js";
|
|
2
2
|
import { amountMap } from "../map.js";
|
|
3
|
+
const formatFeeInfo = (configuration) => {
|
|
4
|
+
return {
|
|
5
|
+
neededToCompute: configuration == null ? void 0 : configuration.needed_to_compute,
|
|
6
|
+
fee: amountMap(configuration == null ? void 0 : configuration.fee),
|
|
7
|
+
totalAmount: amountMap(configuration == null ? void 0 : configuration.total_amount),
|
|
8
|
+
percentageFee: configuration == null ? void 0 : configuration.percentage_fee,
|
|
9
|
+
transactionFee: configuration == null ? void 0 : configuration.transaction_fee
|
|
10
|
+
};
|
|
11
|
+
};
|
|
3
12
|
const formatPaymentMethodInfo = (paymentMethods = []) => {
|
|
4
13
|
const supportMethods = [];
|
|
5
14
|
const channelParams = {};
|
|
@@ -21,21 +30,9 @@ const formatPaymentMethodInfo = (paymentMethods = []) => {
|
|
|
21
30
|
googlePayMerchantId: configuration == null ? void 0 : configuration.merchant_id
|
|
22
31
|
};
|
|
23
32
|
} else if (value === PaymentMethod.WECHAT_PAY) {
|
|
24
|
-
channelParams.wechatPay =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
totalAmount: amountMap(configuration == null ? void 0 : configuration.total_amount),
|
|
28
|
-
percentageFee: configuration == null ? void 0 : configuration.percentage_fee,
|
|
29
|
-
transactionFee: configuration == null ? void 0 : configuration.transaction_fee
|
|
30
|
-
};
|
|
31
|
-
} else if (value === PaymentMethod.ALI_PAY) {
|
|
32
|
-
channelParams.aliPay = {
|
|
33
|
-
neededToCompute: configuration == null ? void 0 : configuration.needed_to_compute,
|
|
34
|
-
fee: amountMap(configuration == null ? void 0 : configuration.fee),
|
|
35
|
-
totalAmount: amountMap(configuration == null ? void 0 : configuration.total_amount),
|
|
36
|
-
percentageFee: configuration == null ? void 0 : configuration.percentage_fee,
|
|
37
|
-
transactionFee: configuration == null ? void 0 : configuration.transaction_fee
|
|
38
|
-
};
|
|
33
|
+
channelParams.wechatPay = formatFeeInfo(configuration);
|
|
34
|
+
} else if (value === PaymentMethod.ALIPAY_PLUS) {
|
|
35
|
+
channelParams.aliPay = formatFeeInfo(configuration);
|
|
39
36
|
}
|
|
40
37
|
if (value === PaymentMethod.BANKCARD) {
|
|
41
38
|
supportMethods.push(...configuration.allowed_card_networks || []);
|
|
@@ -35,7 +35,7 @@ const getBaseBrowserParams = async (params = {}) => {
|
|
|
35
35
|
terminal_type: terminalType,
|
|
36
36
|
fraud_detection_id: fraudDetectionId,
|
|
37
37
|
// 当前组件库版本(构建时由 define 注入)
|
|
38
|
-
app_version: "0.
|
|
38
|
+
app_version: "0.21.0"
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
const getBrowserParams = async (params = {}) => {
|
|
@@ -4,6 +4,7 @@ import { deepMerge } from "../../utils/object.js";
|
|
|
4
4
|
import "../../core.js";
|
|
5
5
|
import "../../core/context.js";
|
|
6
6
|
import "../../out/fraud-detection.js";
|
|
7
|
+
import "../../core/logger.js";
|
|
7
8
|
const buildPaymentParams = (params, extraParams = {}) => {
|
|
8
9
|
const { bill, payment, customer } = params;
|
|
9
10
|
const mergedParams = deepMerge(
|
|
@@ -6,6 +6,7 @@ import "../../utils/card-brand/brands.js";
|
|
|
6
6
|
import "../../utils/system-info/get-browser-info.js";
|
|
7
7
|
import { normalizedClass } from "../../utils/format.js";
|
|
8
8
|
import "../../out/fraud-detection.js";
|
|
9
|
+
import "../../core/logger.js";
|
|
9
10
|
import { AccordionContext } from "../internal/Accordion/type.js";
|
|
10
11
|
import { accordionTransition } from "../internal/Accordion/accordionTransition.js";
|
|
11
12
|
const { bem } = useBEM("accordion-item");
|
|
@@ -8,6 +8,7 @@ import { CoreContext } from "../../core/context.js";
|
|
|
8
8
|
import "../../out/fraud-detection.js";
|
|
9
9
|
import { useBEM } from "../../hooks/useBEM.js";
|
|
10
10
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
11
|
+
import "../../core/logger.js";
|
|
11
12
|
import "../internal/Form/type.js";
|
|
12
13
|
import "../internal/Form/context.js";
|
|
13
14
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -15,6 +15,7 @@ import { useBEM } from "../../hooks/useBEM.js";
|
|
|
15
15
|
import "../../core/context.js";
|
|
16
16
|
import { PayKKaError } from "../../core/error.js";
|
|
17
17
|
import "../../out/fraud-detection.js";
|
|
18
|
+
import "../../core/logger.js";
|
|
18
19
|
import { usePayState } from "../../hooks/usePayState.js";
|
|
19
20
|
import { useRetry } from "../../hooks/useRetry.js";
|
|
20
21
|
import { Info } from "../internal/Info/Info.js";
|
|
@@ -5,6 +5,7 @@ import "../../utils/system-info/get-browser-info.js";
|
|
|
5
5
|
import { EInternalFieldType } from "../SecuredFieldsProvider/index.js";
|
|
6
6
|
import "../../core/context.js";
|
|
7
7
|
import "../../out/fraud-detection.js";
|
|
8
|
+
import "../../core/logger.js";
|
|
8
9
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
9
10
|
import "../internal/Form/type.js";
|
|
10
11
|
import "../internal/Form/context.js";
|
|
@@ -2,7 +2,7 @@ import { w, A, h, F, y, q, T, u, b } from "../../core.js";
|
|
|
2
2
|
import { isTimeoutError } from "../../api/http.js";
|
|
3
3
|
import { safeParse, safeStringify } from "../../utils/index.js";
|
|
4
4
|
import { defaultInputStyleConfig } from "../../types/index.js";
|
|
5
|
-
import { PaymentMethod, PaymentType, SessionMode, COMMON_CLASS_NAME, CardPaymentMethods } from "../../constant.js";
|
|
5
|
+
import { PaymentMethod, PaymentType, SessionMode, COMMON_CLASS_NAME, PAY_FORM_CLASS_NAME, PAY_FORM_FOOTER_CLASS_NAME, CardPaymentMethods } from "../../constant.js";
|
|
6
6
|
import { commonPaymentQuery, commonPayment } from "../../api/modules/common/index.js";
|
|
7
7
|
import { getBrowserParams } from "../../api/modules/get-browser-params.js";
|
|
8
8
|
import { CoreContext } from "../../core/context.js";
|
|
@@ -13,6 +13,7 @@ import { useBEM } from "../../hooks/useBEM.js";
|
|
|
13
13
|
import { usePayState } from "../../hooks/usePayState.js";
|
|
14
14
|
import { useRetry } from "../../hooks/useRetry.js";
|
|
15
15
|
import { buildPaymentParams } from "../../api/utils/index.js";
|
|
16
|
+
import "../../core/logger.js";
|
|
16
17
|
import { DEFAULT_ADDRESS, AddressField } from "../AddressField/index.js";
|
|
17
18
|
import { CardBrands } from "../CardBrands/index.js";
|
|
18
19
|
import { CardExpireDateField } from "../CardExpireDateField/index.js";
|
|
@@ -28,7 +29,7 @@ import "../internal/Form/FormItem.js";
|
|
|
28
29
|
import { Form } from "../internal/Form/Form.js";
|
|
29
30
|
import { IconSwitch } from "../internal/icons/IconSwitch.js";
|
|
30
31
|
import { Info } from "../internal/Info/Info.js";
|
|
31
|
-
import {
|
|
32
|
+
import { Tip } from "../Tip/index.js";
|
|
32
33
|
import { EFieldType, SecuredFieldsProvider } from "../SecuredFieldsProvider/index.js";
|
|
33
34
|
import "../SubmitButton/index.js";
|
|
34
35
|
import "../internal/Button/button.js";
|
|
@@ -44,10 +45,9 @@ import { createUrlWithParams } from "../../utils/location.js";
|
|
|
44
45
|
import { formatPaymentResult, processPaymentStatus } from "../../utils/payment.js";
|
|
45
46
|
import { normalizedClass, trimAll, limitedToNumber } from "../../utils/format.js";
|
|
46
47
|
const { bem } = useBEM("card");
|
|
47
|
-
const fieldClassNames = bem("field");
|
|
48
48
|
const CURR_PAYMENT_METHOD = PaymentMethod.BANKCARD;
|
|
49
49
|
const Card = w((props, ref) => {
|
|
50
|
-
var _a, _b;
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
51
51
|
const {
|
|
52
52
|
showCardBrands = true,
|
|
53
53
|
session,
|
|
@@ -154,10 +154,10 @@ const Card = w((props, ref) => {
|
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
156
|
y(() => {
|
|
157
|
-
var _a2, _b2;
|
|
157
|
+
var _a2, _b2, _c2;
|
|
158
158
|
if (!sessionReady)
|
|
159
159
|
return;
|
|
160
|
-
const { status, supportMethods = [],
|
|
160
|
+
const { status, supportMethods = [], tokens = [], sessionMode, country, bill = {} } = (session == null ? void 0 : session.checkout) || {};
|
|
161
161
|
if (sessionMode === SessionMode.DROP_IN && !isDropIn) {
|
|
162
162
|
(_b2 = (_a2 = props.core.config).onInitError) == null ? void 0 : _b2.call(
|
|
163
163
|
_a2,
|
|
@@ -173,6 +173,7 @@ const Card = w((props, ref) => {
|
|
|
173
173
|
country && addressCore.setCountry(country);
|
|
174
174
|
form.email = bill.email ?? "";
|
|
175
175
|
form.address.country = country;
|
|
176
|
+
form.token = (_c2 = tokens[0]) == null ? void 0 : _c2.token;
|
|
176
177
|
setSupportedCardBrands(intersection(cardBrandCodes, supportMethods || []));
|
|
177
178
|
setIsCheckoutEnabled(true);
|
|
178
179
|
if (status === "SUCCESS") {
|
|
@@ -277,6 +278,7 @@ const Card = w((props, ref) => {
|
|
|
277
278
|
paymentMethod = cardBrand.code;
|
|
278
279
|
}
|
|
279
280
|
}
|
|
281
|
+
const storePaymentMethodPayload = isShowStoreCheckBox ? { storePaymentMethod } : isForceStorePaymentMethod ? { storePaymentMethod: true } : null;
|
|
280
282
|
return {
|
|
281
283
|
sessionId: session.sessionId,
|
|
282
284
|
clientKey: session.clientKey,
|
|
@@ -290,7 +292,7 @@ const Card = w((props, ref) => {
|
|
|
290
292
|
expYear: `20${expYear}`,
|
|
291
293
|
expMonth,
|
|
292
294
|
cardNo,
|
|
293
|
-
...
|
|
295
|
+
...storePaymentMethodPayload
|
|
294
296
|
}
|
|
295
297
|
},
|
|
296
298
|
bill: (fieldStatus == null ? void 0 : fieldStatus.address.show) ? {
|
|
@@ -315,7 +317,7 @@ const Card = w((props, ref) => {
|
|
|
315
317
|
};
|
|
316
318
|
};
|
|
317
319
|
async function pay(search = false, timeout) {
|
|
318
|
-
var _a2, _b2,
|
|
320
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h;
|
|
319
321
|
try {
|
|
320
322
|
core.payment.currPaymentMethod.value = CURR_PAYMENT_METHOD;
|
|
321
323
|
const requestOptions = { locale: i18n.locale, timeout };
|
|
@@ -332,13 +334,13 @@ const Card = w((props, ref) => {
|
|
|
332
334
|
);
|
|
333
335
|
} else {
|
|
334
336
|
const paymentParams = await getPaymentParams();
|
|
335
|
-
const extraParams = (
|
|
336
|
-
if ((
|
|
337
|
+
const extraParams = (_d2 = (_c2 = core.config)._getExtraParams) == null ? void 0 : _d2.call(_c2, "payment", CURR_PAYMENT_METHOD);
|
|
338
|
+
if ((_e2 = core.config._checkoutConfig) == null ? void 0 : _e2.dynamicSessionId) {
|
|
337
339
|
await core.updateSessionId(buildPaymentParams(paymentParams, extraParams));
|
|
338
340
|
session.sessionId && (paymentParams.sessionId = session.sessionId);
|
|
339
341
|
}
|
|
340
342
|
if (security) {
|
|
341
|
-
(
|
|
343
|
+
(_f2 = SFPRef.current) == null ? void 0 : _f2.payment(paymentParams, extraParams);
|
|
342
344
|
return { end: true };
|
|
343
345
|
} else {
|
|
344
346
|
res = await commonPayment({
|
|
@@ -352,7 +354,7 @@ const Card = w((props, ref) => {
|
|
|
352
354
|
sessionId: session.sessionId,
|
|
353
355
|
clientKey: session.clientKey
|
|
354
356
|
},
|
|
355
|
-
extraParams: (_h = (
|
|
357
|
+
extraParams: (_h = (_g2 = core.config)._getExtraParams) == null ? void 0 : _h.call(_g2, "query", CURR_PAYMENT_METHOD)
|
|
356
358
|
}
|
|
357
359
|
}
|
|
358
360
|
});
|
|
@@ -470,7 +472,8 @@ const Card = w((props, ref) => {
|
|
|
470
472
|
status: submitButtonStatus,
|
|
471
473
|
disabled,
|
|
472
474
|
verified: validated,
|
|
473
|
-
onClick: onSubmit
|
|
475
|
+
onClick: onSubmit,
|
|
476
|
+
children: isSaveButton ? i18n.get("common.save") : null
|
|
474
477
|
}
|
|
475
478
|
);
|
|
476
479
|
};
|
|
@@ -555,19 +558,25 @@ const Card = w((props, ref) => {
|
|
|
555
558
|
}
|
|
556
559
|
}
|
|
557
560
|
}
|
|
561
|
+
const isPurchase = ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.paymentType) === PaymentType.PURCHASE;
|
|
562
|
+
const isRecurring = ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.paymentType) === PaymentType.RECURRING;
|
|
558
563
|
const isFastPayment = T(() => {
|
|
559
564
|
var _a2;
|
|
560
565
|
if (!(session == null ? void 0 : session.checkout))
|
|
561
566
|
return;
|
|
562
|
-
const
|
|
563
|
-
const hasCardTokens = !!((_a2 = session == null ? void 0 : session.checkout.tokens) == null ? void 0 : _a2.length);
|
|
567
|
+
const hasCardTokens = !!((_a2 = session.checkout.tokens) == null ? void 0 : _a2.length);
|
|
564
568
|
return isPurchase && hasCardTokens;
|
|
565
|
-
}, [session == null ? void 0 : session.checkout]);
|
|
569
|
+
}, [session == null ? void 0 : session.checkout, isPurchase]);
|
|
570
|
+
const isNoAmount = Number((_d = (_c = session == null ? void 0 : session.checkout) == null ? void 0 : _c.transAmount) == null ? void 0 : _d.amount) === 0;
|
|
571
|
+
const canStorePaymentMethod = !!((_e = session == null ? void 0 : session.checkout) == null ? void 0 : _e.storePaymentMethod);
|
|
572
|
+
const isNoAmountPurchaseStore = isPurchase && isNoAmount && canStorePaymentMethod;
|
|
573
|
+
const isForceStorePaymentMethod = isRecurring || isNoAmountPurchaseStore;
|
|
574
|
+
const isSaveButton = isNoAmountPurchaseStore || isRecurring && isNoAmount;
|
|
566
575
|
const isShowStoreCheckBox = T(() => {
|
|
567
576
|
if (!(session == null ? void 0 : session.checkout))
|
|
568
577
|
return;
|
|
569
|
-
return
|
|
570
|
-
}, [session == null ? void 0 : session.checkout]);
|
|
578
|
+
return isPurchase && canStorePaymentMethod && !isNoAmount;
|
|
579
|
+
}, [session == null ? void 0 : session.checkout, isPurchase, canStorePaymentMethod, isNoAmount]);
|
|
571
580
|
const StoreCheckBox = () => {
|
|
572
581
|
const onCheck = (checked) => {
|
|
573
582
|
setStorePaymentMethod(checked);
|
|
@@ -582,10 +591,20 @@ const Card = w((props, ref) => {
|
|
|
582
591
|
}
|
|
583
592
|
) });
|
|
584
593
|
};
|
|
594
|
+
const StorePaymentTip = () => {
|
|
595
|
+
let tipText = null;
|
|
596
|
+
if (isNoAmountPurchaseStore) {
|
|
597
|
+
tipText = i18n.get("common.storePaymentTip");
|
|
598
|
+
} else if (isRecurring && isNoAmount) {
|
|
599
|
+
tipText = i18n.get("common.recurringStoreTip");
|
|
600
|
+
} else if (isRecurring) {
|
|
601
|
+
tipText = i18n.get("common.recurringTip");
|
|
602
|
+
}
|
|
603
|
+
return tipText ? /* @__PURE__ */ u(Tip, { text: tipText }) : null;
|
|
604
|
+
};
|
|
585
605
|
const changeBox = () => {
|
|
586
|
-
var _a2, _b2
|
|
587
|
-
const
|
|
588
|
-
const hasCardTokens = !!((_c = (_b2 = session == null ? void 0 : session.checkout) == null ? void 0 : _b2.tokens) == null ? void 0 : _c.length);
|
|
606
|
+
var _a2, _b2;
|
|
607
|
+
const hasCardTokens = !!((_b2 = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.tokens) == null ? void 0 : _b2.length);
|
|
589
608
|
const onClick = () => {
|
|
590
609
|
var _a3;
|
|
591
610
|
(_a3 = formRef.current) == null ? void 0 : _a3.resetValidation();
|
|
@@ -648,7 +667,7 @@ const Card = w((props, ref) => {
|
|
|
648
667
|
[EFieldType.CVV]: null
|
|
649
668
|
});
|
|
650
669
|
const onFieldValidStatusChanged = (data) => {
|
|
651
|
-
var _a2, _b2,
|
|
670
|
+
var _a2, _b2, _c2, _d2;
|
|
652
671
|
const fieldRef = splitCardInfo ? fieldRefMap[data.fieldType] : combinedCardInfoRef;
|
|
653
672
|
const error = data.errorTip && i18n.get(data.errorTip);
|
|
654
673
|
if (!splitCardInfo) {
|
|
@@ -669,10 +688,10 @@ const Card = w((props, ref) => {
|
|
|
669
688
|
if (isSuccess) {
|
|
670
689
|
(_b2 = fieldRef.current) == null ? void 0 : _b2.resetValidation("success");
|
|
671
690
|
} else {
|
|
672
|
-
(
|
|
691
|
+
(_c2 = fieldRef.current) == null ? void 0 : _c2.resetValidation("unValidate");
|
|
673
692
|
}
|
|
674
693
|
} else {
|
|
675
|
-
(
|
|
694
|
+
(_d2 = fieldRef.current) == null ? void 0 : _d2.resetValidation(data.status, error);
|
|
676
695
|
}
|
|
677
696
|
setTimeout(() => {
|
|
678
697
|
validateFormSilently();
|
|
@@ -702,20 +721,20 @@ const Card = w((props, ref) => {
|
|
|
702
721
|
processPaymentError(data.error);
|
|
703
722
|
};
|
|
704
723
|
const Email = () => {
|
|
705
|
-
return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.email.show) && /* @__PURE__ */ u(
|
|
724
|
+
return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.email.show) && /* @__PURE__ */ u(
|
|
706
725
|
EmailField,
|
|
707
726
|
{
|
|
708
727
|
ref: emailFieldRef,
|
|
709
728
|
value: form.email,
|
|
710
729
|
disabled: (fieldStatus == null ? void 0 : fieldStatus.email.disabled) || disabled
|
|
711
730
|
}
|
|
712
|
-
) })
|
|
731
|
+
) });
|
|
713
732
|
};
|
|
714
733
|
const CardHolderName = () => {
|
|
715
734
|
return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.holderName.show) && /* @__PURE__ */ u("div", { className: bem("holder-name"), children: /* @__PURE__ */ u(CardHolderNameField, { disabled: (fieldStatus == null ? void 0 : fieldStatus.holderName.disabled) || disabled }) }) });
|
|
716
735
|
};
|
|
717
736
|
const Address = () => {
|
|
718
|
-
return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u(
|
|
737
|
+
return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u(
|
|
719
738
|
AddressField,
|
|
720
739
|
{
|
|
721
740
|
ref: addressFieldRef,
|
|
@@ -723,7 +742,7 @@ const Card = w((props, ref) => {
|
|
|
723
742
|
disabled,
|
|
724
743
|
onChange: (value) => setForm(Object.assign(form, { address: value }))
|
|
725
744
|
}
|
|
726
|
-
) })
|
|
745
|
+
) });
|
|
727
746
|
};
|
|
728
747
|
const ErrorMessage = () => {
|
|
729
748
|
return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg }) });
|
|
@@ -740,9 +759,9 @@ const Card = w((props, ref) => {
|
|
|
740
759
|
) });
|
|
741
760
|
};
|
|
742
761
|
const CardSplitInfo = () => {
|
|
743
|
-
var _a2, _b2,
|
|
762
|
+
var _a2, _b2, _c2, _d2;
|
|
744
763
|
return /* @__PURE__ */ u(b, { children: [
|
|
745
|
-
/* @__PURE__ */ u("div", {
|
|
764
|
+
/* @__PURE__ */ u("div", { children: [
|
|
746
765
|
/* @__PURE__ */ u("div", { className: bem("card-number-wrapper"), children: [
|
|
747
766
|
/* @__PURE__ */ u(
|
|
748
767
|
CardNumberField,
|
|
@@ -760,7 +779,7 @@ const Card = w((props, ref) => {
|
|
|
760
779
|
CardBrands,
|
|
761
780
|
{
|
|
762
781
|
className: bem("card-brands"),
|
|
763
|
-
supportedCardBrands: (
|
|
782
|
+
supportedCardBrands: (_d2 = (_c2 = session == null ? void 0 : session.checkout) == null ? void 0 : _c2.supportMethods) == null ? void 0 : _d2.filter(Boolean)
|
|
764
783
|
}
|
|
765
784
|
)
|
|
766
785
|
] }),
|
|
@@ -769,7 +788,6 @@ const Card = w((props, ref) => {
|
|
|
769
788
|
CardExpireDateField,
|
|
770
789
|
{
|
|
771
790
|
security,
|
|
772
|
-
className: fieldClassNames,
|
|
773
791
|
disabled,
|
|
774
792
|
ref: cardExpireDateFieldRef
|
|
775
793
|
}
|
|
@@ -778,7 +796,6 @@ const Card = w((props, ref) => {
|
|
|
778
796
|
CardSecurityCodeField,
|
|
779
797
|
{
|
|
780
798
|
security,
|
|
781
|
-
className: fieldClassNames,
|
|
782
799
|
disabled,
|
|
783
800
|
ref: cardSecurityCodeFieldRef
|
|
784
801
|
}
|
|
@@ -787,14 +804,13 @@ const Card = w((props, ref) => {
|
|
|
787
804
|
] });
|
|
788
805
|
};
|
|
789
806
|
const PaymentForm = () => {
|
|
790
|
-
|
|
791
|
-
return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
|
|
807
|
+
return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, PAY_FORM_CLASS_NAME, bem()), children: [
|
|
792
808
|
Email(),
|
|
793
809
|
splitCardInfo ? CardSplitInfo() : CardCombineInfo(),
|
|
794
810
|
CardHolderName(),
|
|
795
811
|
Address(),
|
|
796
|
-
(
|
|
797
|
-
/* @__PURE__ */ u("div", { className:
|
|
812
|
+
StorePaymentTip(),
|
|
813
|
+
/* @__PURE__ */ u("div", { className: PAY_FORM_FOOTER_CLASS_NAME, children: [
|
|
798
814
|
isShowStoreCheckBox && StoreCheckBox(),
|
|
799
815
|
ErrorMessage(),
|
|
800
816
|
!hidePaymentButton && Button()
|
|
@@ -802,27 +818,27 @@ const Card = w((props, ref) => {
|
|
|
802
818
|
] }) });
|
|
803
819
|
};
|
|
804
820
|
const FastPaymentForm = () => {
|
|
805
|
-
var _a2, _b2,
|
|
806
|
-
return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
|
|
821
|
+
var _a2, _b2, _c2, _d2;
|
|
822
|
+
return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, PAY_FORM_CLASS_NAME, bem()), children: [
|
|
807
823
|
Email(),
|
|
808
824
|
/* @__PURE__ */ u("div", { className: bem("card-selector-wrapper"), children: [
|
|
809
825
|
/* @__PURE__ */ u(
|
|
810
826
|
CardSelector,
|
|
811
827
|
{
|
|
812
|
-
value: (
|
|
813
|
-
cardList: (
|
|
828
|
+
value: (_c2 = (_b2 = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.tokens) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.token,
|
|
829
|
+
cardList: (_d2 = session == null ? void 0 : session.checkout) == null ? void 0 : _d2.tokens,
|
|
814
830
|
disabled,
|
|
815
831
|
onClickEdit: onEditOtherCard,
|
|
816
832
|
onClickChange: onClickChangeCard,
|
|
817
833
|
onCardChange,
|
|
818
|
-
className: bem("card-selector"
|
|
834
|
+
className: bem("card-selector"),
|
|
819
835
|
style: { flex: 2 }
|
|
820
836
|
}
|
|
821
837
|
),
|
|
822
838
|
/* @__PURE__ */ u(
|
|
823
839
|
CardSecurityCodeField,
|
|
824
840
|
{
|
|
825
|
-
className: bem("card-security-code"
|
|
841
|
+
className: bem("card-security-code"),
|
|
826
842
|
style: { flex: 1 },
|
|
827
843
|
disabled,
|
|
828
844
|
security,
|
|
@@ -831,7 +847,7 @@ const Card = w((props, ref) => {
|
|
|
831
847
|
)
|
|
832
848
|
] }),
|
|
833
849
|
tokenAddressFilled && Address(),
|
|
834
|
-
/* @__PURE__ */ u("div", { className:
|
|
850
|
+
/* @__PURE__ */ u("div", { className: PAY_FORM_FOOTER_CLASS_NAME, children: [
|
|
835
851
|
ErrorMessage(),
|
|
836
852
|
!hidePaymentButton && Button()
|
|
837
853
|
] })
|
|
@@ -845,7 +861,7 @@ const Card = w((props, ref) => {
|
|
|
845
861
|
i18n,
|
|
846
862
|
disabled,
|
|
847
863
|
checkoutId: core.id,
|
|
848
|
-
sessionMode: (
|
|
864
|
+
sessionMode: (_f = session.checkout) == null ? void 0 : _f.sessionMode,
|
|
849
865
|
supportedCardBrands,
|
|
850
866
|
style: inputStyle || defaultInputStyleConfig,
|
|
851
867
|
core,
|
|
@@ -869,7 +885,7 @@ const Card = w((props, ref) => {
|
|
|
869
885
|
ThreeDSAuth,
|
|
870
886
|
{
|
|
871
887
|
show: showThreeDSModal,
|
|
872
|
-
theme: (
|
|
888
|
+
theme: (_g = session == null ? void 0 : session.checkout) == null ? void 0 : _g.theme,
|
|
873
889
|
onClose: handleCloseThreeDSModal,
|
|
874
890
|
checkoutId: core.id,
|
|
875
891
|
...threeDSInfo
|
|
@@ -4,6 +4,7 @@ import { useBEM } from "../../hooks/useBEM.js";
|
|
|
4
4
|
import "../../core/context.js";
|
|
5
5
|
import { clamp } from "../../utils/index.js";
|
|
6
6
|
import "../../out/fraud-detection.js";
|
|
7
|
+
import "../../core/logger.js";
|
|
7
8
|
import { getSupportedCardBrands, getCardBrandInfo } from "../../utils/card-brand/index.js";
|
|
8
9
|
import { normalizedClass } from "../../utils/format.js";
|
|
9
10
|
const { bem } = useBEM("card-brands");
|
|
@@ -3,6 +3,7 @@ import { isExpired } from "../../utils/index.js";
|
|
|
3
3
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
4
4
|
import "../../out/fraud-detection.js";
|
|
5
5
|
import "../../core/context.js";
|
|
6
|
+
import "../../core/logger.js";
|
|
6
7
|
import "../internal/Form/type.js";
|
|
7
8
|
import "../internal/Form/context.js";
|
|
8
9
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -3,6 +3,7 @@ import "../../utils/card-brand/brands.js";
|
|
|
3
3
|
import "../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../core/context.js";
|
|
5
5
|
import "../../out/fraud-detection.js";
|
|
6
|
+
import "../../core/logger.js";
|
|
6
7
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
7
8
|
import "../internal/Form/type.js";
|
|
8
9
|
import "../internal/Form/context.js";
|
|
@@ -6,6 +6,7 @@ import "../../utils/card-brand/brands.js";
|
|
|
6
6
|
import "../../utils/system-info/get-browser-info.js";
|
|
7
7
|
import { normalizedClass } from "../../utils/format.js";
|
|
8
8
|
import "../../out/fraud-detection.js";
|
|
9
|
+
import "../../core/logger.js";
|
|
9
10
|
const { bem } = useBEM("card-no");
|
|
10
11
|
const CardNo = (props) => {
|
|
11
12
|
const { value, className, style, disabled } = props;
|
|
@@ -3,6 +3,7 @@ import { clamp } from "../../utils/index.js";
|
|
|
3
3
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
4
4
|
import "../../out/fraud-detection.js";
|
|
5
5
|
import "../../core/context.js";
|
|
6
|
+
import "../../core/logger.js";
|
|
6
7
|
import "../internal/Form/type.js";
|
|
7
8
|
import "../internal/Form/context.js";
|
|
8
9
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -6,6 +6,7 @@ import { limitedToNumber } from "../../utils/format.js";
|
|
|
6
6
|
import { EFieldType } from "../SecuredFieldsProvider/index.js";
|
|
7
7
|
import "../../core/context.js";
|
|
8
8
|
import "../../out/fraud-detection.js";
|
|
9
|
+
import "../../core/logger.js";
|
|
9
10
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
10
11
|
import "../internal/Form/type.js";
|
|
11
12
|
import "../internal/Form/context.js";
|
|
@@ -5,6 +5,7 @@ import "../../out/fraud-detection.js";
|
|
|
5
5
|
import { finCardBrandInfoByCode } from "../../utils/card-brand/index.js";
|
|
6
6
|
import "../../utils/system-info/get-browser-info.js";
|
|
7
7
|
import "../../core/context.js";
|
|
8
|
+
import "../../core/logger.js";
|
|
8
9
|
import "../internal/Form/type.js";
|
|
9
10
|
import "../internal/Form/context.js";
|
|
10
11
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -13,6 +13,7 @@ import "../../core/context.js";
|
|
|
13
13
|
import "../../out/fraud-detection.js";
|
|
14
14
|
import { useBEM } from "../../hooks/useBEM.js";
|
|
15
15
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
16
|
+
import "../../core/logger.js";
|
|
16
17
|
import { IconCardNo } from "../internal/icons/IconCardNo.js";
|
|
17
18
|
const { bem } = useBEM("combined-card-info");
|
|
18
19
|
const CombinedCardInfo = w(
|