@paykka/card-checkout-ui 0.13.1 → 0.13.5

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/dist/card-checkout-ui.js +21 -21
  2. package/dist/card-checkout-ui.umd.cjs +21 -21
  3. package/dist/es/_commonjsHelpers.js +82 -1
  4. package/dist/es/api/modules/get-browser-params.js +4 -1
  5. package/dist/es/api/modules/opay-wallet/index.js +16 -0
  6. package/dist/es/api/modules/paga-wallet/index.js +16 -0
  7. package/dist/es/api/modules/pic-pay/index.js +16 -0
  8. package/dist/es/api/modules/pix/index.js +16 -0
  9. package/dist/es/api/modules/vietqr/index.js +4 -0
  10. package/dist/es/components/AliPay/index.js +29 -35
  11. package/dist/es/components/Boost/index.js +34 -40
  12. package/dist/es/components/Card/index.js +35 -39
  13. package/dist/es/components/DropIn/index.js +42 -2
  14. package/dist/es/components/EncryptedCard/index.js +5 -1
  15. package/dist/es/components/GooglePay/index.js +1 -0
  16. package/dist/es/components/GrabPay/index.js +34 -40
  17. package/dist/es/components/GuideCard/index.js +6 -1
  18. package/dist/es/components/LinePay/index.js +34 -40
  19. package/dist/es/components/MayBankQRPay/index.js +35 -41
  20. package/dist/es/components/NinePay/index.js +34 -40
  21. package/dist/es/components/SecuredFieldsProvider/index.js +23 -7
  22. package/dist/es/components/SecuredIframe/index.js +36 -59
  23. package/dist/es/components/Sepa/index.js +17 -21
  24. package/dist/es/components/ShopeePay/index.js +34 -40
  25. package/dist/es/components/TNGWallet/index.js +34 -40
  26. package/dist/es/components/ThreeDS/index.js +32 -7
  27. package/dist/es/components/WechatPay/index.js +19 -24
  28. package/dist/es/components/business/QRCodeModal/QRCodeModal.js +6 -6
  29. package/dist/es/components/index.js +5 -0
  30. package/dist/es/components/internal/Form/FormItem.js +1 -1
  31. package/dist/es/components/internal/Form/util.js +1 -1
  32. package/dist/es/components/internal/Select/SelectMenu.js +2 -2
  33. package/dist/es/components/internal/icons/IconError.js +7 -4
  34. package/dist/es/components/internal/icons/IconOpayWallet.js +71 -0
  35. package/dist/es/components/internal/icons/IconPagaWallet.js +141 -0
  36. package/dist/es/components/internal/icons/IconPaymaya.js +42 -86
  37. package/dist/es/components/internal/icons/IconPicPay.js +49 -0
  38. package/dist/es/components/internal/icons/IconPix.js +75 -0
  39. package/dist/es/components/internal/icons/IconVietqr.js +45 -0
  40. package/dist/es/components/internal/icons/IconVietqrComplete.js +49 -0
  41. package/dist/es/components/wallets/GCash/GCash.js +20 -25
  42. package/dist/es/components/wallets/OpayWallet/OpayWallet.js +346 -0
  43. package/dist/es/components/wallets/OpayWallet/index.js +1 -0
  44. package/dist/es/components/wallets/OpayWallet/opay-wallet.js +1 -0
  45. package/dist/es/components/wallets/OpayWallet/type.js +1 -0
  46. package/dist/es/components/wallets/PagaWallet/PagaWallet.js +346 -0
  47. package/dist/es/components/wallets/PagaWallet/index.js +1 -0
  48. package/dist/es/components/wallets/PagaWallet/paga-wallet.js +1 -0
  49. package/dist/es/components/wallets/PagaWallet/type.js +1 -0
  50. package/dist/es/components/wallets/Paymaya/Paymaya.js +34 -40
  51. package/dist/es/components/wallets/PicPay/PicPay.js +346 -0
  52. package/dist/es/components/wallets/PicPay/index.js +1 -0
  53. package/dist/es/components/wallets/PicPay/pic-pay.js +1 -0
  54. package/dist/es/components/wallets/PicPay/type.js +1 -0
  55. package/dist/es/components/wallets/Pix/Pix.js +346 -0
  56. package/dist/es/components/wallets/Pix/index.js +1 -0
  57. package/dist/es/components/wallets/Pix/pix2.js +1 -0
  58. package/dist/es/components/wallets/Pix/type.js +1 -0
  59. package/dist/es/components/wallets/Vietqr/Vietqr.js +380 -0
  60. package/dist/es/components/wallets/Vietqr/index.js +1 -0
  61. package/dist/es/components/wallets/Vietqr/type.js +1 -0
  62. package/dist/es/components/wallets/Vietqr/vietqr2.js +1 -0
  63. package/dist/es/components/wallets/Zalopay/Zalopay.js +17 -21
  64. package/dist/es/components/wallets/index.js +8 -0
  65. package/dist/es/constant.js +32 -2
  66. package/dist/es/core/checkout.js +24 -1
  67. package/dist/es/core/create.js +1 -1
  68. package/dist/es/core/session.js +2 -23
  69. package/dist/es/core/theme.js +65 -0
  70. package/dist/es/core.js +34 -34
  71. package/dist/es/i18n/locales/de-DE.js +8 -2
  72. package/dist/es/i18n/locales/en-GB.js +8 -2
  73. package/dist/es/i18n/locales/es-ES.js +8 -2
  74. package/dist/es/i18n/locales/fr-FR.js +8 -2
  75. package/dist/es/i18n/locales/ja-JP.js +8 -2
  76. package/dist/es/i18n/locales/ko-KR.js +8 -2
  77. package/dist/es/i18n/locales/nl-NL.js +8 -2
  78. package/dist/es/i18n/locales/pt-PT.js +8 -2
  79. package/dist/es/i18n/locales/ru-RU.js +8 -2
  80. package/dist/es/i18n/locales/zh-CN.js +10 -4
  81. package/dist/es/i18n/locales/zh-HK.js +10 -4
  82. package/dist/es/i18n/locales/zh-TW.js +10 -4
  83. package/dist/es/index.js +17 -5
  84. package/dist/es/style.css +1 -1
  85. package/dist/es/utils/format.js +0 -5
  86. package/dist/es/utils/object.js +31 -1
  87. package/dist/es/utils/string.js +10 -0
  88. package/dist/es/utils/system-info/is-ua-webview.js +14 -12
  89. package/dist/es/utils/theme.js +7 -0
  90. package/dist/style.css +1 -1
  91. package/dist/types/api/modules/get-browser-params.d.ts +1 -0
  92. package/dist/types/api/modules/index.d.ts +5 -0
  93. package/dist/types/api/modules/opay-wallet/index.d.ts +4 -0
  94. package/dist/types/api/modules/paga-wallet/index.d.ts +4 -0
  95. package/dist/types/api/modules/pic-pay/index.d.ts +4 -0
  96. package/dist/types/api/modules/pix/index.d.ts +4 -0
  97. package/dist/types/api/modules/vietqr/index.d.ts +4 -0
  98. package/dist/types/components/DropIn/type.d.ts +3 -2
  99. package/dist/types/components/SecuredFieldsProvider/type.d.ts +5 -0
  100. package/dist/types/components/SecuredIframe/HiddenIframe.d.ts +3 -1
  101. package/dist/types/components/ThreeDS/components/ThreeDSAuth/type.d.ts +2 -0
  102. package/dist/types/components/business/QRCodeModal/type.d.ts +2 -0
  103. package/dist/types/components/index.d.ts +1 -3
  104. package/dist/types/components/internal/Loading/Loading.d.ts +1 -0
  105. package/dist/types/components/internal/Select/SelectMenu.d.ts +1 -1
  106. package/dist/types/components/internal/icons/IconOpayWallet.d.ts +2 -0
  107. package/dist/types/components/internal/icons/IconPagaWallet.d.ts +2 -0
  108. package/dist/types/components/internal/icons/IconPicPay.d.ts +2 -0
  109. package/dist/types/components/internal/icons/IconPix.d.ts +2 -0
  110. package/dist/types/components/internal/icons/IconVietqr.d.ts +2 -0
  111. package/dist/types/components/internal/icons/IconVietqrComplete.d.ts +2 -0
  112. package/dist/types/components/internal/icons/index.d.ts +6 -0
  113. package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +10 -0
  114. package/dist/types/components/wallets/OpayWallet/index.d.ts +2 -0
  115. package/dist/types/components/wallets/OpayWallet/type.d.ts +40 -0
  116. package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +10 -0
  117. package/dist/types/components/wallets/PagaWallet/index.d.ts +2 -0
  118. package/dist/types/components/wallets/PagaWallet/type.d.ts +40 -0
  119. package/dist/types/components/wallets/PicPay/PicPay.d.ts +10 -0
  120. package/dist/types/components/wallets/PicPay/index.d.ts +2 -0
  121. package/dist/types/components/wallets/PicPay/type.d.ts +40 -0
  122. package/dist/types/components/wallets/Pix/Pix.d.ts +10 -0
  123. package/dist/types/components/wallets/Pix/index.d.ts +2 -0
  124. package/dist/types/components/wallets/Pix/type.d.ts +40 -0
  125. package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +10 -0
  126. package/dist/types/components/wallets/Vietqr/index.d.ts +2 -0
  127. package/dist/types/components/wallets/Vietqr/type.d.ts +39 -0
  128. package/dist/types/components/wallets/index.d.ts +8 -0
  129. package/dist/types/components/wallets/type.d.ts +9 -0
  130. package/dist/types/constant.d.ts +11 -1
  131. package/dist/types/core/checkout.d.ts +4 -0
  132. package/dist/types/core/index.d.ts +1 -0
  133. package/dist/types/core/session.d.ts +1 -11
  134. package/dist/types/core/theme.d.ts +7 -0
  135. package/dist/types/i18n/locales/de-DE.d.ts +6 -0
  136. package/dist/types/i18n/locales/en-GB.d.ts +6 -0
  137. package/dist/types/i18n/locales/es-ES.d.ts +6 -0
  138. package/dist/types/i18n/locales/fr-FR.d.ts +6 -0
  139. package/dist/types/i18n/locales/ja-JP.d.ts +6 -0
  140. package/dist/types/i18n/locales/ko-KR.d.ts +6 -0
  141. package/dist/types/i18n/locales/nl-NL.d.ts +6 -0
  142. package/dist/types/i18n/locales/pt-PT.d.ts +6 -0
  143. package/dist/types/i18n/locales/ru-RU.d.ts +6 -0
  144. package/dist/types/i18n/locales/zh-CN.d.ts +6 -0
  145. package/dist/types/i18n/locales/zh-HK.d.ts +6 -0
  146. package/dist/types/i18n/locales/zh-TW.d.ts +6 -0
  147. package/dist/types/types/message.d.ts +29 -25
  148. package/dist/types/utils/index.d.ts +3 -2
  149. package/dist/types/utils/object.d.ts +7 -0
  150. package/dist/types/utils/string.d.ts +1 -0
  151. package/dist/types/utils/style.d.ts +1 -1
  152. package/dist/types/utils/system-info/is-ua-webview.d.ts +1 -1
  153. package/dist/types/utils/theme.d.ts +4 -0
  154. package/package.json +67 -67
  155. package/dist/es/utils/deep-freeze.js +0 -13
  156. package/dist/es/utils/obj.js +0 -22
  157. package/dist/types/utils/deep-freeze.d.ts +0 -1
  158. package/dist/types/utils/obj.d.ts +0 -6
