@paykka/card-checkout-ui 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/README.md +1 -1
  2. package/dist/card-checkout-ui.js +20 -20
  3. package/dist/card-checkout-ui.umd.cjs +20 -20
  4. package/dist/es/api/http.js +1 -1
  5. package/dist/es/api/index.js +1 -1
  6. package/dist/es/api/modules/checkout/index.js +1 -3
  7. package/dist/es/api/modules/checkout/map.js +12 -4
  8. package/dist/es/api/modules/encrypted-card/index.js +3 -2
  9. package/dist/es/api/modules/get-browser-params.js +4 -5
  10. package/dist/es/api/modules/index.js +1 -1
  11. package/dist/es/api/modules/map.js +4 -1
  12. package/dist/es/components/AccordionItem/AccordionItem.js +1 -1
  13. package/dist/es/components/AccountNameField/index.js +1 -1
  14. package/dist/es/components/AddressField/index.js +1 -1
  15. package/dist/es/components/ApplePay/index.js +34 -21
  16. package/dist/es/components/CPFField/index.js +1 -1
  17. package/dist/es/components/Card/index.js +38 -30
  18. package/dist/es/components/CardBrands/index.js +1 -1
  19. package/dist/es/components/CardExpireDateField/index.js +1 -1
  20. package/dist/es/components/CardHolderNameField/index.js +1 -1
  21. package/dist/es/components/CardIBANField/index.js +1 -1
  22. package/dist/es/components/CardNo/index.js +1 -1
  23. package/dist/es/components/CardNumberField/index.js +1 -1
  24. package/dist/es/components/CardSecurityCodeField/index.js +1 -1
  25. package/dist/es/components/CardSelector/index.js +2 -2
  26. package/dist/es/components/CombinedCardInfo/index.js +1 -1
  27. package/dist/es/components/DropIn/index.js +117 -123
  28. package/dist/es/components/EmailField/EmailField.js +1 -1
  29. package/dist/es/components/EncryptedCard/index.js +5 -5
  30. package/dist/es/components/GooglePay/index.js +32 -29
  31. package/dist/es/components/GuideCard/index.js +2 -2
  32. package/dist/es/components/PaymentButton/index.js +22 -7
  33. package/dist/es/components/RecurringTip/index.js +1 -1
  34. package/dist/es/components/SecuredIframe/index.js +3 -4
  35. package/dist/es/components/Sepa/index.js +15 -7
  36. package/dist/es/components/SubmitButton/index.js +2 -2
  37. package/dist/es/components/ThreeDS/index.js +32 -20
  38. package/dist/es/components/Tip/index.js +1 -1
  39. package/dist/es/components/business/BlikCodeField/BlikCodeField.js +1 -1
  40. package/dist/es/components/business/BlikCodeField/index.js +1 -1
  41. package/dist/es/components/business/BlikConfirmModal/BlikConfirmModal.js +3 -3
  42. package/dist/es/components/business/BlikConfirmModal/index.js +2 -2
  43. package/dist/es/components/business/NameField/NameField.js +1 -1
  44. package/dist/es/components/business/NameField/index.js +1 -1
  45. package/dist/es/components/business/PhoneField/PhoneField.js +1 -1
  46. package/dist/es/components/business/PhoneField/index.js +1 -1
  47. package/dist/es/components/business/QRCodeModal/QRCodeModal.js +2 -2
  48. package/dist/es/components/business/QRCodeModal/index.js +1 -1
  49. package/dist/es/components/business/Tooltip/Tooltip.js +1 -1
  50. package/dist/es/components/business/Tooltip/index.js +1 -1
  51. package/dist/es/components/business/index.js +2 -2
  52. package/dist/es/components/index.js +4 -4
  53. package/dist/es/components/internal/Accordion/index.js +1 -1
  54. package/dist/es/components/internal/Button/{Button.js → Button2.js} +2 -2
  55. package/dist/es/components/internal/Button/index.js +2 -2
  56. package/dist/es/components/internal/CheckBox/CheckBox.js +1 -1
  57. package/dist/es/components/internal/CheckBox/index.js +1 -1
  58. package/dist/es/components/internal/Form/type.js +1 -1
  59. package/dist/es/components/internal/Info/Info.js +1 -1
  60. package/dist/es/components/internal/Info/index.js +1 -1
  61. package/dist/es/components/internal/Input/type.js +1 -1
  62. package/dist/es/components/internal/Loading/Loading2.js +20 -0
  63. package/dist/es/{api/modules/line-pay → components/internal/Loading}/index.js +3 -2
  64. package/dist/es/components/internal/Loading/loading.js +1 -0
  65. package/dist/es/components/internal/LoadingCheck/LoadingCheck.js +1 -1
  66. package/dist/es/components/internal/LoadingCheck/index.js +1 -1
  67. package/dist/es/components/internal/Modal/Modal.js +1 -1
  68. package/dist/es/components/internal/QRCode/QRCode.js +1 -1
  69. package/dist/es/components/internal/QRCode/index.js +1 -1
  70. package/dist/es/components/internal/Select/Select.js +1 -1
  71. package/dist/es/components/internal/Select/SelectMenu.js +1 -1
  72. package/dist/es/components/internal/Select/SelectMenuItem.js +1 -1
  73. package/dist/es/components/internal/icons/IconAlipayPlus.js +116 -0
  74. package/dist/es/components/internal/icons/IconError.js +2 -2
  75. package/dist/es/components/internal/icons/IconSuccess.js +2 -2
  76. package/dist/es/components/internal/icons/IconWechatPayGlobal.js +45 -0
  77. package/dist/es/components/internal/icons/IconWechatPayGlobalComplete.js +107 -0
  78. package/dist/es/components/wallets/AliPay/AliPay.js +186 -0
  79. package/dist/es/components/wallets/AliPay/ali-pay.js +1 -0
  80. package/dist/es/components/wallets/AliPay/index.js +1 -0
  81. package/dist/es/components/wallets/AliPay/type.js +1 -0
  82. package/dist/es/components/wallets/Bancontact/Bancontact.js +7 -10
  83. package/dist/es/components/wallets/Blik/Blik.js +14 -11
  84. package/dist/es/components/wallets/Boost/Boost.js +6 -9
  85. package/dist/es/components/wallets/GCash/GCash.js +7 -10
  86. package/dist/es/components/wallets/GrabPay/GrabPay.js +7 -14
  87. package/dist/es/components/wallets/IDeal/IDeal.js +7 -10
  88. package/dist/es/components/wallets/LinePay/LinePay.js +6 -9
  89. package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +6 -9
  90. package/dist/es/components/wallets/NinePay/NinePay.js +6 -9
  91. package/dist/es/components/wallets/OVO/OVO.js +7 -10
  92. package/dist/es/components/wallets/OpayWallet/OpayWallet.js +6 -9
  93. package/dist/es/components/wallets/P24/P24.js +7 -10
  94. package/dist/es/components/wallets/PagaWallet/PagaWallet.js +6 -9
  95. package/dist/es/components/wallets/Paymaya/Paymaya.js +6 -9
  96. package/dist/es/components/wallets/PicPay/PicPay.js +54 -217
  97. package/dist/es/components/wallets/Pix/Pix.js +54 -217
  98. package/dist/es/components/wallets/ShopeePay/ShopeePay.js +6 -9
  99. package/dist/es/components/wallets/Skrill/Skrill.js +7 -10
  100. package/dist/es/components/wallets/TNGWallet/TNGWallet.js +6 -9
  101. package/dist/es/components/wallets/Trustly/Trustly.js +7 -10
  102. package/dist/es/components/wallets/Vietqr/Vietqr.js +14 -15
  103. package/dist/es/components/wallets/WechatPay/WechatPay.js +250 -0
  104. package/dist/es/components/wallets/WechatPay/index.js +1 -0
  105. package/dist/es/components/wallets/WechatPay/type.js +1 -0
  106. package/dist/es/components/wallets/WechatPay/util.js +47 -0
  107. package/dist/es/components/wallets/WechatPay/wechat-pay.js +1 -0
  108. package/dist/es/components/wallets/Zalopay/Zalopay.js +10 -13
  109. package/dist/es/components/wallets/index.js +2 -0
  110. package/dist/es/constant.js +7 -0
  111. package/dist/es/core/checkout.js +36 -9
  112. package/dist/es/core/create-child.js +5 -4
  113. package/dist/es/core/index.js +1 -1
  114. package/dist/es/core/logger.js +1 -1
  115. package/dist/es/core/payment.js +13 -0
  116. package/dist/es/core/preview.js +29 -0
  117. package/dist/es/core/query.js +12 -3
  118. package/dist/es/core/session.js +36 -6
  119. package/dist/es/core/theme.js +1 -1
  120. package/dist/es/hooks/index.js +1 -1
  121. package/dist/es/hooks/useBaseWallet.js +121 -52
  122. package/dist/es/hooks/useI18n.js +3 -3
  123. package/dist/es/i18n/locales/de-DE.js +7 -0
  124. package/dist/es/i18n/locales/en-GB.js +7 -0
  125. package/dist/es/i18n/locales/es-ES.js +7 -0
  126. package/dist/es/i18n/locales/fr-FR.js +7 -0
  127. package/dist/es/i18n/locales/ja-JP.js +7 -0
  128. package/dist/es/i18n/locales/ko-KR.js +7 -0
  129. package/dist/es/i18n/locales/nl-NL.js +7 -0
  130. package/dist/es/i18n/locales/pt-PT.js +7 -0
  131. package/dist/es/i18n/locales/ru-RU.js +7 -0
  132. package/dist/es/i18n/locales/zh-CN.js +7 -0
  133. package/dist/es/i18n/locales/zh-HK.js +7 -0
  134. package/dist/es/i18n/locales/zh-TW.js +7 -0
  135. package/dist/es/i18n/util.js +10 -10
  136. package/dist/es/index.js +7 -5
  137. package/dist/es/out/base-fraud-detection.js +1 -1
  138. package/dist/es/out/fraud-detection.js +59 -44
  139. package/dist/es/out/paykka-detection.js +5 -7
  140. package/dist/es/out/stripe-radar.js +1 -1
  141. package/dist/es/out/worldpay-ddc-manager.js +3 -0
  142. package/dist/es/out/worldpay-ddc.js +1 -1
  143. package/dist/es/style.css +1 -1
  144. package/dist/es/types/event.js +10 -1
  145. package/dist/es/types/index.js +7 -0
  146. package/dist/es/utils/array.js +19 -5
  147. package/dist/es/utils/business/amount.js +15 -0
  148. package/dist/es/utils/business/index.js +1 -0
  149. package/dist/es/utils/detect.js +8 -0
  150. package/dist/es/utils/index.js +7 -9
  151. package/dist/es/utils/location.js +8 -0
  152. package/dist/es/utils/number.js +19 -0
  153. package/dist/es/utils/redirect.js +2 -0
  154. package/dist/style.css +1 -1
  155. package/dist/types/api/modules/checkout/type.d.ts +1 -1
  156. package/dist/types/api/modules/index.d.ts +0 -17
  157. package/dist/types/api/modules/threeDS/index.d.ts +13 -5
  158. package/dist/types/components/ApplePay/type.d.ts +6 -2
  159. package/dist/types/components/Card/type.d.ts +2 -18
  160. package/dist/types/components/DropIn/layout.d.ts +33 -0
  161. package/dist/types/components/DropIn/type.d.ts +6 -6
  162. package/dist/types/components/GooglePay/createGooglePay.d.ts +1 -1
  163. package/dist/types/components/GooglePay/type.d.ts +6 -2
  164. package/dist/types/components/PaymentButton/type.d.ts +2 -0
  165. package/dist/types/components/Sepa/type.d.ts +3 -4
  166. package/dist/types/components/business/QRCodeModal/type.d.ts +12 -3
  167. package/dist/types/components/index.d.ts +0 -2
  168. package/dist/types/components/internal/Loading/Loading.d.ts +2 -1
  169. package/dist/types/components/internal/Loading/type.d.ts +8 -0
  170. package/dist/types/components/internal/ResultMessage/ResultMessage.d.ts +3 -0
  171. package/dist/types/components/internal/ResultMessage/index.d.ts +2 -0
  172. package/dist/types/components/internal/ResultMessage/type.d.ts +13 -0
  173. package/dist/types/components/internal/icons/IconAlipayPlus.d.ts +2 -0
  174. package/dist/types/components/internal/icons/IconError.d.ts +1 -1
  175. package/dist/types/components/internal/icons/IconSuccess.d.ts +1 -1
  176. package/dist/types/components/internal/icons/IconWechatPayGlobal.d.ts +2 -0
  177. package/dist/types/components/internal/icons/IconWechatPayGlobalComplete.d.ts +2 -0
  178. package/dist/types/components/internal/icons/index.d.ts +3 -0
  179. package/dist/types/components/{AliPay → wallets/AliPay}/AliPay.d.ts +9 -4
  180. package/dist/types/components/wallets/AliPay/type.d.ts +7 -0
  181. package/dist/types/components/wallets/Bancontact/type.d.ts +2 -24
  182. package/dist/types/components/wallets/Blik/type.d.ts +2 -24
  183. package/dist/types/components/wallets/Boost/type.d.ts +2 -24
  184. package/dist/types/components/wallets/GCash/type.d.ts +2 -24
  185. package/dist/types/components/wallets/GrabPay/type.d.ts +2 -12
  186. package/dist/types/components/wallets/IDeal/type.d.ts +2 -24
  187. package/dist/types/components/wallets/LinePay/type.d.ts +2 -24
  188. package/dist/types/components/wallets/MayBankQRPay/type.d.ts +2 -24
  189. package/dist/types/components/wallets/NinePay/type.d.ts +2 -24
  190. package/dist/types/components/wallets/OVO/type.d.ts +2 -24
  191. package/dist/types/components/wallets/OpayWallet/type.d.ts +2 -24
  192. package/dist/types/components/wallets/P24/type.d.ts +2 -24
  193. package/dist/types/components/wallets/PagaWallet/type.d.ts +2 -24
  194. package/dist/types/components/wallets/Paymaya/type.d.ts +2 -24
  195. package/dist/types/components/wallets/PicPay/type.d.ts +2 -24
  196. package/dist/types/components/wallets/Pix/type.d.ts +2 -24
  197. package/dist/types/components/wallets/ShopeePay/type.d.ts +2 -24
  198. package/dist/types/components/wallets/Skrill/type.d.ts +2 -12
  199. package/dist/types/components/wallets/TNGWallet/type.d.ts +2 -24
  200. package/dist/types/components/wallets/Trustly/type.d.ts +2 -16
  201. package/dist/types/components/wallets/Vietqr/type.d.ts +2 -24
  202. package/dist/types/components/wallets/WechatPay/WechatPay.d.ts +16 -0
  203. package/dist/types/components/wallets/WechatPay/type.d.ts +12 -0
  204. package/dist/types/components/wallets/WechatPay/util.d.ts +13 -0
  205. package/dist/types/components/wallets/Zalopay/type.d.ts +2 -24
  206. package/dist/types/components/wallets/index.d.ts +2 -0
  207. package/dist/types/components/wallets/type.d.ts +0 -14
  208. package/dist/types/constant.d.ts +8 -0
  209. package/dist/types/core/index.d.ts +1 -0
  210. package/dist/types/core/preview.d.ts +1 -0
  211. package/dist/types/core/session.d.ts +2 -2
  212. package/dist/types/hooks/index.d.ts +0 -1
  213. package/dist/types/hooks/useBaseWallet.d.ts +27 -5
  214. package/dist/types/hooks/useI18n.d.ts +1 -1
  215. package/dist/types/hooks/usePayState.d.ts +1 -4
  216. package/dist/types/i18n/I18n.d.ts +1 -0
  217. package/dist/types/i18n/locales/de-DE.d.ts +7 -0
  218. package/dist/types/i18n/locales/en-GB.d.ts +7 -0
  219. package/dist/types/i18n/locales/es-ES.d.ts +7 -0
  220. package/dist/types/i18n/locales/fr-FR.d.ts +7 -0
  221. package/dist/types/i18n/locales/ja-JP.d.ts +7 -0
  222. package/dist/types/i18n/locales/ko-KR.d.ts +7 -0
  223. package/dist/types/i18n/locales/nl-NL.d.ts +7 -0
  224. package/dist/types/i18n/locales/pt-PT.d.ts +7 -0
  225. package/dist/types/i18n/locales/ru-RU.d.ts +7 -0
  226. package/dist/types/i18n/locales/zh-CN.d.ts +7 -0
  227. package/dist/types/i18n/locales/zh-HK.d.ts +7 -0
  228. package/dist/types/i18n/locales/zh-TW.d.ts +7 -0
  229. package/dist/types/i18n/util.d.ts +8 -1
  230. package/dist/types/index.d.ts +2 -1
  231. package/dist/types/out/fraud-detection.d.ts +2 -5
  232. package/dist/types/out/types.d.ts +5 -6
  233. package/dist/types/out/worldpay-ddc-manager.d.ts +1 -0
  234. package/dist/types/types/event.d.ts +24 -2
  235. package/dist/types/types/index.d.ts +14 -0
  236. package/dist/types/types/message.d.ts +3 -1
  237. package/dist/types/types/payment.d.ts +26 -3
  238. package/dist/types/utils/app-payment.d.ts +1 -0
  239. package/dist/types/utils/array.d.ts +17 -0
  240. package/dist/types/utils/business/amount.d.ts +7 -0
  241. package/dist/types/utils/business/index.d.ts +1 -0
  242. package/dist/types/utils/detect.d.ts +3 -0
  243. package/dist/types/utils/index.d.ts +1 -6
  244. package/dist/types/utils/number.d.ts +4 -0
  245. package/dist/types/utils/redirect.d.ts +10 -0
  246. package/dist/types/utils/system-info/get-browser-info.d.ts +4 -0
  247. package/package.json +4 -2
  248. package/dist/es/api/modules/ali-pay/index.js +0 -16
  249. package/dist/es/api/modules/boost/index.js +0 -5
  250. package/dist/es/api/modules/gcash/index.js +0 -5
  251. package/dist/es/api/modules/grab-pay/index.js +0 -5
  252. package/dist/es/api/modules/may-bank-qr-pay/index.js +0 -5
  253. package/dist/es/api/modules/nine-pay/index.js +0 -5
  254. package/dist/es/api/modules/opay-wallet/index.js +0 -5
  255. package/dist/es/api/modules/paga-wallet/index.js +0 -5
  256. package/dist/es/api/modules/paymaya/index.js +0 -5
  257. package/dist/es/api/modules/pic-pay/index.js +0 -16
  258. package/dist/es/api/modules/pix/index.js +0 -16
  259. package/dist/es/api/modules/shopee-pay/index.js +0 -5
  260. package/dist/es/api/modules/tng-wallet/index.js +0 -5
  261. package/dist/es/api/modules/vietqr/index.js +0 -5
  262. package/dist/es/api/modules/wechat-pay/index.js +0 -16
  263. package/dist/es/api/modules/zalopay/index.js +0 -5
  264. package/dist/es/components/AliPay/index.js +0 -332
  265. package/dist/es/components/WechatPay/index.js +0 -340
  266. package/dist/es/hooks/usePayment.js +0 -1
  267. package/dist/types/api/modules/ali-pay/index.d.ts +0 -4
  268. package/dist/types/api/modules/boost/index.d.ts +0 -4
  269. package/dist/types/api/modules/gcash/index.d.ts +0 -4
  270. package/dist/types/api/modules/grab-pay/index.d.ts +0 -4
  271. package/dist/types/api/modules/line-pay/index.d.ts +0 -4
  272. package/dist/types/api/modules/may-bank-qr-pay/index.d.ts +0 -4
  273. package/dist/types/api/modules/nine-pay/index.d.ts +0 -4
  274. package/dist/types/api/modules/opay-wallet/index.d.ts +0 -4
  275. package/dist/types/api/modules/paga-wallet/index.d.ts +0 -4
  276. package/dist/types/api/modules/paymaya/index.d.ts +0 -4
  277. package/dist/types/api/modules/pic-pay/index.d.ts +0 -4
  278. package/dist/types/api/modules/pix/index.d.ts +0 -4
  279. package/dist/types/api/modules/shopee-pay/index.d.ts +0 -4
  280. package/dist/types/api/modules/tng-wallet/index.d.ts +0 -4
  281. package/dist/types/api/modules/vietqr/index.d.ts +0 -4
  282. package/dist/types/api/modules/wechat-pay/index.d.ts +0 -4
  283. package/dist/types/api/modules/zalopay/index.d.ts +0 -4
  284. package/dist/types/components/AliPay/type.d.ts +0 -26
  285. package/dist/types/components/WechatPay/WechatPay.d.ts +0 -10
  286. package/dist/types/components/WechatPay/type.d.ts +0 -28
  287. package/dist/types/hooks/usePayment.d.ts +0 -8
  288. package/dist/types/hooks/useRetry.console-tests.d.ts +0 -41
  289. package/dist/types/utils/behavior-tracker.d.ts +0 -36
  290. /package/dist/es/components/internal/Button/{button2.js → button.js} +0 -0
  291. /package/dist/types/components/{AliPay → wallets/AliPay}/index.d.ts +0 -0
  292. /package/dist/types/components/{WechatPay → wallets/WechatPay}/index.d.ts +0 -0
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'common.email.label': string;
61
65
  'common.email.incomplete': string;
