@paykka/card-checkout-ui 0.13.8 → 0.13.13

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 (175) hide show
  1. package/dist/card-checkout-ui.js +20 -20
  2. package/dist/card-checkout-ui.umd.cjs +21 -21
  3. package/dist/es/_commonjsHelpers.js +1 -82
  4. package/dist/es/api/index.js +2 -1
  5. package/dist/es/api/modules/checkout/map.js +1 -0
  6. package/dist/es/api/modules/get-browser-params.js +20 -8
  7. package/dist/es/api/modules/index.js +2 -1
  8. package/dist/es/api/modules/map.js +2 -1
  9. package/dist/es/api/modules/risk/index.js +21 -18
  10. package/dist/es/api/modules/threeDS/index.js +2 -1
  11. package/dist/es/api/modules/vietqr/index.js +2 -1
  12. package/dist/es/api/utils/index.js +4 -1
  13. package/dist/es/components/AccordionItem/AccordionItem.js +0 -1
  14. package/dist/es/components/AccountNameField/index.js +1 -1
  15. package/dist/es/components/AddressField/index.js +1 -2
  16. package/dist/es/components/AliPay/index.js +4 -2
  17. package/dist/es/components/ApplePay/index.js +201 -135
  18. package/dist/es/components/Boost/index.js +4 -2
  19. package/dist/es/components/CPFField/index.js +88 -0
  20. package/dist/es/components/Card/index.js +5 -11
  21. package/dist/es/components/CardBrands/index.js +0 -1
  22. package/dist/es/components/CardExpireDateField/index.js +1 -1
  23. package/dist/es/components/CardHolderNameField/index.js +1 -1
  24. package/dist/es/components/CardIBANField/index.js +1 -1
  25. package/dist/es/components/CardNo/index.js +0 -1
  26. package/dist/es/components/CardNumberField/index.js +1 -1
  27. package/dist/es/components/CardSecurityCodeField/index.js +1 -1
  28. package/dist/es/components/CardSelector/index.js +1 -1
  29. package/dist/es/components/CombinedCardInfo/index.js +1 -1
  30. package/dist/es/components/DropIn/index.js +0 -1
  31. package/dist/es/components/EmailField/EmailField.js +1 -1
  32. package/dist/es/components/EncryptedCard/index.js +12 -11
  33. package/dist/es/components/GooglePay/index.js +1 -0
  34. package/dist/es/components/GrabPay/index.js +4 -2
  35. package/dist/es/components/GuideCard/index.js +1 -1
  36. package/dist/es/components/LinePay/index.js +4 -2
  37. package/dist/es/components/MayBankQRPay/index.js +4 -2
  38. package/dist/es/components/NinePay/index.js +4 -2
  39. package/dist/es/components/RecurringTip/index.js +1 -2
  40. package/dist/es/components/SecuredFieldsProvider/index.js +20 -3
  41. package/dist/es/components/SecuredIframe/index.js +50 -22
  42. package/dist/es/components/Sepa/index.js +4 -2
  43. package/dist/es/components/ShopeePay/index.js +4 -2
  44. package/dist/es/components/SubmitButton/index.js +1 -1
  45. package/dist/es/components/TNGWallet/index.js +4 -2
  46. package/dist/es/components/ThreeDS/index.js +1 -2
  47. package/dist/es/components/Tip/index.js +18 -0
  48. package/dist/es/components/WechatPay/index.js +4 -2
  49. package/dist/es/components/business/QRCodeModal/QRCodeModal.js +1 -1
  50. package/dist/es/components/business/QRCodeModal/index.js +0 -1
  51. package/dist/es/components/business/index.js +0 -1
  52. package/dist/es/components/index.js +0 -1
  53. package/dist/es/components/internal/Accordion/index.js +0 -1
  54. package/dist/es/components/internal/Button/Button.js +0 -1
  55. package/dist/es/components/internal/Button/index.js +0 -1
  56. package/dist/es/components/internal/CheckBox/CheckBox.js +0 -1
  57. package/dist/es/components/internal/CheckBox/index.js +0 -1
  58. package/dist/es/components/internal/Form/type.js +0 -1
  59. package/dist/es/components/internal/Info/Info.js +0 -1
  60. package/dist/es/components/internal/Info/index.js +0 -1
  61. package/dist/es/components/internal/Input/Input.js +1 -1
  62. package/dist/es/components/internal/Input/type.js +0 -1
  63. package/dist/es/components/internal/LoadingCheck/LoadingCheck.js +0 -1
  64. package/dist/es/components/internal/LoadingCheck/index.js +0 -1
  65. package/dist/es/components/internal/Modal/Modal.js +1 -1
  66. package/dist/es/components/internal/QRCode/QRCode.js +0 -1
  67. package/dist/es/components/internal/QRCode/index.js +0 -1
  68. package/dist/es/components/internal/Select/Select.js +14 -17
  69. package/dist/es/components/internal/Select/SelectMenu.js +2 -3
  70. package/dist/es/components/internal/Select/SelectMenuItem.js +0 -1
  71. package/dist/es/components/wallets/GCash/GCash.js +4 -2
  72. package/dist/es/components/wallets/OpayWallet/OpayWallet.js +8 -9
  73. package/dist/es/components/wallets/PagaWallet/PagaWallet.js +8 -9
  74. package/dist/es/components/wallets/Paymaya/Paymaya.js +4 -2
  75. package/dist/es/components/wallets/PicPay/PicPay.js +136 -72
  76. package/dist/es/components/wallets/Pix/Pix.js +136 -72
  77. package/dist/es/components/wallets/Vietqr/Vietqr.js +4 -2
  78. package/dist/es/components/wallets/Zalopay/Zalopay.js +4 -2
  79. package/dist/es/config.js +1 -1
  80. package/dist/es/constant.js +2 -0
  81. package/dist/es/core/checkout.js +15 -3
  82. package/dist/es/core/environment.js +10 -2
  83. package/dist/es/core/index.js +0 -1
  84. package/dist/es/core/query.js +2 -1
  85. package/dist/es/core/session.js +6 -2
  86. package/dist/es/core/theme.js +0 -1
  87. package/dist/es/core.js +585 -4
  88. package/dist/es/hooks/index.js +0 -1
  89. package/dist/es/hooks/useI18n.js +0 -1
  90. package/dist/es/hooks/usePayState.js +13 -6
  91. package/dist/es/i18n/locales/de-DE.js +6 -1
  92. package/dist/es/i18n/locales/en-GB.js +6 -1
  93. package/dist/es/i18n/locales/es-ES.js +6 -1
  94. package/dist/es/i18n/locales/fr-FR.js +7 -2
  95. package/dist/es/i18n/locales/ja-JP.js +6 -1
  96. package/dist/es/i18n/locales/ko-KR.js +6 -1
  97. package/dist/es/i18n/locales/nl-NL.js +6 -1
  98. package/dist/es/i18n/locales/pt-PT.js +6 -1
  99. package/dist/es/i18n/locales/ru-RU.js +6 -1
  100. package/dist/es/i18n/locales/zh-CN.js +6 -1
  101. package/dist/es/i18n/locales/zh-HK.js +7 -2
  102. package/dist/es/i18n/locales/zh-TW.js +7 -2
  103. package/dist/es/index.js +6 -3
  104. package/dist/es/out/base-fraud-detection.js +134 -0
  105. package/dist/es/out/config.js +16 -0
  106. package/dist/es/out/fraud-detection.js +118 -27
  107. package/dist/es/out/paykka-detection.js +63 -0
  108. package/dist/es/out/stripe-radar.js +25 -51
  109. package/dist/es/out/worldpay-ddc.js +52 -99
  110. package/dist/es/out/worldpay-jsc-origin.js +0 -1
  111. package/dist/es/out/worldpay-jsc.js +21 -43
  112. package/dist/es/style.css +1 -1
  113. package/dist/es/types/event.js +33 -13
  114. package/dist/es/types/index.js +14 -0
  115. package/dist/es/utils/cpf.js +48 -0
  116. package/dist/es/utils/encrypt.js +18 -0
  117. package/dist/es/utils/iframe.js +1 -1
  118. package/dist/es/utils/location.js +4 -2
  119. package/dist/es/utils/redirect.js +8 -5
  120. package/dist/es/utils/system-info/index.js +1 -3
  121. package/dist/style.css +1 -1
  122. package/dist/types/api/modules/checkout/type.d.ts +2 -0
  123. package/dist/types/api/modules/get-browser-params.d.ts +25 -1
  124. package/dist/types/api/modules/risk/index.d.ts +28 -12
  125. package/dist/types/api/modules/type.d.ts +5 -0
  126. package/dist/types/api/utils/index.d.ts +3 -0
  127. package/dist/types/components/ApplePay/config.d.ts +9 -0
  128. package/dist/types/components/ApplePay/hooks/useApplePay.d.ts +15 -0
  129. package/dist/types/components/ApplePay/type.d.ts +53 -10
  130. package/dist/types/components/ApplePay/utils.d.ts +8 -2
  131. package/dist/types/components/CPFField/CPFField.d.ts +4 -0
  132. package/dist/types/components/CPFField/index.d.ts +2 -0
  133. package/dist/types/components/CPFField/type.d.ts +21 -0
  134. package/dist/types/components/SecuredFieldsProvider/type.d.ts +8 -3
  135. package/dist/types/components/SecuredIframe/useSecuredInput.d.ts +2 -5
  136. package/dist/types/components/ThreeDS/components/ThreeDSIframe/ThreeDSIframe.d.ts +6 -0
  137. package/dist/types/components/Tip/Tip.d.ts +3 -0
  138. package/dist/types/components/Tip/index.d.ts +2 -0
  139. package/dist/types/components/Tip/type.d.ts +12 -0
  140. package/dist/types/constant.d.ts +3 -1
  141. package/dist/types/core/checkout.d.ts +1 -1
  142. package/dist/types/core/environment.d.ts +12 -0
  143. package/dist/types/core/session.d.ts +1 -0
  144. package/dist/types/i18n/locales/de-DE.d.ts +4 -0
  145. package/dist/types/i18n/locales/en-GB.d.ts +4 -0
  146. package/dist/types/i18n/locales/es-ES.d.ts +4 -0
  147. package/dist/types/i18n/locales/fr-FR.d.ts +4 -0
  148. package/dist/types/i18n/locales/ja-JP.d.ts +4 -0
  149. package/dist/types/i18n/locales/ko-KR.d.ts +4 -0
  150. package/dist/types/i18n/locales/nl-NL.d.ts +4 -0
  151. package/dist/types/i18n/locales/pt-PT.d.ts +4 -0
  152. package/dist/types/i18n/locales/ru-RU.d.ts +4 -0
  153. package/dist/types/i18n/locales/zh-CN.d.ts +4 -0
  154. package/dist/types/i18n/locales/zh-HK.d.ts +4 -0
  155. package/dist/types/i18n/locales/zh-TW.d.ts +4 -0
  156. package/dist/types/out/base-fraud-detection.d.ts +53 -0
  157. package/dist/types/out/config.d.ts +11 -0
  158. package/dist/types/out/fraud-detection.d.ts +14 -3
  159. package/dist/types/out/paykka-detection.d.ts +20 -0
  160. package/dist/types/out/stripe-radar.d.ts +7 -9
  161. package/dist/types/out/types.d.ts +8 -2
  162. package/dist/types/out/worldpay-ddc.d.ts +7 -19
  163. package/dist/types/out/worldpay-jsc.d.ts +8 -18
  164. package/dist/types/types/event.d.ts +86 -39
  165. package/dist/types/types/fraud-detection.d.ts +1 -1
  166. package/dist/types/types/index.d.ts +22 -2
  167. package/dist/types/types/message.d.ts +12 -12
  168. package/dist/types/utils/app-payment.d.ts +2 -0
  169. package/dist/types/utils/cpf.d.ts +32 -0
  170. package/dist/types/utils/encrypt.d.ts +9 -0
  171. package/dist/types/utils/location.d.ts +1 -0
  172. package/dist/types/utils/system-info/index.d.ts +0 -1
  173. package/package.json +5 -4
  174. package/dist/types/components/ThreeDS/components/ThreeDSStatus/ThreeDSStatus.d.ts +0 -3
  175. package/dist/types/components/ThreeDS/components/ThreeDSStatus/type.d.ts +0 -6
