@paykka/card-checkout-ui 0.18.0 → 0.21.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.
Files changed (158) hide show
  1. package/README.md +3 -3
  2. package/dist/card-checkout-ui.js +15 -15
  3. package/dist/card-checkout-ui.umd.cjs +15 -15
  4. package/dist/es/api/modules/apple-pay/index.js +6 -2
  5. package/dist/es/api/modules/checkout/map.js +1 -1
  6. package/dist/es/api/modules/get-browser-params.js +1 -1
  7. package/dist/es/components/ApplePay/index.js +5 -3
  8. package/dist/es/components/Card/index.js +48 -31
  9. package/dist/es/components/DropIn/index.js +21 -5
  10. package/dist/es/components/GuideCard/index.js +7 -50
  11. package/dist/es/components/Sepa/index.js +2 -1
  12. package/dist/es/components/business/QRCodeContent/QRCodeContent.js +68 -0
  13. package/dist/es/components/business/QRCodeContent/index.js +8 -0
  14. package/dist/es/components/business/QRCodeModal/QRCodeModal.js +5 -44
  15. package/dist/es/components/business/QRCodeModal/index.js +2 -1
  16. package/dist/es/components/business/index.js +2 -1
  17. package/dist/es/components/index.js +3 -1
  18. package/dist/es/components/internal/Button/Button2.js +2 -2
  19. package/dist/es/components/internal/icons/IconAlipay.js +43 -0
  20. package/dist/es/components/internal/icons/IconAlipayHK.js +66 -0
  21. package/dist/es/components/wallets/Alipay/Alipay.js +148 -0
  22. package/dist/es/components/wallets/Alipay/index.js +1 -0
  23. package/dist/es/components/wallets/Alipay/type.js +1 -0
  24. package/dist/es/components/wallets/AlipayHK/AlipayHK.js +148 -0
  25. package/dist/es/components/wallets/AlipayHK/alipay-hk.js +1 -0
  26. package/dist/es/components/wallets/AlipayHK/index.js +1 -0
  27. package/dist/es/components/wallets/AlipayHK/type.js +1 -0
  28. package/dist/es/components/wallets/{AliPay/AliPay.js → AlipayPlus/AlipayPlus.js} +13 -15
  29. package/dist/es/components/wallets/AlipayPlus/ali-pay-plus.js +1 -0
  30. package/dist/es/components/wallets/AlipayPlus/index.js +1 -0
  31. package/dist/es/components/wallets/AlipayPlus/type.js +1 -0
  32. package/dist/es/components/wallets/Bancontact/Bancontact.js +4 -3
  33. package/dist/es/components/wallets/Blik/Blik.js +4 -3
  34. package/dist/es/components/wallets/Doku/Doku.js +2 -1
  35. package/dist/es/components/wallets/EPS/EPS.js +4 -3
  36. package/dist/es/components/wallets/GCash/GCash.js +2 -0
  37. package/dist/es/components/wallets/GoPay/GoPay.js +2 -1
  38. package/dist/es/components/wallets/IDeal/IDeal.js +4 -3
  39. package/dist/es/components/wallets/Jenius/Jenius.js +2 -1
  40. package/dist/es/components/wallets/LinkAja/LinkAja.js +2 -1
  41. package/dist/es/components/wallets/NuPay/NuPay.js +2 -1
  42. package/dist/es/components/wallets/OVO/OVO.js +2 -1
  43. package/dist/es/components/wallets/P24/P24.js +2 -1
  44. package/dist/es/components/wallets/PayByBank/PayByBank.js +2 -1
  45. package/dist/es/components/wallets/PayU/PayU.js +2 -1
  46. package/dist/es/components/wallets/Skrill/Skrill.js +2 -1
  47. package/dist/es/components/wallets/Trustly/Trustly.js +2 -1
  48. package/dist/es/components/wallets/Twint/Twint.js +2 -1
  49. package/dist/es/components/wallets/Vietqr/Vietqr.js +2 -0
  50. package/dist/es/components/wallets/WechatPay/WechatPay.js +4 -2
  51. package/dist/es/components/wallets/Zalopay/Zalopay.js +2 -0
  52. package/dist/es/components/wallets/index.js +3 -1
  53. package/dist/es/constant.js +15 -3
  54. package/dist/es/core/environment.js +17 -3
  55. package/dist/es/core/logger.js +1 -1
  56. package/dist/es/hooks/useBaseWallet.js +13 -5
  57. package/dist/es/hooks/useRetry.js +6 -0
  58. package/dist/es/i18n/locales/cs-CZ.js +8 -1
  59. package/dist/es/i18n/locales/da-DK.js +8 -1
  60. package/dist/es/i18n/locales/de-DE.js +8 -1
  61. package/dist/es/i18n/locales/en-GB.js +8 -1
  62. package/dist/es/i18n/locales/es-ES.js +8 -1
  63. package/dist/es/i18n/locales/fi-FI.js +8 -1
  64. package/dist/es/i18n/locales/fil-PH.js +8 -1
  65. package/dist/es/i18n/locales/fr-FR.js +8 -1
  66. package/dist/es/i18n/locales/hi-IN.js +8 -1
  67. package/dist/es/i18n/locales/id-ID.js +8 -1
  68. package/dist/es/i18n/locales/it-IT.js +8 -1
  69. package/dist/es/i18n/locales/ja-JP.js +8 -1
  70. package/dist/es/i18n/locales/ko-KR.js +8 -1
  71. package/dist/es/i18n/locales/ms-MY.js +8 -1
  72. package/dist/es/i18n/locales/nb-NO.js +8 -1
  73. package/dist/es/i18n/locales/nl-NL.js +8 -1
  74. package/dist/es/i18n/locales/pl-PL.js +8 -1
  75. package/dist/es/i18n/locales/pt-PT.js +8 -1
  76. package/dist/es/i18n/locales/ru-RU.js +8 -1
  77. package/dist/es/i18n/locales/sv-SE.js +8 -1
  78. package/dist/es/i18n/locales/th-TH.js +8 -1
  79. package/dist/es/i18n/locales/zh-CN.js +8 -1
  80. package/dist/es/i18n/locales/zh-HK.js +8 -1
  81. package/dist/es/i18n/locales/zh-TW.js +8 -1
  82. package/dist/es/index.js +6 -2
  83. package/dist/es/polyfill.js +165 -165
  84. package/dist/es/style.css +1 -1
  85. package/dist/es/utils/date.js +5 -1
  86. package/dist/polyfill.js +165 -165
  87. package/dist/style.css +1 -1
  88. package/dist/types/api/modules/apple-pay/index.d.ts +3 -1
  89. package/dist/types/components/DropIn/type.d.ts +1 -1
  90. package/dist/types/components/business/QRCodeContent/QRCodeContent.d.ts +3 -0
  91. package/dist/types/components/business/QRCodeContent/index.d.ts +2 -0
  92. package/dist/types/components/business/QRCodeContent/type.d.ts +23 -0
  93. package/dist/types/components/business/QRCodeModal/QRCodeModal.d.ts +0 -1
  94. package/dist/types/components/business/QRCodeModal/type.d.ts +2 -28
  95. package/dist/types/components/business/index.d.ts +1 -0
  96. package/dist/types/components/internal/Button/type.d.ts +1 -0
  97. package/dist/types/components/internal/icons/IconAlipay.d.ts +2 -0
  98. package/dist/types/components/internal/icons/IconAlipayHK.d.ts +2 -0
  99. package/dist/types/components/internal/icons/index.d.ts +2 -0
  100. package/dist/types/components/wallets/Alipay/Alipay.d.ts +15 -0
  101. package/dist/types/components/wallets/Alipay/index.d.ts +2 -0
  102. package/dist/types/components/wallets/{AliPay → Alipay}/type.d.ts +2 -2
  103. package/dist/types/components/wallets/AlipayHK/AlipayHK.d.ts +15 -0
  104. package/dist/types/components/wallets/AlipayHK/index.d.ts +2 -0
  105. package/dist/types/components/wallets/AlipayHK/type.d.ts +7 -0
  106. package/dist/types/components/wallets/AlipayPlus/AlipayPlus.d.ts +15 -0
  107. package/dist/types/components/wallets/AlipayPlus/index.d.ts +2 -0
  108. package/dist/types/components/wallets/AlipayPlus/type.d.ts +7 -0
  109. package/dist/types/components/wallets/Doku/Doku.d.ts +2 -2
  110. package/dist/types/components/wallets/DragonPay/DragonPay.d.ts +1 -1
  111. package/dist/types/components/wallets/GoPay/GoPay.d.ts +0 -1
  112. package/dist/types/components/wallets/IDeal/IDeal.d.ts +1 -1
  113. package/dist/types/components/wallets/LinkAja/LinkAja.d.ts +2 -2
  114. package/dist/types/components/wallets/MyBank/MyBank.d.ts +0 -1
  115. package/dist/types/components/wallets/OnlineBankingEstonia/OnlineBankingEstonia.d.ts +0 -1
  116. package/dist/types/components/wallets/OnlineBankingFinland/OnlineBankingFinland.d.ts +0 -1
  117. package/dist/types/components/wallets/P24/P24.d.ts +1 -1
  118. package/dist/types/components/wallets/PayU/PayU.d.ts +1 -1
  119. package/dist/types/components/wallets/Twint/Twint.d.ts +0 -1
  120. package/dist/types/components/wallets/index.d.ts +3 -1
  121. package/dist/types/constant.d.ts +6 -2
  122. package/dist/types/hooks/useBaseWallet.d.ts +13 -0
  123. package/dist/types/hooks/useRetry.d.ts +2 -0
  124. package/dist/types/i18n/locales/cs-CZ.d.ts +7 -0
  125. package/dist/types/i18n/locales/da-DK.d.ts +7 -0
  126. package/dist/types/i18n/locales/de-DE.d.ts +7 -0
  127. package/dist/types/i18n/locales/en-GB.d.ts +7 -0
  128. package/dist/types/i18n/locales/es-ES.d.ts +7 -0
  129. package/dist/types/i18n/locales/fi-FI.d.ts +7 -0
  130. package/dist/types/i18n/locales/fil-PH.d.ts +7 -0
  131. package/dist/types/i18n/locales/fr-FR.d.ts +7 -0
  132. package/dist/types/i18n/locales/hi-IN.d.ts +7 -0
  133. package/dist/types/i18n/locales/id-ID.d.ts +7 -0
  134. package/dist/types/i18n/locales/it-IT.d.ts +7 -0
  135. package/dist/types/i18n/locales/ja-JP.d.ts +7 -0
  136. package/dist/types/i18n/locales/ko-KR.d.ts +7 -0
  137. package/dist/types/i18n/locales/ms-MY.d.ts +7 -0
  138. package/dist/types/i18n/locales/nb-NO.d.ts +7 -0
  139. package/dist/types/i18n/locales/nl-NL.d.ts +7 -0
  140. package/dist/types/i18n/locales/pl-PL.d.ts +7 -0
  141. package/dist/types/i18n/locales/pt-PT.d.ts +7 -0
  142. package/dist/types/i18n/locales/ru-RU.d.ts +7 -0
  143. package/dist/types/i18n/locales/sv-SE.d.ts +7 -0
  144. package/dist/types/i18n/locales/th-TH.d.ts +7 -0
  145. package/dist/types/i18n/locales/zh-CN.d.ts +7 -0
  146. package/dist/types/i18n/locales/zh-HK.d.ts +7 -0
  147. package/dist/types/i18n/locales/zh-TW.d.ts +7 -0
  148. package/dist/types/utils/date.d.ts +1 -0
  149. package/package.json +81 -81
  150. package/dist/es/components/RecurringTip/index.js +0 -21
  151. package/dist/es/components/wallets/AliPay/index.js +0 -1
  152. package/dist/types/components/RecurringTip/RecurringTip.d.ts +0 -2
  153. package/dist/types/components/RecurringTip/index.d.ts +0 -1
  154. package/dist/types/components/wallets/AliPay/AliPay.d.ts +0 -15
  155. package/dist/types/components/wallets/AliPay/index.d.ts +0 -2
  156. /package/dist/es/components/business/{QRCodeModal/qr-code-modal.js → QRCodeContent/qr-code-content.js} +0 -0
  157. /package/dist/es/components/{wallets/AliPay → business/QRCodeContent}/type.js +0 -0
  158. /package/dist/es/components/wallets/{AliPay → Alipay}/ali-pay.js +0 -0
