@paykka/card-checkout-ui 0.13.17 → 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 (180) hide show
  1. package/dist/card-checkout-ui.js +53 -25
  2. package/dist/card-checkout-ui.umd.cjs +53 -25
  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/zalopay/index.js +5 -16
  17. package/dist/es/components/AccordionItem/AccordionItem.js +0 -2
  18. package/dist/es/components/AddressField/index.js +13 -3
  19. package/dist/es/components/AliPay/index.js +64 -62
  20. package/dist/es/components/ApplePay/index.js +42 -39
  21. package/dist/es/components/CPFField/index.js +2 -1
  22. package/dist/es/components/Card/index.js +160 -133
  23. package/dist/es/components/CardExpireDateField/index.js +2 -1
  24. package/dist/es/components/CardNo/index.js +2 -2
  25. package/dist/es/components/CardNumberField/index.js +2 -1
  26. package/dist/es/components/CardSecurityCodeField/index.js +2 -1
  27. package/dist/es/components/CardSelector/index.js +3 -2
  28. package/dist/es/components/DropIn/index.js +24 -21
  29. package/dist/es/components/GooglePay/index.js +97 -88
  30. package/dist/es/components/PaymentButton/index.js +1 -1
  31. package/dist/es/components/SecuredFieldsProvider/index.js +31 -9
  32. package/dist/es/components/SecuredIframe/index.js +40 -23
  33. package/dist/es/components/SubmitButton/index.js +1 -1
  34. package/dist/es/components/ThreeDS/index.js +29 -12
  35. package/dist/es/components/WechatPay/index.js +70 -69
  36. package/dist/es/components/business/PhoneField/PhoneField.js +1 -0
  37. package/dist/es/components/index.js +7 -7
  38. package/dist/es/components/internal/CheckBox/CheckBox.js +2 -2
  39. package/dist/es/components/internal/Input/Input.js +1 -1
  40. package/dist/es/components/internal/Select/Select.js +4 -1
  41. package/dist/es/components/internal/icons/IconArrowDown.js +4 -4
  42. package/dist/es/components/internal/icons/IconBancontact.js +69 -14
  43. package/dist/es/components/internal/icons/IconBlik.js +541 -21
  44. package/dist/es/components/internal/icons/IconIdeal.js +61 -29
  45. package/dist/es/components/internal/icons/IconSkrill.js +14 -7
  46. package/dist/es/components/internal/icons/IconTrustly.js +11 -44
  47. package/dist/es/components/wallets/Bancontact/Bancontact.js +11 -8
  48. package/dist/es/components/wallets/Blik/Blik.js +12 -9
  49. package/dist/es/components/wallets/Boost/Boost.js +183 -0
  50. package/dist/es/components/wallets/Boost/boost2.js +1 -0
  51. package/dist/es/components/wallets/Boost/index.js +1 -0
  52. package/dist/es/components/wallets/Boost/type.js +1 -0
  53. package/dist/es/components/wallets/GCash/GCash.js +62 -252
  54. package/dist/es/components/wallets/GrabPay/GrabPay.js +183 -0
  55. package/dist/es/components/wallets/GrabPay/grab-pay.js +1 -0
  56. package/dist/es/components/wallets/GrabPay/index.js +1 -0
  57. package/dist/es/components/wallets/GrabPay/type.js +1 -0
  58. package/dist/es/components/wallets/IDeal/IDeal.js +11 -8
  59. package/dist/es/components/wallets/LinePay/LinePay.js +183 -0
  60. package/dist/es/components/wallets/LinePay/index.js +1 -0
  61. package/dist/es/components/wallets/LinePay/line-pay.js +1 -0
  62. package/dist/es/components/wallets/LinePay/type.js +1 -0
  63. package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +187 -0
  64. package/dist/es/components/wallets/MayBankQRPay/index.js +1 -0
  65. package/dist/es/components/wallets/MayBankQRPay/may-bank-qr-pay.js +1 -0
  66. package/dist/es/components/wallets/MayBankQRPay/type.js +1 -0
  67. package/dist/es/components/wallets/NinePay/NinePay.js +185 -0
  68. package/dist/es/components/wallets/NinePay/index.js +1 -0
  69. package/dist/es/components/wallets/NinePay/nine-pay.js +1 -0
  70. package/dist/es/components/wallets/NinePay/type.js +1 -0
  71. package/dist/es/components/wallets/OVO/OVO.js +7 -5
  72. package/dist/es/components/wallets/OpayWallet/OpayWallet.js +56 -218
  73. package/dist/es/components/wallets/P24/P24.js +11 -8
  74. package/dist/es/components/wallets/PagaWallet/PagaWallet.js +56 -218
  75. package/dist/es/components/wallets/Paymaya/Paymaya.js +56 -221
  76. package/dist/es/components/wallets/PicPay/PicPay.js +50 -47
  77. package/dist/es/components/wallets/Pix/Pix.js +44 -48
  78. package/dist/es/components/wallets/ShopeePay/ShopeePay.js +185 -0
  79. package/dist/es/components/wallets/ShopeePay/index.js +1 -0
  80. package/dist/es/components/wallets/ShopeePay/shopee-pay.js +1 -0
  81. package/dist/es/components/wallets/ShopeePay/type.js +1 -0
  82. package/dist/es/components/wallets/Skrill/Skrill.js +28 -26
  83. package/dist/es/components/wallets/TNGWallet/TNGWallet.js +185 -0
  84. package/dist/es/components/wallets/TNGWallet/index.js +1 -0
  85. package/dist/es/components/wallets/TNGWallet/tng-wallet.js +1 -0
  86. package/dist/es/components/wallets/TNGWallet/type.js +1 -0
  87. package/dist/es/components/wallets/Trustly/Trustly.js +15 -15
  88. package/dist/es/components/wallets/Vietqr/Vietqr.js +60 -248
  89. package/dist/es/components/wallets/Zalopay/Zalopay.js +61 -249
  90. package/dist/es/components/wallets/index.js +7 -0
  91. package/dist/es/core/checkout.js +19 -45
  92. package/dist/es/core/logger.js +1 -1
  93. package/dist/es/core/payment.js +65 -0
  94. package/dist/es/hooks/useBaseWallet.js +20 -18
  95. package/dist/es/hooks/usePayState.js +37 -25
  96. package/dist/es/hooks/usePayment.js +1 -14
  97. package/dist/es/hooks/useRetry.js +50 -26
  98. package/dist/es/index.js +7 -7
  99. package/dist/es/out/base-fraud-detection.js +4 -1
  100. package/dist/es/out/fraud-detection.js +12 -13
  101. package/dist/es/out/worldpay-ddc-manager.js +7 -14
  102. package/dist/es/out/worldpay-ddc.js +7 -5
  103. package/dist/es/style.css +1 -1
  104. package/dist/es/types/event.js +1 -0
  105. package/dist/es/types/message.js +2 -0
  106. package/dist/es/utils/payment.js +12 -12
  107. package/dist/es/utils/system-info/is-ua-webview.js +1 -20
  108. package/dist/style.css +1 -1
  109. package/dist/types/api/modules/threeDS/index.d.ts +7 -0
  110. package/dist/types/components/AddressField/type.d.ts +2 -2
  111. package/dist/types/components/CPFField/type.d.ts +1 -1
  112. package/dist/types/components/CardExpireDateField/type.d.ts +1 -1
  113. package/dist/types/components/CardNo/type.d.ts +3 -2
  114. package/dist/types/components/CardNumberField/type.d.ts +1 -1
  115. package/dist/types/components/CardSecurityCodeField/type.d.ts +1 -1
  116. package/dist/types/components/CardSelector/type.d.ts +4 -4
  117. package/dist/types/components/GooglePay/createGooglePay.d.ts +1 -1
  118. package/dist/types/components/GooglePay/type.d.ts +6 -0
  119. package/dist/types/components/SecuredFieldsProvider/type.d.ts +2 -0
  120. package/dist/types/components/ThreeDS/components/ThreeDSIframe/ThreeDSIframe.d.ts +0 -6
  121. package/dist/types/components/index.d.ts +0 -7
  122. package/dist/types/components/internal/CheckBox/type.d.ts +2 -1
  123. package/dist/types/components/internal/Select/type.d.ts +1 -1
  124. package/dist/types/components/internal/icons/IconArrowDown.d.ts +1 -1
  125. package/dist/types/components/{Boost → wallets/Boost}/Boost.d.ts +9 -4
  126. package/dist/types/components/{Boost → wallets/Boost}/type.d.ts +2 -2
  127. package/dist/types/components/wallets/GCash/GCash.d.ts +5 -0
  128. package/dist/types/components/{GrabPay → wallets/GrabPay}/GrabPay.d.ts +4 -4
  129. package/dist/types/components/wallets/GrabPay/type.d.ts +17 -0
  130. package/dist/types/components/{LinePay → wallets/LinePay}/LinePay.d.ts +9 -4
  131. package/dist/types/components/{LinePay → wallets/LinePay}/type.d.ts +2 -2
  132. package/dist/types/components/wallets/MayBankQRPay/MayBankQRPay.d.ts +15 -0
  133. package/dist/types/components/{MayBankQRPay → wallets/MayBankQRPay}/type.d.ts +2 -2
  134. package/dist/types/components/wallets/NinePay/NinePay.d.ts +15 -0
  135. package/dist/types/components/{NinePay → wallets/NinePay}/type.d.ts +2 -2
  136. package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +5 -0
  137. package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +5 -0
  138. package/dist/types/components/wallets/Paymaya/Paymaya.d.ts +5 -0
  139. package/dist/types/components/{ShopeePay → wallets/ShopeePay}/ShopeePay.d.ts +9 -4
  140. package/dist/types/components/{ShopeePay → wallets/ShopeePay}/type.d.ts +2 -2
  141. package/dist/types/components/wallets/Skrill/type.d.ts +0 -12
  142. package/dist/types/components/{TNGWallet → wallets/TNGWallet}/TNGWallet.d.ts +9 -4
  143. package/dist/types/components/{TNGWallet → wallets/TNGWallet}/type.d.ts +2 -2
  144. package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +5 -0
  145. package/dist/types/components/wallets/Zalopay/Zalopay.d.ts +5 -0
  146. package/dist/types/components/wallets/index.d.ts +7 -0
  147. package/dist/types/core/checkout.d.ts +2 -9
  148. package/dist/types/core/payment.d.ts +21 -0
  149. package/dist/types/hooks/useBaseWallet.d.ts +2 -2
  150. package/dist/types/hooks/usePayState.d.ts +3 -1
  151. package/dist/types/hooks/useRetry.console-tests.d.ts +41 -0
  152. package/dist/types/hooks/useRetry.d.ts +22 -3
  153. package/dist/types/out/base-fraud-detection.d.ts +1 -0
  154. package/dist/types/out/config.d.ts +1 -1
  155. package/dist/types/out/fraud-detection.d.ts +2 -8
  156. package/dist/types/out/types.d.ts +3 -1
  157. package/dist/types/out/worldpay-ddc-manager.d.ts +6 -7
  158. package/dist/types/types/event.d.ts +6 -1
  159. package/dist/types/types/message.d.ts +24 -3
  160. package/dist/types/types/payment.d.ts +4 -0
  161. package/dist/types/utils/iframe.d.ts +1 -1
  162. package/dist/types/utils/payment.d.ts +10 -10
  163. package/package.json +9 -5
  164. package/dist/es/components/Boost/index.js +0 -349
  165. package/dist/es/components/GrabPay/index.js +0 -349
  166. package/dist/es/components/LinePay/index.js +0 -349
  167. package/dist/es/components/MayBankQRPay/index.js +0 -355
  168. package/dist/es/components/NinePay/index.js +0 -349
  169. package/dist/es/components/ShopeePay/index.js +0 -349
  170. package/dist/es/components/TNGWallet/index.js +0 -349
  171. package/dist/types/components/GrabPay/type.d.ts +0 -28
  172. package/dist/types/components/MayBankQRPay/MayBankQRPay.d.ts +0 -10
  173. package/dist/types/components/NinePay/NinePay.d.ts +0 -10
  174. /package/dist/types/components/{Boost → wallets/Boost}/index.d.ts +0 -0
  175. /package/dist/types/components/{GrabPay → wallets/GrabPay}/index.d.ts +0 -0
  176. /package/dist/types/components/{LinePay → wallets/LinePay}/index.d.ts +0 -0
  177. /package/dist/types/components/{MayBankQRPay → wallets/MayBankQRPay}/index.d.ts +0 -0
  178. /package/dist/types/components/{NinePay → wallets/NinePay}/index.d.ts +0 -0
  179. /package/dist/types/components/{ShopeePay → wallets/ShopeePay}/index.d.ts +0 -0
  180. /package/dist/types/components/{TNGWallet → wallets/TNGWallet}/index.d.ts +0 -0
