@paykka/card-checkout-ui 0.14.0 → 0.15.2
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 +15 -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,6 +1,6 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../types';
|
|
2
|
-
import type { PaymentCommonProps } from '../../types/payment';
|
|
3
|
-
export interface ApplePayProps extends PayKKaCommonConfig, PaymentCommonProps {
|
|
2
|
+
import type { PaymentCommonProps, PaymentCustomFieldsProps } from '../../types/payment';
|
|
3
|
+
export interface ApplePayProps extends PayKKaCommonConfig, Omit<PaymentCommonProps, keyof PaymentCustomFieldsProps> {
|
|
4
4
|
/**
|
|
5
5
|
* Apple Pay SDK 加载回调
|
|
6
6
|
* @param status 是否加载成功
|
|
@@ -23,6 +23,10 @@ export interface ApplePayProps extends PayKKaCommonConfig, PaymentCommonProps {
|
|
|
23
23
|
* 在 onLoad 返回 false 的情况下不会触发该回调
|
|
24
24
|
*/
|
|
25
25
|
onCanUse?: (canUse: boolean) => void;
|
|
26
|
+
/**
|
|
27
|
+
* 点击 Apple Pay 按钮时触发。若返回 false,则不继续支付,支持异步
|
|
28
|
+
*/
|
|
29
|
+
onBtnClick?: () => void | boolean | Promise<void | boolean>;
|
|
26
30
|
}
|
|
27
31
|
export interface ApplePayRef {
|
|
28
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../types';
|
|
2
|
-
import type { PaymentCommonProps, PaymentCommonRef, PaymentThreeDSProps, PaymentThreeDSRef } from '../../types/payment';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentThreeDSProps, PaymentThreeDSRef } from '../../types/payment';
|
|
3
3
|
export interface CardProps extends PayKKaCommonConfig, PaymentCommonProps, PaymentThreeDSProps {
|
|
4
4
|
/**
|
|
5
5
|
* 定义卡敏感信息表单布局展示
|
|
@@ -8,28 +8,12 @@ export interface CardProps extends PayKKaCommonConfig, PaymentCommonProps, Payme
|
|
|
8
8
|
* @defaultValue 'split'
|
|
9
9
|
*/
|
|
10
10
|
cardInfoLayout?: CardInfoLayout;
|
|
11
|
-
/**
|
|
12
|
-
* 是否展示邮箱
|
|
13
|
-
* @remarks
|
|
14
|
-
* - 若配置 true 但创建收银台时已经传了,就展示禁用状态。
|
|
15
|
-
* - 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
16
|
-
* @defaultValue false
|
|
17
|
-
*/
|
|
18
|
-
showEmail?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* 是否展示邮箱
|
|
21
|
-
* @remarks
|
|
22
|
-
* - 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
|
|
23
|
-
* - 若配置 false 但创建收银台时未传,依旧会展示该输入框。
|
|
24
|
-
* @defaultValue false
|
|
25
|
-
*/
|
|
26
|
-
showAddress?: boolean;
|
|
27
11
|
/**
|
|
28
12
|
* 是否在卡号输入框下展示收银台支持的发卡行图标
|
|
29
13
|
* @defaultValue true
|
|
30
14
|
*/
|
|
31
15
|
showCardBrands?: boolean;
|
|
32
16
|
}
|
|
33
|
-
export interface CardRef extends PaymentCommonRef, PaymentThreeDSRef {
|
|
17
|
+
export interface CardRef extends PaymentCommonRef, PaymentThreeDSRef, PaymentFormFieldsRef {
|
|
34
18
|
}
|
|
35
19
|
export type CardInfoLayout = 'split' | 'combine';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PaymentMethod } from '../../constant';
|
|
2
|
+
import type { DropInPaymentCategory, DropInPaymentMethodLayout } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* 将支付方式转换为支付类型,与 methods 的顺序一致
|
|
5
|
+
* @param methods 支持的支付方式
|
|
6
|
+
* @returns 转换后的支付方式
|
|
7
|
+
*/
|
|
8
|
+
export declare const toDropInCategories: (methods: PaymentMethod[]) => DropInPaymentCategory[];
|
|
9
|
+
/**
|
|
10
|
+
* 对支付方式进行排序,order 里面有的按照 order 排,剩下的按照默认顺序排在后面
|
|
11
|
+
* @param items 需要排序的支付方式
|
|
12
|
+
* @param order 排序顺序
|
|
13
|
+
* @returns 排序后的支付方式
|
|
14
|
+
*/
|
|
15
|
+
export declare const sortByOrder: <T>(items: T[], order?: T[]) => T[];
|
|
16
|
+
/**
|
|
17
|
+
* 根据支持的支付方式和布局配置,计算出需要展示的支付方式
|
|
18
|
+
* @param options 支持的支付方式和布局配置
|
|
19
|
+
* @returns 需要展示的支付方式
|
|
20
|
+
*/
|
|
21
|
+
export declare const resolveDropInDisplayCategories: (options: {
|
|
22
|
+
supportMethods: PaymentMethod[];
|
|
23
|
+
layout?: DropInPaymentMethodLayout;
|
|
24
|
+
}) => DropInPaymentCategory[];
|
|
25
|
+
/**
|
|
26
|
+
* 根据支持的支付方式,分割出头部支付方式和主内容支付方式
|
|
27
|
+
* @param categories 支持的支付方式
|
|
28
|
+
* @returns 头部支付方式和折叠式支付方式
|
|
29
|
+
*/
|
|
30
|
+
export declare const splitHeaderAndMain: (categories: DropInPaymentCategory[]) => {
|
|
31
|
+
header: DropInPaymentCategory[];
|
|
32
|
+
main: DropInPaymentCategory[];
|
|
33
|
+
};
|
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'preact/compat';
|
|
|
2
2
|
import type { PayKKaCommonConfig } from '../../types';
|
|
3
3
|
import { PaymentCategory, PaymentMethod } from '../../constant';
|
|
4
4
|
import type { ComponentType } from 'preact';
|
|
5
|
-
import type { PaymentCommonProps } from '../../types/payment';
|
|
5
|
+
import type { PaymentCommonProps, PaymentCommonRef } from '../../types/payment';
|
|
6
6
|
export interface DropInProps extends PayKKaCommonConfig, PaymentCommonProps {
|
|
7
7
|
/**
|
|
8
8
|
* 配置各种支付方式的参数
|
|
@@ -17,9 +17,9 @@ export interface DropInProps extends PayKKaCommonConfig, PaymentCommonProps {
|
|
|
17
17
|
*/
|
|
18
18
|
layout?: 'tabs' | 'accordion';
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
export interface DropInPaymentMethodLayout {
|
|
21
|
+
}
|
|
22
|
+
export interface DropInRefs extends PaymentCommonRef {
|
|
23
23
|
}
|
|
24
24
|
export type PaymentMethodsConfig = Partial<{
|
|
25
25
|
[key in DropInPaymentCategory]: Partial<PaymentComponentProps<key>>;
|
|
@@ -32,9 +32,9 @@ export interface PaymentTypeOptions {
|
|
|
32
32
|
/**
|
|
33
33
|
* 当前 Drop-in 支持的支付方式
|
|
34
34
|
* 目前暂不支持 WeChatPay 和 Alipay
|
|
35
|
-
* 注意:会影响 Drop-in
|
|
35
|
+
* 注意:会影响 Drop-in 的支付方式展示顺序,由 dropInSupportedPaymentMethods 和 paymentMethodLayout.order 决定
|
|
36
36
|
*/
|
|
37
37
|
export declare const dropInSupportedPaymentMethods: PaymentMethod[];
|
|
38
|
-
export type DropInPaymentCategory = PaymentCategory.APPLE_PAY | PaymentCategory.GOOGLE_PAY | PaymentCategory.CARD | PaymentCategory.BOOST | PaymentCategory.GRAB_PAY | PaymentCategory.TNG_WALLET | PaymentCategory.MAY_BANK_QR_PAY | PaymentCategory.SHOPEE_PAY | PaymentCategory.LINE_PAY | PaymentCategory.NINE_PAY | PaymentCategory.GCASH | PaymentCategory.PAYMAYA | PaymentCategory.ZALOPAY | PaymentCategory.VIETQR | PaymentCategory.PIX | PaymentCategory.PIC_PAY | PaymentCategory.OPAY_WALLET | PaymentCategory.PAGA_WALLET | PaymentCategory.BANCONTACT | PaymentCategory.IDEAL | PaymentCategory.BLIK | PaymentCategory.OVO | PaymentCategory.SKRILL | PaymentCategory.TRUSTLY | PaymentCategory.P24;
|
|
38
|
+
export type DropInPaymentCategory = PaymentCategory.APPLE_PAY | PaymentCategory.GOOGLE_PAY | PaymentCategory.CARD | PaymentCategory.BOOST | PaymentCategory.GRAB_PAY | PaymentCategory.TNG_WALLET | PaymentCategory.MAY_BANK_QR_PAY | PaymentCategory.SHOPEE_PAY | PaymentCategory.LINE_PAY | PaymentCategory.NINE_PAY | PaymentCategory.GCASH | PaymentCategory.PAYMAYA | PaymentCategory.ZALOPAY | PaymentCategory.VIETQR | PaymentCategory.PIX | PaymentCategory.PIC_PAY | PaymentCategory.OPAY_WALLET | PaymentCategory.PAGA_WALLET | PaymentCategory.BANCONTACT | PaymentCategory.IDEAL | PaymentCategory.BLIK | PaymentCategory.OVO | PaymentCategory.SKRILL | PaymentCategory.TRUSTLY | PaymentCategory.P24 | PaymentCategory.ALI_PAY | PaymentCategory.WECHAT_PAY;
|
|
39
39
|
export declare const PaymentComponentMap: Record<DropInPaymentCategory, ComponentType<any>>;
|
|
40
40
|
export type PaymentComponentProps<P extends keyof typeof PaymentComponentMap> = React.ComponentProps<(typeof PaymentComponentMap)[P]>;
|
|
@@ -6,6 +6,6 @@ export declare const createGooglePay: (core: PayKKaCheckout, checkout: CheckoutR
|
|
|
6
6
|
} & google.payments.api.Address, search?: boolean, timeout?: number) => Promise<{
|
|
7
7
|
res?: google.payments.api.PaymentAuthorizationResult;
|
|
8
8
|
end: boolean;
|
|
9
|
-
} | undefined>, onClick?: () => void
|
|
9
|
+
} | undefined>, onClick?: () => void | boolean | Promise<void | boolean>, onCanUse?: (canUse: boolean) => void, onCancel?: () => void) => {
|
|
10
10
|
onGooglePayLoaded: (container: HTMLDivElement | null) => Promise<void>;
|
|
11
11
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PayKKaCommonConfig } from '../../types';
|
|
2
|
-
import type { PaymentCommonProps, PaymentThreeDSProps, PaymentThreeDSRef } from '../../types/payment';
|
|
3
|
-
export interface GooglePayProps extends PayKKaCommonConfig, PaymentCommonProps, PaymentThreeDSProps {
|
|
2
|
+
import type { PaymentCommonProps, PaymentCustomFieldsProps, PaymentThreeDSProps, PaymentThreeDSRef } from '../../types/payment';
|
|
3
|
+
export interface GooglePayProps extends PayKKaCommonConfig, Omit<PaymentCommonProps, keyof PaymentCustomFieldsProps>, PaymentThreeDSProps {
|
|
4
4
|
/**
|
|
5
5
|
* SDK 加载回调,status 为 true 表示加载成功,false 表示加载失败
|
|
6
6
|
* 注意:该回调在 SDK 加载成功后触发,但不一定表示 Google Pay 可用
|
|
@@ -11,6 +11,10 @@ export interface GooglePayProps extends PayKKaCommonConfig, PaymentCommonProps,
|
|
|
11
11
|
* 注意:在 onLoad 返回 false 的情况下不会触发该回调
|
|
12
12
|
*/
|
|
13
13
|
onCanUse?: (canUse: boolean) => void;
|
|
14
|
+
/**
|
|
15
|
+
* 点击 Google Pay 按钮时触发,若返回 false,则不继续支付,支持异步
|
|
16
|
+
*/
|
|
17
|
+
onBtnClick?: () => void | boolean | Promise<void | boolean>;
|
|
14
18
|
/**
|
|
15
19
|
* 取消支付时触发,可再次支付
|
|
16
20
|
* @remark
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import type { PayKKaError } from '../../core';
|
|
2
2
|
import type { PayKKaCommonConfig, PaymentInfo } from '../../types';
|
|
3
|
+
import type { PaymentFormFieldsRef } from '../../types/payment';
|
|
3
4
|
import type { FormValidateError } from '../internal/Form';
|
|
4
5
|
export interface SepaProps extends PayKKaCommonConfig {
|
|
5
|
-
onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void
|
|
6
|
+
onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void | boolean | Promise<void | boolean>;
|
|
6
7
|
onSuccess?: (data: PaymentInfo) => void;
|
|
7
8
|
onError?: (error: PayKKaError) => void;
|
|
8
9
|
onTimeout?: () => void;
|
|
9
10
|
onAuthorized?: () => void;
|
|
10
11
|
onExpired?: () => void;
|
|
11
12
|
}
|
|
12
|
-
export interface SepaRef {
|
|
13
|
-
updateAddress: () => void;
|
|
14
|
-
updateEmail: () => void;
|
|
13
|
+
export interface SepaRef extends PaymentFormFieldsRef {
|
|
15
14
|
}
|
|
@@ -11,11 +11,20 @@ export interface QRCodeModalProps {
|
|
|
11
11
|
qrCode: string;
|
|
12
12
|
/** 支付金额 */
|
|
13
13
|
amount?: Amount;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* 整个 model 的背景色
|
|
16
|
+
* @defaultValue #FFFFFF
|
|
17
|
+
*/
|
|
15
18
|
bgColor?: string;
|
|
16
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* 整个 model 的文字颜色
|
|
21
|
+
* @defaultValue #1F1F1F
|
|
22
|
+
*/
|
|
17
23
|
textColor?: string;
|
|
18
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* 二维码周边的边框颜色
|
|
26
|
+
* @defaultValue #000000
|
|
27
|
+
*/
|
|
19
28
|
borderColor?: string;
|
|
20
29
|
/** 弹窗关闭时触发 */
|
|
21
30
|
onClose?: () => void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '../style/index.scss';
|
|
2
|
-
export * from './AliPay';
|
|
3
2
|
export * from './Card';
|
|
4
3
|
export * from './CardBrands';
|
|
5
4
|
export * from './CardExpireDateField';
|
|
@@ -9,7 +8,6 @@ export * from './CardSecurityCodeField';
|
|
|
9
8
|
export * from './CardSelector';
|
|
10
9
|
export * from './CardNo';
|
|
11
10
|
export * from './SubmitButton';
|
|
12
|
-
export * from './WechatPay';
|
|
13
11
|
export * from './ApplePay';
|
|
14
12
|
export * from './GooglePay';
|
|
15
13
|
export * from './SecuredIframe';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CustomAttributes } from '../../../types';
|
|
2
|
+
export interface ResultMessageProps extends CustomAttributes<HTMLDivElement> {
|
|
3
|
+
/** 结果文案 */
|
|
4
|
+
text: string;
|
|
5
|
+
/** 结果类型 */
|
|
6
|
+
type: ResultMessageType;
|
|
7
|
+
/** 图标大小 */
|
|
8
|
+
iconSize?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare enum ResultMessageType {
|
|
11
|
+
SUCCESS = "success",
|
|
12
|
+
ERROR = "error"
|
|
13
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconProps } from './type';
|
|
2
|
-
export declare
|
|
2
|
+
export declare const IconError: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IconProps } from './type';
|
|
2
|
-
export declare
|
|
2
|
+
export declare const IconSuccess: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import './ali-pay.scss';
|
|
2
2
|
import type { AliPayProps, AliPayRef } from './type';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
/**
|
|
4
|
+
* AliPay 支付方式
|
|
5
|
+
* - 表单:邮箱,地址
|
|
6
|
+
* - 支付:直接跳转
|
|
7
|
+
*/
|
|
8
|
+
export declare const AliPay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<AliPayProps & import("../../../types").PayKKaCommonConfig & {
|
|
9
|
+
session: import("../../../core").Session;
|
|
10
|
+
core: import("../../../core").PayKKaCheckout;
|
|
11
|
+
threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
|
|
7
12
|
isDropIn?: boolean | undefined;
|
|
8
13
|
}> & {
|
|
9
14
|
ref?: import("preact").Ref<AliPayRef> | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PayKKaCommonConfig } from '../../../types';
|
|
2
|
+
import type { PaymentCommonProps, PaymentCommonRef, PaymentFormFieldsRef, PaymentRetryRef } from '../../../types/payment';
|
|
3
|
+
import type { WalletCustomProps, WalletRedirectProps } from '../type';
|
|
4
|
+
export interface AliPayProps extends PayKKaCommonConfig, PaymentCommonProps, WalletCustomProps, WalletRedirectProps {
|
|
5
|
+
}
|
|
6
|
+
export interface AliPayRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
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 BancontactProps 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 BancontactRef {
|
|
19
|
-
/** 停止轮询支付结果 */
|
|
20
|
-
stopRetry: () => void;
|
|
21
|
-
/** 开始轮询支付结果 */
|
|
22
|
-
startRetry: (timeout?: number) => void;
|
|
23
|
-
/** 更新表单邮箱 */
|
|
24
|
-
updateEmail: () => void;
|
|
25
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
26
|
-
payment: () => void;
|
|
27
|
-
/** 更新表单地址 */
|
|
28
|
-
updateAddress: () => void;
|
|
6
|
+
export interface BancontactRef 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 } from '../type';
|
|
4
4
|
export interface BlikProps extends PayKKaCommonConfig, 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 BlikRef {
|
|
19
|
-
/** 停止轮询支付结果 */
|
|
20
|
-
stopRetry: () => void;
|
|
21
|
-
/** 开始轮询支付结果 */
|
|
22
|
-
startRetry: (timeout?: number) => void;
|
|
23
|
-
/** 更新表单邮箱 */
|
|
24
|
-
updateEmail: () => void;
|
|
25
|
-
/** 更新表单地址 */
|
|
26
|
-
updateAddress: () => void;
|
|
27
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
28
|
-
payment: () => void;
|
|
6
|
+
export interface BlikRef 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 BoostProps 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 BoostRef {
|
|
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 BoostRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
28
6
|
}
|
|
@@ -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 GCashProps 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 GCashRef {
|
|
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 GCashRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
28
6
|
}
|
|
@@ -1,17 +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 GrabPayProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
|
|
5
5
|
}
|
|
6
|
-
export interface GrabPayRef {
|
|
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 GrabPayRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
17
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 IDealProps 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 IDealRef {
|
|
19
|
-
/** 停止轮询支付结果 */
|
|
20
|
-
stopRetry: () => void;
|
|
21
|
-
/** 开始轮询支付结果 */
|
|
22
|
-
startRetry: (timeout?: number) => void;
|
|
23
|
-
/** 更新表单邮箱 */
|
|
24
|
-
updateEmail: () => void;
|
|
25
|
-
/** 更新表单地址 */
|
|
26
|
-
updateAddress: () => void;
|
|
27
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
28
|
-
payment: () => void;
|
|
6
|
+
export interface IDealRef 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 LinePayProps 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 LinePayRef {
|
|
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 LinePayRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
28
6
|
}
|
|
@@ -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 MayBankQRPayProps 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 MayBankQRPayRef {
|
|
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 MayBankQRPayRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
28
6
|
}
|
|
@@ -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 NinePayProps 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 NinePayRef {
|
|
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 NinePayRef 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 { WalletCustomProps, WalletRedirectProps } from '../type';
|
|
4
4
|
export interface OVOProps 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 OVORef {
|
|
19
|
-
/** 停止轮询支付结果 */
|
|
20
|
-
stopRetry: () => void;
|
|
21
|
-
/** 开始轮询支付结果 */
|
|
22
|
-
startRetry: (timeout?: number) => void;
|
|
23
|
-
/** 更新表单邮箱 */
|
|
24
|
-
updateEmail: () => void;
|
|
25
|
-
/** 更新表单地址 */
|
|
26
|
-
updateAddress: () => void;
|
|
27
|
-
/** 不展示支付按钮时,可调用该方法进行支付 */
|
|
28
|
-
payment: () => void;
|
|
6
|
+
export interface OVORef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
|
|
29
7
|
}
|