@@ -0,0 +1,40 @@
1
+ import type { PayKKaError } from '../../..';
2
+ import type { PayKKaCommonConfig, PaymentInfo } from '../../../types';
3
+ import type { FormValidateError } from '../../internal/Form';
4
+ import type { WalletRedirectProps } from '../type';
5
+ export interface OpayWalletProps extends PayKKaCommonConfig, WalletRedirectProps {
6
+ /**
7
+ * 是否展示邮箱
8
+ * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
9
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
10
+ */
11
+ showEmail?: boolean;
12
+ /**
13
+ * 是否展示邮箱
14
+ * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
15
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
16
+ */
17
+ showAddress?: boolean;
18
+ /** 提交表单时触发 */
19
+ onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void;
20
+ /** 支付成功后触发 */
21
+ onSuccess?: (data: PaymentInfo) => void;
22
+ /** 支付失败时触发 */
23
+ onError?: (error: PayKKaError) => void;
24
+ /** 支付超时时触发 */
25
+ onTimeout?: () => void;
26
+ /** 收银台已过期时触发 */
27
+ onExpired?: () => void;
28
+ }
29
+ export interface OpayWalletRef {
30
+ /** 停止轮询支付结果 */
31
+ stopRetry: () => void;
32
+ /** 开始轮询支付结果 */
33
+ startRetry: (timeout?: number) => void;
34
+ /** 更新表单地址 */
35
+ updateAddress: () => void;
36
+ /** 更新表单邮箱 */
37
+ updateEmail: () => void;
38
+ /** 不展示支付按钮时,可调用该方法进行支付 */
39
+ payment: () => void;
40
+ }
@@ -0,0 +1,10 @@
1
+ import type { PagaWalletProps, PagaWalletRef } from './type';
2
+ import './paga-wallet.scss';
3
+ export declare const PagaWallet: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<PagaWalletProps & import("../../../types").PayKKaCommonConfig & {
4
+ session: import("../../../core").Session;
5
+ core: import("../../../core").PayKKaCheckout;
6
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
7
+ isDropIn?: boolean | undefined;
8
+ }> & {
9
+ ref?: import("preact").Ref<PagaWalletRef> | undefined;
10
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './PagaWallet';
2
+ export * from './type';
@@ -0,0 +1,40 @@
1
+ import type { PayKKaError } from '../../..';
2
+ import type { PayKKaCommonConfig, PaymentInfo } from '../../../types';
3
+ import type { FormValidateError } from '../../internal/Form';
4
+ import type { WalletRedirectProps } from '../type';
5
+ export interface PagaWalletProps extends PayKKaCommonConfig, WalletRedirectProps {
6
+ /**
7
+ * 是否展示邮箱
8
+ * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
9
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
10
+ */
11
+ showEmail?: boolean;
12
+ /**
13
+ * 是否展示邮箱
14
+ * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
15
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
16
+ */
17
+ showAddress?: boolean;
18
+ /** 提交表单时触发 */
19
+ onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void;
20
+ /** 支付成功后触发 */
21
+ onSuccess?: (data: PaymentInfo) => void;
22
+ /** 支付失败时触发 */
23
+ onError?: (error: PayKKaError) => void;
24
+ /** 支付超时时触发 */
25
+ onTimeout?: () => void;
26
+ /** 收银台已过期时触发 */
27
+ onExpired?: () => void;
28
+ }
29
+ export interface PagaWalletRef {
30
+ /** 停止轮询支付结果 */
31
+ stopRetry: () => void;
32
+ /** 开始轮询支付结果 */
33
+ startRetry: (timeout?: number) => void;
34
+ /** 更新表单地址 */
35
+ updateAddress: () => void;
36
+ /** 更新表单邮箱 */
37
+ updateEmail: () => void;
38
+ /** 不展示支付按钮时,可调用该方法进行支付 */
39
+ payment: () => void;
40
+ }
@@ -0,0 +1,10 @@
1
+ import type { PicPayProps, PicPayRef } from './type';
2
+ import './pic-pay.scss';
3
+ export declare const PicPay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<PicPayProps & import("../../../types").PayKKaCommonConfig & {
4
+ session: import("../../../core").Session;
5
+ core: import("../../../core").PayKKaCheckout;
6
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
7
+ isDropIn?: boolean | undefined;
8
+ }> & {
9
+ ref?: import("preact").Ref<PicPayRef> | undefined;
10
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './PicPay';
2
+ export * from './type';
@@ -0,0 +1,40 @@
1
+ import type { PayKKaError } from '../../..';
2
+ import type { PayKKaCommonConfig, PaymentInfo } from '../../../types';
3
+ import type { FormValidateError } from '../../internal/Form';
4
+ import type { WalletRedirectProps } from '../type';
5
+ export interface PicPayProps extends PayKKaCommonConfig, WalletRedirectProps {
6
+ /**
7
+ * 是否展示邮箱
8
+ * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
9
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
10
+ */
11
+ showEmail?: boolean;
12
+ /**
13
+ * 是否展示邮箱
14
+ * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
15
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
16
+ */
17
+ showAddress?: boolean;
18
+ /** 提交表单时触发 */
19
+ onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void;
20
+ /** 支付成功后触发 */
21
+ onSuccess?: (data: PaymentInfo) => void;
22
+ /** 支付失败时触发 */
23
+ onError?: (error: PayKKaError) => void;
24
+ /** 支付超时时触发 */
25
+ onTimeout?: () => void;
26
+ /** 收银台已过期时触发 */
27
+ onExpired?: () => void;
28
+ }
29
+ export interface PicPayRef {
30
+ /** 停止轮询支付结果 */
31
+ stopRetry: () => void;
32
+ /** 开始轮询支付结果 */
33
+ startRetry: (timeout?: number) => void;
34
+ /** 更新表单地址 */
35
+ updateAddress: () => void;
36
+ /** 更新表单邮箱 */
37
+ updateEmail: () => void;
38
+ /** 不展示支付按钮时,可调用该方法进行支付 */
39
+ payment: () => void;
40
+ }
@@ -0,0 +1,10 @@
1
+ import type { PixProps, PixRef } from './type';
2
+ import './pix.scss';
3
+ export declare const Pix: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<PixProps & import("../../../types").PayKKaCommonConfig & {
4
+ session: import("../../../core").Session;
5
+ core: import("../../../core").PayKKaCheckout;
6
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
7
+ isDropIn?: boolean | undefined;
8
+ }> & {
9
+ ref?: import("preact").Ref<PixRef> | undefined;
10
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './Pix';
2
+ export * from './type';
@@ -0,0 +1,40 @@
1
+ import type { PayKKaError } from '../../..';
2
+ import type { PayKKaCommonConfig, PaymentInfo } from '../../../types';
3
+ import type { FormValidateError } from '../../internal/Form';
4
+ import type { WalletRedirectProps } from '../type';
5
+ export interface PixProps extends PayKKaCommonConfig, WalletRedirectProps {
6
+ /**
7
+ * 是否展示邮箱
8
+ * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
9
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
10
+ */
11
+ showEmail?: boolean;
12
+ /**
13
+ * 是否展示邮箱
14
+ * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
15
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
16
+ */
17
+ showAddress?: boolean;
18
+ /** 提交表单时触发 */
19
+ onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void;
20
+ /** 支付成功后触发 */
21
+ onSuccess?: (data: PaymentInfo) => void;
22
+ /** 支付失败时触发 */
23
+ onError?: (error: PayKKaError) => void;
24
+ /** 支付超时时触发 */
25
+ onTimeout?: () => void;
26
+ /** 收银台已过期时触发 */
27
+ onExpired?: () => void;
28
+ }
29
+ export interface PixRef {
30
+ /** 停止轮询支付结果 */
31
+ stopRetry: () => void;
32
+ /** 开始轮询支付结果 */
33
+ startRetry: (timeout?: number) => void;
34
+ /** 更新表单地址 */
35
+ updateAddress: () => void;
36
+ /** 更新表单邮箱 */
37
+ updateEmail: () => void;
38
+ /** 不展示支付按钮时,可调用该方法进行支付 */
39
+ payment: () => void;
40
+ }
@@ -0,0 +1,10 @@
1
+ import type { VietqrProps, VietqrRef } from './type';
2
+ import './vietqr.scss';
3
+ export declare const Vietqr: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<VietqrProps & import("../../../types").PayKKaCommonConfig & {
4
+ session: import("../../../core").Session;
5
+ core: import("../../../core").PayKKaCheckout;
6
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
7
+ isDropIn?: boolean | undefined;
8
+ }> & {
9
+ ref?: import("preact").Ref<VietqrRef> | undefined;
10
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './Vietqr';
2
+ export * from './type';
@@ -0,0 +1,39 @@
1
+ import type { PayKKaError } from '../../..';
2
+ import type { PayKKaCommonConfig, PaymentInfo } from '../../../types';
3
+ import type { FormValidateError } from '../../internal/Form';
4
+ export interface VietqrProps extends PayKKaCommonConfig {
5
+ /**
6
+ * 是否展示邮箱
7
+ * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
8
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
9
+ */
10
+ showEmail?: boolean;
11
+ /**
12
+ * 是否展示邮箱
13
+ * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
14
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
15
+ */
16
+ showAddress?: boolean;
17
+ /** 提交表单时触发 */
18
+ onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void;
19
+ /** 支付成功后触发 */
20
+ onSuccess?: (data: PaymentInfo) => void;
21
+ /** 支付失败时触发 */
22
+ onError?: (error: PayKKaError) => void;
23
+ /** 支付超时时触发 */
24
+ onTimeout?: (type: 'retry' | 'channel') => void;
25
+ /** 收银台已过期时触发 */
26
+ onExpired?: () => void;
27
+ }
28
+ export interface VietqrRef {
29
+ /** 停止轮询支付结果 */
30
+ stopRetry: () => void;
31
+ /** 开始轮询支付结果 */
32
+ startRetry: (timeout?: number) => void;
33
+ /** 更新表单地址 */
34
+ updateAddress: () => void;
35
+ /** 更新表单邮箱 */
36
+ updateEmail: () => void;
37
+ /** 不展示支付按钮时,可调用该方法进行支付 */
38
+ payment: () => void;
39
+ }
@@ -0,0 +1,8 @@
1
+ export * from './GCash';
2
+ export * from './Paymaya';
3
+ export * from './Zalopay';
4
+ export * from './Vietqr';
5
+ export * from './Pix';
6
+ export * from './PicPay';
7
+ export * from './PagaWallet';
8
+ export * from './OpayWallet';
@@ -0,0 +1,9 @@
1
+ /** 钱包支付方式公共配置 */
2
+ export interface WalletCommonProps {
3
+ }
4
+ /** 通过跳转支付的钱包配置 */
5
+ export interface WalletRedirectProps extends WalletCommonProps {
6
+ }
7
+ /** 通过弹窗支付的钱包配置 */
8
+ export interface WalletQRCodeModalProps extends WalletCommonProps {
9
+ }
@@ -28,6 +28,11 @@ export declare enum PaymentMethod {
28
28
  GCASH = "G_CASH",
29
29
  PAYMAYA = "PAYMAYA",
30
30
  ZALOPAY = "ZALOPAY",
31
+ VIETQR = "VIETQR",
32
+ PIX = "PIX",
33
+ PIC_PAY = "PIC_PAY",
34
+ OPAY_WALLET = "OPAY_WALLET",
35
+ PAGA_WALLET = "PAGA_WALLET",
31
36
  /** 目前没用 */
32
37
  SEPA_DEBIT = "SEPA_DEBIT"
33
38
  }
@@ -50,7 +55,12 @@ export declare enum PaymentCategory {
50
55
  NINE_PAY = "ninePay",
51
56
  GCASH = "gcash",
52
57
  PAYMAYA = "paymaya",
53
- ZALOPAY = "zalopay"
58
+ VIETQR = "vietqr",
59
+ ZALOPAY = "zalopay",
60
+ PIX = "pix",
61
+ PIC_PAY = "picPay",
62
+ OPAY_WALLET = "opayWallet",
63
+ PAGA_WALLET = "pagaWallet"
54
64
  }
55
65
  export declare const PaymentMethod2CategoryMap: Partial<Record<PaymentMethod, PaymentCategory>>;
56
66
  export declare const PaymentCategory2MethodMap: Partial<Record<PaymentCategory, PaymentMethod[]>>;
@@ -5,6 +5,7 @@ import { Session } from './session';
5
5
  import getFraudDetectionInstance from '../out/fraud-detection';
6
6
  import type { PaymentMethod } from '../constant';
7
7
  import { AddressCore } from './address';
8
+ import { PayKKaTheme } from './theme';
8
9
  export type FraudDetectionType = ReturnType<typeof getFraudDetectionInstance>;
9
10
  /**
10
11
  * 收银台实例
@@ -29,10 +30,13 @@ export declare class PayKKaCheckout {
29
30
  */
30
31
  private initEnv;
31
32
  private initLocale;
33
+ private initTheme;
32
34
  private initOtherData;
33
35
  get session(): Session;
36
+ get theme(): PayKKaTheme;
34
37
  get envConfig(): PayKKaEnvConfig;
35
38
  get config(): PayKKaInitConfiguration;
39
+ get id(): string;
36
40
  /** 创建组件,把 session 作为组件的 props 传递 */
37
41
  create<P extends Recordable>(component: ComponentType<P> | ((props: P) => JSX.Element), props?: Partial<P> | null): ComponentInst<P>;
38
42
  getCoreProps(): CoreProps;
@@ -4,3 +4,4 @@ export * from './session';
4
4
  export * from './query';
5
5
  export * from './checkout';
6
6
  export * from './error';
7
+ export * from './theme';
@@ -11,23 +11,13 @@ export interface SessionParams {
11
11
  */
12
12
  clientKey?: string;
13
13
  }
14
- export interface CheckoutTheme {
15
- primary: string;
16
- primaryHover: string;
17
- primaryActive: string;
18
- }
19
14
  export declare class Session {
20
15
  #private;
21
16
  sessionId?: string;
22
17
  readonly clientKey?: string;
23
18
  checkout?: CheckoutRes;
24
- colors: CheckoutTheme | null;
19
+ theme: import("@preact/signals").Signal<Recordable<any>>;
25
20
  extraParams: Recordable;
26
21
  constructor(params: SessionParams, extraParams?: Recordable);
27
- /**
28
- * 设置主题
29
- * 目前的主题仅仅包含按钮背景和字体色
30
- */
31
- private initTheme;
32
22
  ready(): import("../utils").CreatePromiseReturn<boolean>;
33
23
  }
@@ -0,0 +1,7 @@
1
+ import type { CheckoutTheme } from '../api';
2
+ export declare class PayKKaTheme {
3
+ #private;
4
+ constructor(checkoutId: string);
5
+ init(theme?: CheckoutTheme): void;
6
+ get className(): string;
7
+ }
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;
@@ -13,6 +13,11 @@ declare const _default: {
13
13
  'dropIn.gcash.label': string;
14
14
  'dropIn.paymaya.label': string;
15
15
  'dropIn.zalopay.label': string;
16
+ 'dropIn.vietqr.label': string;
17
+ 'dropIn.pix.label': string;
18
+ 'dropIn.picPay.label': string;
19
+ 'dropIn.opayWallet.label': string;
20
+ 'dropIn.pagaWallet.label': string;
16
21
  'card.cardNumber.label': string;
17
22
  'card.cardNumber.incomplete': string;
18
23
  'card.cardNumber.invalid': string;
@@ -69,5 +74,6 @@ declare const _default: {
69
74
  'qrCode.expired': string;
70
75
  'qrCode.scanByGcash': string;
71
76
  'qrCode.scanByZalopay': string;
77
+ 'qrCode.scanByVietqr': string;
72
78
  };
73
79
  export default _default;