@@ -1,16 +1,5 @@
1
- import { http } from "../../http.js";
2
- import { payResMap } from "../map.js";
3
- import { apiPrefix } from "../../../config.js";
4
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
5
- const boostPay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getBoostPayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- boostPay,
15
- getBoostPayInfo
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { http } from "../../http.js";
3
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
4
- import { payResMap } from "../map.js";
5
- const gcashPay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getGcashPayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- gcashPay,
15
- getGcashPayInfo
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,7 +1,6 @@
1
1
  import "../../utils/card-brand/brands.js";
2
2
  import { getBrowser } from "../../utils/system-info/index.js";
3
3
  import { getFingerprint } from "../../utils/system-info/finger-print.js";
4
- import { isUaWebview } from "../../utils/system-info/is-ua-webview.js";
5
4
  const getTerminalType = (deviceType) => {
6
5
  let terminalType = "WEB";
7
6
  const userAgent = window.navigator.userAgent.toLowerCase();
@@ -10,8 +9,6 @@ const getTerminalType = (deviceType) => {
10
9
  terminalType = "MINI_APP";
11
10
  } else if (userAgent.includes("micromessenger") || userAgent.includes("alipay")) {
12
11
  terminalType = "IN_APP_WAP";
13
- } else if (isUaWebview(userAgent)) {
14
- terminalType = "APP";
15
12
  } else {
16
13
  terminalType = "WAP";
17
14
  }
@@ -39,7 +36,7 @@ const getBaseBrowserParams = async (params = {}) => {
39
36
  terminal_type: terminalType,
40
37
  fraud_detection_id: fraudDetectionId,
41
38
  // 当前组件库版本(构建时由 define 注入)
42
- app_version: "0.13.17"
39
+ app_version: "0.14.0"
43
40
  };
44
41
  };