@@ -1,82 +1 @@
1
- const name = "@paykka/card-checkout-ui";
2
- const version = "0.13.8";
3
- const type = "module";
4
- const main = "dist/paykka-card-checkout-ui.umd.js";
5
- const module = "dist/es/index.js";
6
- const typings = "dist/types/index.d.ts";
7
- const exports = {
8
- ".": {
9
- "import": "./dist/es/index.js",
10
- require: "./dist/paykka-card-checkout-ui.umd.js",
11
- types: "./dist/types/index.d.ts"
12
- },
13
- "./*": "./dist/*"
14
- };
15
- const files = [
16
- "dist"
17
- ];
18
- const scripts = {
19
- dev: "vite --host",
20
- build: "pnpm type-check && pnpm build:npm && pnpm build:inner && pnpm copy-dist-to-cdn && pnpm build:outer",
21
- "build:npm": "tsx ./build/run.ts",
22
- "build:inner": "tsx ./build/runInner.ts",
23
- "build:outer": "tsx ./build/runOuter.ts",
24
- "build:type": "tsc -p ./tsconfig.build.json",
25
- "copy-dist-to-cdn": "tsx ./build/copyDist2CDN.ts",
26
- changeset: "changeset",
27
- "changeset:pre": "changeset pre enter beta",
28
- "changeset:pre-exit": "changeset pre exit",
29
- "changeset:version": "changeset version",
30
- "changeset:release": "changeset publish",
31
- "changeset:prelease": "changeset publish --tag beta",
32
- "release:prod": "pnpm build && pnpm changeset:release",
33
- "release:noprod": "pnpm build && pnpm changeset:pre-exit && pnpm changeset:prelease",
34
- "type-check": "tsc --noEmit -p tsconfig.json --composite false",
35
- "release:npm": "node scripts/release-npm.cjs"
36
- };
37
- const publishConfig = {
38
- registry: "https://packages.aliyun.com/640edee5a84870ae9d591e48/npm/npm-registry/"
39
- };
40
- const dependencies = {
41
- "@ctrl/tinycolor": "^4.0.3",
42
- "@fingerprintjs/fingerprintjs": "^4.2.2",
43
- "@preact/signals": "^1.3.0",
44
- "@types/applepayjs": "^14.0.9",
45
- "@types/googlepay": "^0.7.7",
46
- "@types/qrcode": "^1.5.5",
47
- preact: "^10.24.3",
48
- qrcode: "^1.5.4",
49
- "ts-toolbelt": "^9.6.0",
50
- unfetch: "^5.0.0",
51
- "vue-tsc": "^2.1.10"
52
- };
53
- const devDependencies = {
54
- "@changesets/cli": "^2.27.1",
55
- "@preact/preset-vite": "^2.9.1",
56
- "@types/node": "^20.12.7",
57
- autoprefixer: "^10.4.18",
58
- execa: "^8.0.1",
59
- "fast-glob": "^3.3.2",
60
- sass: "^1.71.1",
61
- terser: "^5.42.0",
62
- tsx: "^4.7.3",
63
- typescript: "^5.4.5",
64
- vite: "^5.2.10"
65
- };
66
- const packageJson = {
67
- name,
68
- version,
69
- type,
70
- main,
71
- module,
72
- typings,
73
- exports,
74
- files,
75
- scripts,
76
- publishConfig,
77
- dependencies,
78
- devDependencies
79
- };
80
- export {
81
- packageJson
82
- };
1
+
@@ -1,4 +1,5 @@
1
- import "./http.js";
2
1
  import "../utils/card-brand/brands.js";
