@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
@@ -1,10 +1,10 @@
1
1
  import type { GrabPayProps } from './type';
2
2
  import type { GrabPayRef } from './type';
3
3
  import './grab-pay.scss';
4
- export declare const GrabPay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<GrabPayProps & import("../../types").PayKKaCommonConfig & {
5
- session: import("../../core").Session;
6
- core: import("../../core").PayKKaCheckout;
7
- threeDSFrame?: import("../../types").ThreeDSFrameConfig | undefined;
4
+ export declare const GrabPay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<GrabPayProps & import("../../../types").PayKKaCommonConfig & {
5
+ session: import("../../../core").Session;
6
+ core: import("../../../core").PayKKaCheckout;
7
+ threeDSFrame?: import("../../../types").ThreeDSFrameConfig | undefined;
8
8
  isDropIn?: boolean | undefined;
9
9
  }> & {
10
10
  ref?: import("preact").Ref<GrabPayRef> | undefined;
@@ -0,0 +1,17 @@
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ import type { WalletRedirectProps, WalletCustomProps } from '../type';
4
+ export interface GrabPayProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
5
+ }
6
+ export interface GrabPayRef {
7
+ /** 停止轮询支付结果 */
8
+ stopRetry: () => void;
9
+ /** 开始轮询支付结果 */
10
+ startRetry: (timeout?: number) => void;
11
+ /** 更新表单地址 */
12
+ updateAddress: () => void;
13
+ /** 更新表单邮箱 */
14
+ updateEmail: () => void;
15
+ /** 不展示支付按钮时,可调用该方法进行支付 */
16
+ payment: () => void;
17
+ }
@@ -0,0 +1,15 @@
1
+ import './ideal.scss';
2
+ import type { IDealProps, IDealRef } from './type';
3
+ /**
4
+ * IDeal 荷兰支付方式
5
+ * - 表单:邮箱,姓名
6
+ * - 支付:跳转至银行页面完成支付
7
+ */
8
+ export declare const IDeal: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<IDealProps & 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<IDealRef> | undefined;
15
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './IDeal';
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, WalletRedirectProps } from '../type';
4
+ export interface IDealProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
5
+ /**
6
+ * 是否展示邮箱
7
+ * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
8
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
9
+ */
10
+ showEmail?: boolean;
11
+ /**
12
+ * 是否展示地址
13
+ * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
14
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
15
+ */
16
+ showAddress?: boolean;
17
+ }
18
+ export interface IDealRef {
19
+ /** 停止轮询支付结果 */
20
+ stopRetry: () => void;
21
+ /** 开始轮询支付结果 */
22
+ startRetry: (timeout?: number) => void;
23
+ /** 更新表单邮箱 */
24
+ updateEmail: () => void;
25
+ /** 更新表单地址 */
26
+ updateAddress: () => void;
27
+ /** 不展示支付按钮时,可调用该方法进行支付 */
28
+ payment: () => void;
29
+ }
@@ -1,10 +1,15 @@
1
1
  import type { LinePayProps } from './type';
2
2
  import type { LinePayRef } from './type';
3
3
  import './line-pay.scss';
