@paykka/card-checkout-ui 0.13.17 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/card-checkout-ui.js +53 -25
- package/dist/card-checkout-ui.umd.cjs +53 -25
- package/dist/es/api/http.js +1 -1
- package/dist/es/api/index.js +1 -1
- package/dist/es/api/modules/checkout/index.js +1 -3
- package/dist/es/api/modules/checkout/map.js +12 -4
- package/dist/es/api/modules/encrypted-card/index.js +3 -2
- package/dist/es/api/modules/get-browser-params.js +4 -8
- package/dist/es/api/modules/index.js +1 -1
- package/dist/es/api/modules/map.js +4 -1
- package/dist/es/api/modules/threeDS/index.js +16 -2
- package/dist/es/components/AccordionItem/AccordionItem.js +1 -3
- package/dist/es/components/AccountNameField/index.js +1 -1
- package/dist/es/components/AddressField/index.js +14 -4
- package/dist/es/components/ApplePay/index.js +74 -58
- package/dist/es/components/CPFField/index.js +3 -2
- package/dist/es/components/Card/index.js +192 -157
- package/dist/es/components/CardBrands/index.js +1 -1
- package/dist/es/components/CardExpireDateField/index.js +3 -2
- package/dist/es/components/CardHolderNameField/index.js +1 -1
- package/dist/es/components/CardIBANField/index.js +1 -1
- package/dist/es/components/CardNo/index.js +3 -3
- package/dist/es/components/CardNumberField/index.js +3 -2
- package/dist/es/components/CardSecurityCodeField/index.js +3 -2
- package/dist/es/components/CardSelector/index.js +5 -4
- package/dist/es/components/CombinedCardInfo/index.js +1 -1
- package/dist/es/components/DropIn/index.js +141 -144
- package/dist/es/components/EmailField/EmailField.js +1 -1
- package/dist/es/components/EncryptedCard/index.js +5 -5
- package/dist/es/components/GooglePay/index.js +126 -114
- package/dist/es/components/GuideCard/index.js +2 -2
- package/dist/es/components/PaymentButton/index.js +23 -8
- package/dist/es/components/RecurringTip/index.js +1 -1
- package/dist/es/components/SecuredFieldsProvider/index.js +31 -9
- package/dist/es/components/SecuredIframe/index.js +43 -27
- package/dist/es/components/Sepa/index.js +15 -7
- package/dist/es/components/SubmitButton/index.js +3 -3
- package/dist/es/components/ThreeDS/index.js +59 -30
- package/dist/es/components/Tip/index.js +1 -1
- package/dist/es/components/business/BlikCodeField/BlikCodeField.js +1 -1
- package/dist/es/components/business/BlikCodeField/index.js +1 -1
- package/dist/es/components/business/BlikConfirmModal/BlikConfirmModal.js +3 -3
- package/dist/es/components/business/BlikConfirmModal/index.js +2 -2
- package/dist/es/components/business/NameField/NameField.js +1 -1
- package/dist/es/components/business/NameField/index.js +1 -1
- package/dist/es/components/business/PhoneField/PhoneField.js +2 -1
- package/dist/es/components/business/PhoneField/index.js +1 -1
- package/dist/es/components/business/QRCodeModal/QRCodeModal.js +2 -2
- package/dist/es/components/business/QRCodeModal/index.js +1 -1
- package/dist/es/components/business/Tooltip/Tooltip.js +1 -1
- package/dist/es/components/business/Tooltip/index.js +1 -1
- package/dist/es/components/business/index.js +2 -2
- package/dist/es/components/index.js +11 -11
- package/dist/es/components/internal/Accordion/index.js +1 -1
- package/dist/es/components/internal/Button/{Button.js → Button2.js} +2 -2
- package/dist/es/components/internal/Button/index.js +2 -2
- package/dist/es/components/internal/CheckBox/CheckBox.js +3 -3
- package/dist/es/components/internal/CheckBox/index.js +1 -1
- package/dist/es/components/internal/Form/type.js +1 -1
- package/dist/es/components/internal/Info/Info.js +1 -1
- package/dist/es/components/internal/Info/index.js +1 -1
- package/dist/es/components/internal/Input/Input.js +1 -1
- package/dist/es/components/internal/Input/type.js +1 -1
- package/dist/es/components/internal/Loading/Loading2.js +20 -0
- package/dist/es/{api/modules/vietqr → components/internal/Loading}/index.js +3 -2
- package/dist/es/components/internal/Loading/loading.js +1 -0
- package/dist/es/components/internal/LoadingCheck/LoadingCheck.js +1 -1
- package/dist/es/components/internal/LoadingCheck/index.js +1 -1
- package/dist/es/components/internal/Modal/Modal.js +1 -1
- package/dist/es/components/internal/QRCode/QRCode.js +1 -1
- package/dist/es/components/internal/QRCode/index.js +1 -1
- package/dist/es/components/internal/Select/Select.js +5 -2
- package/dist/es/components/internal/Select/SelectMenu.js +1 -1
- package/dist/es/components/internal/Select/SelectMenuItem.js +1 -1
- package/dist/es/components/internal/icons/IconAlipayPlus.js +116 -0
- package/dist/es/components/internal/icons/IconArrowDown.js +4 -4
- package/dist/es/components/internal/icons/IconBancontact.js +69 -14
- package/dist/es/components/internal/icons/IconBlik.js +541 -21
- package/dist/es/components/internal/icons/IconError.js +2 -2
- package/dist/es/components/internal/icons/IconIdeal.js +61 -29
- package/dist/es/components/internal/icons/IconSkrill.js +14 -7
- package/dist/es/components/internal/icons/IconSuccess.js +2 -2
- package/dist/es/components/internal/icons/IconTrustly.js +11 -44
- package/dist/es/components/internal/icons/IconWechatPayGlobal.js +45 -0
- package/dist/es/components/internal/icons/IconWechatPayGlobalComplete.js +107 -0
- package/dist/es/components/wallets/AliPay/AliPay.js +186 -0
- package/dist/es/components/wallets/AliPay/ali-pay.js +1 -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/Bancontact/Bancontact.js +18 -18
- package/dist/es/components/wallets/Blik/Blik.js +26 -20
- package/dist/es/components/wallets/Boost/Boost.js +180 -0
- package/dist/es/components/wallets/Boost/boost2.js +1 -0
- package/dist/es/components/wallets/Boost/index.js +1 -0
- package/dist/es/components/wallets/Boost/type.js +1 -0
- package/dist/es/components/wallets/GCash/GCash.js +68 -261
- package/dist/es/components/wallets/GrabPay/GrabPay.js +176 -0
- package/dist/es/components/wallets/GrabPay/grab-pay.js +1 -0
- package/dist/es/components/wallets/GrabPay/index.js +1 -0
- package/dist/es/components/wallets/GrabPay/type.js +1 -0
- package/dist/es/components/wallets/IDeal/IDeal.js +18 -18
- package/dist/es/components/wallets/LinePay/LinePay.js +180 -0
- package/dist/es/components/wallets/LinePay/index.js +1 -0
- package/dist/es/components/wallets/LinePay/line-pay.js +1 -0
- package/dist/es/components/wallets/LinePay/type.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +184 -0
- package/dist/es/components/wallets/MayBankQRPay/index.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/may-bank-qr-pay.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/type.js +1 -0
- package/dist/es/components/wallets/NinePay/NinePay.js +182 -0
- package/dist/es/components/wallets/NinePay/index.js +1 -0
- package/dist/es/components/wallets/NinePay/nine-pay.js +1 -0
- package/dist/es/components/wallets/NinePay/type.js +1 -0
- package/dist/es/components/wallets/OVO/OVO.js +14 -15
- package/dist/es/components/wallets/OpayWallet/OpayWallet.js +61 -226
- package/dist/es/components/wallets/P24/P24.js +18 -18
- package/dist/es/components/wallets/PagaWallet/PagaWallet.js +61 -226
- package/dist/es/components/wallets/Paymaya/Paymaya.js +61 -229
- package/dist/es/components/wallets/PicPay/PicPay.js +83 -243
- package/dist/es/components/wallets/Pix/Pix.js +77 -244
- package/dist/es/components/wallets/ShopeePay/ShopeePay.js +182 -0
- package/dist/es/components/wallets/ShopeePay/index.js +1 -0
- package/dist/es/components/wallets/ShopeePay/shopee-pay.js +1 -0
- package/dist/es/components/wallets/ShopeePay/type.js +1 -0
- package/dist/es/components/wallets/Skrill/Skrill.js +34 -35
- package/dist/es/components/wallets/TNGWallet/TNGWallet.js +182 -0
- package/dist/es/components/wallets/TNGWallet/index.js +1 -0
- package/dist/es/components/wallets/TNGWallet/tng-wallet.js +1 -0
- package/dist/es/components/wallets/TNGWallet/type.js +1 -0
- package/dist/es/components/wallets/Trustly/Trustly.js +22 -25
- package/dist/es/components/wallets/Vietqr/Vietqr.js +69 -258
- package/dist/es/components/wallets/WechatPay/WechatPay.js +250 -0
- package/dist/es/components/wallets/WechatPay/index.js +1 -0
- package/dist/es/components/wallets/WechatPay/type.js +1 -0
- package/dist/es/components/wallets/WechatPay/util.js +47 -0
- package/dist/es/components/wallets/WechatPay/wechat-pay.js +1 -0
- package/dist/es/components/wallets/Zalopay/Zalopay.js +67 -258
- package/dist/es/components/wallets/index.js +9 -0
- package/dist/es/constant.js +7 -0
- package/dist/es/core/checkout.js +50 -49
- package/dist/es/core/create-child.js +5 -4
- package/dist/es/core/index.js +1 -1
- package/dist/es/core/logger.js +1 -1
- package/dist/es/core/payment.js +78 -0
- package/dist/es/core/preview.js +29 -0
- package/dist/es/core/query.js +12 -3
- package/dist/es/core/session.js +36 -6
- package/dist/es/core/theme.js +1 -1
- package/dist/es/hooks/index.js +1 -1
- package/dist/es/hooks/useBaseWallet.js +136 -65
- package/dist/es/hooks/useI18n.js +3 -3
- package/dist/es/hooks/usePayState.js +37 -25
- package/dist/es/hooks/useRetry.js +50 -26
- package/dist/es/i18n/locales/de-DE.js +7 -0
- package/dist/es/i18n/locales/en-GB.js +7 -0
- package/dist/es/i18n/locales/es-ES.js +7 -0
- package/dist/es/i18n/locales/fr-FR.js +7 -0
- package/dist/es/i18n/locales/ja-JP.js +7 -0
- package/dist/es/i18n/locales/ko-KR.js +7 -0
- package/dist/es/i18n/locales/nl-NL.js +7 -0
- package/dist/es/i18n/locales/pt-PT.js +7 -0
- package/dist/es/i18n/locales/ru-RU.js +7 -0
- package/dist/es/i18n/locales/zh-CN.js +7 -0
- package/dist/es/i18n/locales/zh-HK.js +7 -0
- package/dist/es/i18n/locales/zh-TW.js +7 -0
- package/dist/es/i18n/util.js +10 -10
- package/dist/es/index.js +14 -12
- package/dist/es/out/base-fraud-detection.js +5 -2
- package/dist/es/out/fraud-detection.js +68 -54
- package/dist/es/out/paykka-detection.js +5 -7
- package/dist/es/out/stripe-radar.js +1 -1
- package/dist/es/out/worldpay-ddc-manager.js +9 -13
- package/dist/es/out/worldpay-ddc.js +8 -6
- package/dist/es/style.css +1 -1
- package/dist/es/types/event.js +11 -1
- package/dist/es/types/index.js +7 -0
- package/dist/es/types/message.js +2 -0
- package/dist/es/utils/array.js +19 -5
- package/dist/es/utils/business/amount.js +15 -0
- package/dist/es/utils/business/index.js +1 -0
- package/dist/es/utils/detect.js +8 -0
- package/dist/es/utils/index.js +7 -9
- package/dist/es/utils/location.js +8 -0
- package/dist/es/utils/number.js +19 -0
- package/dist/es/utils/payment.js +12 -12
- package/dist/es/utils/redirect.js +2 -0
- package/dist/es/utils/system-info/is-ua-webview.js +1 -20
- package/dist/style.css +1 -1
- package/dist/types/api/modules/checkout/type.d.ts +1 -1
- package/dist/types/api/modules/index.d.ts +0 -17
- package/dist/types/api/modules/threeDS/index.d.ts +19 -4
- package/dist/types/components/AddressField/type.d.ts +2 -2
- package/dist/types/components/ApplePay/type.d.ts +6 -2
- package/dist/types/components/CPFField/type.d.ts +1 -1
- package/dist/types/components/Card/type.d.ts +2 -18
- package/dist/types/components/CardExpireDateField/type.d.ts +1 -1
- package/dist/types/components/CardNo/type.d.ts +3 -2
- package/dist/types/components/CardNumberField/type.d.ts +1 -1
- package/dist/types/components/CardSecurityCodeField/type.d.ts +1 -1
- package/dist/types/components/CardSelector/type.d.ts +4 -4
- package/dist/types/components/DropIn/layout.d.ts +33 -0
- package/dist/types/components/DropIn/type.d.ts +6 -6
- package/dist/types/components/GooglePay/createGooglePay.d.ts +1 -1
- package/dist/types/components/GooglePay/type.d.ts +12 -2
- package/dist/types/components/PaymentButton/type.d.ts +2 -0
- package/dist/types/components/SecuredFieldsProvider/type.d.ts +2 -0
- package/dist/types/components/Sepa/type.d.ts +3 -4
- package/dist/types/components/ThreeDS/components/ThreeDSIframe/ThreeDSIframe.d.ts +0 -6
- package/dist/types/components/business/QRCodeModal/type.d.ts +12 -3
- package/dist/types/components/index.d.ts +0 -9
- package/dist/types/components/internal/CheckBox/type.d.ts +2 -1
- package/dist/types/components/internal/Loading/Loading.d.ts +2 -1
- package/dist/types/components/internal/Loading/type.d.ts +8 -0
- package/dist/types/components/internal/ResultMessage/ResultMessage.d.ts +3 -0
- package/dist/types/components/internal/ResultMessage/index.d.ts +2 -0
- package/dist/types/components/internal/ResultMessage/type.d.ts +13 -0
- package/dist/types/components/internal/Select/type.d.ts +1 -1
- package/dist/types/components/internal/icons/IconAlipayPlus.d.ts +2 -0
- package/dist/types/components/internal/icons/IconArrowDown.d.ts +1 -1
- package/dist/types/components/internal/icons/IconError.d.ts +1 -1
- package/dist/types/components/internal/icons/IconSuccess.d.ts +1 -1
- package/dist/types/components/internal/icons/IconWechatPayGlobal.d.ts +2 -0
- package/dist/types/components/internal/icons/IconWechatPayGlobalComplete.d.ts +2 -0
- package/dist/types/components/internal/icons/index.d.ts +3 -0
- package/dist/types/components/{AliPay → wallets/AliPay}/AliPay.d.ts +9 -4
- package/dist/types/components/wallets/AliPay/type.d.ts +7 -0
- package/dist/types/components/wallets/Bancontact/type.d.ts +2 -24
- package/dist/types/components/wallets/Blik/type.d.ts +2 -24
- package/dist/types/components/{Boost → wallets/Boost}/Boost.d.ts +9 -4
- package/dist/types/components/wallets/Boost/type.d.ts +6 -0
- package/dist/types/components/wallets/GCash/GCash.d.ts +5 -0
- package/dist/types/components/wallets/GCash/type.d.ts +2 -24
- package/dist/types/components/{GrabPay → wallets/GrabPay}/GrabPay.d.ts +4 -4
- package/dist/types/components/wallets/GrabPay/type.d.ts +7 -0
- package/dist/types/components/wallets/IDeal/type.d.ts +2 -24
- package/dist/types/components/{LinePay → wallets/LinePay}/LinePay.d.ts +9 -4
- package/dist/types/components/wallets/LinePay/type.d.ts +6 -0
- package/dist/types/components/wallets/MayBankQRPay/MayBankQRPay.d.ts +15 -0
- package/dist/types/components/wallets/MayBankQRPay/type.d.ts +6 -0
- package/dist/types/components/wallets/NinePay/NinePay.d.ts +15 -0
- package/dist/types/components/wallets/NinePay/type.d.ts +6 -0
- package/dist/types/components/wallets/OVO/type.d.ts +2 -24
- package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +5 -0
- package/dist/types/components/wallets/OpayWallet/type.d.ts +2 -24
- package/dist/types/components/wallets/P24/type.d.ts +2 -24
- package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +5 -0
- package/dist/types/components/wallets/PagaWallet/type.d.ts +2 -24
- package/dist/types/components/wallets/Paymaya/Paymaya.d.ts +5 -0
- package/dist/types/components/wallets/Paymaya/type.d.ts +2 -24
- package/dist/types/components/wallets/PicPay/type.d.ts +2 -24
- package/dist/types/components/wallets/Pix/type.d.ts +2 -24
- package/dist/types/components/{ShopeePay → wallets/ShopeePay}/ShopeePay.d.ts +9 -4
- package/dist/types/components/wallets/ShopeePay/type.d.ts +6 -0
- package/dist/types/components/wallets/Skrill/type.d.ts +2 -24
- package/dist/types/components/{TNGWallet → wallets/TNGWallet}/TNGWallet.d.ts +9 -4
- package/dist/types/components/wallets/TNGWallet/type.d.ts +6 -0
- package/dist/types/components/wallets/Trustly/type.d.ts +2 -16
- package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +5 -0
- package/dist/types/components/wallets/Vietqr/type.d.ts +2 -24
- package/dist/types/components/wallets/WechatPay/WechatPay.d.ts +16 -0
- package/dist/types/components/wallets/WechatPay/type.d.ts +12 -0
- package/dist/types/components/wallets/WechatPay/util.d.ts +13 -0
- package/dist/types/components/wallets/Zalopay/Zalopay.d.ts +5 -0
- package/dist/types/components/wallets/Zalopay/type.d.ts +2 -24
- package/dist/types/components/wallets/index.d.ts +9 -0
- package/dist/types/components/wallets/type.d.ts +0 -14
- package/dist/types/constant.d.ts +8 -0
- package/dist/types/core/checkout.d.ts +2 -9
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/core/payment.d.ts +21 -0
- package/dist/types/core/preview.d.ts +1 -0
- package/dist/types/core/session.d.ts +2 -2
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/useBaseWallet.d.ts +27 -5
- package/dist/types/hooks/useI18n.d.ts +1 -1
- package/dist/types/hooks/usePayState.d.ts +3 -4
- package/dist/types/hooks/useRetry.d.ts +22 -3
- package/dist/types/i18n/I18n.d.ts +1 -0
- package/dist/types/i18n/locales/de-DE.d.ts +7 -0
- package/dist/types/i18n/locales/en-GB.d.ts +7 -0
- package/dist/types/i18n/locales/es-ES.d.ts +7 -0
- package/dist/types/i18n/locales/fr-FR.d.ts +7 -0
- package/dist/types/i18n/locales/ja-JP.d.ts +7 -0
- package/dist/types/i18n/locales/ko-KR.d.ts +7 -0
- package/dist/types/i18n/locales/nl-NL.d.ts +7 -0
- package/dist/types/i18n/locales/pt-PT.d.ts +7 -0
- package/dist/types/i18n/locales/ru-RU.d.ts +7 -0
- package/dist/types/i18n/locales/zh-CN.d.ts +7 -0
- package/dist/types/i18n/locales/zh-HK.d.ts +7 -0
- package/dist/types/i18n/locales/zh-TW.d.ts +7 -0
- package/dist/types/i18n/util.d.ts +8 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/out/base-fraud-detection.d.ts +1 -0
- package/dist/types/out/config.d.ts +1 -1
- package/dist/types/out/fraud-detection.d.ts +3 -12
- package/dist/types/out/types.d.ts +7 -6
- package/dist/types/out/worldpay-ddc-manager.d.ts +7 -7
- package/dist/types/types/event.d.ts +30 -3
- package/dist/types/types/index.d.ts +14 -0
- package/dist/types/types/message.d.ts +27 -4
- package/dist/types/types/payment.d.ts +30 -3
- package/dist/types/utils/app-payment.d.ts +1 -0
- package/dist/types/utils/array.d.ts +17 -0
- package/dist/types/utils/business/amount.d.ts +7 -0
- package/dist/types/utils/business/index.d.ts +1 -0
- package/dist/types/utils/detect.d.ts +3 -0
- package/dist/types/utils/iframe.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -6
- package/dist/types/utils/number.d.ts +4 -0
- package/dist/types/utils/payment.d.ts +10 -10
- package/dist/types/utils/redirect.d.ts +10 -0
- package/dist/types/utils/system-info/get-browser-info.d.ts +4 -0
- package/package.json +11 -5
- package/dist/es/api/modules/ali-pay/index.js +0 -16
- package/dist/es/api/modules/boost/index.js +0 -16
- package/dist/es/api/modules/gcash/index.js +0 -16
- package/dist/es/api/modules/grab-pay/index.js +0 -16
- package/dist/es/api/modules/line-pay/index.js +0 -16
- package/dist/es/api/modules/may-bank-qr-pay/index.js +0 -16
- package/dist/es/api/modules/nine-pay/index.js +0 -16
- package/dist/es/api/modules/opay-wallet/index.js +0 -16
- package/dist/es/api/modules/paga-wallet/index.js +0 -16
- package/dist/es/api/modules/paymaya/index.js +0 -16
- package/dist/es/api/modules/pic-pay/index.js +0 -16
- package/dist/es/api/modules/pix/index.js +0 -16
- package/dist/es/api/modules/shopee-pay/index.js +0 -16
- package/dist/es/api/modules/tng-wallet/index.js +0 -16
- package/dist/es/api/modules/wechat-pay/index.js +0 -16
- package/dist/es/api/modules/zalopay/index.js +0 -16
- package/dist/es/components/AliPay/index.js +0 -330
- package/dist/es/components/Boost/index.js +0 -349
- package/dist/es/components/GrabPay/index.js +0 -349
- package/dist/es/components/LinePay/index.js +0 -349
- package/dist/es/components/MayBankQRPay/index.js +0 -355
- package/dist/es/components/NinePay/index.js +0 -349
- package/dist/es/components/ShopeePay/index.js +0 -349
- package/dist/es/components/TNGWallet/index.js +0 -349
- package/dist/es/components/WechatPay/index.js +0 -339
- package/dist/es/hooks/usePayment.js +0 -14
- package/dist/types/api/modules/ali-pay/index.d.ts +0 -4
- package/dist/types/api/modules/boost/index.d.ts +0 -4
- package/dist/types/api/modules/gcash/index.d.ts +0 -4
- package/dist/types/api/modules/grab-pay/index.d.ts +0 -4
- package/dist/types/api/modules/line-pay/index.d.ts +0 -4
- package/dist/types/api/modules/may-bank-qr-pay/index.d.ts +0 -4
- package/dist/types/api/modules/nine-pay/index.d.ts +0 -4
- package/dist/types/api/modules/opay-wallet/index.d.ts +0 -4
- package/dist/types/api/modules/paga-wallet/index.d.ts +0 -4
- package/dist/types/api/modules/paymaya/index.d.ts +0 -4
- package/dist/types/api/modules/pic-pay/index.d.ts +0 -4
- package/dist/types/api/modules/pix/index.d.ts +0 -4
- package/dist/types/api/modules/shopee-pay/index.d.ts +0 -4
- package/dist/types/api/modules/tng-wallet/index.d.ts +0 -4
- package/dist/types/api/modules/vietqr/index.d.ts +0 -4
- package/dist/types/api/modules/wechat-pay/index.d.ts +0 -4
- package/dist/types/api/modules/zalopay/index.d.ts +0 -4
- package/dist/types/components/AliPay/type.d.ts +0 -26
- package/dist/types/components/Boost/type.d.ts +0 -28
- package/dist/types/components/GrabPay/type.d.ts +0 -28
- package/dist/types/components/LinePay/type.d.ts +0 -28
- package/dist/types/components/MayBankQRPay/MayBankQRPay.d.ts +0 -10
- package/dist/types/components/MayBankQRPay/type.d.ts +0 -28
- package/dist/types/components/NinePay/NinePay.d.ts +0 -10
- package/dist/types/components/NinePay/type.d.ts +0 -28
- package/dist/types/components/ShopeePay/type.d.ts +0 -28
- package/dist/types/components/TNGWallet/type.d.ts +0 -28
- package/dist/types/components/WechatPay/WechatPay.d.ts +0 -10
- package/dist/types/components/WechatPay/type.d.ts +0 -28
- package/dist/types/hooks/usePayment.d.ts +0 -8
- package/dist/types/utils/behavior-tracker.d.ts +0 -36
- /package/dist/es/components/internal/Button/{button2.js → button.js} +0 -0
- /package/dist/types/components/{AliPay → wallets/AliPay}/index.d.ts +0 -0
- /package/dist/types/components/{Boost → wallets/Boost}/index.d.ts +0 -0
- /package/dist/types/components/{GrabPay → wallets/GrabPay}/index.d.ts +0 -0
- /package/dist/types/components/{LinePay → wallets/LinePay}/index.d.ts +0 -0
- /package/dist/types/components/{MayBankQRPay → wallets/MayBankQRPay}/index.d.ts +0 -0
- /package/dist/types/components/{NinePay → wallets/NinePay}/index.d.ts +0 -0
- /package/dist/types/components/{ShopeePay → wallets/ShopeePay}/index.d.ts +0 -0
- /package/dist/types/components/{TNGWallet → wallets/TNGWallet}/index.d.ts +0 -0
- /package/dist/types/components/{WechatPay → wallets/WechatPay}/index.d.ts +0 -0
|
@@ -13,8 +13,7 @@ import { postMessageToIframe } from "../../utils/iframe.js";
|
|
|
13
13
|
import { isTimeoutError } from "../../api/http.js";
|
|
14
14
|
import { cardPay } from "../../api/modules/card/index.js";
|
|
15
15
|
import { PaymentMethod } from "../../constant.js";
|
|
16
|
-
import {
|
|
17
|
-
import { picPay } from "../../api/modules/pic-pay/index.js";
|
|
16
|
+
import { walletPay } from "../../api/modules/wallet/index.js";
|
|
18
17
|
import { encryptCard } from "../../api/modules/encrypted-card/index.js";
|
|
19
18
|
const useSecuredInput = () => {
|
|
20
19
|
let fieldType;
|
|
@@ -199,6 +198,7 @@ const FieldIframe = (props) => {
|
|
|
199
198
|
const inputRef = A(null);
|
|
200
199
|
const { initSecuredInput, getConfigByFieldType, getCurrCardBrand, cardBin, value, brand } = useSecuredInput();
|
|
201
200
|
const [hasInit, setHasInit] = h(false);
|
|
201
|
+
const [disabled, setDisabled] = h(false);
|
|
202
202
|
const inputId = "securedInput";
|
|
203
203
|
const initInput = () => {
|
|
204
204
|
initSecuredInput({
|
|
@@ -294,6 +294,11 @@ const FieldIframe = (props) => {
|
|
|
294
294
|
processValidStatusChanged("error", error);
|
|
295
295
|
sendValidateMessage("error");
|
|
296
296
|
}
|
|
297
|
+
} else if (feedbackData.action === MessageAction.SET_CONFIG) {
|
|
298
|
+
const data2 = feedbackData;
|
|
299
|
+
if (data2.disabled !== void 0) {
|
|
300
|
+
setDisabled(data2.disabled);
|
|
301
|
+
}
|
|
297
302
|
}
|
|
298
303
|
};
|
|
299
304
|
y(() => {
|
|
@@ -367,9 +372,8 @@ const FieldIframe = (props) => {
|
|
|
367
372
|
checkoutId
|
|
368
373
|
};
|
|
369
374
|
postMessageToIframe(validData, window.parent);
|
|
370
|
-
if (status !== "success")
|
|
375
|
+
if (status !== "success")
|
|
371
376
|
return;
|
|
372
|
-
}
|
|
373
377
|
sendValidWithValueMessage();
|
|
374
378
|
};
|
|
375
379
|
const sendValidWithValueMessage = () => {
|
|
@@ -405,7 +409,7 @@ const FieldIframe = (props) => {
|
|
|
405
409
|
ref: inputRef,
|
|
406
410
|
placeholder: props.placeholder,
|
|
407
411
|
autocomplete: "off",
|
|
408
|
-
disabled: !hasInit
|
|
412
|
+
disabled: !hasInit || disabled
|
|
409
413
|
}
|
|
410
414
|
);
|
|
411
415
|
};
|
|
@@ -419,49 +423,52 @@ const HiddenIframe = ({ checkoutId }) => {
|
|
|
419
423
|
cpf: void 0
|
|
420
424
|
};
|
|
421
425
|
const onReceiveMessage = async (event) => {
|
|
422
|
-
const { data } = event;
|
|
423
|
-
const
|
|
424
|
-
if (!Reflect.has(
|
|
426
|
+
const { data, origin } = event;
|
|
427
|
+
const feedbackData = safeParse(data);
|
|
428
|
+
if (!Reflect.has(feedbackData, "action"))
|
|
425
429
|
return;
|
|
426
|
-
|
|
427
|
-
if (parsedData.checkoutId !== checkoutId) {
|
|
430
|
+
if (feedbackData.checkoutId !== checkoutId)
|
|
428
431
|
return;
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
switch (feedbackData.fieldType) {
|
|
432
|
+
if (feedbackData.action === MessageAction.VALID_WITH_VALUE) {
|
|
433
|
+
const data2 = feedbackData;
|
|
434
|
+
switch (data2.fieldType) {
|
|
433
435
|
case EFieldType.CVV: {
|
|
434
|
-
formData.cvv =
|
|
436
|
+
formData.cvv = data2.value;
|
|
435
437
|
break;
|
|
436
438
|
}
|
|
437
439
|
case EFieldType.CARD_NUMBER: {
|
|
438
|
-
formData.cardNo = trimAll(
|
|
440
|
+
formData.cardNo = trimAll(data2.value);
|
|
439
441
|
break;
|
|
440
442
|
}
|
|
441
443
|
case EFieldType.EXPIRE_DATE: {
|
|
442
|
-
const [expMonth, expYear] =
|
|
444
|
+
const [expMonth, expYear] = data2.value.split("/");
|
|
443
445
|
formData.expMonth = expMonth;
|
|
444
446
|
formData.expYear = `20${expYear}`;
|
|
445
447
|
break;
|
|
446
448
|
}
|
|
447
449
|
case EInternalFieldType.CPF: {
|
|
448
|
-
formData.cpf = limitedToNumber(trimAll(
|
|
450
|
+
formData.cpf = limitedToNumber(trimAll(data2.value));
|
|
449
451
|
break;
|
|
450
452
|
}
|
|
451
453
|
}
|
|
452
|
-
} else if (
|
|
453
|
-
const
|
|
454
|
-
pay(
|
|
455
|
-
} else if (
|
|
456
|
-
const
|
|
454
|
+
} else if (feedbackData.action === MessageAction.PAYMENT) {
|
|
455
|
+
const data2 = feedbackData;
|
|
456
|
+
pay(data2.formData, data2.locale, data2.extraParams);
|
|
457
|
+
} else if (feedbackData.action === MessageAction.ENCRYPT_CARD) {
|
|
458
|
+
const data2 = feedbackData;
|
|
457
459
|
try {
|
|
458
|
-
const res = await encryptCard({ ...
|
|
460
|
+
const res = await encryptCard({ ...data2, ...formData });
|
|
459
461
|
sendCardEncryptedMessage(res);
|
|
460
462
|
} catch (error) {
|
|
461
463
|
console.log("error", error);
|
|
462
464
|
sendCardEncryptionFailedMessage(error);
|
|
463
465
|
}
|
|
464
|
-
}
|
|
466
|
+
} else if (feedbackData.action === MessageAction.DDC_CARD_BIN) {
|
|
467
|
+
if (origin !== cdnOrigin)
|
|
468
|
+
return;
|
|
469
|
+
sendDDCCardBinMessage(event.source);
|
|
470
|
+
} else
|
|
471
|
+
;
|
|
465
472
|
};
|
|
466
473
|
y(() => {
|
|
467
474
|
window.addEventListener("message", onReceiveMessage);
|
|
@@ -473,8 +480,8 @@ const HiddenIframe = ({ checkoutId }) => {
|
|
|
473
480
|
};
|
|
474
481
|
const paymentMethod = params.payment.paymentMethod;
|
|
475
482
|
const payMap = {
|
|
476
|
-
[PaymentMethod.PIX]:
|
|
477
|
-
[PaymentMethod.PIC_PAY]:
|
|
483
|
+
[PaymentMethod.PIX]: walletPay,
|
|
484
|
+
[PaymentMethod.PIC_PAY]: walletPay
|
|
478
485
|
};
|
|
479
486
|
const payFn = payMap[paymentMethod] || cardPay;
|
|
480
487
|
const data = {
|
|
@@ -500,6 +507,14 @@ const HiddenIframe = ({ checkoutId }) => {
|
|
|
500
507
|
}
|
|
501
508
|
});
|
|
502
509
|
};
|
|
510
|
+
const sendDDCCardBinMessage = (target) => {
|
|
511
|
+
const data = {
|
|
512
|
+
action: MessageAction.DDC_CARD_BIN,
|
|
513
|
+
checkoutId,
|
|
514
|
+
bin: limitedToNumber(formData.cardNo).slice(0, 9)
|
|
515
|
+
};
|
|
516
|
+
postMessageToIframe(data, target);
|
|
517
|
+
};
|
|
503
518
|
const sendAfterPaymentMessage = (response, requestInfo) => {
|
|
504
519
|
const data = {
|
|
505
520
|
action: MessageAction.AFTER_PAYMENT,
|
|
@@ -541,6 +556,7 @@ const HiddenIframe = ({ checkoutId }) => {
|
|
|
541
556
|
const sendHiddenIframeReadyMessage = () => {
|
|
542
557
|
const data = {
|
|
543
558
|
action: MessageAction.HIDDEN_IFRAME_READY,
|
|
559
|
+
name: window.name,
|
|
544
560
|
checkoutId
|
|
545
561
|
};
|
|
546
562
|
postMessageToIframe(data, window.parent);
|
|
@@ -4,13 +4,14 @@ import { CoreContext } from "../../core/context.js";
|
|
|
4
4
|
import "../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../utils/system-info/get-browser-info.js";
|
|
6
6
|
import { normalizedClass, formatAmount, trimAll } from "../../utils/format.js";
|
|
7
|
+
import { COMMON_CLASS_NAME, PaymentMethod } from "../../constant.js";
|
|
7
8
|
import { formatPaymentResult } from "../../utils/payment.js";
|
|
8
9
|
import { isTimeoutError } from "../../api/http.js";
|
|
9
|
-
import {
|
|
10
|
-
import { COMMON_CLASS_NAME, PaymentMethod } from "../../constant.js";
|
|
10
|
+
import { buildPaymentParams } from "../../api/utils/index.js";
|
|
11
11
|
import { getSepaPayInfo, sepaPay } from "../../api/modules/sepa/index.js";
|
|
12
|
+
import { getBrowserParams } from "../../api/modules/get-browser-params.js";
|
|
12
13
|
import { PayKKaError } from "../../core/error.js";
|
|
13
|
-
import "../../out/
|
|
14
|
+
import "../../out/fraud-detection.js";
|
|
14
15
|
import { usePayState } from "../../hooks/usePayState.js";
|
|
15
16
|
import { useRetry } from "../../hooks/useRetry.js";
|
|
16
17
|
import { AddressField } from "../AddressField/index.js";
|
|
@@ -133,7 +134,9 @@ const Sepa = w((props, ref) => {
|
|
|
133
134
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
134
135
|
var _a2;
|
|
135
136
|
requiredBill && addressCore.setValidateAllFields(true);
|
|
136
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors);
|
|
137
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors));
|
|
138
|
+
if (submitResult === false)
|
|
139
|
+
return;
|
|
137
140
|
if (errors) {
|
|
138
141
|
setSubmitButtonStatus("unSubmit");
|
|
139
142
|
return;
|
|
@@ -183,7 +186,7 @@ const Sepa = w((props, ref) => {
|
|
|
183
186
|
};
|
|
184
187
|
};
|
|
185
188
|
async function pay(search = false, timeout) {
|
|
186
|
-
var _a, _b, _c, _d, _e;
|
|
189
|
+
var _a, _b, _c, _d, _e, _f;
|
|
187
190
|
try {
|
|
188
191
|
const requestOptions = { locale: i18n.locale, timeout };
|
|
189
192
|
let res = null;
|
|
@@ -199,8 +202,13 @@ const Sepa = w((props, ref) => {
|
|
|
199
202
|
requestOptions
|
|
200
203
|
);
|
|
201
204
|
} else {
|
|
205
|
+
const paymentParams = await getPaymentParams();
|
|
202
206
|
const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", PaymentMethod.SEPA_DEBIT);
|
|
203
|
-
|
|
207
|
+
if ((_e = core.config._checkoutConfig) == null ? void 0 : _e.dynamicSessionId) {
|
|
208
|
+
await core.updateSessionId(buildPaymentParams(paymentParams, extraParams));
|
|
209
|
+
session.sessionId && (paymentParams.sessionId = session.sessionId);
|
|
210
|
+
}
|
|
211
|
+
res = await sepaPay(paymentParams, extraParams, requestOptions);
|
|
204
212
|
}
|
|
205
213
|
return processAfterPayment(res, search);
|
|
206
214
|
} catch (error) {
|
|
@@ -214,7 +222,7 @@ const Sepa = w((props, ref) => {
|
|
|
214
222
|
} else {
|
|
215
223
|
const message = error.i18nKey ? i18n.get(error.i18nKey) : error.message;
|
|
216
224
|
setErrorMsg(message);
|
|
217
|
-
(
|
|
225
|
+
(_f = props.onError) == null ? void 0 : _f.call(props, new PayKKaError("API_ERROR", message, { code: error.code, cause: error }));
|
|
218
226
|
setSubmitButtonStatus("unSubmit");
|
|
219
227
|
return { end: true };
|
|
220
228
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { h, y, u } from "../../core.js";
|
|
2
2
|
import { useBEM } from "../../hooks/useBEM.js";
|
|
3
3
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
4
|
+
import "../../out/fraud-detection.js";
|
|
4
5
|
import "../../utils/card-brand/brands.js";
|
|
5
6
|
import "../../utils/system-info/get-browser-info.js";
|
|
6
7
|
import { normalizedClass } from "../../utils/format.js";
|
|
7
8
|
import "../../core/context.js";
|
|
8
|
-
import "
|
|
9
|
-
import { Button } from "../internal/Button/Button.js";
|
|
9
|
+
import { Button } from "../internal/Button/Button2.js";
|
|
10
10
|
import { IconSafe } from "../internal/icons/IconSafe.js";
|
|
11
11
|
import { LoadingCheck } from "../internal/LoadingCheck/LoadingCheck.js";
|
|
12
12
|
const { bem } = useBEM("submit-button");
|
|
@@ -51,7 +51,7 @@ const SubmitButton = (props) => {
|
|
|
51
51
|
className: normalizedClass(bem({ success: status === "success" }), className),
|
|
52
52
|
style,
|
|
53
53
|
loading: status === "loading",
|
|
54
|
-
disabled: props.disabled || status === "success",
|
|
54
|
+
disabled: (props.disabled || status === "success") && status !== "loading",
|
|
55
55
|
children: /* @__PURE__ */ u("span", { class: bem("text", { "not-verified": !props.verified }), children: content })
|
|
56
56
|
}
|
|
57
57
|
);
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { h, A, x, T, y, u } from "../../core.js";
|
|
1
|
+
import { h, A, x, T, y, u, b } from "../../core.js";
|
|
2
2
|
import "../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import { CoreContext } from "../../core/context.js";
|
|
5
|
-
import "../../out/
|
|
5
|
+
import "../../out/fraud-detection.js";
|
|
6
6
|
import { Modal } from "../internal/Modal/Modal.js";
|
|
7
|
-
import "../internal/Button/
|
|
7
|
+
import "../internal/Button/button.js";
|
|
8
|
+
import "../internal/Loading/loading.js";
|
|
8
9
|
import { useBEM } from "../../hooks/useBEM.js";
|
|
9
10
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
10
|
-
import { safeParse } from "../../utils/index.js";
|
|
11
11
|
import { cdnOrigin } from "../../config.js";
|
|
12
|
+
import { safeParse } from "../../utils/index.js";
|
|
13
|
+
import { useBreakpoints } from "../../hooks/useBreakpoints.js";
|
|
12
14
|
import { MessageAction } from "../../types/message.js";
|
|
13
15
|
import { ThreeDSEventType } from "../../types/event.js";
|
|
14
|
-
import {
|
|
16
|
+
import { noticeThreeDSOperate, ThreeDSAuthOperate } from "../../api/modules/threeDS/index.js";
|
|
15
17
|
import { Icon3DSInfo } from "../internal/icons/Icon3DSInfo.js";
|
|
16
|
-
import { Button } from "../internal/Button/
|
|
18
|
+
import { Button } from "../internal/Button/Button2.js";
|
|
17
19
|
import { THREE_DS_IFRAME_NAME } from "../SecuredFieldsProvider/index.js";
|
|
20
|
+
import { Loading } from "../internal/Loading/Loading2.js";
|
|
18
21
|
const { bem } = useBEM("three-ds-auth");
|
|
19
22
|
const ThreeDSAuth = (props) => {
|
|
20
23
|
const {
|
|
@@ -28,26 +31,32 @@ const ThreeDSAuth = (props) => {
|
|
|
28
31
|
checkoutId
|
|
29
32
|
} = props;
|
|
30
33
|
const breakpoints = useBreakpoints();
|
|
31
|
-
const [
|
|
34
|
+
const [continueThreeDS, setContinueThreeDS] = h(false);
|
|
32
35
|
const messageHandler = A();
|
|
33
36
|
const iframeRef = A(null);
|
|
34
37
|
const [iframeName] = h(`${THREE_DS_IFRAME_NAME}-${checkoutId}-${Date.now()}`);
|
|
38
|
+
const [iframeLoaded, setIframeLoaded] = h(false);
|
|
39
|
+
const innerChannelLoaded = A(false);
|
|
40
|
+
const authId = A(void 0);
|
|
35
41
|
const { i18n } = useI18n();
|
|
36
42
|
const { core } = x(CoreContext) ?? {};
|
|
37
|
-
const
|
|
38
|
-
|
|
43
|
+
const handleLastThreeDS = () => {
|
|
44
|
+
setContinueThreeDS(true);
|
|
39
45
|
};
|
|
40
46
|
const onChange = (status) => {
|
|
41
47
|
var _a, _b;
|
|
42
48
|
if (!status) {
|
|
43
49
|
(_b = (_a = core == null ? void 0 : core.config) == null ? void 0 : _a.onEvent) == null ? void 0 : _b.call(_a, ThreeDSEventType.THREE_DS_CANCELLED);
|
|
44
50
|
onClose == null ? void 0 : onClose();
|
|
51
|
+
console.log("onChange", innerChannelLoaded.current, authId.current);
|
|
52
|
+
if (innerChannelLoaded.current && authId.current) {
|
|
53
|
+
noticeThreeDSOperate(authId.current, ThreeDSAuthOperate.CANCEL);
|
|
54
|
+
}
|
|
45
55
|
}
|
|
46
56
|
};
|
|
47
57
|
const modalWidth = T(() => {
|
|
48
|
-
if (!show)
|
|
58
|
+
if (!show)
|
|
49
59
|
return "0";
|
|
50
|
-
}
|
|
51
60
|
return width || (breakpoints.smaller("sm") ? "90vw" : "600px");
|
|
52
61
|
}, [show, width, breakpoints.matches]);
|
|
53
62
|
y(() => {
|
|
@@ -62,16 +71,14 @@ const ThreeDSAuth = (props) => {
|
|
|
62
71
|
window.removeEventListener("message", messageHandler.current);
|
|
63
72
|
}
|
|
64
73
|
messageHandler.current = (event) => {
|
|
65
|
-
var _a2, _b2, _c2, _d2;
|
|
74
|
+
var _a2, _b2, _c2, _d2, _e, _f;
|
|
66
75
|
const { data, origin } = event;
|
|
67
|
-
if (origin !== cdnOrigin)
|
|
76
|
+
if (origin !== cdnOrigin)
|
|
68
77
|
return;
|
|
69
|
-
}
|
|
70
78
|
const feedbackData = safeParse(data);
|
|
71
79
|
console.log(feedbackData, checkoutId);
|
|
72
|
-
if (feedbackData.checkoutId !== checkoutId)
|
|
80
|
+
if (feedbackData.checkoutId !== checkoutId)
|
|
73
81
|
return;
|
|
74
|
-
}
|
|
75
82
|
switch (feedbackData.action) {
|
|
76
83
|
case MessageAction.CHECK_THREE_DS: {
|
|
77
84
|
onClose == null ? void 0 : onClose();
|
|
@@ -79,13 +86,30 @@ const ThreeDSAuth = (props) => {
|
|
|
79
86
|
break;
|
|
80
87
|
}
|
|
81
88
|
case MessageAction.THREE_DS_AUTH_LOADED: {
|
|
82
|
-
|
|
89
|
+
const data2 = feedbackData;
|
|
90
|
+
setIframeLoaded(true);
|
|
91
|
+
(_d2 = (_c2 = core == null ? void 0 : core.config) == null ? void 0 : _c2.onEvent) == null ? void 0 : _d2.call(_c2, ThreeDSEventType.THREE_DS_AUTH, {
|
|
92
|
+
status: data2.status
|
|
93
|
+
});
|
|
94
|
+
authId.current = data2.authId;
|
|
95
|
+
console.log("认证id", authId.current);
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
case MessageAction.THREE_DS_INNER_CHANNEL_LOADED: {
|
|
99
|
+
(_f = (_e = core == null ? void 0 : core.config) == null ? void 0 : _e.onEvent) == null ? void 0 : _f.call(_e, ThreeDSEventType.THREE_DS_INNER_CHANNEL);
|
|
100
|
+
innerChannelLoaded.current = true;
|
|
101
|
+
console.log("innerChannelLoaded", innerChannelLoaded.current, authId.current);
|
|
102
|
+
if (authId.current) {
|
|
103
|
+
noticeThreeDSOperate(authId.current, ThreeDSAuthOperate.OPEN);
|
|
104
|
+
}
|
|
83
105
|
break;
|
|
84
106
|
}
|
|
85
107
|
}
|
|
86
108
|
};
|
|
87
109
|
window.addEventListener("message", messageHandler.current);
|
|
88
110
|
} else {
|
|
111
|
+
innerChannelLoaded.current = false;
|
|
112
|
+
setIframeLoaded(false);
|
|
89
113
|
messageHandler.current && window.removeEventListener("message", messageHandler.current);
|
|
90
114
|
}
|
|
91
115
|
}, [show]);
|
|
@@ -101,18 +125,23 @@ const ThreeDSAuth = (props) => {
|
|
|
101
125
|
maxHeight: "calc(100vh - 100px)",
|
|
102
126
|
minWidth: "300px"
|
|
103
127
|
},
|
|
104
|
-
children: /* @__PURE__ */ u("div", { className: bem("content"), children: !incomplete ||
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
128
|
+
children: /* @__PURE__ */ u("div", { className: bem("content"), children: !incomplete || continueThreeDS ? /* @__PURE__ */ u(b, { children: [
|
|
129
|
+
!iframeLoaded && /* @__PURE__ */ u(Loading, { fixed: false, style: { position: "absolute" } }),
|
|
130
|
+
url && /* @__PURE__ */ u(
|
|
131
|
+
"iframe",
|
|
132
|
+
{
|
|
133
|
+
ref: iframeRef,
|
|
134
|
+
name: iframeName,
|
|
135
|
+
class: bem("three-ds-iframe"),
|
|
136
|
+
width: "100%",
|
|
137
|
+
height: "100%",
|
|
138
|
+
frameBorder: 0,
|
|
139
|
+
src: url,
|
|
140
|
+
style: { display: iframeLoaded ? "block" : "none" },
|
|
141
|
+
onLoad: () => setIframeLoaded(true)
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
] }) : /* @__PURE__ */ u("div", { className: bem("last-three-ds"), children: [
|
|
116
145
|
/* @__PURE__ */ u(Icon3DSInfo, { className: bem("last-three-ds-icon"), size: 60 }),
|
|
117
146
|
/* @__PURE__ */ u("div", { className: bem("last-three-ds-title"), children: [
|
|
118
147
|
/* @__PURE__ */ u("div", { children: i18n.get("threeDS.paymentIncomplete") }),
|
|
@@ -125,7 +154,7 @@ const ThreeDSAuth = (props) => {
|
|
|
125
154
|
backgroundColor: theme == null ? void 0 : theme.payButtonBackgroundColor,
|
|
126
155
|
color: theme == null ? void 0 : theme.payButtonTextColor
|
|
127
156
|
},
|
|
128
|
-
onClick:
|
|
157
|
+
onClick: handleLastThreeDS,
|
|
129
158
|
children: i18n.get("common.confirm")
|
|
130
159
|
}
|
|
131
160
|
) })
|
|
@@ -3,7 +3,7 @@ import { useBEM } from "../../hooks/useBEM.js";
|
|
|
3
3
|
import "../../core/context.js";
|
|
4
4
|
import "../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import "../../out/
|
|
6
|
+
import "../../out/fraud-detection.js";
|
|
7
7
|
import { IconInfo } from "../internal/icons/IconInfo.js";
|
|
8
8
|
const { bem } = useBEM("tip");
|
|
9
9
|
function Tip(props) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { x, h, y, u, b } from "../../../core.js";
|
|
2
2
|
import { useBEM } from "../../../hooks/useBEM.js";
|
|
3
3
|
import { useI18n } from "../../../hooks/useI18n.js";
|
|
4
|
+
import "../../../out/fraud-detection.js";
|
|
4
5
|
import "../../../utils/card-brand/brands.js";
|
|
5
6
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
7
|
import { normalizedClass, trimAll } from "../../../utils/format.js";
|
|
7
8
|
import "../../../core/context.js";
|
|
8
|
-
import "../../../out/worldpay-jsc-origin.js";
|
|
9
9
|
import "../../internal/Form/type.js";
|
|
10
10
|
import { FormContext } from "../../internal/Form/context.js";
|
|
11
11
|
import { FormItem } from "../../internal/Form/FormItem.js";
|
|
@@ -2,7 +2,7 @@ import "../../../core.js";
|
|
|
2
2
|
import "../../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
|
-
import "../../../out/
|
|
5
|
+
import "../../../out/fraud-detection.js";
|
|
6
6
|
import "../../internal/Form/type.js";
|
|
7
7
|
import "../../internal/Form/context.js";
|
|
8
8
|
import "../../internal/Form/FormItem.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { u, b } from "../../../core.js";
|
|
2
2
|
import { useBEM } from "../../../hooks/useBEM.js";
|
|
3
3
|
import { useI18n } from "../../../hooks/useI18n.js";
|
|
4
|
+
import "../../../out/fraud-detection.js";
|
|
4
5
|
import "../../../utils/card-brand/brands.js";
|
|
5
6
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import "../../../core/context.js";
|
|
7
|
-
import "../../../out/worldpay-jsc-origin.js";
|
|
8
7
|
import { useBreakpoints } from "../../../hooks/useBreakpoints.js";
|
|
9
|
-
import
|
|
8
|
+
import "../../../core/context.js";
|
|
9
|
+
import { Button } from "../../internal/Button/Button2.js";
|
|
10
10
|
import { Modal } from "../../internal/Modal/Modal.js";
|
|
11
11
|
import "./blik-confirm-modal.js";
|
|
12
12
|
import { IconPhone } from "../../internal/icons/IconPhone.js";
|
|
@@ -2,8 +2,8 @@ import "../../../core.js";
|
|
|
2
2
|
import "../../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
|
-
import "../../../out/
|
|
6
|
-
import "../../internal/Button/
|
|
5
|
+
import "../../../out/fraud-detection.js";
|
|
6
|
+
import "../../internal/Button/button.js";
|
|
7
7
|
import "../../internal/Modal/Modal.js";
|
|
8
8
|
import "./blik-confirm-modal.js";
|
|
9
9
|
import "../../internal/LoadingCheck/loading-check.js";
|
|
@@ -2,8 +2,8 @@ import { u } from "../../../core.js";
|
|
|
2
2
|
import "../../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import { useI18n } from "../../../hooks/useI18n.js";
|
|
5
|
+
import "../../../out/fraud-detection.js";
|
|
5
6
|
import "../../../core/context.js";
|
|
6
|
-
import "../../../out/worldpay-jsc-origin.js";
|
|
7
7
|
import "../../internal/Form/type.js";
|
|
8
8
|
import "../../internal/Form/context.js";
|
|
9
9
|
import { FormItem } from "../../internal/Form/FormItem.js";
|
|
@@ -2,7 +2,7 @@ import "../../../core.js";
|
|
|
2
2
|
import "../../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
|
-
import "../../../out/
|
|
5
|
+
import "../../../out/fraud-detection.js";
|
|
6
6
|
import "../../internal/Form/type.js";
|
|
7
7
|
import "../../internal/Form/context.js";
|
|
8
8
|
import "../../internal/Form/FormItem.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { x, h, T, y, u } from "../../../core.js";
|
|
2
2
|
import { useBEM } from "../../../hooks/useBEM.js";
|
|
3
3
|
import { useI18n } from "../../../hooks/useI18n.js";
|
|
4
|
+
import "../../../out/fraud-detection.js";
|
|
4
5
|
import "../../../utils/card-brand/brands.js";
|
|
5
6
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
7
|
import { trimAll, normalizedClass } from "../../../utils/format.js";
|
|
7
8
|
import "../../../core/context.js";
|
|
8
|
-
import "../../../out/worldpay-jsc-origin.js";
|
|
9
9
|
import "../../internal/Form/type.js";
|
|
10
10
|
import { FormContext, FormItemContext } from "../../internal/Form/context.js";
|
|
11
11
|
import { FormItem } from "../../internal/Form/FormItem.js";
|
|
@@ -98,6 +98,7 @@ const PhoneField = (props) => {
|
|
|
98
98
|
options: phoneList,
|
|
99
99
|
filterable: false,
|
|
100
100
|
inputClassName: bem("areaCode-input"),
|
|
101
|
+
disabled,
|
|
101
102
|
onSelect: (v) => {
|
|
102
103
|
formContext == null ? void 0 : formContext.setForm((prev) => ({ ...prev, areaCode: String(v) }));
|
|
103
104
|
}
|
|
@@ -2,7 +2,7 @@ import "../../../core.js";
|
|
|
2
2
|
import "../../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
|
-
import "../../../out/
|
|
5
|
+
import "../../../out/fraud-detection.js";
|
|
6
6
|
import "../../internal/Form/type.js";
|
|
7
7
|
import "../../internal/Form/context.js";
|
|
8
8
|
import "../../internal/Form/FormItem.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { u, b } from "../../../core.js";
|
|
2
2
|
import { useBEM } from "../../../hooks/useBEM.js";
|
|
3
3
|
import { useI18n } from "../../../hooks/useI18n.js";
|
|
4
|
+
import "../../../out/fraud-detection.js";
|
|
4
5
|
import "../../../utils/card-brand/brands.js";
|
|
5
6
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
7
|
import { formatAmount } from "../../../utils/format.js";
|
|
7
8
|
import { formatTime } from "../../../utils/date.js";
|
|
8
|
-
import "../../../core/context.js";
|
|
9
|
-
import "../../../out/worldpay-jsc-origin.js";
|
|
10
9
|
import { useBreakpoints } from "../../../hooks/useBreakpoints.js";
|
|
10
|
+
import "../../../core/context.js";
|
|
11
11
|
import { Modal } from "../../internal/Modal/Modal.js";
|
|
12
12
|
import "./qr-code-modal.js";
|
|
13
13
|
import { QRCode } from "../../internal/QRCode/QRCode.js";
|
|
@@ -2,6 +2,6 @@ import "../../../core.js";
|
|
|
2
2
|
import "../../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
|
-
import "../../../out/
|
|
5
|
+
import "../../../out/fraud-detection.js";
|
|
6
6
|
import "../../internal/Modal/Modal.js";
|
|
7
7
|
import "./qr-code-modal.js";
|
|
@@ -3,7 +3,7 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import "../../../out/
|
|
6
|
+
import "../../../out/fraud-detection.js";
|
|
7
7
|
import "./tooltip2.js";
|
|
8
8
|
const Tooltip = (props) => {
|
|
9
9
|
const { content, children } = props;
|
|
@@ -2,5 +2,5 @@ import "../../../core.js";
|
|
|
2
2
|
import "../../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../../core/context.js";
|
|
5
|
-
import "../../../out/
|
|
5
|
+
import "../../../out/fraud-detection.js";
|
|
6
6
|
import "./tooltip2.js";
|
|
@@ -2,7 +2,7 @@ import "../../core.js";
|
|
|
2
2
|
import "../../utils/card-brand/brands.js";
|
|
3
3
|
import "../../utils/system-info/get-browser-info.js";
|
|
4
4
|
import "../../core/context.js";
|
|
5
|
-
import "../../out/
|
|
5
|
+
import "../../out/fraud-detection.js";
|
|
6
6
|
import "../internal/Modal/Modal.js";
|
|
7
7
|
import "./QRCodeModal/qr-code-modal.js";
|
|
8
8
|
import "../internal/Form/type.js";
|
|
@@ -16,6 +16,6 @@ import "./PhoneField/config.js";
|
|
|
16
16
|
import "./PhoneField/phone-field.js";
|
|
17
17
|
import "./Tooltip/tooltip2.js";
|
|
18
18
|
import "./BlikCodeField/blik-code-field.js";
|
|
19
|
-
import "../internal/Button/
|
|
19
|
+
import "../internal/Button/button.js";
|
|
20
20
|
import "./BlikConfirmModal/blik-confirm-modal.js";
|
|
21
21
|
import "../internal/LoadingCheck/loading-check.js";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import "../style/index.js";
|
|
2
|
-
import "./AliPay/index.js";
|
|
3
2
|
import "./Card/index.js";
|
|
4
3
|
import "../core.js";
|
|
5
4
|
import "./CardBrands/index.js";
|
|
6
5
|
import "../utils/card-brand/brands.js";
|
|
7
6
|
import "../utils/system-info/get-browser-info.js";
|
|
8
7
|
import "../core/context.js";
|
|
9
|
-
import "../out/
|
|
8
|
+
import "../out/fraud-detection.js";
|
|
10
9
|
import "./CardExpireDateField/index.js";
|
|
11
10
|
import "./internal/Form/type.js";
|
|
12
11
|
import "./internal/Form/context.js";
|
|
@@ -18,24 +17,23 @@ import "./CardNumberField/index.js";
|
|
|
18
17
|
import "./CardSecurityCodeField/index.js";
|
|
19
18
|
import "./CardSelector/index.js";
|
|
20
19
|
import "./internal/Select/Select.js";
|
|
21
|
-
import "./internal/Button/
|
|
20
|
+
import "./internal/Button/button.js";
|
|
22
21
|
import "./CardNo/index.js";
|
|
23
22
|
import "./SubmitButton/index.js";
|
|
24
23
|
import "./internal/LoadingCheck/loading-check.js";
|
|
25
|
-
import "./WechatPay/index.js";
|
|
26
24
|
import "./ApplePay/index.js";
|
|
27
25
|
import "./GooglePay/index.js";
|
|
28
26
|
import "./Sepa/index.js";
|
|
29
27
|
import "./EncryptedCard/index.js";
|
|
30
28
|
import "./CombinedCardInfo/index.js";
|
|
31
29
|
import "./DropIn/index.js";
|
|
32
|
-
import "./Boost/
|
|
33
|
-
import "./
|
|
34
|
-
import "./
|
|
35
|
-
import "./NinePay/
|
|
36
|
-
import "./
|
|
37
|
-
import "./
|
|
38
|
-
import "./
|
|
30
|
+
import "./wallets/Boost/Boost.js";
|
|
31
|
+
import "./wallets/GrabPay/GrabPay.js";
|
|
32
|
+
import "./wallets/LinePay/LinePay.js";
|
|
33
|
+
import "./wallets/NinePay/NinePay.js";
|
|
34
|
+
import "./wallets/MayBankQRPay/MayBankQRPay.js";
|
|
35
|
+
import "./wallets/ShopeePay/ShopeePay.js";
|
|
36
|
+
import "./wallets/TNGWallet/TNGWallet.js";
|
|
39
37
|
import "./wallets/GCash/GCash.js";
|
|
40
38
|
import "./wallets/Paymaya/Paymaya.js";
|
|
41
39
|
import "./wallets/Zalopay/Zalopay.js";
|
|
@@ -51,3 +49,5 @@ import "./wallets/IDeal/IDeal.js";
|
|
|
51
49
|
import "./wallets/Skrill/Skrill.js";
|
|
52
50
|
import "./wallets/P24/P24.js";
|
|
53
51
|
import "./wallets/Trustly/Trustly.js";
|
|
52
|
+
import "./wallets/AliPay/AliPay.js";
|
|
53
|
+
import "./wallets/WechatPay/WechatPay.js";
|