@paykka/card-checkout-ui 0.13.16 → 0.14.0

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 (356) hide show
  1. package/dist/card-checkout-ui.js +54 -26
  2. package/dist/card-checkout-ui.umd.cjs +54 -26
  3. package/dist/es/api/modules/boost/index.js +5 -16
  4. package/dist/es/api/modules/gcash/index.js +5 -16
  5. package/dist/es/api/modules/get-browser-params.js +1 -4
  6. package/dist/es/api/modules/grab-pay/index.js +5 -16
  7. package/dist/es/api/modules/line-pay/index.js +5 -16
  8. package/dist/es/api/modules/may-bank-qr-pay/index.js +5 -16
  9. package/dist/es/api/modules/nine-pay/index.js +5 -16
  10. package/dist/es/api/modules/opay-wallet/index.js +5 -16
  11. package/dist/es/api/modules/paga-wallet/index.js +5 -16
  12. package/dist/es/api/modules/paymaya/index.js +5 -16
  13. package/dist/es/api/modules/shopee-pay/index.js +5 -16
  14. package/dist/es/api/modules/threeDS/index.js +16 -2
  15. package/dist/es/api/modules/tng-wallet/index.js +5 -16
  16. package/dist/es/api/modules/wallet/index.js +16 -0
  17. package/dist/es/api/modules/zalopay/index.js +5 -16
  18. package/dist/es/api/utils/index.js +2 -1
  19. package/dist/es/components/AccordionItem/AccordionItem.js +0 -2
  20. package/dist/es/components/AddressField/index.js +95 -85
  21. package/dist/es/components/AliPay/index.js +88 -76
  22. package/dist/es/components/ApplePay/index.js +61 -43
  23. package/dist/es/components/CPFField/index.js +2 -1
  24. package/dist/es/components/Card/index.js +182 -143
  25. package/dist/es/components/CardExpireDateField/index.js +2 -1
  26. package/dist/es/components/CardNo/index.js +2 -2
  27. package/dist/es/components/CardNumberField/index.js +2 -1
  28. package/dist/es/components/CardSecurityCodeField/index.js +2 -1
  29. package/dist/es/components/CardSelector/index.js +3 -2
  30. package/dist/es/components/DropIn/index.js +98 -31
  31. package/dist/es/components/GooglePay/index.js +190 -151
  32. package/dist/es/components/GuideCard/index.js +8 -1
  33. package/dist/es/components/PaymentButton/index.js +58 -0
  34. package/dist/es/components/RecurringTip/index.js +3 -3
  35. package/dist/es/components/SecuredFieldsProvider/index.js +81 -17
  36. package/dist/es/components/SecuredIframe/index.js +120 -52
  37. package/dist/es/components/Sepa/index.js +23 -25
  38. package/dist/es/components/SubmitButton/index.js +1 -1
  39. package/dist/es/components/ThreeDS/index.js +34 -15
  40. package/dist/es/components/WechatPay/index.js +94 -83
  41. package/dist/es/components/business/BlikCodeField/BlikCodeField.js +92 -0
  42. package/dist/es/components/business/BlikCodeField/blik-code-field.js +1 -0
  43. package/dist/es/components/business/BlikCodeField/index.js +13 -0
  44. package/dist/es/components/business/BlikConfirmModal/BlikConfirmModal.js +45 -0
  45. package/dist/es/components/business/BlikConfirmModal/blik-confirm-modal.js +1 -0
  46. package/dist/es/components/business/BlikConfirmModal/index.js +9 -0
  47. package/dist/es/components/business/BlikConfirmModal/type.js +1 -0
  48. package/dist/es/components/business/NameField/NameField.js +51 -0
  49. package/dist/es/components/business/NameField/index.js +11 -0
  50. package/dist/es/components/business/NameField/type.js +1 -0
  51. package/dist/es/components/business/PhoneField/PhoneField.js +125 -0
  52. package/dist/es/components/business/PhoneField/config.js +33 -0
  53. package/dist/es/components/business/PhoneField/index.js +14 -0
  54. package/dist/es/components/business/PhoneField/phone-field.js +1 -0
  55. package/dist/es/components/business/PhoneField/type.js +1 -0
  56. package/dist/es/components/business/SegmentedDigitInput/SegmentedDigitInput.js +80 -0
  57. package/dist/es/components/business/SegmentedDigitInput/format.js +26 -0
  58. package/dist/es/components/business/SegmentedDigitInput/index.js +5 -0
  59. package/dist/es/components/business/Tooltip/Tooltip.js +18 -0
  60. package/dist/es/components/business/Tooltip/index.js +6 -0
  61. package/dist/es/components/business/Tooltip/tooltip2.js +1 -0
  62. package/dist/es/components/business/index.js +14 -0
  63. package/dist/es/components/index.js +14 -7
  64. package/dist/es/components/internal/CheckBox/CheckBox.js +2 -2
  65. package/dist/es/components/internal/Input/Input.js +1 -1
  66. package/dist/es/components/internal/Select/Select.js +7 -1
  67. package/dist/es/components/internal/icons/IconArrowDown.js +4 -4
  68. package/dist/es/components/internal/icons/IconBancontact.js +95 -0
  69. package/dist/es/components/internal/icons/IconBlik.js +567 -0
  70. package/dist/es/components/internal/icons/IconIdeal.js +86 -0
  71. package/dist/es/components/internal/icons/IconOvo.js +47 -0
  72. package/dist/es/components/internal/icons/IconP24.js +40 -0
  73. package/dist/es/components/internal/icons/IconPhone.js +56 -0
  74. package/dist/es/components/internal/icons/IconSkrill.js +38 -0
  75. package/dist/es/components/internal/icons/IconTrustly.js +37 -0
  76. package/dist/es/components/wallets/Bancontact/Bancontact.js +201 -0
  77. package/dist/es/components/wallets/Bancontact/bancontact2.js +1 -0
  78. package/dist/es/components/wallets/Bancontact/index.js +1 -0
  79. package/dist/es/components/wallets/Bancontact/type.js +1 -0
  80. package/dist/es/components/wallets/Blik/Blik.js +232 -0
  81. package/dist/es/components/wallets/Blik/blik2.js +1 -0
  82. package/dist/es/components/wallets/Blik/index.js +1 -0
  83. package/dist/es/components/wallets/Blik/type.js +1 -0
  84. package/dist/es/components/wallets/Boost/Boost.js +183 -0
  85. package/dist/es/components/wallets/Boost/boost2.js +1 -0
  86. package/dist/es/components/wallets/Boost/index.js +1 -0
  87. package/dist/es/components/wallets/Boost/type.js +1 -0
  88. package/dist/es/components/wallets/GCash/GCash.js +74 -252
  89. package/dist/es/components/wallets/GrabPay/GrabPay.js +183 -0
  90. package/dist/es/components/wallets/GrabPay/grab-pay.js +1 -0
  91. package/dist/es/components/wallets/GrabPay/index.js +1 -0
  92. package/dist/es/components/wallets/GrabPay/type.js +1 -0
  93. package/dist/es/components/wallets/IDeal/IDeal.js +201 -0
  94. package/dist/es/components/wallets/IDeal/ideal2.js +1 -0
  95. package/dist/es/components/wallets/IDeal/index.js +1 -0
  96. package/dist/es/components/wallets/IDeal/type.js +1 -0
  97. package/dist/es/components/wallets/LinePay/LinePay.js +183 -0
  98. package/dist/es/components/wallets/LinePay/index.js +1 -0
  99. package/dist/es/components/wallets/LinePay/line-pay.js +1 -0
  100. package/dist/es/components/wallets/LinePay/type.js +1 -0
  101. package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +187 -0
  102. package/dist/es/components/wallets/MayBankQRPay/index.js +1 -0
  103. package/dist/es/components/wallets/MayBankQRPay/may-bank-qr-pay.js +1 -0
  104. package/dist/es/components/wallets/MayBankQRPay/type.js +1 -0
  105. package/dist/es/components/wallets/NinePay/NinePay.js +185 -0
  106. package/dist/es/components/wallets/NinePay/index.js +1 -0
  107. package/dist/es/components/wallets/NinePay/nine-pay.js +1 -0
  108. package/dist/es/components/wallets/NinePay/type.js +1 -0
  109. package/dist/es/components/wallets/OVO/OVO.js +200 -0
  110. package/dist/es/components/wallets/OVO/index.js +1 -0
  111. package/dist/es/components/wallets/OVO/ovo2.js +1 -0
  112. package/dist/es/components/wallets/OVO/type.js +1 -0
  113. package/dist/es/components/wallets/OpayWallet/OpayWallet.js +57 -218
  114. package/dist/es/components/wallets/P24/P24.js +198 -0
  115. package/dist/es/components/wallets/P24/index.js +1 -0
  116. package/dist/es/components/wallets/P24/p242.js +1 -0
  117. package/dist/es/components/wallets/P24/type.js +1 -0
  118. package/dist/es/components/wallets/PagaWallet/PagaWallet.js +57 -218
  119. package/dist/es/components/wallets/Paymaya/Paymaya.js +57 -221
  120. package/dist/es/components/wallets/PicPay/PicPay.js +64 -55
  121. package/dist/es/components/wallets/Pix/Pix.js +58 -56
  122. package/dist/es/components/wallets/ShopeePay/ShopeePay.js +185 -0
  123. package/dist/es/components/wallets/ShopeePay/index.js +1 -0
  124. package/dist/es/components/wallets/ShopeePay/shopee-pay.js +1 -0
  125. package/dist/es/components/wallets/ShopeePay/type.js +1 -0
  126. package/dist/es/components/wallets/Skrill/Skrill.js +200 -0
  127. package/dist/es/components/wallets/Skrill/index.js +1 -0
  128. package/dist/es/components/wallets/Skrill/skrill2.js +1 -0
  129. package/dist/es/components/wallets/Skrill/type.js +1 -0
  130. package/dist/es/components/wallets/TNGWallet/TNGWallet.js +185 -0
  131. package/dist/es/components/wallets/TNGWallet/index.js +1 -0
  132. package/dist/es/components/wallets/TNGWallet/tng-wallet.js +1 -0
  133. package/dist/es/components/wallets/TNGWallet/type.js +1 -0
  134. package/dist/es/components/wallets/Trustly/Trustly.js +226 -0
  135. package/dist/es/components/wallets/Trustly/index.js +1 -0
  136. package/dist/es/components/wallets/Trustly/trustly2.js +1 -0
  137. package/dist/es/components/wallets/Trustly/type.js +1 -0
  138. package/dist/es/components/wallets/Vietqr/Vietqr.js +73 -242
  139. package/dist/es/components/wallets/Zalopay/Zalopay.js +73 -242
  140. package/dist/es/components/wallets/index.js +14 -0
  141. package/dist/es/constant.js +48 -2
  142. package/dist/es/core/address.js +7 -6
  143. package/dist/es/core/checkout.js +93 -41
  144. package/dist/es/core/create-child.js +68 -0
  145. package/dist/es/core/environment.js +23 -1
  146. package/dist/es/core/error.js +15 -2
  147. package/dist/es/core/logger.js +106 -0
  148. package/dist/es/core/payment.js +65 -0
  149. package/dist/es/fe-logger.min.js +1 -0
  150. package/dist/es/hooks/useBaseWallet.js +280 -0
  151. package/dist/es/hooks/usePayState.js +37 -25
  152. package/dist/es/hooks/usePayment.js +1 -14
  153. package/dist/es/hooks/useRetry.js +50 -26
  154. package/dist/es/i18n/locales/de-DE.js +24 -0
  155. package/dist/es/i18n/locales/en-GB.js +24 -0
  156. package/dist/es/i18n/locales/es-ES.js +24 -0
  157. package/dist/es/i18n/locales/fr-FR.js +24 -0
  158. package/dist/es/i18n/locales/ja-JP.js +24 -0
  159. package/dist/es/i18n/locales/ko-KR.js +24 -0
  160. package/dist/es/i18n/locales/nl-NL.js +24 -0
  161. package/dist/es/i18n/locales/pt-PT.js +24 -0
  162. package/dist/es/i18n/locales/ru-RU.js +24 -0
  163. package/dist/es/i18n/locales/zh-CN.js +24 -0
  164. package/dist/es/i18n/locales/zh-HK.js +24 -0
  165. package/dist/es/i18n/locales/zh-TW.js +24 -0
  166. package/dist/es/index.js +23 -8
  167. package/dist/es/out/base-fraud-detection.js +4 -1
  168. package/dist/es/out/config.js +10 -4
  169. package/dist/es/out/fraud-detection.js +12 -13
  170. package/dist/es/out/worldpay-ddc-manager.js +7 -14
  171. package/dist/es/out/worldpay-ddc.js +7 -5
  172. package/dist/es/polyfill.js +166 -0
  173. package/dist/es/style.css +1 -1
  174. package/dist/es/types/event.js +12 -3
  175. package/dist/es/types/message.js +3 -0
  176. package/dist/es/utils/iframe.js +1 -1
  177. package/dist/es/utils/location.js +0 -8
  178. package/dist/es/utils/payment.js +12 -12
  179. package/dist/es/utils/redirect.js +4 -5
  180. package/dist/es/utils/system-info/is-ua-webview.js +1 -20
  181. package/dist/fe-logger.min.js +1 -0
  182. package/dist/polyfill.js +166 -0
  183. package/dist/style.css +1 -1
  184. package/dist/types/api/modules/index.d.ts +1 -0
  185. package/dist/types/api/modules/threeDS/index.d.ts +7 -0
  186. package/dist/types/api/modules/type.d.ts +2 -0
  187. package/dist/types/api/modules/wallet/index.d.ts +18 -0
  188. package/dist/types/api/utils/index.d.ts +1 -0
  189. package/dist/types/components/AddressField/index.d.ts +1 -0
  190. package/dist/types/components/AddressField/type.d.ts +17 -2
  191. package/dist/types/components/AddressField/utils.d.ts +22 -0
  192. package/dist/types/components/AliPay/type.d.ts +11 -15
  193. package/dist/types/components/ApplePay/type.d.ts +5 -28
  194. package/dist/types/components/CPFField/type.d.ts +1 -1
  195. package/dist/types/components/Card/type.d.ts +22 -23
  196. package/dist/types/components/CardExpireDateField/type.d.ts +1 -1
  197. package/dist/types/components/CardNo/type.d.ts +3 -2
  198. package/dist/types/components/CardNumberField/type.d.ts +1 -1
  199. package/dist/types/components/CardSecurityCodeField/type.d.ts +1 -1
  200. package/dist/types/components/CardSelector/type.d.ts +4 -4
  201. package/dist/types/components/DropIn/type.d.ts +10 -22
  202. package/dist/types/components/GooglePay/createGooglePay.d.ts +4 -4
  203. package/dist/types/components/GooglePay/type.d.ts +10 -14
  204. package/dist/types/components/PaymentButton/PaymentButton.d.ts +3 -0
  205. package/dist/types/components/PaymentButton/index.d.ts +2 -0
  206. package/dist/types/components/PaymentButton/type.d.ts +13 -0
  207. package/dist/types/components/RecurringTip/RecurringTip.d.ts +1 -1
  208. package/dist/types/components/SecuredFieldsProvider/type.d.ts +7 -1
  209. package/dist/types/components/SecuredIframe/HiddenIframe.d.ts +5 -0
  210. package/dist/types/components/ThreeDS/components/ThreeDSIframe/ThreeDSIframe.d.ts +0 -6
  211. package/dist/types/components/ThreeDS/components/ThreeDSIframe/type.d.ts +2 -0
  212. package/dist/types/components/WechatPay/type.d.ts +11 -15
  213. package/dist/types/components/business/BlikCodeField/BlikCodeField.d.ts +6 -0
  214. package/dist/types/components/business/BlikCodeField/index.d.ts +2 -0
  215. package/dist/types/components/business/BlikCodeField/type.d.ts +9 -0
  216. package/dist/types/components/business/BlikConfirmModal/BlikConfirmModal.d.ts +6 -0
  217. package/dist/types/components/business/BlikConfirmModal/index.d.ts +2 -0
  218. package/dist/types/components/business/BlikConfirmModal/type.d.ts +8 -0
  219. package/dist/types/components/business/NameField/NameField.d.ts +5 -0
  220. package/dist/types/components/business/NameField/index.d.ts +2 -0
  221. package/dist/types/components/business/NameField/type.d.ts +7 -0
  222. package/dist/types/components/business/PhoneField/PhoneField.d.ts +6 -0
  223. package/dist/types/components/business/PhoneField/config.d.ts +22 -0
  224. package/dist/types/components/business/PhoneField/index.d.ts +2 -0
  225. package/dist/types/components/business/PhoneField/type.d.ts +9 -0
  226. package/dist/types/components/business/SegmentedDigitInput/SegmentedDigitInput.d.ts +5 -0
  227. package/dist/types/components/business/SegmentedDigitInput/format.d.ts +5 -0
  228. package/dist/types/components/business/SegmentedDigitInput/index.d.ts +3 -0
  229. package/dist/types/components/business/SegmentedDigitInput/type.d.ts +13 -0
  230. package/dist/types/components/business/Tooltip/Tooltip.d.ts +11 -0
  231. package/dist/types/components/business/Tooltip/index.d.ts +1 -0
  232. package/dist/types/components/business/index.d.ts +6 -0
  233. package/dist/types/components/index.d.ts +0 -7
  234. package/dist/types/components/internal/CheckBox/type.d.ts +2 -1
  235. package/dist/types/components/internal/Form/type.d.ts +2 -1
  236. package/dist/types/components/internal/Select/type.d.ts +1 -1
  237. package/dist/types/components/internal/icons/IconArrowDown.d.ts +1 -1
  238. package/dist/types/components/internal/icons/IconBancontact.d.ts +2 -0
  239. package/dist/types/components/internal/icons/IconBlik.d.ts +2 -0
  240. package/dist/types/components/internal/icons/IconIdeal.d.ts +2 -0
  241. package/dist/types/components/internal/icons/IconOvo.d.ts +2 -0
  242. package/dist/types/components/internal/icons/IconP24.d.ts +2 -0
  243. package/dist/types/components/internal/icons/IconPhone.d.ts +2 -0
  244. package/dist/types/components/internal/icons/IconSkrill.d.ts +2 -0
  245. package/dist/types/components/internal/icons/IconTrustly.d.ts +2 -0
  246. package/dist/types/components/internal/icons/index.d.ts +8 -0
  247. package/dist/types/components/type.d.ts +0 -0
  248. package/dist/types/components/wallets/Bancontact/Bancontact.d.ts +15 -0
  249. package/dist/types/components/wallets/Bancontact/index.d.ts +2 -0
  250. package/dist/types/components/{GrabPay → wallets/Bancontact}/type.d.ts +8 -18
  251. package/dist/types/components/wallets/Blik/Blik.d.ts +15 -0
  252. package/dist/types/components/wallets/Blik/index.d.ts +2 -0
  253. package/dist/types/components/wallets/Blik/type.d.ts +29 -0
  254. package/dist/types/components/{Boost → wallets/Boost}/Boost.d.ts +9 -4
  255. package/dist/types/components/{Boost → wallets/Boost}/type.d.ts +3 -14
  256. package/dist/types/components/wallets/GCash/GCash.d.ts +5 -0
  257. package/dist/types/components/wallets/GCash/type.d.ts +3 -14
  258. package/dist/types/components/{GrabPay → wallets/GrabPay}/GrabPay.d.ts +4 -4
  259. package/dist/types/components/wallets/GrabPay/type.d.ts +17 -0
  260. package/dist/types/components/wallets/IDeal/IDeal.d.ts +15 -0
  261. package/dist/types/components/wallets/IDeal/index.d.ts +2 -0
  262. package/dist/types/components/wallets/IDeal/type.d.ts +29 -0
  263. package/dist/types/components/{LinePay → wallets/LinePay}/LinePay.d.ts +9 -4
  264. package/dist/types/components/{LinePay → wallets/LinePay}/type.d.ts +3 -14
  265. package/dist/types/components/wallets/MayBankQRPay/MayBankQRPay.d.ts +15 -0
  266. package/dist/types/components/{MayBankQRPay → wallets/MayBankQRPay}/type.d.ts +3 -14
  267. package/dist/types/components/wallets/NinePay/NinePay.d.ts +15 -0
  268. package/dist/types/components/{NinePay → wallets/NinePay}/type.d.ts +3 -14
  269. package/dist/types/components/wallets/OVO/OVO.d.ts +15 -0
  270. package/dist/types/components/wallets/OVO/index.d.ts +2 -0
  271. package/dist/types/components/wallets/OVO/type.d.ts +29 -0
  272. package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +5 -0
  273. package/dist/types/components/wallets/OpayWallet/type.d.ts +4 -15
  274. package/dist/types/components/wallets/P24/P24.d.ts +15 -0
  275. package/dist/types/components/wallets/P24/index.d.ts +2 -0
  276. package/dist/types/components/wallets/P24/type.d.ts +29 -0
  277. package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +5 -0
  278. package/dist/types/components/wallets/PagaWallet/type.d.ts +5 -16
  279. package/dist/types/components/wallets/Paymaya/Paymaya.d.ts +5 -0
  280. package/dist/types/components/wallets/Paymaya/type.d.ts +3 -14
  281. package/dist/types/components/wallets/PicPay/type.d.ts +5 -16
  282. package/dist/types/components/wallets/Pix/type.d.ts +5 -16
  283. package/dist/types/components/{ShopeePay → wallets/ShopeePay}/ShopeePay.d.ts +9 -4
  284. package/dist/types/components/{ShopeePay → wallets/ShopeePay}/type.d.ts +3 -14
  285. package/dist/types/components/wallets/Skrill/Skrill.d.ts +15 -0
  286. package/dist/types/components/wallets/Skrill/index.d.ts +2 -0
  287. package/dist/types/components/wallets/Skrill/type.d.ts +17 -0
  288. package/dist/types/components/{TNGWallet → wallets/TNGWallet}/TNGWallet.d.ts +9 -4
  289. package/dist/types/components/{TNGWallet → wallets/TNGWallet}/type.d.ts +3 -14
  290. package/dist/types/components/wallets/Trustly/Trustly.d.ts +15 -0
  291. package/dist/types/components/wallets/Trustly/index.d.ts +2 -0
  292. package/dist/types/components/wallets/Trustly/type.d.ts +21 -0
  293. package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +5 -0
  294. package/dist/types/components/wallets/Vietqr/type.d.ts +3 -14
  295. package/dist/types/components/wallets/Zalopay/Zalopay.d.ts +5 -0
  296. package/dist/types/components/wallets/Zalopay/type.d.ts +3 -14
  297. package/dist/types/components/wallets/index.d.ts +14 -0
  298. package/dist/types/components/wallets/type.d.ts +18 -4
  299. package/dist/types/constant.d.ts +15 -1
  300. package/dist/types/core/address.d.ts +2 -5
  301. package/dist/types/core/checkout.d.ts +10 -10
  302. package/dist/types/core/create-child.d.ts +1 -0
  303. package/dist/types/core/environment.d.ts +5 -0
  304. package/dist/types/core/error.d.ts +9 -3
  305. package/dist/types/core/index.d.ts +2 -0
  306. package/dist/types/core/logger.d.ts +55 -0
  307. package/dist/types/core/payment.d.ts +21 -0
  308. package/dist/types/hooks/index.d.ts +1 -0
  309. package/dist/types/hooks/useBaseWallet.d.ts +54 -0
  310. package/dist/types/hooks/usePayState.d.ts +3 -1
  311. package/dist/types/hooks/useRetry.console-tests.d.ts +41 -0
  312. package/dist/types/hooks/useRetry.d.ts +22 -3
  313. package/dist/types/i18n/locales/de-DE.d.ts +23 -0
  314. package/dist/types/i18n/locales/en-GB.d.ts +23 -0
  315. package/dist/types/i18n/locales/es-ES.d.ts +23 -0
  316. package/dist/types/i18n/locales/fr-FR.d.ts +23 -0
  317. package/dist/types/i18n/locales/ja-JP.d.ts +23 -0
  318. package/dist/types/i18n/locales/ko-KR.d.ts +23 -0
  319. package/dist/types/i18n/locales/nl-NL.d.ts +23 -0
  320. package/dist/types/i18n/locales/pt-PT.d.ts +23 -0
  321. package/dist/types/i18n/locales/ru-RU.d.ts +23 -0
  322. package/dist/types/i18n/locales/zh-CN.d.ts +23 -0
  323. package/dist/types/i18n/locales/zh-HK.d.ts +23 -0
  324. package/dist/types/i18n/locales/zh-TW.d.ts +23 -0
  325. package/dist/types/out/base-fraud-detection.d.ts +1 -0
  326. package/dist/types/out/config.d.ts +6 -1
  327. package/dist/types/out/fraud-detection.d.ts +2 -8
  328. package/dist/types/out/types.d.ts +3 -1
  329. package/dist/types/out/worldpay-ddc-manager.d.ts +6 -7
  330. package/dist/types/types/event.d.ts +46 -13
  331. package/dist/types/types/index.d.ts +8 -37
  332. package/dist/types/types/message.d.ts +48 -7
  333. package/dist/types/types/payment.d.ts +63 -0
  334. package/dist/types/utils/app-payment.d.ts +7 -3
  335. package/dist/types/utils/behavior-tracker.d.ts +36 -0
  336. package/dist/types/utils/env.d.ts +37 -0
  337. package/dist/types/utils/iframe.d.ts +1 -1
  338. package/dist/types/utils/payment.d.ts +10 -10
  339. package/package.json +12 -5
  340. package/dist/es/components/Boost/index.js +0 -348
  341. package/dist/es/components/GrabPay/index.js +0 -348
  342. package/dist/es/components/LinePay/index.js +0 -348
  343. package/dist/es/components/MayBankQRPay/index.js +0 -354
  344. package/dist/es/components/NinePay/index.js +0 -348
  345. package/dist/es/components/ShopeePay/index.js +0 -348
  346. package/dist/es/components/TNGWallet/index.js +0 -348
  347. package/dist/types/components/MayBankQRPay/MayBankQRPay.d.ts +0 -10
  348. package/dist/types/components/NinePay/NinePay.d.ts +0 -10
  349. package/dist/types/utils/logger.d.ts +0 -14
  350. /package/dist/types/components/{Boost → wallets/Boost}/index.d.ts +0 -0
  351. /package/dist/types/components/{GrabPay → wallets/GrabPay}/index.d.ts +0 -0
  352. /package/dist/types/components/{LinePay → wallets/LinePay}/index.d.ts +0 -0
  353. /package/dist/types/components/{MayBankQRPay → wallets/MayBankQRPay}/index.d.ts +0 -0
  354. /package/dist/types/components/{NinePay → wallets/NinePay}/index.d.ts +0 -0
  355. /package/dist/types/components/{ShopeePay → wallets/ShopeePay}/index.d.ts +0 -0
  356. /package/dist/types/components/{TNGWallet → wallets/TNGWallet}/index.d.ts +0 -0