3
2
  import "../utils/system-info/get-browser-info.js";
4
3
  import "../core.js";
4
+ import "../core/context.js";
5
+ import "../out/worldpay-jsc-origin.js";
@@ -67,6 +67,7 @@ const checkoutMap = (res = {}) => {
67
67
  country: res.country,
68
68
  merchantId: res.merchant_id,
69
69
  sessionId: res.session_id,
70
+ clientKey: res.client_key,
70
71
  status: res.status,
71
72
  transAmount: amountMap(res.trans_amount),
72
73
  expireTime: res.expire_time,
@@ -1,13 +1,11 @@
1
1
  import "../../utils/card-brand/brands.js";
2
2
  import { getBrowser } from "../../utils/system-info/index.js";
3
- import { packageJson } from "../../_commonjsHelpers.js";
3
+ import { getFingerprint } from "../../utils/system-info/finger-print.js";
4
4
  import { isUaWebview } from "../../utils/system-info/is-ua-webview.js";
5
- const getBrowserParams = async (params = {}) => {
6
- const { fraudDetectionId } = params;
7
- const browser = await getBrowser();
5
+ const getTerminalType = (deviceType) => {
8
6
  let terminalType = "WEB";
9
7
  const userAgent = window.navigator.userAgent.toLowerCase();
10
- if (browser.deviceType === "MOBILE") {
8
+ if (deviceType === "MOBILE") {
11
9
  if (userAgent.includes("miniprogram")) {
12
10
  terminalType = "MINI_APP";
13
11
  } else if (userAgent.includes("micromessenger") || userAgent.includes("alipay")) {
@@ -18,7 +16,16 @@ const getBrowserParams = async (params = {}) => {
18
16
  terminalType = "WAP";
19
17
  }
20
18
  }
19
+ return terminalType;
20
+ };
21
+ const getBaseBrowserParams = async (params = {}) => {
22
+ var _a, _b;
23
+ const { fraudDetectionId, origin } = params;
24
+ const browser = await getBrowser();
25
+ const terminalType = getTerminalType(browser.deviceType);
21
26
  return {
27
+ origin: btoa(origin || window.location.origin),
28
+ referer: btoa(document.referrer || ((_b = (_a = window.frames) == null ? void 0 : _a.top) == null ? void 0 : _b.document.referrer) || ""),
22
29
  user_agent: browser.userAgent,
23
30
  color_depth: browser.colorDepth,
24
31
  language: browser.language,
@@ -29,11 +36,16 @@ const getBrowserParams = async (params = {}) => {
29
36
  screen_width: browser.screenWidth,
30
37
  cookies: browser.cookies,
31
38
  device_os: browser.osName,
32
- device_finger_print_id: browser.deviceFingerprintId,
33
39
  terminal_type: terminalType,
34
40
  fraud_detection_id: fraudDetectionId,
35
- // 当前组件库版本
36
- app_version: packageJson.version
41
+ // 当前组件库版本(构建时由 define 注入)
42
+ app_version: "0.13.13"
43
+ };
44
+ };
45
+ const getBrowserParams = async (params = {}) => {
46
+ return {
47
+ ...await getBaseBrowserParams(params),
48
+ device_finger_print_id: await getFingerprint()
37
49
  };
38
50
  };
39
51
  export {
@@ -1,4 +1,5 @@
1
1
  import "../../utils/card-brand/brands.js";
2
2
  import "../../utils/system-info/get-browser-info.js";
3
3
  import "../../core.js";
4
- import "../http.js";
4
+ import "../../core/context.js";
5
+ import "../../out/worldpay-jsc-origin.js";
@@ -22,7 +22,8 @@ const payResMap = (res) => {
22
22
  finishTime: res.utc_finish_time,
23
23
  payInfo: {
24
24
  threeDSUrl: (_a = res.authentication_result) == null ? void 0 : _a.authentication_url,
25
- paymentUrl: payInfo.payment_url,
25
+ targetUrl: payInfo.payment_url || payInfo.request_url,
26
+ requestMethod: payInfo.request_method,
26
27
  paymentExpiredAt: res == null ? void 0 : res.payment_expire_time,
27
28
  ...payInfo
28
29
  },
@@ -1,35 +1,38 @@
1
- import { apiPrefix } from "../../../config.js";
2
1
  import { http } from "../../http.js";
3
- const getRiskAuthorization = async (params, options) => {
4
- return http.post(`${apiPrefix}/fraud-detection/component/authorization`, params, options).then((res) => {
5
- return {
6
- authCode: res.auth_code,
7
- channel: res.channel,
8
- expireTime: res.expire_time
9
- };
10
- });
11
- };
12
- const getChannelConfig = async (channel, options) => {
2
+ const getChannelSDKConfig = async (params, options) => {
3
+ const { channel, browser } = params;
13
4
  return http.post(
14
5
  "/pub/channel/sdk/config",
15
6
  {
7
+ browser,
16
8
  channel_code_list: [
17
- {
18
- channel_code: channel
19
- }
9
+ ...channel.map((item) => ({
10
+ channel_code: item
11
+ }))
20
12
  ]
21
13
  },
22
14
  options
23
15
  ).then((res) => {
24
- var _a;
16
+ const { stripe, world_pay: worldPay } = res || {};
25
17
  return {
26
18
  stripe: {
27
- key: ((_a = res == null ? void 0 : res.stripe) == null ? void 0 : _a.public_key) || ""
19
+ key: (stripe == null ? void 0 : stripe.public_key) || ""
20
+ },
21
+ worldPay: {
22
+ authCode: (worldPay == null ? void 0 : worldPay.auth_code) || "",
23
+ ddcCollectUrl: (worldPay == null ? void 0 : worldPay.channel_collect_url) || ""
28
24
  }
29
25
  };
30
26
  });
31
27
  };
28
+ const reportUrls = async (params) => {
29
+ return http.post("/pub/fraud-detection/report/urls", {
30
+ client_key: params.clientKey,
31
+ fraud_detection_mode: params.fraudDetectionMode,
32
+ data: params.data
33
+ });
34
+ };
32
35
  export {
33
- getChannelConfig,
34
- getRiskAuthorization
36
+ getChannelSDKConfig,
37
+ reportUrls
35
38
  };
@@ -1,4 +1,5 @@
1
1
  import "../../../utils/card-brand/brands.js";
2
2
  import "../../../utils/system-info/get-browser-info.js";
3
3
  import "../../../core.js";
4
- import "../../http.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,4 +1,5 @@
1
1
  import "../../../utils/card-brand/brands.js";
2
2
  import "../../../utils/system-info/get-browser-info.js";
3
3
  import "../../../core.js";
4
- import "../../http.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -2,7 +2,7 @@ import "../../utils/card-brand/brands.js";
2
2
  import "../../utils/system-info/get-browser-info.js";
3
3
  import { deepMerge } from "../../utils/object.js";
4
4
  const buildPaymentParams = (params, extraParams = {}) => {
5
- const { bill, payment } = params;
5
+ const { bill, payment, customer } = params;
6
6
  const mergedParams = deepMerge(
7
7
  {
8
8
  bill: {
@@ -40,6 +40,9 @@ const buildPaymentParams = (params, extraParams = {}) => {
40
40
  cvv: payment.cvv,
41
41
  holder_name: payment.holderName
42
42
  },
43
+ customer: {
44
+ document: customer == null ? void 0 : customer.document
45
+ },
43
46
  browser: params.browser
44
47
  };
45
48
  };
@@ -5,7 +5,6 @@ import "../../core/context.js";
5
5
  import "../../utils/card-brand/brands.js";
6
6
  import "../../utils/system-info/get-browser-info.js";
7
7
  import { normalizedClass } from "../../utils/format.js";
8
- import "../../api/http.js";
9
8
  import "../../out/worldpay-jsc-origin.js";
10
9
  import { AccordionContext } from "../internal/Accordion/type.js";
11
10
  import { accordionTransition } from "../internal/Accordion/accordionTransition.js";
@@ -2,7 +2,7 @@ import { u } from "../../core.js";
2
2
  import "../../utils/card-brand/brands.js";
3
3
  import "../../utils/system-info/get-browser-info.js";
4
4
  import { useI18n } from "../../hooks/useI18n.js";
5
- import "../../api/http.js";
5
+ import "../../core/context.js";
6
6
  import "../../out/worldpay-jsc-origin.js";
7
7
  import "../internal/Form/type.js";
8
8
  import "../internal/Form/context.js";
@@ -6,7 +6,7 @@ import "../../utils/card-brand/brands.js";
6
6
  import "../../utils/system-info/get-browser-info.js";
7
7
  import { useBEM } from "../../hooks/useBEM.js";
8
8
  import { useI18n } from "../../hooks/useI18n.js";
9
- import "../../api/http.js";
9
+ import { CoreContext } from "../../core/context.js";
10
10
  import "../../out/worldpay-jsc-origin.js";
11
11
  import "../internal/Form/type.js";
12
12
  import "../internal/Form/context.js";
@@ -15,7 +15,6 @@ import "../internal/Form/Form.js";
15
15
  import { Input } from "../internal/Input/Input.js";
16
16
  import "../internal/Input/type.js";
17
17
  import { Select } from "../internal/Select/Select.js";
18
- import { CoreContext } from "../../core/context.js";
19
18
  const { bem } = useBEM("address-field");
20
19
  const defaultAddress = {
21
20
  country: void 0,
@@ -28,7 +28,7 @@ const AliPay = w((props, ref) => {
28
28
  const { session, core, showEmail = false, showAddress = false } = props;
29
29
  const addressCore = core.getAddressCore();
30
30
  const emailState = createEmailCore();
31
- const { setErrorMsg, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
31
+ const { setErrorMsg, fraudDetection, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
32
32
  const [submitButtonStatus, setSubmitButtonStatus] = h("unSubmit");
33
33
  const formRef = A(null);
34
34
  const [form, setForm] = h({
@@ -159,7 +159,9 @@ const AliPay = w((props, ref) => {
159
159
  payment: {
160
160
  paymentMethod: PaymentMethod.ALI_PAY
161
161
  },
162
- browser: await getBrowserParams()
162
+ browser: await getBrowserParams({
163
+ fraudDetectionId: await (fraudDetection == null ? void 0 : fraudDetection.getFraudDetectionId())
164
+ })
163
165
  };
164
166
  };
165
167
  async function pay(search = false, timeout) {