@paykka/card-checkout-ui 0.14.0 → 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 +20 -20
- package/dist/card-checkout-ui.umd.cjs +20 -20
- 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 -5
- package/dist/es/api/modules/index.js +1 -1
- package/dist/es/api/modules/map.js +4 -1
- package/dist/es/components/AccordionItem/AccordionItem.js +1 -1
- package/dist/es/components/AccountNameField/index.js +1 -1
- package/dist/es/components/AddressField/index.js +1 -1
- package/dist/es/components/ApplePay/index.js +34 -21
- package/dist/es/components/CPFField/index.js +1 -1
- package/dist/es/components/Card/index.js +38 -30
- package/dist/es/components/CardBrands/index.js +1 -1
- package/dist/es/components/CardExpireDateField/index.js +1 -1
- 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 +1 -1
- package/dist/es/components/CardNumberField/index.js +1 -1
- package/dist/es/components/CardSecurityCodeField/index.js +1 -1
- package/dist/es/components/CardSelector/index.js +2 -2
- package/dist/es/components/CombinedCardInfo/index.js +1 -1
- package/dist/es/components/DropIn/index.js +117 -123
- 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 +32 -29
- package/dist/es/components/GuideCard/index.js +2 -2
- package/dist/es/components/PaymentButton/index.js +22 -7
- package/dist/es/components/RecurringTip/index.js +1 -1
- package/dist/es/components/SecuredIframe/index.js +3 -4
- package/dist/es/components/Sepa/index.js +15 -7
- package/dist/es/components/SubmitButton/index.js +2 -2
- package/dist/es/components/ThreeDS/index.js +32 -20
- 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 +1 -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 +4 -4
- 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 +1 -1
- 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/type.js +1 -1
- package/dist/es/components/internal/Loading/Loading2.js +20 -0
- package/dist/es/{api/modules/line-pay → 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 +1 -1
- 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/IconError.js +2 -2
- package/dist/es/components/internal/icons/IconSuccess.js +2 -2
- 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 +7 -10
- package/dist/es/components/wallets/Blik/Blik.js +14 -11
- package/dist/es/components/wallets/Boost/Boost.js +6 -9
- package/dist/es/components/wallets/GCash/GCash.js +7 -10
- package/dist/es/components/wallets/GrabPay/GrabPay.js +7 -14
- package/dist/es/components/wallets/IDeal/IDeal.js +7 -10
- package/dist/es/components/wallets/LinePay/LinePay.js +6 -9
- package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +6 -9
- package/dist/es/components/wallets/NinePay/NinePay.js +6 -9
- package/dist/es/components/wallets/OVO/OVO.js +7 -10
- package/dist/es/components/wallets/OpayWallet/OpayWallet.js +6 -9
- package/dist/es/components/wallets/P24/P24.js +7 -10
- package/dist/es/components/wallets/PagaWallet/PagaWallet.js +6 -9
- package/dist/es/components/wallets/Paymaya/Paymaya.js +6 -9
- package/dist/es/components/wallets/PicPay/PicPay.js +54 -217
- package/dist/es/components/wallets/Pix/Pix.js +54 -217
- package/dist/es/components/wallets/ShopeePay/ShopeePay.js +6 -9
- package/dist/es/components/wallets/Skrill/Skrill.js +7 -10
- package/dist/es/components/wallets/TNGWallet/TNGWallet.js +6 -9
- package/dist/es/components/wallets/Trustly/Trustly.js +7 -10
- package/dist/es/components/wallets/Vietqr/Vietqr.js +14 -15
- 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 +10 -13
- package/dist/es/components/wallets/index.js +2 -0
- package/dist/es/constant.js +7 -0
- package/dist/es/core/checkout.js +36 -9
- 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 +13 -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 +121 -52
- package/dist/es/hooks/useI18n.js +3 -3
- 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 +7 -5
- package/dist/es/out/base-fraud-detection.js +1 -1
- package/dist/es/out/fraud-detection.js +59 -44
- 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 +3 -0
- package/dist/es/out/worldpay-ddc.js +1 -1
- package/dist/es/style.css +1 -1
- package/dist/es/types/event.js +10 -1
- package/dist/es/types/index.js +7 -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/redirect.js +2 -0
- 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 +13 -5
- package/dist/types/components/ApplePay/type.d.ts +6 -2
- package/dist/types/components/Card/type.d.ts +2 -18
- 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 +6 -2
- package/dist/types/components/PaymentButton/type.d.ts +2 -0
- package/dist/types/components/Sepa/type.d.ts +3 -4
- package/dist/types/components/business/QRCodeModal/type.d.ts +12 -3
- package/dist/types/components/index.d.ts +0 -2
- 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/icons/IconAlipayPlus.d.ts +2 -0
- 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/wallets/Boost/type.d.ts +2 -24
- package/dist/types/components/wallets/GCash/type.d.ts +2 -24
- package/dist/types/components/wallets/GrabPay/type.d.ts +2 -12
- package/dist/types/components/wallets/IDeal/type.d.ts +2 -24
- package/dist/types/components/wallets/LinePay/type.d.ts +2 -24
- package/dist/types/components/wallets/MayBankQRPay/type.d.ts +2 -24
- package/dist/types/components/wallets/NinePay/type.d.ts +2 -24
- package/dist/types/components/wallets/OVO/type.d.ts +2 -24
- 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/type.d.ts +2 -24
- 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/wallets/ShopeePay/type.d.ts +2 -24
- package/dist/types/components/wallets/Skrill/type.d.ts +2 -12
- package/dist/types/components/wallets/TNGWallet/type.d.ts +2 -24
- package/dist/types/components/wallets/Trustly/type.d.ts +2 -16
- 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/type.d.ts +2 -24
- package/dist/types/components/wallets/index.d.ts +2 -0
- package/dist/types/components/wallets/type.d.ts +0 -14
- package/dist/types/constant.d.ts +8 -0
- package/dist/types/core/index.d.ts +1 -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 +1 -4
- 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/fraud-detection.d.ts +2 -5
- package/dist/types/out/types.d.ts +5 -6
- package/dist/types/out/worldpay-ddc-manager.d.ts +1 -0
- package/dist/types/types/event.d.ts +24 -2
- package/dist/types/types/index.d.ts +14 -0
- package/dist/types/types/message.d.ts +3 -1
- package/dist/types/types/payment.d.ts +26 -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/index.d.ts +1 -6
- package/dist/types/utils/number.d.ts +4 -0
- 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 +4 -2
- package/dist/es/api/modules/ali-pay/index.js +0 -16
- package/dist/es/api/modules/boost/index.js +0 -5
- package/dist/es/api/modules/gcash/index.js +0 -5
- package/dist/es/api/modules/grab-pay/index.js +0 -5
- package/dist/es/api/modules/may-bank-qr-pay/index.js +0 -5
- package/dist/es/api/modules/nine-pay/index.js +0 -5
- package/dist/es/api/modules/opay-wallet/index.js +0 -5
- package/dist/es/api/modules/paga-wallet/index.js +0 -5
- package/dist/es/api/modules/paymaya/index.js +0 -5
- 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 -5
- package/dist/es/api/modules/tng-wallet/index.js +0 -5
- package/dist/es/api/modules/vietqr/index.js +0 -5
- package/dist/es/api/modules/wechat-pay/index.js +0 -16
- package/dist/es/api/modules/zalopay/index.js +0 -5
- package/dist/es/components/AliPay/index.js +0 -332
- package/dist/es/components/WechatPay/index.js +0 -340
- package/dist/es/hooks/usePayment.js +0 -1
- 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/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/hooks/useRetry.console-tests.d.ts +0 -41
- 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/{WechatPay → wallets/WechatPay}/index.d.ts +0 -0
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
2
|
import type { WalletCustomProps, WalletRedirectProps } from '../type';
|
|
3
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
3
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
4
4
|
export interface OpayWalletProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
|
|
5
|
-
/**
|
|
6
|
-
* 是否展示邮箱
|
|
7
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
8
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
9
|
-
*/
|
|
10
|
-
showEmail?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* 是否展示邮箱
|
|
13
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
14
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
15
|
-
*/
|
|
16
|
-
showAddress?: boolean;
|
|
17
5
|
}
|
|
18
|
-
export interface OpayWalletRef {
|
|
19
|
-
/** 停止轮询支付结果 */
|
|
20
|
-
stopRetry: () => void;
|
|
21
|
-
/** 开始轮询支付结果 */
|
|
22
|
-
startRetry: (timeout?: number) => void;
|
|
23
|
-
/** 更新表单地址 */
|
|
24
|
-
updateAddress: () => void;
|
|
25
|
-
/** 更新表单邮箱 */
|
|
26
|
-
updateEmail: () => void;
|
|
27
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
28
|
-
payment: () => void;
|
|
6
|
+
export interface OpayWalletRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
29
7
|
}
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
3
|
import type { WalletCustomProps, WalletRedirectProps } from '../type';
|
|
4
4
|
export interface P24Props extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
|
|
5
|
-
/**
|
|
6
|
-
* 是否展示邮箱
|
|
7
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
8
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
9
|
-
*/
|
|
10
|
-
showEmail?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* 是否展示地址
|
|
13
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
14
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
15
|
-
*/
|
|
16
|
-
showAddress?: boolean;
|
|
17
5
|
}
|
|
18
|
-
export interface P24Ref {
|
|
19
|
-
/** 停止轮询支付结果 */
|
|
20
|
-
stopRetry: () => void;
|
|
21
|
-
/** 开始轮询支付结果 */
|
|
22
|
-
startRetry: (timeout?: number) => void;
|
|
23
|
-
/** 更新表单地址 */
|
|
24
|
-
updateAddress: () => void;
|
|
25
|
-
/** 更新表单邮箱 */
|
|
26
|
-
updateEmail: () => void;
|
|
27
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
28
|
-
payment: () => void;
|
|
6
|
+
export interface P24Ref extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
29
7
|
}
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
3
|
import type { WalletCustomProps, WalletRedirectProps } from '../type';
|
|
4
4
|
export interface PagaWalletProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
|
|
5
|
-
/**
|
|
6
|
-
* 是否展示邮箱
|
|
7
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
8
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
9
|
-
*/
|
|
10
|
-
showEmail?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* 是否展示地址
|
|
13
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
14
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
15
|
-
*/
|
|
16
|
-
showAddress?: boolean;
|
|
17
5
|
}
|
|
18
|
-
export interface PagaWalletRef {
|
|
19
|
-
/** 停止轮询支付结果 */
|
|
20
|
-
stopRetry: () => void;
|
|
21
|
-
/** 开始轮询支付结果 */
|
|
22
|
-
startRetry: (timeout?: number) => void;
|
|
23
|
-
/** 更新表单地址 */
|
|
24
|
-
updateAddress: () => void;
|
|
25
|
-
/** 更新表单邮箱 */
|
|
26
|
-
updateEmail: () => void;
|
|
27
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
28
|
-
payment: () => void;
|
|
6
|
+
export interface PagaWalletRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
29
7
|
}
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
3
|
export interface PaymayaProps extends PayKKaCommonConfig, PaymentCommonProps {
|
|
4
|
-
/**
|
|
5
|
-
* 是否展示邮箱
|
|
6
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
7
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
8
|
-
*/
|
|
9
|
-
showEmail?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* 是否展示邮箱
|
|
12
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
13
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
14
|
-
*/
|
|
15
|
-
showAddress?: boolean;
|
|
16
4
|
}
|
|
17
|
-
export interface PaymayaRef {
|
|
18
|
-
/** 停止轮询支付结果 */
|
|
19
|
-
stopRetry: () => void;
|
|
20
|
-
/** 开始轮询支付结果 */
|
|
21
|
-
startRetry: (timeout?: number) => void;
|
|
22
|
-
/** 更新表单地址 */
|
|
23
|
-
updateAddress: () => void;
|
|
24
|
-
/** 更新表单邮箱 */
|
|
25
|
-
updateEmail: () => void;
|
|
26
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
27
|
-
payment: () => void;
|
|
5
|
+
export interface PaymayaRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
28
6
|
}
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
3
|
import type { WalletRedirectProps, WalletCustomProps } from '../type';
|
|
4
4
|
export interface PicPayProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
|
|
5
|
-
/**
|
|
6
|
-
* 是否展示邮箱
|
|
7
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
8
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
9
|
-
*/
|
|
10
|
-
showEmail?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* 是否展示地址
|
|
13
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
14
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
15
|
-
*/
|
|
16
|
-
showAddress?: boolean;
|
|
17
5
|
}
|
|
18
|
-
export interface PicPayRef {
|
|
19
|
-
/** 停止轮询支付结果 */
|
|
20
|
-
stopRetry: () => void;
|
|
21
|
-
/** 开始轮询支付结果 */
|
|
22
|
-
startRetry: (timeout?: number) => void;
|
|
23
|
-
/** 更新表单地址 */
|
|
24
|
-
updateAddress: () => void;
|
|
25
|
-
/** 更新表单邮箱 */
|
|
26
|
-
updateEmail: () => void;
|
|
27
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
28
|
-
payment: () => void;
|
|
6
|
+
export interface PicPayRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
29
7
|
}
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
2
|
import type { WalletRedirectProps, WalletCustomProps } from '../type';
|
|
3
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
3
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
4
4
|
export interface PixProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
|
|
5
|
-
/**
|
|
6
|
-
* 是否展示邮箱
|
|
7
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
8
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
9
|
-
*/
|
|
10
|
-
showEmail?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* 是否展示地址
|
|
13
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
14
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
15
|
-
*/
|
|
16
|
-
showAddress?: boolean;
|
|
17
5
|
}
|
|
18
|
-
export interface PixRef {
|
|
19
|
-
/** 停止轮询支付结果 */
|
|
20
|
-
stopRetry: () => void;
|
|
21
|
-
/** 开始轮询支付结果 */
|
|
22
|
-
startRetry: (timeout?: number) => void;
|
|
23
|
-
/** 更新表单地址 */
|
|
24
|
-
updateAddress: () => void;
|
|
25
|
-
/** 更新表单邮箱 */
|
|
26
|
-
updateEmail: () => void;
|
|
27
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
28
|
-
payment: () => void;
|
|
6
|
+
export interface PixRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
29
7
|
}
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
3
|
export interface ShopeePayProps extends PayKKaCommonConfig, PaymentCommonProps {
|
|
4
|
-
/**
|
|
5
|
-
* 是否展示邮箱
|
|
6
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
7
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
8
|
-
*/
|
|
9
|
-
showEmail?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* 是否展示邮箱
|
|
12
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
13
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
14
|
-
*/
|
|
15
|
-
showAddress?: boolean;
|
|
16
4
|
}
|
|
17
|
-
export interface ShopeePayRef {
|
|
18
|
-
/** 停止轮询支付结果 */
|
|
19
|
-
stopRetry: () => void;
|
|
20
|
-
/** 开始轮询支付结果 */
|
|
21
|
-
startRetry: (timeout?: number) => void;
|
|
22
|
-
/** 更新表单地址 */
|
|
23
|
-
updateAddress: () => void;
|
|
24
|
-
/** 更新表单邮箱 */
|
|
25
|
-
updateEmail: () => void;
|
|
26
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
27
|
-
payment: () => void;
|
|
5
|
+
export interface ShopeePayRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
28
6
|
}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
2
|
import type { WalletCustomProps, WalletRedirectProps } from '../type';
|
|
3
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
3
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
4
4
|
export interface SkrillProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
|
|
5
5
|
}
|
|
6
|
-
export interface SkrillRef {
|
|
7
|
-
/** 停止轮询支付结果 */
|
|
8
|
-
stopRetry: () => void;
|
|
9
|
-
/** 开始轮询支付结果 */
|
|
10
|
-
startRetry: (timeout?: number) => void;
|
|
11
|
-
/** 更新表单地址 */
|
|
12
|
-
updateAddress: () => void;
|
|
13
|
-
/** 更新表单邮箱 */
|
|
14
|
-
updateEmail: () => void;
|
|
15
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
16
|
-
payment: () => void;
|
|
6
|
+
export interface SkrillRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
17
7
|
}
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
3
|
export interface TNGWalletProps extends PayKKaCommonConfig, PaymentCommonProps {
|
|
4
|
-
/**
|
|
5
|
-
* 是否展示邮箱
|
|
6
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
7
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
8
|
-
*/
|
|
9
|
-
showEmail?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* 是否展示邮箱
|
|
12
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
13
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
14
|
-
*/
|
|
15
|
-
showAddress?: boolean;
|
|
16
4
|
}
|
|
17
|
-
export interface TNGWalletRef {
|
|
18
|
-
/** 停止轮询支付结果 */
|
|
19
|
-
stopRetry: () => void;
|
|
20
|
-
/** 开始轮询支付结果 */
|
|
21
|
-
startRetry: (timeout?: number) => void;
|
|
22
|
-
/** 更新表单地址 */
|
|
23
|
-
updateAddress: () => void;
|
|
24
|
-
/** 更新表单邮箱 */
|
|
25
|
-
updateEmail: () => void;
|
|
26
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
27
|
-
payment: () => void;
|
|
5
|
+
export interface TNGWalletRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
28
6
|
}
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
3
|
import type { WalletCustomProps, WalletRedirectProps } from '../type';
|
|
4
4
|
export interface TrustlyProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
|
|
5
|
-
/**
|
|
6
|
-
* 是否展示地址
|
|
7
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
8
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
9
|
-
*/
|
|
10
|
-
showAddress?: boolean;
|
|
11
5
|
}
|
|
12
|
-
export interface TrustlyRef {
|
|
13
|
-
/** 停止轮询支付结果 */
|
|
14
|
-
stopRetry: () => void;
|
|
15
|
-
/** 开始轮询支付结果 */
|
|
16
|
-
startRetry: (timeout?: number) => void;
|
|
17
|
-
/** 更新表单地址 */
|
|
18
|
-
updateAddress: () => void;
|
|
19
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
20
|
-
payment: () => void;
|
|
6
|
+
export interface TrustlyRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
21
7
|
}
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
3
|
export interface VietqrProps extends PayKKaCommonConfig, PaymentCommonProps {
|
|
4
|
-
/**
|
|
5
|
-
* 是否展示邮箱
|
|
6
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
7
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
8
|
-
*/
|
|
9
|
-
showEmail?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* 是否展示邮箱
|
|
12
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
13
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
14
|
-
*/
|
|
15
|
-
showAddress?: boolean;
|
|
16
4
|
}
|
|
17
|
-
export interface VietqrRef {
|
|
18
|
-
/** 停止轮询支付结果 */
|
|
19
|
-
stopRetry: () => void;
|
|
20
|
-
/** 开始轮询支付结果 */
|
|
21
|
-
startRetry: (timeout?: number) => void;
|
|
22
|
-
/** 更新表单地址 */
|
|
23
|
-
updateAddress: () => void;
|
|
24
|
-
/** 更新表单邮箱 */
|
|
25
|
-
updateEmail: () => void;
|
|
26
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
27
|
-
payment: () => void;
|
|
5
|
+
export interface VietqrRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
28
6
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './wechat-pay.scss';
|
|
2
|
+
import type { WechatPayProps, WechatPayRef } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* 微信支付
|
|
5
|
+
*
|
|
6
|
+
* - 表单:邮箱,地址
|
|
7
|
+
* - 支付:web 端展示二维码,微信内调微信 JS-SDK 支付
|
|
8
|
+
*/
|
|
9
|
+
export declare const WechatPay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<WechatPayProps & import("../../../types").PayKKaCommonConfig & {
|
|
10
|
+
session: import("../../../core").Session;
|
|
11
|
+
core: import("../../../core").PayKKaCheckout;
|
|
12
|
+
threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
|
|
13
|
+
isDropIn?: boolean | undefined;
|
|
14
|
+
}> & {
|
|
15
|
+
ref?: import("preact").Ref<WechatPayRef> | undefined;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
|
+
import type { WalletCustomProps, WalletQRCodeModalProps, WalletRedirectProps } from '../type';
|
|
4
|
+
export interface WechatPayProps extends PayKKaCommonConfig, PaymentCommonProps, WalletCustomProps, WalletRedirectProps, WalletQRCodeModalProps {
|
|
5
|
+
/**
|
|
6
|
+
* 获取微信 openid,收银台组件内不处理,需要自行实现
|
|
7
|
+
* @returns 微信 openid
|
|
8
|
+
*/
|
|
9
|
+
onGetOpenId?: () => MaybePromise<string>;
|
|
10
|
+
}
|
|
11
|
+
export interface WechatPayRef extends PaymentRetryRef, PaymentFormFieldsRef, PaymentCommonRef {
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 集成微信 JS-SDK 支付
|
|
3
|
+
* @see {@link https://pay.weixin.qq.com/doc/v3/merchant/4012791857}
|
|
4
|
+
*/
|
|
5
|
+
export declare enum WechatPayResult {
|
|
6
|
+
/** 支付成功 */
|
|
7
|
+
SUCCESS = "get_brand_wcpay_request:ok",
|
|
8
|
+
/** 支付过程中用户取消 */
|
|
9
|
+
CANCEL = "get_brand_wcpay_request:cancel",
|
|
10
|
+
/** 支付失败 */
|
|
11
|
+
FAIL = "get_brand_wcpay_request:fail"
|
|
12
|
+
}
|
|
13
|
+
export declare const launchWechatPay: (config: Recordable) => Promise<void>;
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
3
|
export interface ZalopayProps extends PayKKaCommonConfig, PaymentCommonProps {
|
|
4
|
-
/**
|
|
5
|
-
* 是否展示邮箱
|
|
6
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
7
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
8
|
-
*/
|
|
9
|
-
showEmail?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* 是否展示邮箱
|
|
12
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
13
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
14
|
-
*/
|
|
15
|
-
showAddress?: boolean;
|
|
16
4
|
}
|
|
17
|
-
export interface ZalopayRef {
|
|
18
|
-
/** 停止轮询支付结果 */
|
|
19
|
-
stopRetry: () => void;
|
|
20
|
-
/** 开始轮询支付结果 */
|
|
21
|
-
startRetry: (timeout?: number) => void;
|
|
22
|
-
/** 更新表单地址 */
|
|
23
|
-
updateAddress: () => void;
|
|
24
|
-
/** 更新表单邮箱 */
|
|
25
|
-
updateEmail: () => void;
|
|
26
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
27
|
-
payment: () => void;
|
|
5
|
+
export interface ZalopayRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
28
6
|
}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
/** 钱包自定义配置,主要作用于展示 */
|
|
2
2
|
export interface WalletCustomProps {
|
|
3
|
-
/**
|
|
4
|
-
* 是否展示邮箱
|
|
5
|
-
* 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
6
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
7
|
-
* @defaultValue false
|
|
8
|
-
*/
|
|
9
|
-
showEmail?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* 是否展示邮箱
|
|
12
|
-
* 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
13
|
-
* 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
14
|
-
* @defaultValue false
|
|
15
|
-
*/
|
|
16
|
-
showAddress?: boolean;
|
|
17
3
|
}
|
|
18
4
|
/** 通过跳转支付的钱包配置 */
|
|
19
5
|
export interface WalletRedirectProps {
|
package/dist/types/constant.d.ts
CHANGED
|
@@ -107,3 +107,11 @@ export declare enum ChannelCode {
|
|
|
107
107
|
WORLDPAY_JSC = "WORLDPAY_JSC",
|
|
108
108
|
PAYKKA = "PAYKKA"
|
|
109
109
|
}
|
|
110
|
+
export declare enum PayEnv {
|
|
111
|
+
/** 微信 Webview 环境,不含企业微信 */
|
|
112
|
+
WX_WEB = "WX_WEB",
|
|
113
|
+
/** 支付宝 Webview 环境 */
|
|
114
|
+
ALI_WEB = "ALI_WEB",
|
|
115
|
+
/** 其他 Web 环境 */
|
|
116
|
+
WEB = "WEB"
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CheckoutRes } from '../api';
|
|
2
|
-
export interface
|
|
2
|
+
export interface SessionInitOptions {
|
|
3
3
|
/**
|
|
4
4
|
* 会话 ID
|
|
5
5
|
* Hosted、Component、Drop-in 必填
|
|
@@ -19,6 +19,6 @@ export declare class Session {
|
|
|
19
19
|
checkout?: CheckoutRes;
|
|
20
20
|
theme: import("@preact/signals").Signal<Recordable<any>>;
|
|
21
21
|
extraParams: Recordable;
|
|
22
|
-
constructor(
|
|
22
|
+
constructor(options: SessionInitOptions, extraParams?: Recordable);
|
|
23
23
|
ready(): import("../utils").CreatePromiseReturn<boolean>;
|
|
24
24
|
}
|
|
@@ -1,19 +1,36 @@
|
|
|
1
|
+
import type { CheckoutPaymentParams } from '../api/modules/type';
|
|
1
2
|
import { PaymentMethod } from '../constant';
|
|
2
3
|
import type { WalletCustomProps, WalletRedirectProps, WalletQRCodeModalProps } from '../components/wallets/type';
|
|
3
|
-
import type
|
|
4
|
+
import { type BasePaymentInfo, type CoreProps } from '../types';
|
|
4
5
|
import { type FieldStatusConfig } from '../api';
|
|
5
6
|
import type { PaymentButtonStatus } from '../components/PaymentButton';
|
|
6
7
|
import type { PaymentCommonProps, PaymentMethodContext } from '../types/payment';
|
|
7
8
|
export type BaseWalletProps = WalletCustomProps & WalletRedirectProps & WalletQRCodeModalProps & CoreProps & PaymentCommonProps;
|
|
8
9
|
export type BaseWalletOptions = {
|
|
9
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* 轮询超时时间
|
|
12
|
+
* @defaultValue 20 * 1000
|
|
13
|
+
**/
|
|
10
14
|
retryTimeout?: number;
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* 是否支持二维码支付弹窗,若不支持,则直接采用跳转方式
|
|
17
|
+
* @defaultValue false
|
|
18
|
+
**/
|
|
12
19
|
supportQRCodeModal?: boolean;
|
|
13
20
|
/** 获取最终处理过的表单数据 */
|
|
14
21
|
getFormData: () => Recordable;
|
|
15
|
-
/**
|
|
16
|
-
|
|
22
|
+
/**
|
|
23
|
+
* 处理支付中状态
|
|
24
|
+
* 返回 false 时,结束轮询
|
|
25
|
+
*/
|
|
26
|
+
onProcessing?: (paymentInfo: BasePaymentInfo) => MaybePromise<void | boolean>;
|
|
27
|
+
/** 获取支付请求额外的参数,通常为某种支付方式所特有 */
|
|
28
|
+
getExtraPaymentParams?: () => MaybePromise<DeepPartial<CheckoutPaymentParams>>;
|
|
29
|
+
/**
|
|
30
|
+
* 用来替代默认的支付流程,应用在如 Pix、PicPay 等需要通过 iframe 进行支付的情况
|
|
31
|
+
* 支付完成后,需要 processAfterPayment 方法处理后续逻辑
|
|
32
|
+
**/
|
|
33
|
+
executePayment?: (params: CheckoutPaymentParams, extraParams?: Recordable) => void;
|
|
17
34
|
};
|
|
18
35
|
/**
|
|
19
36
|
* 基础钱包通用逻辑
|
|
@@ -51,4 +68,9 @@ export declare const useBaseWallet: (paymentMethod: PaymentMethod, baseProps: Ba
|
|
|
51
68
|
isEnabled: boolean;
|
|
52
69
|
fieldStatus: FieldStatusConfig | undefined;
|
|
53
70
|
getPaymentMethodContext: () => PaymentMethodContext;
|
|
71
|
+
processAfterPayment: (paymentInfo: BasePaymentInfo, search?: boolean) => Promise<{
|
|
72
|
+
end: boolean;
|
|
73
|
+
}>;
|
|
74
|
+
processOnError: (error: any) => void;
|
|
75
|
+
processOnTimeout: (type: 'channel' | 'retry', message?: string) => void;
|
|
54
76
|
};
|
|
@@ -6,10 +6,7 @@ export declare const usePayState: (session: Session, core?: PayKKaCheckout) => {
|
|
|
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
|
-
hiddenIframeName?: string | undefined;
|
|
12
|
-
} | undefined) => Promise<string>;
|
|
9
|
+
getFraudDetectionId: (options?: import("../out/types").FraudDetectionInitOption | undefined) => Promise<string>;
|
|
13
10
|
createFraudDetection: () => Promise<void>;
|
|
14
11
|
} | null;
|
|
15
12
|
sessionReady: boolean;
|
|
@@ -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;
|