@@ -0,0 +1,13 @@
1
+ import type { ButtonProps } from '../internal/Button';
2
+ import type { ReactNode } from 'preact/compat';
3
+ export type PaymentButtonStatus = 'unSubmit' | 'loading' | 'success';
4
+ export interface PaymentButtonProps extends Pick<ButtonProps, 'style' | 'className' | 'onClick'> {
5
+ /** 是否验证通过 */
6
+ verified?: boolean;
7
+ /** 按钮状态 */
8
+ status?: PaymentButtonStatus;
9
+ /** 是否禁用 */
10
+ disabled?: boolean;
11
+ /** 子组件 */
12
+ children?: ReactNode;
13
+ }
@@ -1,2 +1,2 @@
1
1
  import './recurring-tip.scss';
2
- export declare function RecurringTip(): import("preact").JSX.Element;
2
+ export declare function RecurringTip(isCard?: boolean): import("preact").JSX.Element;
@@ -1,9 +1,11 @@
1
1
  import type { ReactNode } from 'preact/compat';
2
2
  import type { SessionMode } from '../../constant';
3
3
  import type { I18n } from '../../i18n';
4
- import type { EncryptCardMessage, InputStylesConfig, Message, MessageAction } from '../../types';
4
+ import type { EncryptCardMessage, EventData, InputStylesConfig, Message, MessageAction, SecurityIframeEventType } from '../../types';
5
5
  import type { CheckoutPaymentParams } from '../../api';