@@ -0,0 +1,2 @@
1
+ export * from './AlipayHK';
2
+ export * from './type';
@@ -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 AlipayHKProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
5
+ }
6
+ export interface AlipayHKRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
7
+ }
@@ -0,0 +1,15 @@
1
+ import './ali-pay-plus.scss';
2
+ import type { AlipayPlusProps, AlipayPlusRef } from './type';
3
+ /**
4
+ * AlipayPlus 支付方式
5
+ * - 表单:邮箱,地址
6
+ * - 支付:直接跳转
7
+ */
8
+ export declare const AlipayPlus: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<AlipayPlusProps & import("../../../types").PayKKaCommonConfig & {
9
+ session: import("../../../core").Session;
10
+ core: import("../../../core").PayKKaCheckout;
11
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
12
+ isDropIn?: boolean | undefined;
13
+ }> & {
14
+ ref?: import("preact").Ref<AlipayPlusRef> | undefined;
15
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './AlipayPlus';
2
+ export * from './type';
@@ -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 AlipayPlusProps extends PayKKaCommonConfig, PaymentCommonProps, WalletCustomProps, WalletRedirectProps {
5
+ }
6
+ export interface AlipayPlusRef extends PaymentCommonRef, PaymentRetryRef, PaymentFormFieldsRef {
7
+ }
@@ -8,8 +8,8 @@ import type { DokuProps, DokuRef } from './type';
8
8
  export declare const Doku: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<DokuProps & import("../../../types").PayKKaCommonConfig & {
9
9
  session: import("../../../core").Session;
10
10
  core: import("../../../core").PayKKaCheckout;
11
- threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
12
- isDropIn?: boolean | undefined;
11
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined; /** 表单是否验证通过 */
12
+ isDropIn?: boolean | undefined; /** 静默校验,校验表单但不展示错误提示,仅更新校验结果 */
13
13
  }> & {
14
14
  ref?: import("preact").Ref<DokuRef> | undefined;
15
15
  }>;
@@ -9,7 +9,7 @@ import './dragon-pay.scss';
9
9
  export declare const DragonPay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<DragonPayProps & import("../../../types").PayKKaCommonConfig & {
10
10
  session: import("../../../core").Session;
11
11
  core: import("../../../core").PayKKaCheckout;
12
- threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined; /** 设置表单引用时触发静默校验,避免表单引用初始化未完成时提前触发 */
12
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
13
13
  isDropIn?: boolean | undefined;
14
14
  }> & {
15
15
  ref?: import("preact").Ref<DragonPayRef> | undefined;
@@ -7,7 +7,6 @@ import type { GoPayProps, GoPayRef } from './type';
7
7
  */
8
8
  export declare const GoPay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<GoPayProps & import("../../../types").PayKKaCommonConfig & {
9
9
  session: import("../../../core").Session;
10
- /** 静默校验,校验表单但不展示错误提示,仅更新校验结果 */
11
10
  core: import("../../../core").PayKKaCheckout;
12
11
  threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
13
12
  isDropIn?: boolean | undefined;
@@ -6,7 +6,7 @@ import type { IDealProps, IDealRef } from './type';
6
6
  * - 支付:跳转至银行页面完成支付
7
7
  */
8
8
  export declare const IDeal: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<IDealProps & import("../../../types").PayKKaCommonConfig & {
9
- session: import("../../../core").Session;
9
+ session: import("../../../core").Session; /** 表单数据 */
10
10
  core: import("../../../core").PayKKaCheckout;
11
11
  threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
12
12
  isDropIn?: boolean | undefined;
@@ -8,8 +8,8 @@ import type { LinkAjaProps, LinkAjaRef } from './type';
8
8
  export declare const LinkAja: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<LinkAjaProps & import("../../../types").PayKKaCommonConfig & {
9
9
  session: import("../../../core").Session;
10
10
  core: import("../../../core").PayKKaCheckout;
11
- threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined; /** 表单是否验证通过 */
12
- isDropIn?: boolean | undefined; /** 静默校验,校验表单但不展示错误提示,仅更新校验结果 */
11
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
12
+ isDropIn?: boolean | undefined;
13
13
  }> & {
14
14
  ref?: import("preact").Ref<LinkAjaRef> | undefined;
15
15
  }>;
@@ -6,7 +6,6 @@ import type { MyBankProps, MyBankRef } from './type';
6
6
  * - 支付:跳转至 MyBank 页面完成支付
7
7
  */
8
8
  export declare const MyBank: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<MyBankProps & import("../../../types").PayKKaCommonConfig & {
9
- /** 表单数据 */
10
9
  session: import("../../../core").Session;
11
10
  core: import("../../../core").PayKKaCheckout;
12
11
  threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
@@ -9,7 +9,6 @@ import './online-banking-estonia.scss';
9
9
  export declare const OnlineBankingEstonia: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<OnlineBankingEstoniaProps & import("../../../types").PayKKaCommonConfig & {
10
10
  session: import("../../../core").Session;
11
11
  core: import("../../../core").PayKKaCheckout;
12
- /** 静默校验,校验表单但不展示错误提示,仅更新校验结果 */
13
12
  threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
14
13
  isDropIn?: boolean | undefined;
15
14
  }> & {
@@ -9,7 +9,6 @@ import './online-banking-finland.scss';
9
9
  export declare const OnlineBankingFinland: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<OnlineBankingFinlandProps & import("../../../types").PayKKaCommonConfig & {
10
10
  session: import("../../../core").Session;
11
11
  core: import("../../../core").PayKKaCheckout;
12
- /** 静默校验,校验表单但不展示错误提示,仅更新校验结果 */
13
12
  threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
14
13
  isDropIn?: boolean | undefined;
15
14
  }> & {
@@ -9,7 +9,7 @@ export declare const P24: import("preact").FunctionalComponent<import("preact/co
9
9
  session: import("../../../core").Session;
10
10
  core: import("../../../core").PayKKaCheckout;
11
11
  threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
12
- isDropIn?: boolean | undefined;
12
+ isDropIn?: boolean | undefined; /** 设置表单引用时触发静默校验,避免表单引用初始化未完成时提前触发 */
13
13
  }> & {
14
14
  ref?: import("preact").Ref<P24Ref> | undefined;
15
15
  }>;
@@ -8,7 +8,7 @@ import type { PayUProps, PayURef } from './type';
8
8
  export declare const PayU: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<PayUProps & import("../../../types").PayKKaCommonConfig & {
9
9
  session: import("../../../core").Session;
10
10
  core: import("../../../core").PayKKaCheckout;
11
- threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined; /** 表单是否验证通过 */
11
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
12
12
  isDropIn?: boolean | undefined;
13
13
  }> & {
14
14
  ref?: import("preact").Ref<PayURef> | undefined;
@@ -7,7 +7,6 @@ import type { TwintProps, TwintRef } from './type';
7
7
  */
8
8
  export declare const Twint: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<TwintProps & import("../../../types").PayKKaCommonConfig & {
9
9
  session: import("../../../core").Session;
10
- /** 静默校验,校验表单但不展示错误提示,仅更新校验结果 */
11
10
  core: import("../../../core").PayKKaCheckout;
12
11
  threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
13
12
  isDropIn?: boolean | undefined;
@@ -28,7 +28,9 @@ export * from './MbWay';
28
28
  export * from './Multibanco';
29
29
  export * from './PayU';
30
30
  export * from './Satispay';
31
- export * from './AliPay';
31
+ export * from './AlipayPlus';
32
+ export * from './Alipay';
33
+ export * from './AlipayHK';
32
34
  export * from './WechatPay';
33
35
  export * from './PayByBank';
34
36
  export * from './Fpx';
@@ -18,7 +18,9 @@ export declare enum PaymentMethod {
18
18
  BOC = "BOC",
19
19
  CHINA_UNION_PAY = "CHINA_UNION_PAY",
20
20
  /** 钱包 */
21
- ALI_PAY = "ALIPAY_PLUS",
21
+ ALIPAY_PLUS = "ALIPAY_PLUS",
22
+ ALIPAY = "ALIPAY",
23
+ ALIPAY_HK = "ALIPAY_HK",
22
24
  WECHAT_PAY = "WECHAT_PAY_GLOBAL",
23
25
  BOOST = "BOOST",
24
26
  GRAB_PAY = "GRABPAY",
@@ -78,7 +80,9 @@ export declare enum PaymentCategory {
78
80
  SEPA_DEBIT = "sepaDebit",
79
81
  /** 钱包 */
80
82
  WECHAT_PAY = "wechatPay",
81
- ALI_PAY = "aliPay",
83
+ ALIPAY_PLUS = "aliPayPlus",
84
+ ALIPAY = "aliPay",
85
+ ALIPAY_HK = "aliPayHK",
82
86
  BOOST = "boost",
83
87
  GRAB_PAY = "grabPay",
84
88
  TNG_WALLET = "tngEWallet",
@@ -3,6 +3,7 @@ import { PaymentMethod } from '../constant';
3
3
  import type { WalletCustomProps, WalletRedirectProps, WalletQRCodeModalProps } from '../components/wallets/type';
4
4
  import { type BasePaymentInfo, type CoreProps } from '../types';
5
5
  import { type FieldStatusConfig } from '../api';
6
+ import { type RetryPollTier } from './useRetry';
6
7
  import type { PaymentButtonStatus } from '../components/PaymentButton';
7
8
  import type { PaymentCommonProps, PaymentMethodContext } from '../types/payment';
8
9
  export type BaseWalletProps = WalletCustomProps & WalletRedirectProps & WalletQRCodeModalProps & CoreProps & PaymentCommonProps;
@@ -23,6 +24,11 @@ export interface BaseWalletOnProcessingResult {
23
24
  */
24
25
  success?: boolean;
25
26
  }
27
+ export interface BaseWalletRetryOptions {
28
+ timeout?: number;
29
+ interval?: number;
30
+ pollTiers?: RetryPollTier[];
31
+ }
26
32
  export interface BaseWalletOptions {
27
33
  /**
28
34
  * 轮询超时时间
@@ -34,6 +40,12 @@ export interface BaseWalletOptions {
34
40
  * @defaultValue false
35
41
  **/
36
42
  supportQRCodeModal?: boolean;
43
+ /** 支付超时时的专属错误文案 */
44
+ timeoutMessage?: string;
45
+ /** 支付过期时的专属错误文案 */
46
+ expiredMessage?: string;
47
+ /** 根据支付响应动态调整当前支付流程的轮询配置 */
48
+ getRetryOptions?: (paymentInfo: BasePaymentInfo) => BaseWalletRetryOptions | undefined;
37
49
  /** 获取最终处理过的表单数据 */
38
50
  getFormData: () => Recordable;
39
51
  /**
@@ -90,4 +102,5 @@ export declare const useBaseWallet: (paymentMethod: PaymentMethod, baseProps: Ba
90
102
  }>;
91
103
  processOnError: (error: any) => void;
92
104
  processOnTimeout: (type: 'channel' | 'retry', message?: string) => void;
105
+ paymentTimeout: boolean;
93
106
  };
@@ -14,6 +14,8 @@ export type RetryPollTier = {
14
14
  * 之后每 12s 一次,直至达到外层设置的轮询时间
15
15
  */
16
16
  export declare const DEFAULT_RETRY_POLL_TIERS: RetryPollTier[];
17
+ /** 扫码支付轮询档位 */
18
+ export declare const SCAN_CODE_RETRY_POLL_TIERS: RetryPollTier[];
17
19
  export declare const getRetryIntervalForElapsed: (elapsedMs: number, tiers?: RetryPollTier[]) => number;
18
20
  export declare const useRetry: (cb: (timeout: number) => Promise<{
19
21
  end: boolean;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;
@@ -43,7 +43,9 @@ declare const _default: {
43
43
  'dropIn.onlineBankingLithuania.label': string;
44
44
  'dropIn.onlineBankingIndonesia.label': string;
45
45
  'dropIn.onlineBankingThailand.label': string;
46
+ 'dropIn.aliPayPlus.label': string;
46
47
  'dropIn.aliPay.label': string;
48
+ 'dropIn.aliPayHK.label': string;
47
49
  'dropIn.wechatPay.label': string;
48
50
  'dropIn.sepaDebit.label': string;
49
51
  'dropIn.swish.label': string;
@@ -76,9 +78,14 @@ declare const _default: {
76
78
  'common.paySuccess': string;
77
79
  'common.payTimeout': string;
78
80
  'common.pay3DSIncomplete': string;
81
+ 'common.paymentTimeout': string;
82
+ 'common.repay': string;
79
83
  'common.queryTimeout': string;
80
84
  'common.recurringTip': string;
81
85
  'common.recurringTip2': string;
86
+ 'common.save': string;
87
+ 'common.storePaymentTip': string;
88
+ 'common.recurringStoreTip': string;
82
89
  'common.noData': string;
83
90
  'common.netError': string;
84
91
  'common.unknownError': string;