62
66
  'common.email.incorrect': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'common.email.label': string;
61
65
  'common.email.incomplete': string;
62
66
  'common.email.incorrect': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'common.email.label': string;
61
65
  'common.email.incomplete': string;
62
66
  'common.email.incorrect': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'common.email.label': string;
61
65
  'common.email.incomplete': string;
62
66
  'common.email.incorrect': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'common.email.label': string;
61
65
  'common.email.incomplete': string;
62
66
  'common.email.incorrect': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'common.email.label': string;
61
65
  'common.email.incomplete': string;
62
66
  'common.email.incorrect': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'common.email.label': string;
61
65
  'common.email.incomplete': string;
62
66
  'common.email.incorrect': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'form.name.label': string;
61
65
  'form.name.placeholder': string;
62
66
  'form.name.incomplete': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'common.email.label': string;
61
65
  'common.email.incomplete': string;
62
66
  'common.email.incorrect': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  'guideCard.redirectDescription': string;
3
3
  'guideCard.scanQRCode': string;
4
+ 'guideCard.redirectWechatPay': string;
4
5
  'dropIn.card.label': string;
5
6
  'dropIn.otherPaymentMethod': string;
6
7
  'dropIn.boost.label': string;
@@ -25,6 +26,8 @@ declare const _default: {
25
26
  'dropIn.skrill.label': string;
26
27
  'dropIn.trustly.label': string;
27
28
  'dropIn.p24.label': string;
29
+ 'dropIn.aliPay.label': string;
30
+ 'dropIn.wechatPay.label': string;
28
31
  'card.cardNumber.label': string;
29
32
  'card.cardNumber.incomplete': string;
30
33
  'card.cardNumber.invalid': string;
@@ -57,6 +60,7 @@ declare const _default: {
57
60
  'common.unknownError': string;
58
61
  'common.cancel': string;
59
62
  'common.confirm': string;
63
+ 'common.wechatPayGlobal': string;
60
64
  'common.email.label': string;
61
65
  'common.email.incomplete': string;
62
66
  'common.email.incorrect': string;
@@ -94,10 +98,13 @@ declare const _default: {
94
98
  'threeDS.authenticationSuccessful': string;
95
99
  'threeDS.authenticationFailed': string;
96
100
  'threeDS.returnToCheckout': string;
101
+ 'threeDS.linkExpired': string;
102
+ 'threeDS.linkAlreadyUsed': string;
97
103
  'qrCode.expired': string;
98
104
  'qrCode.scanByGcash': string;
99
105
  'qrCode.scanByZalopay': string;
100
106
  'qrCode.scanByVietqr': string;
107
+ 'qrCode.scanWechatPayGlobal': string;
101
108
  'cpf.label': string;
102
109
  'cpf.incomplete': string;
103
110
  'cpf.placeholder': string;
@@ -9,7 +9,14 @@ export declare const getRealLocale: (locale: string) => string;
9
9
  * 如果都不是,则返回 undefined,这里不做英文兜底,由上层判断
10
10
  */
11
11
  export declare const getLocalKey: (locale: string) => string;
12
- export declare function loadTranslation(locale: string, customLocales?: CustomLocales): Promise<{
12
+ export declare const loadTranslation: (locale: string, customLocales?: CustomLocales) => Promise<{
13
13
  locale: string;
14
14
  translation: Translation;
15
15
  }>;
16
+ /** 根据语言获取国际化文案集合 */
17
+ export declare const resolveTranslation: (locale?: string | null) => Promise<{
18
+ locale: string;
19
+ translation: Translation;
20
+ }>;
21
+ /** 根据语言获取单个国际化文案 */
22
+ export declare const getI18nText: (key: keyof Translation, locale?: string | null) => Promise<string>;
@@ -1,7 +1,8 @@
1
1
  export * from './components';
2
2
  export { type ComponentInst, create, querySession, Session, PayKKaCheckout, PayKKaError } from './core';
3
- export { I18n, LocaleKey } from './i18n';
3
+ export { I18n, LocaleKey, type LocaleKeyType } from './i18n';
4
4
  export { setApiUrl, setCDNUrl, setFraudDetectionEnv, setCustomReqHeaders, setCustomLocale } from './config';
5
5
  export { getFingerprint, redirectToPayment } from './utils';
6
6
  export { PaymentMethod } from './constant';
7
7
  export * from './types';
8
+ export type { CheckoutRes } from './api';
@@ -1,9 +1,6 @@
1
- import type { FraudDetectionConfig, FraudDetectionOptions } from './types';
1
+ import type { FraudDetectionConfig, FraudDetectionInitOption, FraudDetectionOptions } from './types';
2
2
  type FraudDetectionType = {
3
- getFraudDetectionId: (options?: {
4
- bin?: string;
5
- hiddenIframeName?: string;
6
- }) => Promise<string>;
3
+ getFraudDetectionId: (options?: FraudDetectionInitOption) => Promise<string>;
7
4
  createFraudDetection: () => Promise<void>;
8
5
  };
9
6
  export default function getFraudDetectionInstance(config: FraudDetectionConfig,
@@ -1,13 +1,12 @@
1
1
  import type { FraudDetectionEnv, PayKKaInitConfiguration } from '../types';
2
- export type FraudDetectionOptions = {
3
- sessionMode?: string;
4
- } & Pick<PayKKaInitConfiguration, 'onEvent'>;
5
- export type FraudDetectionConfig = {
2
+ export type FraudDetectionOptions = {} & Pick<PayKKaInitConfiguration, 'onEvent'>;
3
+ export interface FraudDetectionConfig {
4
+ /** 客户端密钥 */
6
5
  clientKey: string;
7
6
  /** 环境,默认 eu */
8
7
  env?: FraudDetectionEnv;
9
- };
8
+ }
10
9
  export interface FraudDetectionInitOption {
10
+ /** 卡 bin */
11
11
  bin?: string;
12
- hiddenIframeName?: string;
13
12
  }
@@ -12,6 +12,7 @@ export declare class WorldpayDDCManager {
12
12
  /** 本次(最近一次)init 对应的 DDC 实例 */
13
13
  private currentDDC;
14
14
  constructor(options?: FraudDetectionOptions, channelConfig?: ChannelSDKConfig);
15
+ updateChannelConfig(channelConfig?: ChannelSDKConfig): void;
15
16
  init(options?: FraudDetectionInitOption): Promise<void>;
16
17
  getFraudDetectionId(): string | undefined | null;
17
18
  }
@@ -1,3 +1,4 @@
1
+ import type { ThreeDSStatus } from '../api';
1
2
  import type { AllFieldType } from '../components/SecuredFieldsProvider';
2
3
  import type { ChannelCode } from '../constant';
3
4
  import type { PaymentMethod } from '../constant';
@@ -5,7 +6,7 @@ import type { PaymentMethod } from '../constant';
5
6
  * 事件类型
6
7
  * 适用于埋点上报
7
8
  */
8
- export type EventType = FraudDetectionEventType | ApplePayEventType | GooglePayEventType | PaymentEventType | ThreeDSEventType | LoggerEventType | SecurityIframeEventType;
9
+ export type EventType = FraudDetectionEventType | ApplePayEventType | GooglePayEventType | PaymentEventType | ThreeDSEventType | LoggerEventType | SecurityIframeEventType | WechatPayEventType;
9
10
  export type EventData<T extends EventType> = EventDataMapping[T];
10
11
  /** fraud detection 事件类型 */
11
12
  export declare enum FraudDetectionEventType {
@@ -27,6 +28,8 @@ export declare enum FraudDetectionEventType {
27
28
  FRAUD_DETECTION_WARNING = "fraudDetection:warning"
28
29
  }
29
30
  export declare enum ApplePayEventType {
31
+ /** Apple Pay 环境检测失败 */
32
+ APPLE_PAY_ENV_CHECK_ERROR = "applePay:envCheckError",
30
33
  /** Apple Pay SDK 加载失败 */
31
34
  APPLE_PAY_LOAD_ERROR = "applePay:loadError",
32
35
  /** 当前环境不支持 Apple Pay */
@@ -52,6 +55,16 @@ export declare enum GooglePayEventType {
52
55
  /** Google Pay 取消支付 */
53
56
  GOOGLE_PAY_CANCELLED = "googlePay:cancelled"
54
57
  }
58
+ export declare enum WechatPayEventType {
59
+ /** 微信支付开始 */
60
+ WECHAT_PAY_START = "wechatPay:start",
61
+ /** 微信支付成功 */
62
+ WECHAT_PAY_SUCCESS = "wechatPay:success",
63
+ /** 微信支付失败 */
64
+ WECHAT_PAY_FAILURE = "wechatPay:failure",
65
+ /** 微信支付取消 */
66
+ WECHAT_PAY_CANCELLED = "wechatPay:cancelled"
67
+ }
55
68
  export declare enum PaymentEventType {
56
69
  /** 支付开始 */
57
70
  PAYMENT_START = "payment:start",
@@ -109,6 +122,7 @@ export interface EventDataMapping {
109
122
  [ApplePayEventType.APPLE_PAY_VALIDATE_MERCHANT]: undefined;
110
123
  [ApplePayEventType.APPLE_PAY_AUTHORIZED]: undefined;
111
124
  [ApplePayEventType.APPLE_PAY_CANCELLED]: undefined;
125
+ [ApplePayEventType.APPLE_PAY_ENV_CHECK_ERROR]: CommonEventData;
112
126
  [GooglePayEventType.GOOGLE_PAY_LOAD_ERROR]: undefined;
113
127
  [GooglePayEventType.GOOGLE_PAY_CAN_NOT_USE]: undefined;
114
128
  [GooglePayEventType.GOOGLE_PAY_BUTTON_CLICKED]: undefined;
@@ -125,12 +139,16 @@ export interface EventDataMapping {
125
139
  [ThreeDSEventType.THREE_DS_CANCELLED]: undefined;
126
140
  [ThreeDSEventType.THREE_DS_CONTINUE]: undefined;
127
141
  [ThreeDSEventType.THREE_DS_END]: undefined;
128
- [ThreeDSEventType.THREE_DS_AUTH]: undefined;
142
+ [ThreeDSEventType.THREE_DS_AUTH]: ThreeDSAuthData;
129
143
  [ThreeDSEventType.THREE_DS_INNER_CHANNEL]: undefined;
130
144
  [SecurityIframeEventType.SECURITY_IFRAME_LOADED]: SecurityIframeBaseData;
131
145
  [SecurityIframeEventType.SECURITY_IFRAME_LOAD_ERROR]: SecurityIframeBaseData;
132
146
  [LoggerEventType.ENV]: Recordable;
133
147
  [LoggerEventType.BEHAVIOR]: Recordable;
148
+ [WechatPayEventType.WECHAT_PAY_START]: undefined;
149
+ [WechatPayEventType.WECHAT_PAY_SUCCESS]: undefined;
150
+ [WechatPayEventType.WECHAT_PAY_FAILURE]: CommonEventData;
151
+ [WechatPayEventType.WECHAT_PAY_CANCELLED]: undefined;
134
152
  }
135
153
  export interface CommonEventData {
136
154
  message?: string;
@@ -168,3 +186,7 @@ export interface SecurityIframeBaseData {
168
186
  /** iframe 的 url */
169
187
  url?: string;
170
188
  }
189
+ export interface ThreeDSAuthData {
190
+ /** 3DS 状态 */
191
+ status?: ThreeDSStatus;
192
+ }
@@ -80,6 +80,14 @@ export declare enum PaymentStatus {
80
80
  /** 上一次 3DS 认证未完成 */
81
81
  IN_PREVIOUS_THREEDS = "IN_PREVIOUS_THREEDS"
82
82
  }
83
+ export declare enum PaymentAction {
84
+ /** 扫码支付 */
85
+ SCAN_CODE = "SCAN_CODE",
86
+ /** 跳转支付 */
87
+ REDIRECT = "REDIRECT",
88
+ /** 跳转支付(POST 方式) */
89
+ REDIRECT_POST = "REDIRECT_POST"
90
+ }
83
91
  export interface BasePaymentInfo {
84
92
  /** 会话 ID */
85
93
  sessionId?: string;
@@ -115,6 +123,12 @@ export interface BasePaymentInfo {
115
123
  requestMethod?: string;
116
124
  /** 支付过期时间 */
117
125
  paymentExpiredAt?: string;
126
+ /** 支付动作 */
127
+ action?: PaymentAction;
128
+ /** 二维码 */
129
+ qrCode?: string;
130
+ /** 请求数据,POST 方式跳转时需要传递 */
131
+ requestData?: Recordable;
118
132
  /** 其他支付信息 */
119
133
  [key: string]: any;
120
134
  };
@@ -1,5 +1,5 @@
1
1
  import type { CardBrand, InputStylesConfig } from '.';
2
- import type { CheckoutPaymentParams, PayRes } from '../api';
2
+ import type { CheckoutPaymentParams, PayRes, ThreeDSStatus } from '../api';
3
3
  import type { EncryptCardRes } from '../api/modules/encrypted-card/type';
4
4
  import type { AllFieldType, FieldIframeConfig } from '../components/SecuredFieldsProvider';
5
5
  import type { FormValidationStatus } from '../components/internal/Form';
@@ -236,5 +236,7 @@ export interface DDCCardBinMessage extends BaseMessage {
236
236
  export interface ThreeDSAuthLoadedMessage extends BaseMessage {
237
237
  /** 认证记录 id,标识当前认证 */
238
238
  authId: string | undefined;
239
+ /** 3DS 状态 */
240
+ status?: ThreeDSStatus;
239
241
  }
240
242
  export {};
@@ -11,16 +11,35 @@ export interface PaymentMethodContext {
11
11
  /** 会话 ID */
12
12
  sessionId?: string;
13
13
  }
14
+ /** 自定义表单字段展示配置 */
15
+ export interface PaymentCustomFieldsProps {
16
+ /**
17
+ * 是否展示邮箱
18
+ * @remarks
19
+ * - 若配置 true 但创建收银台时已经传了,就展示禁用状态。
20
+ * - 若配置 false 但创建收银台时未传,依旧会展示该输入框。
21
+ * @defaultValue false
22
+ */
23
+ showEmail?: boolean;
24
+ /**
25
+ * 是否展示邮箱
26
+ * @remarks
27
+ * - 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
28
+ * - 若配置 false 但创建收银台时未传,依旧会展示该输入框。
29
+ * @defaultValue false
30
+ */
31
+ showAddress?: boolean;
32
+ }
14
33
  /** 支付方式公共 props */
15
- export interface PaymentCommonProps {
34
+ export interface PaymentCommonProps extends PaymentCustomFieldsProps {
16
35
  /**
17
- * 提交表单时触发
36
+ * 提交表单时触发,返回 false 则不继续支付,支持异步
18
37
  * @param error 表单校验错误信息,为空则说明校验通过
19
38
  * @param context 支付方式上下文数据
20
39
  * @remarks
21
40
  * 创建 PayKKaCheckout 时定义的 onSubmit 回调会被组件的同名回调覆盖
22
41
  */
23
- onSubmit?: (error: Recordable<FormValidateError[]> | undefined, context: PaymentMethodContext) => void;
42
+ onSubmit?: (error: Recordable<FormValidateError[]> | undefined, context: PaymentMethodContext) => void | boolean | Promise<void | boolean>;
24
43
  /**
25
44
  * 支付成功后触发
26
45
  * @param data 支付成功数据
@@ -61,3 +80,7 @@ export interface PaymentCommonRef {
61
80
  }
62
81
  export interface PaymentThreeDSRef {
63
82
  }
83
+ export interface PaymentRetryRef {
84
+ }
85
+ export interface PaymentFormFieldsRef {
86
+ }
@@ -14,3 +14,4 @@ export declare const getAppLoggerId: () => {
14
14
  sid: any;
15
15
  pid: any;
16
16
  };
17
+ export declare const injectIosBridge: () => void;
@@ -1 +1,18 @@
1
+ /**
2
+ * 删除数组中特定元素,改变原数组
3
+ * @param array 要删除元素的数组
4
+ * @param element 要删除的元素
5
+ */
1
6
  export declare const removeElementFromArray: (array: any[], element: any) => void;
7
+ /**
8
+ * 获取多个数组的交集 A∩B∩C
9
+ * @param arrays 要获取交集的数组
10
+ * @returns 交集数组
11
+ */
12
+ export declare const intersection: <T>(...arrays: T[][]) => T[];
13
+ /**
14
+ * 获取多个数组的差集 A∖(B∪C)
15
+ * @param arrays 要获取差集的数组
16
+ * @returns 差集数组
17
+ */
18
+ export declare const difference: <T>(...arrays: T[][]) => T[];
@@ -0,0 +1,7 @@
1
+ import type { WalletChannelParams } from '../../api';
2
+ /**
3
+ * 计算交易金额加上渠道手续费后的总金额
4
+ * @param amount 交易金额
5
+ * @param channelParams 渠道参数
6
+ */
7
+ export declare const calcAmountWithFee: (amount: number | undefined | null, channelParams: WalletChannelParams | undefined) => number | null | undefined;
@@ -0,0 +1 @@
1
+ export * from './amount';
@@ -1 +1,4 @@
1
+ import { PayEnv } from '../constant';
1
2
  export declare const isEventSupported: (eventName: string, element?: HTMLDivElement) => boolean;
3
+ /** 获取当前支付环境 */
4
+ export declare const getPayEnv: () => PayEnv;