6
+ import type { PayKKaCheckout } from '../../core';
6
7
  export interface SecuredFieldsProviderProps extends SecuredFieldsCallback {
8
+ core?: PayKKaCheckout;
7
9
  i18n: I18n;
8
10
  supportedCardBrands?: string[];
9
11
  sessionMode?: SessionMode;
@@ -12,6 +14,7 @@ export interface SecuredFieldsProviderProps extends SecuredFieldsCallback {
12
14
  targetElement?: HTMLElement;
13
15
  style?: InputStylesConfig;
14
16
  checkoutId: string;
17
+ disabled?: boolean;
15
18
  }
16
19
  export interface SecuredFieldsProviderRef {
17
20
  payment: (formData: CheckoutPaymentParams, extraParams?: Recordable) => void;
@@ -39,6 +42,8 @@ export interface SecuredFieldsCallback {
39
42
  onCardEncrypted?: (data: Message<MessageAction.CARD_ENCRYPTED>) => void;
40
43
  onCardEncryptionFailed?: (data: Message<MessageAction.CARD_ENCRYPTION_FAILED>) => void;
41
44
  onValidated?: (data: Message<MessageAction.VALIDATED>) => void;
45
+ onEvent?: (eventType: SecurityIframeEventType, data: EventData<SecurityIframeEventType>) => void;
46
+ onHiddenIframeReady?: (data: Message<MessageAction.HIDDEN_IFRAME_READY>) => void;
42
47
  }
43
48
  export declare enum EFieldType {
44
49
  CARD_NUMBER = "CARD_NUMBER",
@@ -53,6 +58,7 @@ export interface SecuredFieldConfig extends FieldIframeConfig, SecuredFieldsCall
53
58
  iframeName: string;
54
59
  iframeClassName: string;
55
60
  hiddenIframe: HTMLIFrameElement;
61
+ onEvent?: (eventType: SecurityIframeEventType, data: EventData<SecurityIframeEventType>) => void;
56
62
  }
57
63
  export interface FieldIframeConfig {
58
64
  fieldType: AllFieldType;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * 隐藏 iframe,负责接收其他 iframe 传递的敏感信息,并进行支付或加密操作
3
+ * @remarks
4
+ * 隐藏 iframe 只有报错,和接口日志需要上报,因此采用手动捕获,通知父页面进行上报,直接引入 sdk 太重了
5
+ */
1
6
  export declare const HiddenIframe: ({ checkoutId }: {
2
7
  checkoutId: string;
3
8
  }) => import("preact").JSX.Element;
@@ -1,9 +1,3 @@
1
1
  import type { ThreeDSIframeProps } from './type';
2
2
  import './three-ds-iframe.scss';
3
- /**
4
- * 解析 checkoutId,为 window.name 的倒数第二个值
5
- * 这是为了让里面的 iframe 最后跳转到我们的成功页时能拿到 checkoutId,防止页面通信错乱
6
- * 如果不用 window.name 做间接传递,则需要在 iframe 加载完之后进行 postMessage 通信传递 checkoutId
7
- * 我们这个 3ds 弹窗是 iframe1 嵌套 iframe2,外层传递 checkoutId 给 iframe1,iframe1 再传递给 iframe2,用 postMessage 需要四次交互,过于复杂
8
- */
9
3
  export declare const ThreeDSIframe: (props: ThreeDSIframeProps) => import("preact").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import type { PayKKaLogger } from '../../../../core';
1
2
  export interface ThreeDSFormConfig {
2
3
  action: string | null;
3
4
  dataList: Array<{
@@ -8,6 +9,7 @@ export interface ThreeDSFormConfig {
8
9
  export interface ThreeDSIframeProps {
9
10
  config: ThreeDSFormConfig;
10
11
  sessionId?: string;
12
+ logger?: PayKKaLogger;
11
13
  }
12
14
  export declare enum ThreeDSChannel {
13
15
  ECP = "ECP",
@@ -1,26 +1,22 @@
1
- import type { PayRes } from '../../api';
2
- import type { PayKKaError } from '../../core';
3
- import type { PayKKaCommonConfig, PaymentInfo } from '../../types';
4
- import type { FormValidateError } from '../internal/Form';
5
- export interface WechatPayProps extends PayKKaCommonConfig {
1
+ import type { PayKKaCommonConfig } from '../../types';
2
+ import type { PaymentCommonProps } from '../../types/payment';
3
+ export interface WechatPayProps extends PayKKaCommonConfig, PaymentCommonProps {
6
4
  /**
7
5
  * 是否展示邮箱
8
- * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
9
- * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
6
+ * @remarks
7
+ * - 若配置 true 但创建收银台时已经传了,就展示禁用状态。
8
+ * - 若配置 false 但创建收银台时未传,依旧会展示该输入框。
9
+ * @defaultValue false
10
10
  */
11
11
  showEmail?: boolean;
12
12
  /**
13
13
  * 是否展示邮箱
14
- * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
15
- * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
14
+ * @remarks
15
+ * - 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
16
+ * - 若配置 false 但创建收银台时未传,依旧会展示该输入框。
17
+ * @defaultValue false
16
18
  */
17
19
  showAddress?: boolean;
18
- onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void;
19
- onSuccess?: (data: PaymentInfo) => void;
20
- onError?: (error: PayKKaError) => void;
21
- onTimeout?: (source: 'retry' | 'channel') => void;
22
- onExpired?: () => void;
23
- onSubmitResponse?: (payRes: PayRes) => void;
24
20
  onGetOpenId?: () => Promise<string>;
25
21
  onCallWxPayBox?: (payInfo: any) => Promise<void>;
26
22
  }
@@ -0,0 +1,6 @@
1
+ import type { BlikCodeFieldProps } from './type';
2
+ import './blik-code-field.scss';
3
+ /**
4
+ * BLIK 6 位验证码,展示层格式 123 456;标签右侧可带说明图标与悬停提示
5
+ */
6
+ export declare const BlikCodeField: (props: BlikCodeFieldProps) => import("preact/compat").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './BlikCodeField';
2
+ export type { BlikCodeFieldProps } from './type';
@@ -0,0 +1,9 @@
1
+ import type { FormItemProps } from '../../internal/Form';
2
+ import type { InputProps } from '../../internal/Input';
3
+ export interface BlikCodeFieldProps extends Pick<FormItemProps, 'onValidationStatusChange' | 'className' | 'style' | 'label'>, Pick<InputProps, 'onInput' | 'disabled'> {
4
+ placeholder?: string;
5
+ incompleteText?: string;
6
+ invalidText?: string;
7
+ /** 是否在标签文案右侧展示说明图标与悬停提示,默认 true */
8
+ showInfoTooltip?: boolean;
9
+ }
@@ -0,0 +1,6 @@
1
+ import type { BlikConfirmModalProps } from './type';
2
+ import './blik-confirm-modal.scss';
3
+ /**
4
+ * BLIK 在银行 App 内确认付款时的提示弹窗(等待用户确认)。
5
+ */
6
+ export declare const BlikConfirmModal: (props: BlikConfirmModalProps) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './BlikConfirmModal';
2
+ export * from './type';
@@ -0,0 +1,8 @@
1
+ export interface BlikConfirmModalProps {
2
+ /** 是否展示 */
3
+ show?: boolean;
4
+ /** 弹窗显隐变化(关闭时一般为 false) */
5
+ onChange?: (open: boolean) => void;
6
+ /** 是否挂载到 body,避免被父级裁剪或影响 fixed */
7
+ appendToBody?: boolean;
8
+ }
@@ -0,0 +1,5 @@
1
+ import type { NameFieldProps } from './type';
2
+ /**
3
+ * 通用姓名输入框,许多支付方式需要输入姓名,但是文案可能不同,这里支持自定义文案
4
+ */
5
+ export declare const NameField: (props: NameFieldProps) => import("preact/compat").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './NameField';
2
+ export * from './type';
@@ -0,0 +1,7 @@
1
+ import type { FormItemProps } from '../../internal/Form';
2
+ import type { InputProps } from '../../internal/Input';
3
+ export interface NameFieldProps extends Pick<FormItemProps, 'onValidationStatusChange' | 'className' | 'style'>, Pick<InputProps, 'onInput' | 'disabled' | 'maxLength'> {
4
+ label?: string;
5
+ placeholder?: string;
6
+ incompleteText?: string;
7
+ }
@@ -0,0 +1,6 @@
1
+ import type { PhoneFieldProps } from './type';
2
+ import './phone-field.scss';
3
+ /**
4
+ * 通用手机号输入框,支持区号选择
5
+ */
6
+ export declare const PhoneField: (props: PhoneFieldProps) => import("preact/compat").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import type { SelectOption } from '../../internal/Select';
2
+ export declare enum PHONE_TYPE {
3
+ /** 印尼 */
4
+ IDN = "IDN"
5
+ }
6
+ export interface PhoneConfig {
7
+ /** 区号 */
8
+ areaCode: string;
9
+ /** 占位符 */
10
+ placeholder: string;
11
+ /** 正则表达式 */
12
+ regex: RegExp;
13
+ /** 数字分组(每组数字长度,中间用空格分隔) */
14
+ digitGroups: number[];
15
+ /** 最大长度 */
16
+ maxDigits: number;
17
+ }
18
+ export declare const phoneType2ConfigMap: Record<PHONE_TYPE, PhoneConfig>;
19
+ export declare const phoneList: (SelectOption & PhoneConfig)[];
20
+ /** 手机号展示格式化(空格分隔),内部与 SegmentedDigitInput 共用逻辑 */
21
+ export declare const formatPhoneDigits: (rawDigits: string, groups: number[], maxDigits: number) => string;
22
+ export declare const phoneConfigByAreaCode: (areaCode: string | number) => (SelectOption & PhoneConfig) | undefined;
@@ -0,0 +1,2 @@
1
+ export * from './PhoneField';
2
+ export * from './type';
@@ -0,0 +1,9 @@
1
+ import type { FormItemProps } from '../../internal/Form';
2
+ import type { InputProps } from '../../internal/Input';
3
+ export interface PhoneFieldProps extends Pick<FormItemProps, 'onValidationStatusChange' | 'className' | 'style' | 'label'>, Pick<InputProps, 'onInput' | 'disabled'> {
4
+ areaCode?: string;
5
+ areaCodeDisabled?: boolean;
6
+ placeholder?: string;
7
+ incompleteText?: string;
8
+ invalidText?: string;
9
+ }
@@ -0,0 +1,5 @@
1
+ import type { SegmentedDigitInputProps } from './type';
2
+ /**
3
+ * 数字输入框:按 digitGroups 在展示层插入分隔符(如手机号、卡号分段),仅允许数字输入。
4
+ */
5
+ export declare const SegmentedDigitInput: (props: SegmentedDigitInputProps) => import("preact/compat").JSX.Element;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 将连续数字按分组插入分隔符(如 [3,4,4] + 空格 => 812 3456 7890)
3
+ */
4
+ export declare function formatDigitsByGroups(rawDigits: string, groups: number[], maxDigits: number, separator?: string): string;
5
+ export declare function maxFormattedLength(groups: number[], maxDigits: number, separator?: string): number;
@@ -0,0 +1,3 @@
1
+ export * from './SegmentedDigitInput';
2
+ export * from './format';
3
+ export type { SegmentedDigitInputProps } from './type';
@@ -0,0 +1,13 @@
1
+ import type { TargetedEvent } from 'preact/compat';
2
+ import type { InputProps } from '../../internal/Input';
3
+ export interface SegmentedDigitInputProps extends Pick<InputProps, 'placeholder' | 'disabled' | 'inputClassName' | 'style' | 'onFocus' | 'onBlur' | 'leftIcon' | 'rightIcon'> {
4
+ /** 展示层受控值(含分隔符) */
5
+ value: string;
6
+ /** 每组连续数字位数,分隔符插在组与组之间,如 [3,4,4] */
7
+ digitGroups: number[];
8
+ /** 最多输入的数字个数(不含分隔符) */
9
+ maxDigits: number;
10
+ /** 组间分隔符,默认空格 */
11
+ separator?: string;
12
+ onInput?: (event: TargetedEvent<HTMLInputElement, InputEvent>) => void;
13
+ }
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'preact/compat';
2
+ import './tooltip.scss';
3
+ export interface TooltipProps {
4
+ /** 悬停展示的文案 */
5
+ content: string;
6
+ children: ReactNode;
7
+ }
8
+ /**
9
+ * 最简单的悬停气泡:纯 CSS :hover,无 Portal
10
+ */
11
+ export declare const Tooltip: (props: TooltipProps) => import("preact/compat").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Tooltip';
@@ -1 +1,7 @@
1
1
  export * from './QRCodeModal';
2
+ export * from './NameField';
3
+ export * from './PhoneField';
4
+ export * from './BlikCodeField';
5
+ export * from './BlikConfirmModal';
6
+ export * from './Tooltip';
7
+ export * from './SegmentedDigitInput';
@@ -18,11 +18,4 @@ export * from './CardIBANField';
18
18
  export * from './EncryptedCard';
19
19
  export * from './CombinedCardInfo';
20
20
  export * from './DropIn';
21
- export * from './Boost';
22
- export * from './LinePay';
23
- export * from './MayBankQRPay';
24
- export * from './NinePay';
25
- export * from './GrabPay';
26
- export * from './TNGWallet';
27
- export * from './ShopeePay';
28
21
  export * from './wallets';
@@ -1,6 +1,7 @@
1
- import type { CustomAttributes } from "../../../types";
1
+ import type { CustomAttributes } from '../../../types';
2
2
  export interface CheckBoxProps extends CustomAttributes<HTMLDivElement> {
3
3
  checked?: boolean;
4
4
  label?: string;
5
+ disabled?: boolean;
5
6
  onChange?: (checked: boolean) => void;
6
7
  }
@@ -31,7 +31,8 @@ export interface FormProps {
31
31
  form: Recordable;
32
32
  }
33
33
  export interface FormItemProps extends CustomAttributes<HTMLDivElement> {
34
- label?: string;
34
+ /** 支持字符串或自定义节点(如图标、插槽) */
35
+ label?: ReactNode;
35
36
  path?: string;
36
37
  rule?: FormRule;
37
38
  children?: ReactNode;
@@ -9,7 +9,7 @@ export type SelectOption = BaseSelectOption<string | number>;
9
9
  export interface SelectRef {
10
10
  blur: () => void;
11
11
  }
12
- export interface SelectProps extends CustomAttributes<HTMLInputElement, 'onBlur' | 'onFocus' | 'placeholder'> {
12
+ export interface SelectProps extends CustomAttributes<HTMLInputElement, 'onBlur' | 'onFocus' | 'placeholder' | 'disabled'> {
13
13
  /** 选中值 */
14
14
  value?: string | number;
15
15
  /** 校验状态 */
@@ -1,2 +1,2 @@
1
1
  import type { IconProps } from './type';
2
- export declare function IconArrowDown({ size, style, className }: IconProps): import("preact").JSX.Element;
2
+ export declare const IconArrowDown: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './type';
2
+ export declare const IconBancontact: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './type';
2
+ export declare const IconBlik: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './type';
2
+ export declare const IconIdeal: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './type';
2
+ export declare const IconOvo: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './type';
2
+ export declare const IconP24: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './type';
2
+ export declare const IconPhone: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './type';
2
+ export declare const IconSkrill: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './type';
2
+ export declare const IconTrustly: ({ size, style, className }: IconProps) => import("preact").JSX.Element;
@@ -40,3 +40,11 @@ export * from './IconPix';
40
40
  export * from './IconPicPay';
41
41
  export * from './IconOpayWallet';
42
42
  export * from './IconPagaWallet';
43
+ export * from './IconP24';
44
+ export * from './IconTrustly';
45
+ export * from './IconBlik';
46
+ export * from './IconOvo';
47
+ export * from './IconSkrill';
48
+ export * from './IconBancontact';
49
+ export * from './IconIdeal';
50
+ export * from './IconPhone';
File without changes
@@ -0,0 +1,15 @@
1
+ import './bancontact.scss';
2
+ import type { BancontactProps, BancontactRef } from './type';
3
+ /**
4
+ * Bancontact 比利时支付方式
5
+ * - 表单:邮箱,姓名
6
+ * - 支付:跳转至银行页面完成支付
7
+ */
8
+ export declare const Bancontact: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<BancontactProps & 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<BancontactRef> | undefined;
15
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './Bancontact';
2
+ export * from './type';
@@ -1,7 +1,7 @@
1
- import type { PayKKaError } from '../../core';
2
- import type { PayKKaCommonConfig, PaymentInfo } from '../../types';
3
- import type { FormValidateError } from '../internal/Form';
4
- export interface GrabPayProps extends PayKKaCommonConfig {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ import type { WalletCustomProps, WalletRedirectProps } from '../type';
4
+ export interface BancontactProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
5
5
  /**
6
6
  * 是否展示邮箱
7
7
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -9,31 +9,21 @@ export interface GrabPayProps extends PayKKaCommonConfig {
9
9
  */
10
10
  showEmail?: boolean;
11
11
  /**
12
- * 是否展示邮箱
12
+ * 是否展示地址
13
13
  * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
14
14
  * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
15
15
  */
16
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?: () => void;
25
- /** 收银台已过期时触发 */
26
- onExpired?: () => void;
27
17
  }
28
- export interface GrabPayRef {
18
+ export interface BancontactRef {
29
19
  /** 停止轮询支付结果 */
30
20
  stopRetry: () => void;
31
21
  /** 开始轮询支付结果 */
32
22
  startRetry: (timeout?: number) => void;
33
- /** 更新表单地址 */
34
- updateAddress: () => void;
35
23
  /** 更新表单邮箱 */
36
24
  updateEmail: () => void;
37
25
  /** 不展示支付按钮时,可调用该方法进行支付 */
38
26
  payment: () => void;
27
+ /** 更新表单地址 */
28
+ updateAddress: () => void;
39
29
  }
@@ -0,0 +1,15 @@
1
+ import './blik.scss';
2
+ import type { BlikProps, BlikRef } from './type';
3
+ /**
4
+ * BLIK 波兰支付方式
5
+ * - 表单:邮箱,姓名,BLIK 验证码
6
+ * - 支付:展示弹窗并轮询,等待用户在银行 app 操作
7
+ */
8
+ export declare const Blik: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<BlikProps & 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<BlikRef> | undefined;
15
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './Blik';
2
+ export * from './type';
@@ -0,0 +1,29 @@
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ import type { WalletCustomProps } from '../type';
4
+ export interface BlikProps extends PayKKaCommonConfig, WalletCustomProps, PaymentCommonProps {
5
+ /**
6
+ * 是否展示邮箱
7
+ * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
8
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
9
+ */
10
+ showEmail?: boolean;
11
+ /**
12
+ * 是否展示地址
13
+ * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
14
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
15
+ */
16
+ showAddress?: boolean;
17
+ }
18
+ export interface BlikRef {
19
+ /** 停止轮询支付结果 */
20
+ stopRetry: () => void;
21
+ /** 开始轮询支付结果 */
22
+ startRetry: (timeout?: number) => void;
23
+ /** 更新表单邮箱 */
24
+ updateEmail: () => void;
25
+ /** 更新表单地址 */
26
+ updateAddress: () => void;
27
+ /** 不展示支付按钮时,可调用该方法进行支付 */
28
+ payment: () => void;
29
+ }
@@ -1,10 +1,15 @@
1
1
  import type { BoostProps } from './type';
2
2
  import type { BoostRef } from './type';
3
3
  import './boost.scss';
4
- export declare const Boost: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<BoostProps & import("../../types").PayKKaCommonConfig & {
5
- session: import("../../core").Session;
6
- core: import("../../core").PayKKaCheckout;
7
- threeDSFrame?: import("../../types").ThreeDSFrameConfig | undefined;
4
+ /**
5
+ * Boost 支付方式
6
+ * - 表单:邮箱,地址
7
+ * - 支付:跳转至 Boost 页面完成支付
8
+ */
9
+ export declare const Boost: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<BoostProps & import("../../../types").PayKKaCommonConfig & {
10
+ session: import("../../../core").Session;
11
+ core: import("../../../core").PayKKaCheckout;
12
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
8
13
  isDropIn?: boolean | undefined;
9
14
  }> & {
10
15
  ref?: import("preact").Ref<BoostRef> | undefined;
@@ -1,7 +1,6 @@
1
- import type { PayKKaError } from '../../core';
2
- import type { FormValidateError } from '../internal/Form';
3
- import type { PaymentInfo } from '../../types';
4
- export interface BoostProps {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ export interface BoostProps extends PayKKaCommonConfig, PaymentCommonProps {
5
4
  /**
6
5
  * 是否展示邮箱
7
6
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -14,16 +13,6 @@ export interface BoostProps {
14
13
  * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
15
14
  */
16
15
  showAddress?: boolean;
17
- /** 提交表单时触发 */
18
- onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void;
19
- /** 支付成功后触发 */
20
- onSuccess?: (data: PaymentInfo) => void;
21
- /** 支付失败时触发 */
22
- onError?: (error: PayKKaError) => void;
23
- /** 支付超时时触发 */
24
- onTimeout?: () => void;
25
- /** 收银台已过期时触发 */
26
- onExpired?: () => void;
27
16
  }
28
17
  export interface BoostRef {
29
18
  /** 停止轮询支付结果 */
@@ -1,5 +1,10 @@
1
1
  import type { GCashProps, GCashRef } from './type';
2
2
  import './g-cash.scss';
3
+ /**
4
+ * GCash 支付方式
5
+ * - 表单:邮箱,地址
6
+ * - 支付:移动端跳转,PC 端展示二维码弹窗
7
+ */
3
8
  export declare const GCash: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<GCashProps & import("../../../types").PayKKaCommonConfig & {
4
9
  session: import("../../../core").Session;
5
10
  core: import("../../../core").PayKKaCheckout;
@@ -1,7 +1,6 @@
1
- import type { PayKKaError } from '../../..';
2
- import type { PayKKaCommonConfig, PaymentInfo } from '../../../types';
3
- import type { FormValidateError } from '../../internal/Form';
4
- export interface GCashProps extends PayKKaCommonConfig {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ export interface GCashProps extends PayKKaCommonConfig, PaymentCommonProps {
5
4
  /**
6
5
  * 是否展示邮箱
7
6
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -14,16 +13,6 @@ export interface GCashProps extends PayKKaCommonConfig {
14
13
  * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
15
14
  */
16
15
  showAddress?: boolean;
17
- /** 提交表单时触发 */
18
- onSubmit?: (formValidateError?: Recordable<FormValidateError[]>) => void;
19
- /** 支付成功后触发 */
20
- onSuccess?: (data: PaymentInfo) => void;
21
- /** 支付失败时触发 */
22
- onError?: (error: PayKKaError) => void;
23
- /** 支付超时时触发 */
24
- onTimeout?: () => void;
25
- /** 收银台已过期时触发 */
26
- onExpired?: () => void;
27
16
  }
28
17
  export interface GCashRef {
29
18
  /** 停止轮询支付结果 */