45
42
  const getBrowserParams = async (params = {}) => {
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { http } from "../../http.js";
3
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
4
- import { payResMap } from "../map.js";
5
- const grabPay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getGrabPayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getGrabPayInfo,
15
- grabPay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,16 +1,5 @@
1
- import { http } from "../../http.js";
2
- import { payResMap } from "../map.js";
3
- import { apiPrefix } from "../../../config.js";
4
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
5
- const linePay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getLinePayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getLinePayInfo,
15
- linePay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { http } from "../../http.js";
3
- import { payResMap } from "../map.js";
4
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
5
- const mayBankQRPay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getMayBankQRPayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getMayBankQRPayInfo,
15
- mayBankQRPay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { http } from "../../http.js";
3
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
4
- import { payResMap } from "../map.js";
5
- const ninePay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getNinePayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getNinePayInfo,
15
- ninePay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
3
- import { http } from "../../http.js";
4
- import { payResMap } from "../map.js";
5
- const opayWalletPay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getOpayWalletPayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getOpayWalletPayInfo,
15
- opayWalletPay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
3
- import { http } from "../../http.js";
4
- import { payResMap } from "../map.js";
5
- const pagaWalletPay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getPagaWalletPayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getPagaWalletPayInfo,
15
- pagaWalletPay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
3
- import { http } from "../../http.js";
4
- import { payResMap } from "../map.js";
5
- const paymayaPay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getPaymayaPayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getPaymayaPayInfo,
15
- paymayaPay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { http } from "../../http.js";
3
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
4
- import { payResMap } from "../map.js";
5
- const shopeePay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getShopeePayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getShopeePayInfo,
15
- shopeePay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,5 +1,19 @@
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 "../../../core/context.js";
5
- import "../../../out/worldpay-jsc-origin.js";
4
+ import { http } from "../../http.js";
5
+ var ThreeDSAuthOperate = /* @__PURE__ */ ((ThreeDSAuthOperate2) => {
6
+ ThreeDSAuthOperate2["OPEN"] = "OPEN";
7
+ ThreeDSAuthOperate2["CANCEL"] = "CANCEL";
8
+ return ThreeDSAuthOperate2;
9
+ })(ThreeDSAuthOperate || {});
10
+ const noticeThreeDSOperate = (id, operate) => {
11
+ return http.post("/3ds/stand-alone/notify", {
12
+ authentication_record_id: id,
13
+ operate
14
+ });
15
+ };
16
+ export {
17
+ ThreeDSAuthOperate,
18
+ noticeThreeDSOperate
19
+ };
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { http } from "../../http.js";
3
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
4
- import { payResMap } from "../map.js";
5
- const tngWalletPay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getTNGWalletPayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getTNGWalletPayInfo,
15
- tngWalletPay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -1,16 +1,5 @@
1
- import { apiPrefix } from "../../../config.js";
2
- import { http } from "../../http.js";
3
- import { payResMap } from "../map.js";
4
- import { buildPaymentParams, buildQueryParams } from "../../utils/index.js";
5
- const zalopayPay = async (params, extraParams, options) => {
6
- const paymentParams = buildPaymentParams(params, extraParams);
7
- return http.post(`${apiPrefix}/payments`, paymentParams, options).then(payResMap);
8
- };
9
- const getZalopayPayInfo = async (params, extraParams, options) => {
10
- const queryParams = buildQueryParams(params, extraParams);
11
- return http.post(`${apiPrefix}/payments/query`, queryParams, options).then(payResMap);
12
- };
13
- export {
14
- getZalopayPayInfo,
15
- zalopayPay
16
- };
1
+ import "../../../utils/card-brand/brands.js";
2
+ import "../../../utils/system-info/get-browser-info.js";
3
+ import "../../../core.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/worldpay-jsc-origin.js";
@@ -15,8 +15,6 @@ const AccordionItem = (props) => {
15
15
  const [contentRef, setContentRef] = h(null);
16
16
  const active = activeName === value;
17
17
  const handleClickItem = () => {
18
- if (disabled)
19
- return;
20
18
  onSelect(value);
21
19
  };
22
20
  y(() => {
@@ -47,10 +47,11 @@ const AddressField = w((props, ref) => {
47
47
  if (!(context == null ? void 0 : context.core)) {
48
48
  throw new Error("CoreContext is not found");
49
49
  }
50
- const { onChange, label, allowedCountries, mode = "address" } = props;
50
+ const { onChange, allowedCountries, mode, disabled = false } = props;
51
51
  const { i18n } = useI18n();
52
52
  const addressCore = context.core.getAddressCore();
53
- const addressMode = mode ?? ((_a = context.core.config._checkoutConfig) == null ? void 0 : _a.addressMode);
53
+ const addressMode = mode || ((_a = context.core.config._checkoutConfig) == null ? void 0 : _a.addressMode) || "address";
54
+ const addressLabelKey = addressMode === "address" ? "address.label" : "address.country";
54
55
  const [addressState, setAddressState] = h({ ...addressCore.getAddressState() });
55
56
  const [countryOptions, setCountryOptions] = h(addressCore.getCountryOption() ?? []);
56
57
  const [provinceOptions, setProvinceOptions] = h(addressCore.getProvinceOption() ?? []);
@@ -211,7 +212,7 @@ const AddressField = w((props, ref) => {
211
212
  FormItem,
212
213
  {
213
214
  ref: countryFormItemRef,
214
- label: label || i18n.get("address.label"),
215
+ label: i18n.get(addressLabelKey),
215
216
  path: "address.country",
216
217
  rule: createRule(),
217
218
  showErrorMessage: false,
@@ -219,6 +220,7 @@ const AddressField = w((props, ref) => {
219
220
  Select,
220
221
  {
221
222
  value: addressState.country,
223
+ disabled,
222
224
  filterable: true,
223
225
  options: visibleCountryOptions,
224
226
  onSelect: (value) => onSelectCountry(value),
@@ -242,6 +244,7 @@ const AddressField = w((props, ref) => {
242
244
  Input,
243
245
  {
244
246
  value: addressState.address1,
247
+ disabled,
245
248
  onInput: (event) => handleStateChange(EAddressType.ADDRESS_1, event.currentTarget.value),
246
249
  placeholder: description,
247
250
  inputClassName: className
@@ -262,6 +265,7 @@ const AddressField = w((props, ref) => {
262
265
  Input,
263
266
  {
264
267
  value: addressState.address2,
268
+ disabled,
265
269
  onInput: (event) => handleStateChange(EAddressType.ADDRESS_2, event.currentTarget.value),
266
270
  placeholder: description,
267
271
  inputClassName: className
@@ -283,6 +287,7 @@ const AddressField = w((props, ref) => {
283
287
  Input,
284
288
  {
285
289
  value: addressState.postCode,
290
+ disabled,
286
291
  onInput: (event) => handleStateChange(EAddressType.POST_CODE, event.currentTarget.value),
287
292
  placeholder: description,
288
293
  inputClassName: className
@@ -304,6 +309,7 @@ const AddressField = w((props, ref) => {
304
309
  Input,
305
310
  {
306
311
  value: addressState.area,
312
+ disabled,
307
313
  onInput: (event) => handleStateChange(EAddressType.AREA, event.currentTarget.value),
308
314
  placeholder: description,
309
315
  inputClassName: className
@@ -325,6 +331,7 @@ const AddressField = w((props, ref) => {
325
331
  Select,
326
332
  {
327
333
  value: addressState.city,
334
+ disabled,
328
335
  filterable: true,
329
336
  options: cityOptions,
330
337
  onSelect: (value) => onSelectCity(value),
@@ -336,6 +343,7 @@ const AddressField = w((props, ref) => {
336
343
  Input,
337
344
  {
338
345
  value: addressState.city,
346
+ disabled,
339
347
  onInput: (event) => handleStateChange(EAddressType.CITY, event.currentTarget.value),
340
348
  placeholder: description,
341
349
  inputClassName: className
@@ -357,6 +365,7 @@ const AddressField = w((props, ref) => {
357
365
  Select,
358
366
  {
359
367
  value: addressState.province,
368
+ disabled,
360
369
  filterable: true,
361
370
  options: provinceOptions,
362
371
  onSelect: (value) => onSelectProvince(value),
@@ -368,6 +377,7 @@ const AddressField = w((props, ref) => {
368
377
  Input,
369
378
  {
370
379
  value: addressState.province,
380
+ disabled,
371
381
  onInput: (event) => handleStateChange(EAddressType.PROVINCE, event.currentTarget.value),
372
382
  placeholder: description,
373
383
  inputClassName: className