@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
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import type { PayKKaCheckout, Session } from '../core';
|
|
2
|
-
export declare
|
|
2
|
+
export declare const usePayState: (session: Session, core?: PayKKaCheckout) => {
|
|
3
3
|
validated: boolean;
|
|
4
4
|
setValidated: import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<boolean>>;
|
|
5
5
|
errorMsg: string;
|
|
6
6
|
setErrorMsg: import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<string>>;
|
|
7
7
|
i18n: import("../i18n").I18n;
|
|
8
8
|
fraudDetection: {
|
|
9
|
-
getFraudDetectionId: (options?:
|
|
10
|
-
bin?: string | undefined;
|
|
11
|
-
} | undefined) => Promise<string>;
|
|
9
|
+
getFraudDetectionId: (options?: import("../out/types").FraudDetectionInitOption | undefined) => Promise<string>;
|
|
12
10
|
createFraudDetection: () => Promise<void>;
|
|
13
11
|
} | null;
|
|
14
12
|
sessionReady: boolean;
|
|
13
|
+
disabled: boolean;
|
|
15
14
|
};
|
|
@@ -1,15 +1,34 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const withRetryIntervalJitter: (interval: number) => number;
|
|
2
|
+
export type RetryPollTier = {
|
|
3
|
+
/**
|
|
4
|
+
* 已流逝时间(毫秒)严格小于本值时用本档 `interval`。
|
|
5
|
+
* 最后一档常用 {@link Number.POSITIVE_INFINITY},表示之后不再换档;总轮询时长仍由 `useRetry` 的 `timeout` 决定。
|
|
6
|
+
*/
|
|
7
|
+
until: number;
|
|
8
|
+
/** 该档内每轮间隔;值为毫秒 */
|
|
9
|
+
interval: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 前 15s 每 3s 一次
|
|
13
|
+
* 15s~60s 每 6s 一次
|
|
14
|
+
* 之后每 12s 一次,直至达到外层设置的轮询时间
|
|
15
|
+
*/
|
|
16
|
+
export declare const DEFAULT_RETRY_POLL_TIERS: RetryPollTier[];
|
|
17
|
+
export declare const getRetryIntervalForElapsed: (elapsedMs: number, tiers?: RetryPollTier[]) => number;
|
|
18
|
+
export declare const useRetry: (cb: (timeout: number) => Promise<{
|
|
2
19
|
end: boolean;
|
|
3
20
|
res?: any;
|
|
4
|
-
}>, { timeout, interval, onTimeout, onEnd }
|
|
21
|
+
}>, { timeout, interval, pollTiers, onTimeout, onEnd }?: {
|
|
5
22
|
timeout?: number;
|
|
6
23
|
interval?: number;
|
|
24
|
+
pollTiers?: RetryPollTier[];
|
|
7
25
|
onTimeout?: () => void;
|
|
8
26
|
onEnd?: (res: any) => void;
|
|
9
|
-
})
|
|
27
|
+
}) => {
|
|
10
28
|
start: (opts?: {
|
|
11
29
|
timeout?: number;
|
|
12
30
|
interval?: number;
|
|
31
|
+
pollTiers?: RetryPollTier[];
|
|
13
32
|
}) => Promise<unknown>;
|
|
14
33
|
stop: () => void;
|
|
15
34
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'form.name.label': string;
|
|
61
65
|
'form.name.placeholder': string;
|
|
62
66
|
'form.name.incomplete': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'form.name.label': string;
|
|
61
65
|
'form.name.placeholder': string;
|
|
62
66
|
'form.name.incomplete': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'guideCard.redirectDescription': string;
|
|
3
3
|
'guideCard.scanQRCode': string;
|
|
4
|
+
'guideCard.redirectWechatPay': string;
|
|
4
5
|
'dropIn.card.label': string;
|
|
5
6
|
'dropIn.otherPaymentMethod': string;
|
|
6
7
|
'dropIn.boost.label': string;
|
|
@@ -25,6 +26,8 @@ declare const _default: {
|
|
|
25
26
|
'dropIn.skrill.label': string;
|
|
26
27
|
'dropIn.trustly.label': string;
|
|
27
28
|
'dropIn.p24.label': string;
|
|
29
|
+
'dropIn.aliPay.label': string;
|
|
30
|
+
'dropIn.wechatPay.label': string;
|
|
28
31
|
'card.cardNumber.label': string;
|
|
29
32
|
'card.cardNumber.incomplete': string;
|
|
30
33
|
'card.cardNumber.invalid': string;
|
|
@@ -57,6 +60,7 @@ declare const _default: {
|
|
|
57
60
|
'common.unknownError': string;
|
|
58
61
|
'common.cancel': string;
|
|
59
62
|
'common.confirm': string;
|
|
63
|
+
'common.wechatPayGlobal': string;
|
|
60
64
|
'common.email.label': string;
|
|
61
65
|
'common.email.incomplete': string;
|
|
62
66
|
'common.email.incorrect': string;
|
|
@@ -94,10 +98,13 @@ declare const _default: {
|
|
|
94
98
|
'threeDS.authenticationSuccessful': string;
|
|
95
99
|
'threeDS.authenticationFailed': string;
|
|
96
100
|
'threeDS.returnToCheckout': string;
|
|
101
|
+
'threeDS.linkExpired': string;
|
|
102
|
+
'threeDS.linkAlreadyUsed': string;
|
|
97
103
|
'qrCode.expired': string;
|
|
98
104
|
'qrCode.scanByGcash': string;
|
|
99
105
|
'qrCode.scanByZalopay': string;
|
|
100
106
|
'qrCode.scanByVietqr': string;
|
|
107
|
+
'qrCode.scanWechatPayGlobal': string;
|
|
101
108
|
'cpf.label': string;
|
|
102
109
|
'cpf.incomplete': string;
|
|
103
110
|
'cpf.placeholder': string;
|
|
@@ -9,7 +9,14 @@ export declare const getRealLocale: (locale: string) => string;
|
|
|
9
9
|
* 如果都不是,则返回 undefined,这里不做英文兜底,由上层判断
|
|
10
10
|
*/
|
|
11
11
|
export declare const getLocalKey: (locale: string) => string;
|
|
12
|
-
export declare
|
|
12
|
+
export declare const loadTranslation: (locale: string, customLocales?: CustomLocales) => Promise<{
|
|
13
13
|
locale: string;
|
|
14
14
|
translation: Translation;
|
|
15
15
|
}>;
|
|
16
|
+
/** 根据语言获取国际化文案集合 */
|
|
17
|
+
export declare const resolveTranslation: (locale?: string | null) => Promise<{
|
|
18
|
+
locale: string;
|
|
19
|
+
translation: Translation;
|
|
20
|
+
}>;
|
|
21
|
+
/** 根据语言获取单个国际化文案 */
|
|
22
|
+
export declare const getI18nText: (key: keyof Translation, locale?: string | null) => Promise<string>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export { type ComponentInst, create, querySession, Session, PayKKaCheckout, PayKKaError } from './core';
|
|
3
|
-
export { I18n, LocaleKey } from './i18n';
|
|
3
|
+
export { I18n, LocaleKey, type LocaleKeyType } from './i18n';
|
|
4
4
|
export { setApiUrl, setCDNUrl, setFraudDetectionEnv, setCustomReqHeaders, setCustomLocale } from './config';
|
|
5
5
|
export { getFingerprint, redirectToPayment } from './utils';
|
|
6
6
|
export { PaymentMethod } from './constant';
|
|
7
7
|
export * from './types';
|
|
8
|
+
export type { CheckoutRes } from './api';
|
|
@@ -14,7 +14,7 @@ export declare const STRIPE_RADAR_SCRIPT_ORIGIN = "https://js.stripe.com";
|
|
|
14
14
|
export declare const STRIPE_RADAR_SCRIPT_URL = "https://js.stripe.com/v3/";
|
|
15
15
|
/** ddc 超时时间, 15s */
|
|
16
16
|
export declare const DDC_TIMEOUT = 15000;
|
|
17
|
-
/** stripe 超时时间,
|
|
17
|
+
/** stripe 超时时间, 12s */
|
|
18
18
|
export declare const STRIPE_RADAR_TIMEOUT = 12000;
|
|
19
19
|
/** 默认超时时间, 10s */
|
|
20
20
|
export declare const DEFAULT_TIMEOUT = 10000;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { FraudDetectionConfig, FraudDetectionOptions } from './types';
|
|
1
|
+
import type { FraudDetectionConfig, FraudDetectionInitOption, FraudDetectionOptions } from './types';
|
|
3
2
|
type FraudDetectionType = {
|
|
4
|
-
getFraudDetectionId: (options?:
|
|
5
|
-
bin?: string;
|
|
6
|
-
}) => Promise<string>;
|
|
3
|
+
getFraudDetectionId: (options?: FraudDetectionInitOption) => Promise<string>;
|
|
7
4
|
createFraudDetection: () => Promise<void>;
|
|
8
5
|
};
|
|
9
6
|
export default function getFraudDetectionInstance(config: FraudDetectionConfig,
|
|
@@ -11,11 +8,5 @@ export default function getFraudDetectionInstance(config: FraudDetectionConfig,
|
|
|
11
8
|
* 内部配置
|
|
12
9
|
* @internal
|
|
13
10
|
*/
|
|
14
|
-
options?: FraudDetectionOptions
|
|
15
|
-
/**
|
|
16
|
-
* 可用渠道列表
|
|
17
|
-
* 仅供Hosted等页面收银台使用,不能让用户知道我们有哪些渠道
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
mode?: CollModeType[]): FraudDetectionType;
|
|
11
|
+
options?: FraudDetectionOptions): FraudDetectionType;
|
|
21
12
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { FraudDetectionEnv, PayKKaInitConfiguration } from '../types';
|
|
2
|
-
export type FraudDetectionOptions = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type FraudDetectionConfig = {
|
|
6
|
-
env?: FraudDetectionEnv;
|
|
2
|
+
export type FraudDetectionOptions = {} & Pick<PayKKaInitConfiguration, 'onEvent'>;
|
|
3
|
+
export interface FraudDetectionConfig {
|
|
4
|
+
/** 客户端密钥 */
|
|
7
5
|
clientKey: string;
|
|
8
|
-
|
|
6
|
+
/** 环境,默认 eu */
|
|
7
|
+
env?: FraudDetectionEnv;
|
|
8
|
+
}
|
|
9
9
|
export interface FraudDetectionInitOption {
|
|
10
|
+
/** 卡 bin */
|
|
10
11
|
bin?: string;
|
|
11
12
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { ChannelSDKConfig } from '../api/modules/risk';
|
|
2
2
|
import type { FraudDetectionInitOption, FraudDetectionOptions } from './types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* 每次支付都要最新 ddc id:
|
|
5
|
+
* - 不按 bin 缓存、不用兜底 id
|
|
6
|
+
* - 每次 init 都 new 一个 WorldpayDDC 并采集
|
|
6
7
|
*/
|
|
7
8
|
export declare class WorldpayDDCManager {
|
|
8
9
|
private static instance;
|
|
9
10
|
private options?;
|
|
10
11
|
private channelConfig?;
|
|
11
|
-
/**
|
|
12
|
-
private
|
|
12
|
+
/** 本次(最近一次)init 对应的 DDC 实例 */
|
|
13
|
+
private currentDDC;
|
|
13
14
|
constructor(options?: FraudDetectionOptions, channelConfig?: ChannelSDKConfig);
|
|
14
|
-
|
|
15
|
-
private createWorldpayDDC;
|
|
15
|
+
updateChannelConfig(channelConfig?: ChannelSDKConfig): void;
|
|
16
16
|
init(options?: FraudDetectionInitOption): Promise<void>;
|
|
17
|
-
getFraudDetectionId(
|
|
17
|
+
getFraudDetectionId(): string | undefined | null;
|
|
18
18
|
}
|