@paykka/card-checkout-ui 0.15.2 → 0.17.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 +23 -23
- package/dist/card-checkout-ui.umd.cjs +23 -23
- package/dist/es/api/http.js +12 -1
- package/dist/es/api/modules/apple-pay/index.js +0 -12
- package/dist/es/api/modules/common/index.js +29 -0
- package/dist/es/api/modules/get-browser-params.js +1 -1
- package/dist/es/api/modules/index.js +1 -1
- package/dist/es/api/modules/threeDS/index.js +1 -1
- package/dist/es/api/utils/index.js +3 -0
- package/dist/es/components/AccountNameField/index.js +2 -2
- package/dist/es/components/AddressField/index.js +2 -2
- package/dist/es/components/ApplePay/index.js +26 -10
- package/dist/es/components/CPFField/index.js +2 -2
- package/dist/es/components/Card/index.js +20 -6
- package/dist/es/components/CardHolderNameField/index.js +2 -2
- package/dist/es/components/CardSecurityCodeField/index.js +2 -2
- package/dist/es/components/CombinedCardInfo/index.js +3 -3
- package/dist/es/components/DropIn/index.js +145 -1
- package/dist/es/components/EmailField/EmailField.js +2 -2
- package/dist/es/components/EncryptedCard/index.js +1 -1
- package/dist/es/components/GooglePay/index.js +35 -21
- package/dist/es/components/GuideCard/index.js +19 -1
- package/dist/es/components/SecuredFieldsProvider/index.js +2 -0
- package/dist/es/components/SecuredIframe/index.js +19 -10
- package/dist/es/components/Sepa/index.js +21 -6
- package/dist/es/components/business/BlikConfirmModal/BlikConfirmModal.js +1 -1
- package/dist/es/components/business/NameField/NameField.js +2 -2
- package/dist/es/components/business/QRCodeModal/QRCodeModal.js +1 -1
- package/dist/es/components/business/SegmentedDigitInput/format.js +3 -0
- package/dist/es/components/business/SegmentedDigitInput/index.js +2 -0
- package/dist/es/components/index.js +18 -0
- package/dist/es/components/internal/Accordion/accordionTransition.js +3 -0
- package/dist/es/components/internal/Form/Form.js +2 -0
- package/dist/es/components/internal/Form/FormItem.js +2 -0
- package/dist/es/components/internal/Input/Input.js +2 -0
- package/dist/es/components/internal/icons/Icon3DSFail.js +2 -0
- package/dist/es/components/internal/icons/Icon3DSInfo.js +2 -0
- package/dist/es/components/internal/icons/Icon3DSSuccess.js +2 -0
- package/dist/es/components/internal/icons/IconAdd.js +2 -0
- package/dist/es/components/internal/icons/IconAlipayPlus.js +2 -0
- package/dist/es/components/internal/icons/IconAmex.js +2 -0
- package/dist/es/components/internal/icons/IconArrowDown.js +2 -0
- package/dist/es/components/internal/icons/IconBancomatPay.js +33 -0
- package/dist/es/components/internal/icons/IconBancontact.js +2 -0
- package/dist/es/components/internal/icons/IconBizum.js +33 -0
- package/dist/es/components/internal/icons/IconBlik.js +2 -0
- package/dist/es/components/internal/icons/IconBoost.js +2 -0
- package/dist/es/components/internal/icons/IconCard.js +2 -0
- package/dist/es/components/internal/icons/IconCard2.js +2 -0
- package/dist/es/components/internal/icons/IconCardNo.js +2 -0
- package/dist/es/components/internal/icons/IconDinnersClub.js +2 -0
- package/dist/es/components/internal/icons/IconDiscover.js +2 -0
- package/dist/es/components/internal/icons/IconDragonPay.js +42 -0
- package/dist/es/components/internal/icons/IconEPS.js +44 -0
- package/dist/es/components/internal/icons/IconError.js +2 -0
- package/dist/es/components/internal/icons/IconFpx.js +42 -0
- package/dist/es/components/internal/icons/IconGCash.js +2 -0
- package/dist/es/components/internal/icons/IconGcashComplete.js +2 -0
- package/dist/es/components/internal/icons/IconGrabPay.js +2 -0
- package/dist/es/components/internal/icons/IconIdeal.js +2 -0
- package/dist/es/components/internal/icons/IconInfo.js +2 -0
- package/dist/es/components/internal/icons/IconJcb.js +2 -0
- package/dist/es/components/internal/icons/IconLinePay.js +2 -0
- package/dist/es/components/internal/icons/IconMasterCard.js +2 -0
- package/dist/es/components/internal/icons/IconMayBankQRPay.js +2 -0
- package/dist/es/components/internal/icons/IconMbWay.js +33 -0
- package/dist/es/components/internal/icons/IconMultibanco.js +34 -0
- package/dist/es/components/internal/icons/IconMyBank.js +38 -0
- package/dist/es/components/internal/icons/IconNinePay.js +2 -0
- package/dist/es/components/internal/icons/IconOnlineBankingEstonia.js +42 -0
- package/dist/es/components/internal/icons/IconOnlineBankingFinland.js +42 -0
- package/dist/es/components/internal/icons/IconOnlineBankingIndonesia.js +42 -0
- package/dist/es/components/internal/icons/IconOnlineBankingLatvia.js +42 -0
- package/dist/es/components/internal/icons/IconOnlineBankingLithuania.js +42 -0
- package/dist/es/components/internal/icons/IconOnlineBankingThailand.js +42 -0
- package/dist/es/components/internal/icons/IconOpayWallet.js +2 -0
- package/dist/es/components/internal/icons/IconOvo.js +2 -0
- package/dist/es/components/internal/icons/IconP24.js +2 -0
- package/dist/es/components/internal/icons/IconPagaWallet.js +2 -0
- package/dist/es/components/internal/icons/IconPayByBank.js +42 -0
- package/dist/es/components/internal/icons/IconPayU.js +27 -0
- package/dist/es/components/internal/icons/IconPaymaya.js +2 -0
- package/dist/es/components/internal/icons/IconPhone.js +2 -0
- package/dist/es/components/internal/icons/IconPicPay.js +2 -0
- package/dist/es/components/internal/icons/IconPix.js +2 -0
- package/dist/es/components/internal/icons/IconRedirect.js +2 -0
- package/dist/es/components/internal/icons/IconSafe.js +2 -0
- package/dist/es/components/internal/icons/IconSatispay.js +34 -0
- package/dist/es/components/internal/icons/IconScan.js +2 -0
- package/dist/es/components/internal/icons/IconShopeePay.js +2 -0
- package/dist/es/components/internal/icons/IconSkrill.js +2 -0
- package/dist/es/components/internal/icons/IconSuccess.js +2 -0
- package/dist/es/components/internal/icons/IconSwitch.js +2 -0
- package/dist/es/components/internal/icons/IconTNGWallet.js +2 -0
- package/dist/es/components/internal/icons/IconTick.js +2 -0
- package/dist/es/components/internal/icons/IconTrustly.js +2 -0
- package/dist/es/components/internal/icons/IconUnionPay.js +2 -0
- package/dist/es/components/internal/icons/IconUpi.js +42 -0
- package/dist/es/components/internal/icons/IconVietqr.js +2 -0
- package/dist/es/components/internal/icons/IconVietqrComplete.js +2 -0
- package/dist/es/components/internal/icons/IconVisa.js +2 -0
- package/dist/es/components/internal/icons/IconWechatPayGlobal.js +2 -0
- package/dist/es/components/internal/icons/IconWechatPayGlobalComplete.js +2 -0
- package/dist/es/components/internal/icons/IconZalopay.js +2 -0
- package/dist/es/components/internal/icons/IconZalopayComplete.js +2 -0
- package/dist/es/components/internal/icons/iconChecked.js +2 -0
- package/dist/es/components/internal/icons/index.js +2 -0
- package/dist/es/components/wallets/BancomatPay/BancomatPay.js +155 -0
- package/dist/es/components/wallets/BancomatPay/bancomat-pay.js +1 -0
- package/dist/es/components/wallets/BancomatPay/index.js +1 -0
- package/dist/es/components/wallets/BancomatPay/type.js +1 -0
- package/dist/es/components/wallets/Bizum/Bizum.js +155 -0
- package/dist/es/components/wallets/Bizum/bizum2.js +1 -0
- package/dist/es/components/wallets/Bizum/index.js +1 -0
- package/dist/es/components/wallets/Bizum/type.js +1 -0
- package/dist/es/components/wallets/DragonPay/DragonPay.js +180 -0
- package/dist/es/components/wallets/DragonPay/dragon-pay.js +1 -0
- package/dist/es/components/wallets/DragonPay/index.js +1 -0
- package/dist/es/components/wallets/DragonPay/type.js +1 -0
- package/dist/es/components/wallets/EPS/EPS.js +183 -0
- package/dist/es/components/wallets/EPS/eps2.js +1 -0
- package/dist/es/components/wallets/EPS/index.js +1 -0
- package/dist/es/components/wallets/EPS/type.js +1 -0
- package/dist/es/components/wallets/Fpx/Fpx.js +180 -0
- package/dist/es/components/wallets/Fpx/fpx2.js +1 -0
- package/dist/es/components/wallets/Fpx/index.js +1 -0
- package/dist/es/components/wallets/Fpx/type.js +1 -0
- package/dist/es/components/wallets/MbWay/MbWay.js +155 -0
- package/dist/es/components/wallets/MbWay/index.js +1 -0
- package/dist/es/components/wallets/MbWay/mb-way.js +1 -0
- package/dist/es/components/wallets/MbWay/type.js +1 -0
- package/dist/es/components/wallets/Multibanco/Multibanco.js +155 -0
- package/dist/es/components/wallets/Multibanco/index.js +1 -0
- package/dist/es/components/wallets/Multibanco/multibanco2.js +1 -0
- package/dist/es/components/wallets/Multibanco/type.js +1 -0
- package/dist/es/components/wallets/MyBank/MyBank.js +165 -0
- package/dist/es/components/wallets/MyBank/index.js +1 -0
- package/dist/es/components/wallets/MyBank/my-bank.js +1 -0
- package/dist/es/components/wallets/MyBank/type.js +1 -0
- package/dist/es/components/wallets/OnlineBankingEstonia/OnlineBankingEstonia.js +180 -0
- package/dist/es/components/wallets/OnlineBankingEstonia/index.js +1 -0
- package/dist/es/components/wallets/OnlineBankingEstonia/online-banking-estonia.js +1 -0
- package/dist/es/components/wallets/OnlineBankingEstonia/type.js +1 -0
- package/dist/es/components/wallets/OnlineBankingFinland/OnlineBankingFinland.js +180 -0
- package/dist/es/components/wallets/OnlineBankingFinland/index.js +1 -0
- package/dist/es/components/wallets/OnlineBankingFinland/online-banking-finland.js +1 -0
- package/dist/es/components/wallets/OnlineBankingFinland/type.js +1 -0
- package/dist/es/components/wallets/OnlineBankingIndonesia/OnlineBankingIndonesia.js +180 -0
- package/dist/es/components/wallets/OnlineBankingIndonesia/index.js +1 -0
- package/dist/es/components/wallets/OnlineBankingIndonesia/online-banking-indonesia.js +1 -0
- package/dist/es/components/wallets/OnlineBankingIndonesia/type.js +1 -0
- package/dist/es/components/wallets/OnlineBankingLatvia/OnlineBankingLatvia.js +180 -0
- package/dist/es/components/wallets/OnlineBankingLatvia/index.js +1 -0
- package/dist/es/components/wallets/OnlineBankingLatvia/online-banking-latvia.js +1 -0
- package/dist/es/components/wallets/OnlineBankingLatvia/type.js +1 -0
- package/dist/es/components/wallets/OnlineBankingLithuania/OnlineBankingLithuania.js +180 -0
- package/dist/es/components/wallets/OnlineBankingLithuania/index.js +1 -0
- package/dist/es/components/wallets/OnlineBankingLithuania/online-banking-lithuania.js +1 -0
- package/dist/es/components/wallets/OnlineBankingLithuania/type.js +1 -0
- package/dist/es/components/wallets/OnlineBankingThailand/OnlineBankingThailand.js +180 -0
- package/dist/es/components/wallets/OnlineBankingThailand/index.js +1 -0
- package/dist/es/components/wallets/OnlineBankingThailand/online-banking-thailand.js +1 -0
- package/dist/es/components/wallets/OnlineBankingThailand/type.js +1 -0
- package/dist/es/components/wallets/PayByBank/PayByBank.js +212 -0
- package/dist/es/components/wallets/PayByBank/index.js +1 -0
- package/dist/es/components/wallets/PayByBank/pay-by-bank.js +1 -0
- package/dist/es/components/wallets/PayByBank/type.js +1 -0
- package/dist/es/components/wallets/PayU/PayU.js +186 -0
- package/dist/es/components/wallets/PayU/index.js +1 -0
- package/dist/es/components/wallets/PayU/payu2.js +1 -0
- package/dist/es/components/wallets/PayU/type.js +1 -0
- package/dist/es/components/wallets/Satispay/Satispay.js +198 -0
- package/dist/es/components/wallets/Satispay/index.js +1 -0
- package/dist/es/components/wallets/Satispay/satispay2.js +1 -0
- package/dist/es/components/wallets/Satispay/type.js +1 -0
- package/dist/es/components/wallets/Upi/Upi.js +180 -0
- package/dist/es/components/wallets/Upi/index.js +1 -0
- package/dist/es/components/wallets/Upi/type.js +1 -0
- package/dist/es/components/wallets/Upi/upi2.js +1 -0
- package/dist/es/components/wallets/WechatPay/WechatPay.js +5 -10
- package/dist/es/components/wallets/index.js +18 -0
- package/dist/es/config.js +2 -0
- package/dist/es/constant.js +110 -2
- package/dist/es/core/address.js +3 -0
- package/dist/es/core/checkout.js +3 -2
- package/dist/es/core/create.js +2 -0
- package/dist/es/core/logger.js +4 -1
- package/dist/es/core/payment.js +2 -0
- package/dist/es/core/query.js +1 -1
- package/dist/es/core.js +454 -454
- package/dist/es/hooks/useBEM.js +3 -0
- package/dist/es/hooks/useBaseWallet.js +45 -9
- package/dist/es/hooks/usePayState.js +1 -0
- package/dist/es/i18n/I18n.js +2 -0
- package/dist/es/i18n/index.js +2 -0
- package/dist/es/i18n/locales/de-DE.js +20 -2
- package/dist/es/i18n/locales/en-GB.js +20 -2
- package/dist/es/i18n/locales/es-ES.js +20 -2
- package/dist/es/i18n/locales/fr-FR.js +20 -2
- package/dist/es/i18n/locales/ja-JP.js +20 -2
- package/dist/es/i18n/locales/ko-KR.js +20 -2
- package/dist/es/i18n/locales/nl-NL.js +20 -2
- package/dist/es/i18n/locales/pt-PT.js +20 -2
- package/dist/es/i18n/locales/ru-RU.js +20 -2
- package/dist/es/i18n/locales/zh-CN.js +20 -2
- package/dist/es/i18n/locales/zh-HK.js +20 -2
- package/dist/es/i18n/locales/zh-TW.js +20 -2
- package/dist/es/i18n/util.js +3 -0
- package/dist/es/index.js +37 -1
- package/dist/es/style.css +1 -1
- package/dist/es/utils/bem.js +3 -0
- package/dist/es/utils/card-brand/brands.js +2 -0
- package/dist/es/utils/index.js +3 -0
- package/dist/es/utils/payment.js +76 -1
- package/dist/style.css +1 -1
- package/dist/types/api/http.d.ts +6 -1
- package/dist/types/api/modules/apple-pay/index.d.ts +0 -3
- package/dist/types/api/modules/common/index.d.ts +39 -0
- package/dist/types/api/modules/index.d.ts +1 -4
- package/dist/types/components/DropIn/type.d.ts +1 -1
- package/dist/types/components/internal/icons/IconBancomatPay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconBizum.d.ts +2 -0
- package/dist/types/components/internal/icons/IconDragonPay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconEPS.d.ts +2 -0
- package/dist/types/components/internal/icons/IconFpx.d.ts +2 -0
- package/dist/types/components/internal/icons/IconMbWay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconMultibanco.d.ts +2 -0
- package/dist/types/components/internal/icons/IconMyBank.d.ts +2 -0
- package/dist/types/components/internal/icons/IconOnlineBankingEstonia.d.ts +2 -0
- package/dist/types/components/internal/icons/IconOnlineBankingFinland.d.ts +2 -0
- package/dist/types/components/internal/icons/IconOnlineBankingIndonesia.d.ts +2 -0
- package/dist/types/components/internal/icons/IconOnlineBankingLatvia.d.ts +2 -0
- package/dist/types/components/internal/icons/IconOnlineBankingLithuania.d.ts +2 -0
- package/dist/types/components/internal/icons/IconOnlineBankingThailand.d.ts +2 -0
- package/dist/types/components/internal/icons/IconPayByBank.d.ts +2 -0
- package/dist/types/components/internal/icons/IconPayU.d.ts +2 -0
- package/dist/types/components/internal/icons/IconSatispay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconUpi.d.ts +2 -0
- package/dist/types/components/internal/icons/index.d.ts +18 -0
- package/dist/types/components/wallets/BancomatPay/BancomatPay.d.ts +15 -0
- package/dist/types/components/wallets/BancomatPay/index.d.ts +2 -0
- package/dist/types/components/wallets/BancomatPay/type.d.ts +7 -0
- package/dist/types/components/wallets/Bizum/Bizum.d.ts +15 -0
- package/dist/types/components/wallets/Bizum/index.d.ts +2 -0
- package/dist/types/components/wallets/Bizum/type.d.ts +7 -0
- package/dist/types/components/wallets/DragonPay/DragonPay.d.ts +16 -0
- package/dist/types/components/wallets/DragonPay/index.d.ts +2 -0
- package/dist/types/components/wallets/DragonPay/type.d.ts +6 -0
- package/dist/types/components/wallets/EPS/EPS.d.ts +15 -0
- package/dist/types/components/wallets/EPS/index.d.ts +2 -0
- package/dist/types/components/wallets/EPS/type.d.ts +7 -0
- package/dist/types/components/wallets/Fpx/Fpx.d.ts +16 -0
- package/dist/types/components/wallets/Fpx/index.d.ts +2 -0
- package/dist/types/components/wallets/Fpx/type.d.ts +6 -0
- package/dist/types/components/wallets/MbWay/MbWay.d.ts +15 -0
- package/dist/types/components/wallets/MbWay/index.d.ts +2 -0
- package/dist/types/components/wallets/MbWay/type.d.ts +7 -0
- package/dist/types/components/wallets/Multibanco/Multibanco.d.ts +15 -0
- package/dist/types/components/wallets/Multibanco/index.d.ts +2 -0
- package/dist/types/components/wallets/Multibanco/type.d.ts +7 -0
- package/dist/types/components/wallets/MyBank/MyBank.d.ts +15 -0
- package/dist/types/components/wallets/MyBank/index.d.ts +2 -0
- package/dist/types/components/wallets/MyBank/type.d.ts +7 -0
- package/dist/types/components/wallets/OnlineBankingEstonia/OnlineBankingEstonia.d.ts +16 -0
- package/dist/types/components/wallets/OnlineBankingEstonia/index.d.ts +2 -0
- package/dist/types/components/wallets/OnlineBankingEstonia/type.d.ts +6 -0
- package/dist/types/components/wallets/OnlineBankingFinland/OnlineBankingFinland.d.ts +16 -0
- package/dist/types/components/wallets/OnlineBankingFinland/index.d.ts +2 -0
- package/dist/types/components/wallets/OnlineBankingFinland/type.d.ts +6 -0
- package/dist/types/components/wallets/OnlineBankingIndonesia/OnlineBankingIndonesia.d.ts +16 -0
- package/dist/types/components/wallets/OnlineBankingIndonesia/index.d.ts +2 -0
- package/dist/types/components/wallets/OnlineBankingIndonesia/type.d.ts +6 -0
- package/dist/types/components/wallets/OnlineBankingLatvia/OnlineBankingLatvia.d.ts +16 -0
- package/dist/types/components/wallets/OnlineBankingLatvia/index.d.ts +2 -0
- package/dist/types/components/wallets/OnlineBankingLatvia/type.d.ts +6 -0
- package/dist/types/components/wallets/OnlineBankingLithuania/OnlineBankingLithuania.d.ts +16 -0
- package/dist/types/components/wallets/OnlineBankingLithuania/index.d.ts +2 -0
- package/dist/types/components/wallets/OnlineBankingLithuania/type.d.ts +6 -0
- package/dist/types/components/wallets/OnlineBankingThailand/OnlineBankingThailand.d.ts +16 -0
- package/dist/types/components/wallets/OnlineBankingThailand/index.d.ts +2 -0
- package/dist/types/components/wallets/OnlineBankingThailand/type.d.ts +6 -0
- package/dist/types/components/wallets/PayByBank/PayByBank.d.ts +16 -0
- package/dist/types/components/wallets/PayByBank/index.d.ts +2 -0
- package/dist/types/components/wallets/PayByBank/type.d.ts +6 -0
- package/dist/types/components/wallets/PayU/PayU.d.ts +15 -0
- package/dist/types/components/wallets/PayU/index.d.ts +2 -0
- package/dist/types/components/wallets/PayU/type.d.ts +7 -0
- package/dist/types/components/wallets/Satispay/Satispay.d.ts +15 -0
- package/dist/types/components/wallets/Satispay/index.d.ts +2 -0
- package/dist/types/components/wallets/Satispay/type.d.ts +7 -0
- package/dist/types/components/wallets/Upi/Upi.d.ts +16 -0
- package/dist/types/components/wallets/Upi/index.d.ts +2 -0
- package/dist/types/components/wallets/Upi/type.d.ts +6 -0
- package/dist/types/components/wallets/index.d.ts +18 -0
- package/dist/types/constant.d.ts +37 -1
- package/dist/types/hooks/useBaseWallet.d.ts +16 -4
- package/dist/types/i18n/locales/de-DE.d.ts +18 -0
- package/dist/types/i18n/locales/en-GB.d.ts +18 -0
- package/dist/types/i18n/locales/es-ES.d.ts +18 -0
- package/dist/types/i18n/locales/fr-FR.d.ts +18 -0
- package/dist/types/i18n/locales/ja-JP.d.ts +18 -0
- package/dist/types/i18n/locales/ko-KR.d.ts +18 -0
- package/dist/types/i18n/locales/nl-NL.d.ts +18 -0
- package/dist/types/i18n/locales/pt-PT.d.ts +18 -0
- package/dist/types/i18n/locales/ru-RU.d.ts +18 -0
- package/dist/types/i18n/locales/zh-CN.d.ts +18 -0
- package/dist/types/i18n/locales/zh-HK.d.ts +18 -0
- package/dist/types/i18n/locales/zh-TW.d.ts +18 -0
- package/dist/types/utils/payment.d.ts +13 -2
- package/package.json +1 -1
- package/dist/es/api/modules/card/index.js +0 -16
- package/dist/es/api/modules/google-pay/index.js +0 -16
- package/dist/es/api/modules/sepa/index.js +0 -16
- package/dist/es/api/modules/wallet/index.js +0 -16
- package/dist/types/api/modules/card/index.d.ts +0 -4
- package/dist/types/api/modules/google-pay/index.d.ts +0 -4
- package/dist/types/api/modules/sepa/index.d.ts +0 -4
- package/dist/types/api/modules/wallet/index.d.ts +0 -18
package/dist/es/api/http.js
CHANGED
|
@@ -6,8 +6,19 @@ import { getFetch } from "./fetch.js";
|
|
|
6
6
|
import { PayKKaError, EPayKKaError } from "../core/error.js";
|
|
7
7
|
import "../out/fraud-detection.js";
|
|
8
8
|
import { getBrowserInfo } from "../utils/system-info/get-browser-info.js";
|
|
9
|
-
const request = async (method, url, params, { timeout = 2e4, headers, locale } = {}) => {
|
|
9
|
+
const request = async (method, url, params, { timeout = 2e4, headers, locale, signal } = {}) => {
|
|
10
10
|
const abortController = new AbortController();
|
|
11
|
+
if (signal) {
|
|
12
|
+
if (signal.aborted) {
|
|
13
|
+
abortController.abort(signal.reason);
|
|
14
|
+
} else {
|
|
15
|
+
signal.addEventListener(
|
|
16
|
+
"abort",
|
|
17
|
+
() => abortController.abort(signal.reason),
|
|
18
|
+
{ once: true }
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
11
22
|
const timer = setTimeout(() => {
|
|
12
23
|
abortController.abort();
|
|
13
24
|
}, timeout);
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import { apiPrefix } from "../../../config.js";
|
|
2
2
|
import { http } from "../../http.js";
|
|
3
|
-
import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
|
|
4
|
-
import { payResMap } from "../map.js";
|
|
5
3
|
const getMerchantSession = async (options) => {
|
|
6
4
|
return http.post(`${apiPrefix}/apple-pay/create-session`, options);
|
|
7
5
|
};
|
|
8
|
-
const applePay = async (params, extraParams, options) => {
|
|
9
|
-
const paymentParams = buildPaymentParams(params, extraParams);
|
|
10
|
-
return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
|
|
11
|
-
};
|
|
12
|
-
const getApplePayInfo = async (params, extraParams, options) => {
|
|
13
|
-
const queryParams = buildQueryParams(params, extraParams);
|
|
14
|
-
return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
|
|
15
|
-
};
|
|
16
6
|
export {
|
|
17
|
-
applePay,
|
|
18
|
-
getApplePayInfo,
|
|
19
7
|
getMerchantSession
|
|
20
8
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { apiPrefix } from "../../../config.js";
|
|
2
|
+
import "../../../utils/card-brand/brands.js";
|
|
3
|
+
import "../../../utils/system-info/get-browser-info.js";
|
|
4
|
+
import { payWithCheckpoints } from "../../../utils/payment.js";
|
|
5
|
+
import { http } from "../../http.js";
|
|
6
|
+
import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
|
|
7
|
+
import { payResMap } from "../map.js";
|
|
8
|
+
const commonPayment = async (config) => {
|
|
9
|
+
const { params, extraParams, options: { request, query } = {} } = config;
|
|
10
|
+
if (query == null ? void 0 : query.enable) {
|
|
11
|
+
return payWithCheckpoints(
|
|
12
|
+
(signal) => doCommonPayment(params, extraParams, { ...request, signal }),
|
|
13
|
+
(timeout, signal) => commonPaymentQuery(query.params, query.extraParams, { ...request, timeout, signal })
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
return doCommonPayment(params, extraParams, request);
|
|
17
|
+
};
|
|
18
|
+
const doCommonPayment = async (params, extraParams, options) => {
|
|
19
|
+
const paymentParams = buildPaymentParams(params, extraParams);
|
|
20
|
+
return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
|
|
21
|
+
};
|
|
22
|
+
const commonPaymentQuery = async (params, extraParams, options) => {
|
|
23
|
+
const queryParams = buildQueryParams(params, extraParams);
|
|
24
|
+
return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
commonPayment,
|
|
28
|
+
commonPaymentQuery
|
|
29
|
+
};
|
|
@@ -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.17.0"
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
const getBrowserParams = async (params = {}) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../utils/card-brand/brands.js";
|
|
2
2
|
import "../../../utils/system-info/get-browser-info.js";
|
|
3
|
-
import "../../../core.js";
|
|
4
3
|
import { http } from "../../http.js";
|
|
4
|
+
import "../../../core.js";
|
|
5
5
|
var ThreeDSAuthOperate = /* @__PURE__ */ ((ThreeDSAuthOperate2) => {
|
|
6
6
|
ThreeDSAuthOperate2["OPEN"] = "OPEN";
|
|
7
7
|
ThreeDSAuthOperate2["CANCEL"] = "CANCEL";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import "../../utils/card-brand/brands.js";
|
|
2
2
|
import "../../utils/system-info/get-browser-info.js";
|
|
3
3
|
import { deepMerge } from "../../utils/object.js";
|
|
4
|
+
import "../../core.js";
|
|
5
|
+
import "../../core/context.js";
|
|
6
|
+
import "../../out/fraud-detection.js";
|
|
4
7
|
const buildPaymentParams = (params, extraParams = {}) => {
|
|
5
8
|
const { bill, payment, customer } = params;
|
|
6
9
|
const mergedParams = deepMerge(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { u } from "../../core.js";
|
|
2
2
|
import "../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../utils/system-info/get-browser-info.js";
|
|
4
|
-
import { useI18n } from "../../hooks/useI18n.js";
|
|
5
|
-
import "../../out/fraud-detection.js";
|
|
6
4
|
import "../../core/context.js";
|
|
5
|
+
import "../../out/fraud-detection.js";
|
|
6
|
+
import { useI18n } from "../../hooks/useI18n.js";
|
|
7
7
|
import "../internal/Form/type.js";
|
|
8
8
|
import "../internal/Form/context.js";
|
|
9
9
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -4,10 +4,10 @@ import { EAddressType } from "../../constant.js";
|
|
|
4
4
|
import { isArray, isNil } from "../../utils/is.js";
|
|
5
5
|
import "../../utils/card-brand/brands.js";
|
|
6
6
|
import "../../utils/system-info/get-browser-info.js";
|
|
7
|
+
import { CoreContext } from "../../core/context.js";
|
|
8
|
+
import "../../out/fraud-detection.js";
|
|
7
9
|
import { useBEM } from "../../hooks/useBEM.js";
|
|
8
10
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
9
|
-
import "../../out/fraud-detection.js";
|
|
10
|
-
import { CoreContext } from "../../core/context.js";
|
|
11
11
|
import "../internal/Form/type.js";
|
|
12
12
|
import "../internal/Form/context.js";
|
|
13
13
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -7,9 +7,10 @@ import { ApplePayEventType } from "../../types/event.js";
|
|
|
7
7
|
import { PaymentMethod, SessionMode } from "../../constant.js";
|
|
8
8
|
import { deepMerge } from "../../utils/object.js";
|
|
9
9
|
import { processPaymentStatus, formatPaymentResult } from "../../utils/payment.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { getMerchantSession } from "../../api/modules/apple-pay/index.js";
|
|
11
|
+
import { commonPaymentQuery, commonPayment } from "../../api/modules/common/index.js";
|
|
12
12
|
import { getBrowserParams } from "../../api/modules/get-browser-params.js";
|
|
13
|
+
import { buildPaymentParams } from "../../api/utils/index.js";
|
|
13
14
|
import { useBEM } from "../../hooks/useBEM.js";
|
|
14
15
|
import "../../core/context.js";
|
|
15
16
|
import { PayKKaError } from "../../core/error.js";
|
|
@@ -222,7 +223,7 @@ const ApplePay = w((props) => {
|
|
|
222
223
|
};
|
|
223
224
|
};
|
|
224
225
|
async function pay(search = false, timeout, token, billingContact, shippingContact) {
|
|
225
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
226
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
226
227
|
setErrorMsg("");
|
|
227
228
|
try {
|
|
228
229
|
core.payment.currPaymentMethod.value = CURR_PAYMENT_METHOD;
|
|
@@ -230,7 +231,7 @@ const ApplePay = w((props) => {
|
|
|
230
231
|
let res = null;
|
|
231
232
|
if (search) {
|
|
232
233
|
const extraParams = (_b = (_a = core.config)._getExtraParams) == null ? void 0 : _b.call(_a, "query", CURR_PAYMENT_METHOD);
|
|
233
|
-
res = await
|
|
234
|
+
res = await commonPaymentQuery(
|
|
234
235
|
{
|
|
235
236
|
sessionId: session.sessionId,
|
|
236
237
|
clientKey: session.clientKey,
|
|
@@ -246,11 +247,26 @@ const ApplePay = w((props) => {
|
|
|
246
247
|
await core.updateSessionId(buildPaymentParams(paymentParams, extraParams));
|
|
247
248
|
session.sessionId && (paymentParams.sessionId = session.sessionId);
|
|
248
249
|
}
|
|
249
|
-
res = await
|
|
250
|
+
res = await commonPayment({
|
|
251
|
+
params: paymentParams,
|
|
252
|
+
extraParams,
|
|
253
|
+
options: {
|
|
254
|
+
request: requestOptions,
|
|
255
|
+
query: {
|
|
256
|
+
enable: true,
|
|
257
|
+
params: {
|
|
258
|
+
sessionId: session.sessionId,
|
|
259
|
+
clientKey: session.clientKey,
|
|
260
|
+
paymentMethod: CURR_PAYMENT_METHOD
|
|
261
|
+
},
|
|
262
|
+
extraParams: (_g = (_f = core.config)._getExtraParams) == null ? void 0 : _g.call(_f, "query", CURR_PAYMENT_METHOD)
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
});
|
|
250
266
|
}
|
|
251
267
|
const { errorMessage, errorCode, sessionId } = res;
|
|
252
268
|
sessionId && (session.sessionId = sessionId);
|
|
253
|
-
!search && ((
|
|
269
|
+
!search && ((_h = props.onSubmitResponse) == null ? void 0 : _h.call(props, res, getPaymentMethodContext()));
|
|
254
270
|
let end = true;
|
|
255
271
|
await processPaymentStatus(res, {
|
|
256
272
|
onProcessing: async () => {
|
|
@@ -299,7 +315,7 @@ const ApplePay = w((props) => {
|
|
|
299
315
|
} else {
|
|
300
316
|
const message = error.i18nKey ? i18n.get(error.i18nKey) : error.message;
|
|
301
317
|
message && setErrorMsg(message);
|
|
302
|
-
(
|
|
318
|
+
(_i = props.onError) == null ? void 0 : _i.call(
|
|
303
319
|
props,
|
|
304
320
|
new PayKKaError("API_ERROR", message, { code: error.code, cause: error }),
|
|
305
321
|
getPaymentMethodContext()
|
|
@@ -313,7 +329,7 @@ const ApplePay = w((props) => {
|
|
|
313
329
|
const genApplePayRequest = () => {
|
|
314
330
|
var _a, _b, _c, _d, _e, _f;
|
|
315
331
|
const checkout = session == null ? void 0 : session.checkout;
|
|
316
|
-
const { applePay
|
|
332
|
+
const { applePay } = (checkout == null ? void 0 : checkout.channelParams) ?? {};
|
|
317
333
|
const requiredBillingContactFields = [
|
|
318
334
|
...((_a = applePayConfig.request) == null ? void 0 : _a.requiredBillingContactFields) || []
|
|
319
335
|
];
|
|
@@ -323,11 +339,11 @@ const ApplePay = w((props) => {
|
|
|
323
339
|
const amount = (_c = core.payment) == null ? void 0 : _c.amount.value;
|
|
324
340
|
return {
|
|
325
341
|
merchantCapabilities: ["supports3DS"],
|
|
326
|
-
countryCode: (
|
|
342
|
+
countryCode: (applePay == null ? void 0 : applePay.countryCode) ?? "",
|
|
327
343
|
requiredBillingContactFields,
|
|
328
344
|
requiredShippingContactFields: (_d = applePayConfig.request) == null ? void 0 : _d.requiredShippingContactFields,
|
|
329
345
|
currencyCode: (amount == null ? void 0 : amount.currency) ?? "",
|
|
330
|
-
supportedNetworks: ((_f = (_e =
|
|
346
|
+
supportedNetworks: ((_f = (_e = applePay == null ? void 0 : applePay.supportedNetworks) == null ? void 0 : _e.map) == null ? void 0 : _f.call(_e, (item) => underscoreToUpperCamelCase(item))) ?? [],
|
|
331
347
|
total: {
|
|
332
348
|
label: (checkout == null ? void 0 : checkout.theme.merchantName) ?? "",
|
|
333
349
|
type: "final",
|
|
@@ -3,9 +3,9 @@ import { isUndefined } from "../../utils/is.js";
|
|
|
3
3
|
import "../../utils/card-brand/brands.js";
|
|
4
4
|
import "../../utils/system-info/get-browser-info.js";
|
|
5
5
|
import { EInternalFieldType } from "../SecuredFieldsProvider/index.js";
|
|
6
|
-
import { useI18n } from "../../hooks/useI18n.js";
|
|
7
|
-
import "../../out/fraud-detection.js";
|
|
8
6
|
import "../../core/context.js";
|
|
7
|
+
import "../../out/fraud-detection.js";
|
|
8
|
+
import { useI18n } from "../../hooks/useI18n.js";
|
|
9
9
|
import "../internal/Form/type.js";
|
|
10
10
|
import "../internal/Form/context.js";
|
|
11
11
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { w, A, h, F, y, q, T, u, b } from "../../core.js";
|
|
2
2
|
import { isTimeoutError } from "../../api/http.js";
|
|
3
|
-
import { getCardPayInfo, cardPay } from "../../api/modules/card/index.js";
|
|
4
3
|
import { safeParse, safeStringify } from "../../utils/index.js";
|
|
5
4
|
import { defaultInputStyleConfig } from "../../types/index.js";
|
|
6
5
|
import { PaymentMethod, PaymentType, SessionMode, COMMON_CLASS_NAME, CardPaymentMethods } from "../../constant.js";
|
|
7
|
-
import {
|
|
6
|
+
import { commonPaymentQuery, commonPayment } from "../../api/modules/common/index.js";
|
|
8
7
|
import { getBrowserParams } from "../../api/modules/get-browser-params.js";
|
|
9
8
|
import { CoreContext } from "../../core/context.js";
|
|
10
9
|
import { PayKKaError } from "../../core/error.js";
|
|
@@ -13,6 +12,7 @@ import { createPromise } from "../../utils/create-promise.js";
|
|
|
13
12
|
import { useBEM } from "../../hooks/useBEM.js";
|
|
14
13
|
import { usePayState } from "../../hooks/usePayState.js";
|
|
15
14
|
import { useRetry } from "../../hooks/useRetry.js";
|
|
15
|
+
import { buildPaymentParams } from "../../api/utils/index.js";
|
|
16
16
|
import { DEFAULT_ADDRESS, AddressField } from "../AddressField/index.js";
|
|
17
17
|
import { CardBrands } from "../CardBrands/index.js";
|
|
18
18
|
import { CardExpireDateField } from "../CardExpireDateField/index.js";
|
|
@@ -315,14 +315,14 @@ const Card = w((props, ref) => {
|
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
317
|
async function pay(search = false, timeout) {
|
|
318
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
318
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
319
319
|
try {
|
|
320
320
|
core.payment.currPaymentMethod.value = CURR_PAYMENT_METHOD;
|
|
321
321
|
const requestOptions = { locale: i18n.locale, timeout };
|
|
322
322
|
let res = null;
|
|
323
323
|
if (search) {
|
|
324
324
|
const extraParams = (_b2 = (_a2 = core.config)._getExtraParams) == null ? void 0 : _b2.call(_a2, "query", CURR_PAYMENT_METHOD);
|
|
325
|
-
res = await
|
|
325
|
+
res = await commonPaymentQuery(
|
|
326
326
|
{
|
|
327
327
|
sessionId: session.sessionId,
|
|
328
328
|
clientKey: session.clientKey
|
|
@@ -341,7 +341,21 @@ const Card = w((props, ref) => {
|
|
|
341
341
|
(_f = SFPRef.current) == null ? void 0 : _f.payment(paymentParams, extraParams);
|
|
342
342
|
return { end: true };
|
|
343
343
|
} else {
|
|
344
|
-
res = await
|
|
344
|
+
res = await commonPayment({
|
|
345
|
+
params: paymentParams,
|
|
346
|
+
extraParams,
|
|
347
|
+
options: {
|
|
348
|
+
request: requestOptions,
|
|
349
|
+
query: {
|
|
350
|
+
enable: false,
|
|
351
|
+
params: {
|
|
352
|
+
sessionId: session.sessionId,
|
|
353
|
+
clientKey: session.clientKey
|
|
354
|
+
},
|
|
355
|
+
extraParams: (_h = (_g = core.config)._getExtraParams) == null ? void 0 : _h.call(_g, "query", CURR_PAYMENT_METHOD)
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
});
|
|
345
359
|
}
|
|
346
360
|
}
|
|
347
361
|
return processAfterPayment(res, search);
|
|
@@ -473,7 +487,7 @@ const Card = w((props, ref) => {
|
|
|
473
487
|
return { end: true };
|
|
474
488
|
try {
|
|
475
489
|
const extraParams = (_b2 = (_a2 = core.config)._getExtraParams) == null ? void 0 : _b2.call(_a2, "query", CURR_PAYMENT_METHOD);
|
|
476
|
-
const res = await
|
|
490
|
+
const res = await commonPaymentQuery(
|
|
477
491
|
{
|
|
478
492
|
sessionId: session.sessionId,
|
|
479
493
|
clientKey: session.clientKey
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { u } from "../../core.js";
|
|
2
2
|
import "../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../utils/system-info/get-browser-info.js";
|
|
4
|
-
import { useI18n } from "../../hooks/useI18n.js";
|
|
5
|
-
import "../../out/fraud-detection.js";
|
|
6
4
|
import "../../core/context.js";
|
|
5
|
+
import "../../out/fraud-detection.js";
|
|
6
|
+
import { useI18n } from "../../hooks/useI18n.js";
|
|
7
7
|
import "../internal/Form/type.js";
|
|
8
8
|
import "../internal/Form/context.js";
|
|
9
9
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -4,9 +4,9 @@ import "../../utils/card-brand/brands.js";
|
|
|
4
4
|
import "../../utils/system-info/get-browser-info.js";
|
|
5
5
|
import { limitedToNumber } from "../../utils/format.js";
|
|
6
6
|
import { EFieldType } from "../SecuredFieldsProvider/index.js";
|
|
7
|
-
import { useI18n } from "../../hooks/useI18n.js";
|
|
8
|
-
import "../../out/fraud-detection.js";
|
|
9
7
|
import "../../core/context.js";
|
|
8
|
+
import "../../out/fraud-detection.js";
|
|
9
|
+
import { useI18n } from "../../hooks/useI18n.js";
|
|
10
10
|
import "../internal/Form/type.js";
|
|
11
11
|
import "../internal/Form/context.js";
|
|
12
12
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -9,11 +9,11 @@ import { EFieldType } from "../SecuredFieldsProvider/index.js";
|
|
|
9
9
|
import { finCardBrandInfoByCode, findCardBrandInfo, getSupportedCardBrands } from "../../utils/card-brand/index.js";
|
|
10
10
|
import "../../utils/system-info/get-browser-info.js";
|
|
11
11
|
import { trimAll } from "../../utils/format.js";
|
|
12
|
-
import
|
|
12
|
+
import "../../core/context.js";
|
|
13
|
+
import "../../out/fraud-detection.js";
|
|
13
14
|
import { useBEM } from "../../hooks/useBEM.js";
|
|
14
15
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
15
|
-
import "
|
|
16
|
-
import "../../core/context.js";
|
|
16
|
+
import { IconCardNo } from "../internal/icons/IconCardNo.js";
|
|
17
17
|
const { bem } = useBEM("combined-card-info");
|
|
18
18
|
const CombinedCardInfo = w(
|
|
19
19
|
(props, ref) => {
|
|
@@ -25,8 +25,26 @@ import { IDeal } from "../wallets/IDeal/IDeal.js";
|
|
|
25
25
|
import { Skrill } from "../wallets/Skrill/Skrill.js";
|
|
26
26
|
import { P24 } from "../wallets/P24/P24.js";
|
|
27
27
|
import { Trustly } from "../wallets/Trustly/Trustly.js";
|
|
28
|
+
import { BancomatPay } from "../wallets/BancomatPay/BancomatPay.js";
|
|
29
|
+
import { MyBank } from "../wallets/MyBank/MyBank.js";
|
|
30
|
+
import { Bizum } from "../wallets/Bizum/Bizum.js";
|
|
31
|
+
import { EPS } from "../wallets/EPS/EPS.js";
|
|
32
|
+
import { MbWay } from "../wallets/MbWay/MbWay.js";
|
|
33
|
+
import { Multibanco } from "../wallets/Multibanco/Multibanco.js";
|
|
34
|
+
import { PayU } from "../wallets/PayU/PayU.js";
|
|
35
|
+
import { Satispay } from "../wallets/Satispay/Satispay.js";
|
|
28
36
|
import { AliPay } from "../wallets/AliPay/AliPay.js";
|
|
29
37
|
import { WechatPay } from "../wallets/WechatPay/WechatPay.js";
|
|
38
|
+
import { PayByBank } from "../wallets/PayByBank/PayByBank.js";
|
|
39
|
+
import { Fpx } from "../wallets/Fpx/Fpx.js";
|
|
40
|
+
import { DragonPay } from "../wallets/DragonPay/DragonPay.js";
|
|
41
|
+
import { Upi } from "../wallets/Upi/Upi.js";
|
|
42
|
+
import { OnlineBankingFinland } from "../wallets/OnlineBankingFinland/OnlineBankingFinland.js";
|
|
43
|
+
import { OnlineBankingEstonia } from "../wallets/OnlineBankingEstonia/OnlineBankingEstonia.js";
|
|
44
|
+
import { OnlineBankingLatvia } from "../wallets/OnlineBankingLatvia/OnlineBankingLatvia.js";
|
|
45
|
+
import { OnlineBankingLithuania } from "../wallets/OnlineBankingLithuania/OnlineBankingLithuania.js";
|
|
46
|
+
import { OnlineBankingIndonesia } from "../wallets/OnlineBankingIndonesia/OnlineBankingIndonesia.js";
|
|
47
|
+
import { OnlineBankingThailand } from "../wallets/OnlineBankingThailand/OnlineBankingThailand.js";
|
|
30
48
|
import { useBEM } from "../../hooks/useBEM.js";
|
|
31
49
|
import { CoreContext } from "../../core/context.js";
|
|
32
50
|
import "../../utils/card-brand/brands.js";
|
|
@@ -60,8 +78,26 @@ import { IconOvo } from "../internal/icons/IconOvo.js";
|
|
|
60
78
|
import { IconSkrill } from "../internal/icons/IconSkrill.js";
|
|
61
79
|
import { IconBancontact } from "../internal/icons/IconBancontact.js";
|
|
62
80
|
import { IconIdeal } from "../internal/icons/IconIdeal.js";
|
|
81
|
+
import { IconBancomatPay } from "../internal/icons/IconBancomatPay.js";
|
|
82
|
+
import { IconMyBank } from "../internal/icons/IconMyBank.js";
|
|
83
|
+
import { IconBizum } from "../internal/icons/IconBizum.js";
|
|
84
|
+
import { IconEPS } from "../internal/icons/IconEPS.js";
|
|
85
|
+
import { IconMbWay } from "../internal/icons/IconMbWay.js";
|
|
86
|
+
import { IconMultibanco } from "../internal/icons/IconMultibanco.js";
|
|
87
|
+
import { IconPayU } from "../internal/icons/IconPayU.js";
|
|
88
|
+
import { IconSatispay } from "../internal/icons/IconSatispay.js";
|
|
63
89
|
import { IconWechatPayGlobal } from "../internal/icons/IconWechatPayGlobal.js";
|
|
64
90
|
import { IconAlipayPlus } from "../internal/icons/IconAlipayPlus.js";
|
|
91
|
+
import { IconPayByBank } from "../internal/icons/IconPayByBank.js";
|
|
92
|
+
import { IconFpx } from "../internal/icons/IconFpx.js";
|
|
93
|
+
import { IconDragonPay } from "../internal/icons/IconDragonPay.js";
|
|
94
|
+
import { IconUpi } from "../internal/icons/IconUpi.js";
|
|
95
|
+
import { IconOnlineBankingFinland } from "../internal/icons/IconOnlineBankingFinland.js";
|
|
96
|
+
import { IconOnlineBankingEstonia } from "../internal/icons/IconOnlineBankingEstonia.js";
|
|
97
|
+
import { IconOnlineBankingLatvia } from "../internal/icons/IconOnlineBankingLatvia.js";
|
|
98
|
+
import { IconOnlineBankingLithuania } from "../internal/icons/IconOnlineBankingLithuania.js";
|
|
99
|
+
import { IconOnlineBankingIndonesia } from "../internal/icons/IconOnlineBankingIndonesia.js";
|
|
100
|
+
import { IconOnlineBankingThailand } from "../internal/icons/IconOnlineBankingThailand.js";
|
|
65
101
|
import { intersection } from "../../utils/array.js";
|
|
66
102
|
const dropInSupportedPaymentMethods = [
|
|
67
103
|
...CardPaymentMethods,
|
|
@@ -90,7 +126,25 @@ const dropInSupportedPaymentMethods = [
|
|
|
90
126
|
PaymentMethod.OVO,
|
|
91
127
|
PaymentMethod.SKRILL,
|
|
92
128
|
PaymentMethod.TRUSTLY,
|
|
93
|
-
PaymentMethod.P24
|
|
129
|
+
PaymentMethod.P24,
|
|
130
|
+
PaymentMethod.BANCOMAT_PAY,
|
|
131
|
+
PaymentMethod.MY_BANK,
|
|
132
|
+
PaymentMethod.BIZUM,
|
|
133
|
+
PaymentMethod.EPS,
|
|
134
|
+
PaymentMethod.MB_WAY,
|
|
135
|
+
PaymentMethod.MULTIBANCO,
|
|
136
|
+
PaymentMethod.PAY_U,
|
|
137
|
+
PaymentMethod.SATISPAY,
|
|
138
|
+
PaymentMethod.PAY_BY_BANK,
|
|
139
|
+
PaymentMethod.FPX,
|
|
140
|
+
PaymentMethod.DRAGONPAY,
|
|
141
|
+
PaymentMethod.UPI,
|
|
142
|
+
PaymentMethod.ONLINE_BANKING_FINLAND,
|
|
143
|
+
PaymentMethod.ONLINE_BANKING_ESTONIA,
|
|
144
|
+
PaymentMethod.ONLINE_BANKING_LATVIA,
|
|
145
|
+
PaymentMethod.ONLINE_BANKING_LITHUANIA,
|
|
146
|
+
PaymentMethod.ONLINE_BANKING_INDONESIA,
|
|
147
|
+
PaymentMethod.ONLINE_BANKING_THAILAND
|
|
94
148
|
];
|
|
95
149
|
const PaymentComponentMap = {
|
|
96
150
|
[PaymentCategory.CARD]: Card,
|
|
@@ -118,6 +172,24 @@ const PaymentComponentMap = {
|
|
|
118
172
|
[PaymentCategory.SKRILL]: Skrill,
|
|
119
173
|
[PaymentCategory.TRUSTLY]: Trustly,
|
|
120
174
|
[PaymentCategory.P24]: P24,
|
|
175
|
+
[PaymentCategory.BANCOMAT_PAY]: BancomatPay,
|
|
176
|
+
[PaymentCategory.MY_BANK]: MyBank,
|
|
177
|
+
[PaymentCategory.BIZUM]: Bizum,
|
|
178
|
+
[PaymentCategory.EPS]: EPS,
|
|
179
|
+
[PaymentCategory.MB_WAY]: MbWay,
|
|
180
|
+
[PaymentCategory.MULTIBANCO]: Multibanco,
|
|
181
|
+
[PaymentCategory.PAY_U]: PayU,
|
|
182
|
+
[PaymentCategory.SATISPAY]: Satispay,
|
|
183
|
+
[PaymentCategory.PAY_BY_BANK]: PayByBank,
|
|
184
|
+
[PaymentCategory.FPX]: Fpx,
|
|
185
|
+
[PaymentCategory.DRAGONPAY]: DragonPay,
|
|
186
|
+
[PaymentCategory.UPI]: Upi,
|
|
187
|
+
[PaymentCategory.ONLINE_BANKING_FINLAND]: OnlineBankingFinland,
|
|
188
|
+
[PaymentCategory.ONLINE_BANKING_ESTONIA]: OnlineBankingEstonia,
|
|
189
|
+
[PaymentCategory.ONLINE_BANKING_LATVIA]: OnlineBankingLatvia,
|
|
190
|
+
[PaymentCategory.ONLINE_BANKING_LITHUANIA]: OnlineBankingLithuania,
|
|
191
|
+
[PaymentCategory.ONLINE_BANKING_INDONESIA]: OnlineBankingIndonesia,
|
|
192
|
+
[PaymentCategory.ONLINE_BANKING_THAILAND]: OnlineBankingThailand,
|
|
121
193
|
[PaymentCategory.WECHAT_PAY]: WechatPay,
|
|
122
194
|
[PaymentCategory.ALI_PAY]: AliPay
|
|
123
195
|
// [PaymentCategory.SEPA_DEBIT]: Sepa
|
|
@@ -215,6 +287,78 @@ const paymentCategoryOptionMap = {
|
|
|
215
287
|
icon: IconP24,
|
|
216
288
|
nameKey: "dropIn.p24.label"
|
|
217
289
|
},
|
|
290
|
+
[PaymentCategory.BANCOMAT_PAY]: {
|
|
291
|
+
icon: IconBancomatPay,
|
|
292
|
+
nameKey: "dropIn.bancomatPay.label"
|
|
293
|
+
},
|
|
294
|
+
[PaymentCategory.MY_BANK]: {
|
|
295
|
+
icon: IconMyBank,
|
|
296
|
+
nameKey: "dropIn.myBank.label"
|
|
297
|
+
},
|
|
298
|
+
[PaymentCategory.BIZUM]: {
|
|
299
|
+
icon: IconBizum,
|
|
300
|
+
nameKey: "dropIn.bizum.label"
|
|
301
|
+
},
|
|
302
|
+
[PaymentCategory.EPS]: {
|
|
303
|
+
icon: IconEPS,
|
|
304
|
+
nameKey: "dropIn.eps.label"
|
|
305
|
+
},
|
|
306
|
+
[PaymentCategory.MB_WAY]: {
|
|
307
|
+
icon: IconMbWay,
|
|
308
|
+
nameKey: "dropIn.mbWay.label"
|
|
309
|
+
},
|
|
310
|
+
[PaymentCategory.MULTIBANCO]: {
|
|
311
|
+
icon: IconMultibanco,
|
|
312
|
+
nameKey: "dropIn.multibanco.label"
|
|
313
|
+
},
|
|
314
|
+
[PaymentCategory.PAY_U]: {
|
|
315
|
+
icon: IconPayU,
|
|
316
|
+
nameKey: "dropIn.payU.label"
|
|
317
|
+
},
|
|
318
|
+
[PaymentCategory.SATISPAY]: {
|
|
319
|
+
icon: IconSatispay,
|
|
320
|
+
nameKey: "dropIn.satispay.label"
|
|
321
|
+
},
|
|
322
|
+
[PaymentCategory.PAY_BY_BANK]: {
|
|
323
|
+
icon: IconPayByBank,
|
|
324
|
+
nameKey: "dropIn.payByBank.label"
|
|
325
|
+
},
|
|
326
|
+
[PaymentCategory.FPX]: {
|
|
327
|
+
icon: IconFpx,
|
|
328
|
+
nameKey: "dropIn.fpx.label"
|
|
329
|
+
},
|
|
330
|
+
[PaymentCategory.DRAGONPAY]: {
|
|
331
|
+
icon: IconDragonPay,
|
|
332
|
+
nameKey: "dropIn.dragonPay.label"
|
|
333
|
+
},
|
|
334
|
+
[PaymentCategory.UPI]: {
|
|
335
|
+
icon: IconUpi,
|
|
336
|
+
nameKey: "dropIn.upi.label"
|
|
337
|
+
},
|
|
338
|
+
[PaymentCategory.ONLINE_BANKING_FINLAND]: {
|
|
339
|
+
icon: IconOnlineBankingFinland,
|
|
340
|
+
nameKey: "dropIn.onlineBankingFinland.label"
|
|
341
|
+
},
|
|
342
|
+
[PaymentCategory.ONLINE_BANKING_ESTONIA]: {
|
|
343
|
+
icon: IconOnlineBankingEstonia,
|
|
344
|
+
nameKey: "dropIn.onlineBankingEstonia.label"
|
|
345
|
+
},
|
|
346
|
+
[PaymentCategory.ONLINE_BANKING_LATVIA]: {
|
|
347
|
+
icon: IconOnlineBankingLatvia,
|
|
348
|
+
nameKey: "dropIn.onlineBankingLatvia.label"
|
|
349
|
+
},
|
|
350
|
+
[PaymentCategory.ONLINE_BANKING_LITHUANIA]: {
|
|
351
|
+
icon: IconOnlineBankingLithuania,
|
|
352
|
+
nameKey: "dropIn.onlineBankingLithuania.label"
|
|
353
|
+
},
|
|
354
|
+
[PaymentCategory.ONLINE_BANKING_INDONESIA]: {
|
|
355
|
+
icon: IconOnlineBankingIndonesia,
|
|
356
|
+
nameKey: "dropIn.onlineBankingIndonesia.label"
|
|
357
|
+
},
|
|
358
|
+
[PaymentCategory.ONLINE_BANKING_THAILAND]: {
|
|
359
|
+
icon: IconOnlineBankingThailand,
|
|
360
|
+
nameKey: "dropIn.onlineBankingThailand.label"
|
|
361
|
+
},
|
|
218
362
|
[PaymentCategory.ALI_PAY]: {
|
|
219
363
|
icon: IconAlipayPlus,
|
|
220
364
|
nameKey: "dropIn.aliPay.label"
|
|
@@ -9,9 +9,9 @@ import { isValuable } from "../../utils/is.js";
|
|
|
9
9
|
import "../../utils/card-brand/brands.js";
|
|
10
10
|
import "../../utils/system-info/get-browser-info.js";
|
|
11
11
|
import { EMAIL_REG } from "../../utils/reg-exp.js";
|
|
12
|
-
import { useI18n } from "../../hooks/useI18n.js";
|
|
13
|
-
import "../../out/fraud-detection.js";
|
|
14
12
|
import "../../core/context.js";
|
|
13
|
+
import "../../out/fraud-detection.js";
|
|
14
|
+
import { useI18n } from "../../hooks/useI18n.js";
|
|
15
15
|
import "../internal/Form/type.js";
|
|
16
16
|
import "../internal/Form/context.js";
|
|
17
17
|
import { FormItem } from "../internal/Form/FormItem.js";
|
|
@@ -11,8 +11,8 @@ import { createPromise } from "../../utils/create-promise.js";
|
|
|
11
11
|
import { separateInputStyle, genComponentStyle, loadStyle } from "../../utils/style.js";
|
|
12
12
|
import { EFieldType, SecuredFieldsProvider } from "../SecuredFieldsProvider/index.js";
|
|
13
13
|
import { intersection } from "../../utils/array.js";
|
|
14
|
-
import { genShortId } from "../../utils/string.js";
|
|
15
14
|
import { defaultInputStyleConfig } from "../../types/index.js";
|
|
15
|
+
import { genShortId } from "../../utils/string.js";
|
|
16
16
|
import { CardNumberField } from "../CardNumberField/index.js";
|
|
17
17
|
import { CardExpireDateField } from "../CardExpireDateField/index.js";
|
|
18
18
|
import { CardSecurityCodeField } from "../CardSecurityCodeField/index.js";
|