4
- export declare const LinePay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<LinePayProps & import("../../types").PayKKaCommonConfig & {
5
- session: import("../../core").Session;
6
- core: import("../../core").PayKKaCheckout;
7
- threeDSFrame?: import("../../types").ThreeDSFrameConfig | undefined;
4
+ /**
5
+ * LinePay 支付方式
6
+ * - 表单:邮箱,地址
7
+ * - 支付:跳转至 LinePay 页面完成支付
8
+ */
9
+ export declare const LinePay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<LinePayProps & 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<LinePayRef> | undefined;
@@ -1,7 +1,6 @@
1
- import type { PayKKaError } from '../../core';
2
- import type { PayKKaCommonConfig, PaymentInfo } from '../../types';
3
- import type { FormValidateError } from '../internal/Form';
4
- export interface LinePayProps extends PayKKaCommonConfig {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ export interface LinePayProps extends PayKKaCommonConfig, PaymentCommonProps {
5
4
  /**
6
5
  * 是否展示邮箱
7
6
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -14,16 +13,6 @@ export interface LinePayProps 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 LinePayRef {
29
18
  /** 停止轮询支付结果 */
@@ -0,0 +1,15 @@
1
+ import type { MayBankQRPayProps, MayBankQRPayRef } from './type';
2
+ import './may-bank-qr-pay.scss';
3
+ /**
4
+ * MayBankQRPay 支付方式
5
+ * - 表单:邮箱,地址
6
+ * - 支付:跳转至 MayBankQRPay 页面完成支付
7
+ */
8
+ export declare const MayBankQRPay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<MayBankQRPayProps & 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<MayBankQRPayRef> | undefined;
15
+ }>;
@@ -1,7 +1,6 @@
1
- import type { PayKKaError } from '../../core';
2
- import type { PayKKaCommonConfig, PaymentInfo } from '../../types';
3
- import type { FormValidateError } from '../internal/Form';
4
- export interface MayBankQRPayProps extends PayKKaCommonConfig {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ export interface MayBankQRPayProps extends PayKKaCommonConfig, PaymentCommonProps {
5
4
  /**
6
5
  * 是否展示邮箱
7
6
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -14,16 +13,6 @@ export interface MayBankQRPayProps 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 MayBankQRPayRef {
29
18
  /** 停止轮询支付结果 */
@@ -0,0 +1,15 @@
1
+ import type { NinePayProps, NinePayRef } from './type';
2
+ import './nine-pay.scss';
3
+ /**
4
+ * NinePay 支付方式
5
+ * - 表单:邮箱,地址
6
+ * - 支付:跳转至 NinePay 页面完成支付
7
+ */
8
+ export declare const NinePay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<NinePayProps & 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<NinePayRef> | undefined;
15
+ }>;
@@ -1,7 +1,6 @@
1
- import type { PayKKaError } from '../../core';
2
- import type { PayKKaCommonConfig, PaymentInfo } from '../../types';
3
- import type { FormValidateError } from '../internal/Form';
4
- export interface NinePayProps extends PayKKaCommonConfig {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ export interface NinePayProps extends PayKKaCommonConfig, PaymentCommonProps {
5
4
  /**
6
5
  * 是否展示邮箱
7
6
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -14,16 +13,6 @@ export interface NinePayProps 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 NinePayRef {
29
18
  /** 停止轮询支付结果 */
@@ -0,0 +1,15 @@
1
+ import './ovo.scss';
2
+ import type { OVOProps, OVORef } from './type';
3
+ /**
4
+ * OVO 印尼本地钱包
5
+ * - 表单:手机号(前缀固定 +62)、邮箱、姓名
6
+ * - 支付:跳转至 OVO 页面完成付款
7
+ */
8
+ export declare const OVO: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<OVOProps & 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<OVORef> | undefined;
15
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './OVO';
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, WalletRedirectProps } from '../type';
4
+ export interface OVOProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
5
+ /**
6
+ * 是否展示邮箱
7
+ * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
8
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
9
+ */
10
+ showEmail?: boolean;
11
+ /**
12
+ * 是否展示地址
13
+ * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
14
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
15
+ */
16
+ showAddress?: boolean;
17
+ }
18
+ export interface OVORef {
19
+ /** 停止轮询支付结果 */
20
+ stopRetry: () => void;
21
+ /** 开始轮询支付结果 */
22
+ startRetry: (timeout?: number) => void;
23
+ /** 更新表单邮箱 */
24
+ updateEmail: () => void;
25
+ /** 更新表单地址 */
26
+ updateAddress: () => void;
27
+ /** 不展示支付按钮时,可调用该方法进行支付 */
28
+ payment: () => void;
29
+ }
@@ -1,5 +1,10 @@
1
1
  import type { OpayWalletProps, OpayWalletRef } from './type';
2
2
  import './opay-wallet.scss';
3
+ /**
4
+ * OpayWallet 支付方式
5
+ * - 表单:邮箱,地址
6
+ * - 支付:跳转至 OpayWallet 页面完成支付
7
+ */
3
8
  export declare const OpayWallet: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<OpayWalletProps & import("../../../types").PayKKaCommonConfig & {
4
9
  session: import("../../../core").Session;
5
10
  core: import("../../../core").PayKKaCheckout;
@@ -1,8 +1,7 @@
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 {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { WalletCustomProps, WalletRedirectProps } from '../type';
3
+ import type { PaymentCommonProps } from '../../../types/payment';
4
+ export interface OpayWalletProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
6
5
  /**
7
6
  * 是否展示邮箱
8
7
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -15,16 +14,6 @@ export interface OpayWalletProps extends PayKKaCommonConfig, WalletRedirectProps
15
14
  * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
16
15
  */
17
16
  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
17
  }
29
18
  export interface OpayWalletRef {
30
19
  /** 停止轮询支付结果 */
@@ -0,0 +1,15 @@
1
+ import './p24.scss';
2
+ import type { P24Props, P24Ref } from './type';
3
+ /**
4
+ * P24 波兰支付方式
5
+ * - 表单:邮箱,姓名
6
+ * - 支付:跳转至银行页面完成支付
7
+ */
8
+ export declare const P24: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<P24Props & 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<P24Ref> | undefined;
15
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './P24';
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, WalletRedirectProps } from '../type';
4
+ export interface P24Props extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
5
+ /**
6
+ * 是否展示邮箱
7
+ * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
8
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
9
+ */
10
+ showEmail?: boolean;
11
+ /**
12
+ * 是否展示地址
13
+ * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
14
+ * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
15
+ */
16
+ showAddress?: boolean;
17
+ }
18
+ export interface P24Ref {
19
+ /** 停止轮询支付结果 */
20
+ stopRetry: () => void;
21
+ /** 开始轮询支付结果 */
22
+ startRetry: (timeout?: number) => void;
23
+ /** 更新表单地址 */
24
+ updateAddress: () => void;
25
+ /** 更新表单邮箱 */
26
+ updateEmail: () => void;
27
+ /** 不展示支付按钮时,可调用该方法进行支付 */
28
+ payment: () => void;
29
+ }
@@ -1,5 +1,10 @@
1
1
  import type { PagaWalletProps, PagaWalletRef } from './type';
2
2
  import './paga-wallet.scss';
3
+ /**
4
+ * PagaWallet 支付方式
5
+ * - 表单:邮箱,地址
6
+ * - 支付:跳转至 PagaWallet 页面完成支付
7
+ */
3
8
  export declare const PagaWallet: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<PagaWalletProps & import("../../../types").PayKKaCommonConfig & {
4
9
  session: import("../../../core").Session;
5
10
  core: import("../../../core").PayKKaCheckout;
@@ -1,8 +1,7 @@
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 {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ import type { WalletCustomProps, WalletRedirectProps } from '../type';
4
+ export interface PagaWalletProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
6
5
  /**
7
6
  * 是否展示邮箱
8
7
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -10,21 +9,11 @@ export interface PagaWalletProps extends PayKKaCommonConfig, WalletRedirectProps
10
9
  */
11
10
  showEmail?: boolean;
12
11
  /**
13
- * 是否展示邮箱
12
+ * 是否展示地址
14
13
  * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
15
14
  * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
16
15
  */
17
16
  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
17
  }
29
18
  export interface PagaWalletRef {
30
19
  /** 停止轮询支付结果 */
@@ -1,5 +1,10 @@
1
1
  import type { PaymayaProps, PaymayaRef } from './type';
2
2
  import './paymaya.scss';
3
+ /**
4
+ * Paymaya 支付方式
5
+ * - 表单:邮箱,地址
6
+ * - 支付:跳转至 Paymaya 页面完成支付
7
+ */
3
8
  export declare const Paymaya: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<PaymayaProps & 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 PaymayaProps extends PayKKaCommonConfig {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ export interface PaymayaProps extends PayKKaCommonConfig, PaymentCommonProps {
5
4
  /**
6
5
  * 是否展示邮箱
7
6
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -14,16 +13,6 @@ export interface PaymayaProps 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 PaymayaRef {
29
18
  /** 停止轮询支付结果 */
@@ -1,8 +1,7 @@
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 {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ import type { WalletRedirectProps, WalletCustomProps } from '../type';
4
+ export interface PicPayProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
6
5
  /**
7
6
  * 是否展示邮箱
8
7
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -10,21 +9,11 @@ export interface PicPayProps extends PayKKaCommonConfig, WalletRedirectProps {
10
9
  */
11
10
  showEmail?: boolean;
12
11
  /**
13
- * 是否展示邮箱
12
+ * 是否展示地址
14
13
  * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
15
14
  * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
16
15
  */
17
16
  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
17
  }
29
18
  export interface PicPayRef {
30
19
  /** 停止轮询支付结果 */
@@ -1,8 +1,7 @@
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 {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { WalletRedirectProps, WalletCustomProps } from '../type';
3
+ import type { PaymentCommonProps } from '../../../types/payment';
4
+ export interface PixProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
6
5
  /**
7
6
  * 是否展示邮箱
8
7
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -10,21 +9,11 @@ export interface PixProps extends PayKKaCommonConfig, WalletRedirectProps {
10
9
  */
11
10
  showEmail?: boolean;
12
11
  /**
13
- * 是否展示邮箱
12
+ * 是否展示地址
14
13
  * 若配置 true 但创建收银台时已经传了,还是展示,先不禁用。
15
14
  * 若配置 false 但创建收银台时未传,依旧会展示该输入框。
16
15
  */
17
16
  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
17
  }
29
18
  export interface PixRef {
30
19
  /** 停止轮询支付结果 */
@@ -1,10 +1,15 @@
1
1
  import type { ShopeePayProps } from './type';
2
2
  import type { ShopeePayRef } from './type';
3
3
  import './shopee-pay.scss';
4
- export declare const ShopeePay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<ShopeePayProps & import("../../types").PayKKaCommonConfig & {
5
- session: import("../../core").Session;
6
- core: import("../../core").PayKKaCheckout;
7
- threeDSFrame?: import("../../types").ThreeDSFrameConfig | undefined;
4
+ /**
5
+ * ShopeePay 支付方式
6
+ * - 表单:邮箱,地址
7
+ * - 支付:跳转至 ShopeePay 页面完成支付
8
+ */
9
+ export declare const ShopeePay: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<ShopeePayProps & 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<ShopeePayRef> | undefined;
@@ -1,7 +1,6 @@
1
- import type { PayKKaError } from '../../core';
2
- import type { PayKKaCommonConfig, PaymentInfo } from '../../types';
3
- import type { FormValidateError } from '../internal/Form';
4
- export interface ShopeePayProps extends PayKKaCommonConfig {
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { PaymentCommonProps } from '../../../types/payment';
3
+ export interface ShopeePayProps extends PayKKaCommonConfig, PaymentCommonProps {
5
4
  /**
6
5
  * 是否展示邮箱
7
6
  * 若配置 true 但创建收银台时已经传了,就展示禁用状态。
@@ -14,16 +13,6 @@ export interface ShopeePayProps 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 ShopeePayRef {
29
18
  /** 停止轮询支付结果 */
@@ -0,0 +1,15 @@
1
+ import './skrill.scss';
2
+ import type { SkrillProps, SkrillRef } from './type';
3
+ /**
4
+ * Skrill 支付方式
5
+ * - 表单:姓名,邮箱
6
+ * - 支付:跳转至银行页面完成支付
7
+ */
8
+ export declare const Skrill: import("preact").FunctionalComponent<import("preact/compat").PropsWithoutRef<SkrillProps & 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<SkrillRef> | undefined;
15
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './Skrill';
2
+ export * from './type';
@@ -0,0 +1,17 @@
1
+ import type { PayKKaCommonConfig } from '../../../types';
2
+ import type { WalletCustomProps, WalletRedirectProps } from '../type';
3
+ import type { PaymentCommonProps } from '../../../types/payment';
4
+ export interface SkrillProps extends PayKKaCommonConfig, WalletRedirectProps, WalletCustomProps, PaymentCommonProps {
5
+ }
6
+ export interface SkrillRef {
7
+ /** 停止轮询支付结果 */
8
+ stopRetry: () => void;
9
+ /** 开始轮询支付结果 */
10
+ startRetry: (timeout?: number) => void;
11
+ /** 更新表单地址 */
12
+ updateAddress: () => void;
13
+ /** 更新表单邮箱 */
14
+ updateEmail: () => void;
15
+ /** 不展示支付按钮时,可调用该方法进行支付 */
16
+ payment: () => void;
17
+ }