@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.
- package/dist/card-checkout-ui.js +53 -25
- package/dist/card-checkout-ui.umd.cjs +53 -25
- package/dist/es/api/modules/boost/index.js +5 -16
- package/dist/es/api/modules/gcash/index.js +5 -16
- package/dist/es/api/modules/get-browser-params.js +1 -4
- package/dist/es/api/modules/grab-pay/index.js +5 -16
- package/dist/es/api/modules/line-pay/index.js +5 -16
- package/dist/es/api/modules/may-bank-qr-pay/index.js +5 -16
- package/dist/es/api/modules/nine-pay/index.js +5 -16
- package/dist/es/api/modules/opay-wallet/index.js +5 -16
- package/dist/es/api/modules/paga-wallet/index.js +5 -16
- package/dist/es/api/modules/paymaya/index.js +5 -16
- package/dist/es/api/modules/shopee-pay/index.js +5 -16
- package/dist/es/api/modules/threeDS/index.js +16 -2
- package/dist/es/api/modules/tng-wallet/index.js +5 -16
- package/dist/es/api/modules/zalopay/index.js +5 -16
- package/dist/es/components/AccordionItem/AccordionItem.js +0 -2
- package/dist/es/components/AddressField/index.js +13 -3
- package/dist/es/components/AliPay/index.js +64 -62
- package/dist/es/components/ApplePay/index.js +42 -39
- package/dist/es/components/CPFField/index.js +2 -1
- package/dist/es/components/Card/index.js +160 -133
- package/dist/es/components/CardExpireDateField/index.js +2 -1
- package/dist/es/components/CardNo/index.js +2 -2
- package/dist/es/components/CardNumberField/index.js +2 -1
- package/dist/es/components/CardSecurityCodeField/index.js +2 -1
- package/dist/es/components/CardSelector/index.js +3 -2
- package/dist/es/components/DropIn/index.js +24 -21
- package/dist/es/components/GooglePay/index.js +97 -88
- package/dist/es/components/PaymentButton/index.js +1 -1
- package/dist/es/components/SecuredFieldsProvider/index.js +31 -9
- package/dist/es/components/SecuredIframe/index.js +40 -23
- package/dist/es/components/SubmitButton/index.js +1 -1
- package/dist/es/components/ThreeDS/index.js +29 -12
- package/dist/es/components/WechatPay/index.js +70 -69
- package/dist/es/components/business/PhoneField/PhoneField.js +1 -0
- package/dist/es/components/index.js +7 -7
- package/dist/es/components/internal/CheckBox/CheckBox.js +2 -2
- package/dist/es/components/internal/Input/Input.js +1 -1
- package/dist/es/components/internal/Select/Select.js +4 -1
- package/dist/es/components/internal/icons/IconArrowDown.js +4 -4
- package/dist/es/components/internal/icons/IconBancontact.js +69 -14
- package/dist/es/components/internal/icons/IconBlik.js +541 -21
- package/dist/es/components/internal/icons/IconIdeal.js +61 -29
- package/dist/es/components/internal/icons/IconSkrill.js +14 -7
- package/dist/es/components/internal/icons/IconTrustly.js +11 -44
- package/dist/es/components/wallets/Bancontact/Bancontact.js +11 -8
- package/dist/es/components/wallets/Blik/Blik.js +12 -9
- package/dist/es/components/wallets/Boost/Boost.js +183 -0
- package/dist/es/components/wallets/Boost/boost2.js +1 -0
- package/dist/es/components/wallets/Boost/index.js +1 -0
- package/dist/es/components/wallets/Boost/type.js +1 -0
- package/dist/es/components/wallets/GCash/GCash.js +62 -252
- package/dist/es/components/wallets/GrabPay/GrabPay.js +183 -0
- package/dist/es/components/wallets/GrabPay/grab-pay.js +1 -0
- package/dist/es/components/wallets/GrabPay/index.js +1 -0
- package/dist/es/components/wallets/GrabPay/type.js +1 -0
- package/dist/es/components/wallets/IDeal/IDeal.js +11 -8
- package/dist/es/components/wallets/LinePay/LinePay.js +183 -0
- package/dist/es/components/wallets/LinePay/index.js +1 -0
- package/dist/es/components/wallets/LinePay/line-pay.js +1 -0
- package/dist/es/components/wallets/LinePay/type.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +187 -0
- package/dist/es/components/wallets/MayBankQRPay/index.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/may-bank-qr-pay.js +1 -0
- package/dist/es/components/wallets/MayBankQRPay/type.js +1 -0
- package/dist/es/components/wallets/NinePay/NinePay.js +185 -0
- package/dist/es/components/wallets/NinePay/index.js +1 -0
- package/dist/es/components/wallets/NinePay/nine-pay.js +1 -0
- package/dist/es/components/wallets/NinePay/type.js +1 -0
- package/dist/es/components/wallets/OVO/OVO.js +7 -5
- package/dist/es/components/wallets/OpayWallet/OpayWallet.js +56 -218
- package/dist/es/components/wallets/P24/P24.js +11 -8
- package/dist/es/components/wallets/PagaWallet/PagaWallet.js +56 -218
- package/dist/es/components/wallets/Paymaya/Paymaya.js +56 -221
- package/dist/es/components/wallets/PicPay/PicPay.js +50 -47
- package/dist/es/components/wallets/Pix/Pix.js +44 -48
- package/dist/es/components/wallets/ShopeePay/ShopeePay.js +185 -0
- package/dist/es/components/wallets/ShopeePay/index.js +1 -0
- package/dist/es/components/wallets/ShopeePay/shopee-pay.js +1 -0
- package/dist/es/components/wallets/ShopeePay/type.js +1 -0
- package/dist/es/components/wallets/Skrill/Skrill.js +28 -26
- package/dist/es/components/wallets/TNGWallet/TNGWallet.js +185 -0
- package/dist/es/components/wallets/TNGWallet/index.js +1 -0
- package/dist/es/components/wallets/TNGWallet/tng-wallet.js +1 -0
- package/dist/es/components/wallets/TNGWallet/type.js +1 -0
- package/dist/es/components/wallets/Trustly/Trustly.js +15 -15
- package/dist/es/components/wallets/Vietqr/Vietqr.js +60 -248
- package/dist/es/components/wallets/Zalopay/Zalopay.js +61 -249
- package/dist/es/components/wallets/index.js +7 -0
- package/dist/es/core/checkout.js +19 -45
- package/dist/es/core/logger.js +1 -1
- package/dist/es/core/payment.js +65 -0
- package/dist/es/hooks/useBaseWallet.js +20 -18
- package/dist/es/hooks/usePayState.js +37 -25
- package/dist/es/hooks/usePayment.js +1 -14
- package/dist/es/hooks/useRetry.js +50 -26
- package/dist/es/index.js +7 -7
- package/dist/es/out/base-fraud-detection.js +4 -1
- package/dist/es/out/fraud-detection.js +12 -13
- package/dist/es/out/worldpay-ddc-manager.js +7 -14
- package/dist/es/out/worldpay-ddc.js +7 -5
- package/dist/es/style.css +1 -1
- package/dist/es/types/event.js +1 -0
- package/dist/es/types/message.js +2 -0
- package/dist/es/utils/payment.js +12 -12
- package/dist/es/utils/system-info/is-ua-webview.js +1 -20
- package/dist/style.css +1 -1
- package/dist/types/api/modules/threeDS/index.d.ts +7 -0
- package/dist/types/components/AddressField/type.d.ts +2 -2
- package/dist/types/components/CPFField/type.d.ts +1 -1
- package/dist/types/components/CardExpireDateField/type.d.ts +1 -1
- package/dist/types/components/CardNo/type.d.ts +3 -2
- package/dist/types/components/CardNumberField/type.d.ts +1 -1
- package/dist/types/components/CardSecurityCodeField/type.d.ts +1 -1
- package/dist/types/components/CardSelector/type.d.ts +4 -4
- package/dist/types/components/GooglePay/createGooglePay.d.ts +1 -1
- package/dist/types/components/GooglePay/type.d.ts +6 -0
- package/dist/types/components/SecuredFieldsProvider/type.d.ts +2 -0
- package/dist/types/components/ThreeDS/components/ThreeDSIframe/ThreeDSIframe.d.ts +0 -6
- package/dist/types/components/index.d.ts +0 -7
- package/dist/types/components/internal/CheckBox/type.d.ts +2 -1
- package/dist/types/components/internal/Select/type.d.ts +1 -1
- package/dist/types/components/internal/icons/IconArrowDown.d.ts +1 -1
- package/dist/types/components/{Boost → wallets/Boost}/Boost.d.ts +9 -4
- package/dist/types/components/{Boost → wallets/Boost}/type.d.ts +2 -2
- package/dist/types/components/wallets/GCash/GCash.d.ts +5 -0
- package/dist/types/components/{GrabPay → wallets/GrabPay}/GrabPay.d.ts +4 -4
- package/dist/types/components/wallets/GrabPay/type.d.ts +17 -0
- package/dist/types/components/{LinePay → wallets/LinePay}/LinePay.d.ts +9 -4
- package/dist/types/components/{LinePay → wallets/LinePay}/type.d.ts +2 -2
- package/dist/types/components/wallets/MayBankQRPay/MayBankQRPay.d.ts +15 -0
- package/dist/types/components/{MayBankQRPay → wallets/MayBankQRPay}/type.d.ts +2 -2
- package/dist/types/components/wallets/NinePay/NinePay.d.ts +15 -0
- package/dist/types/components/{NinePay → wallets/NinePay}/type.d.ts +2 -2
- package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +5 -0
- package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +5 -0
- package/dist/types/components/wallets/Paymaya/Paymaya.d.ts +5 -0
- package/dist/types/components/{ShopeePay → wallets/ShopeePay}/ShopeePay.d.ts +9 -4
- package/dist/types/components/{ShopeePay → wallets/ShopeePay}/type.d.ts +2 -2
- package/dist/types/components/wallets/Skrill/type.d.ts +0 -12
- package/dist/types/components/{TNGWallet → wallets/TNGWallet}/TNGWallet.d.ts +9 -4
- package/dist/types/components/{TNGWallet → wallets/TNGWallet}/type.d.ts +2 -2
- package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +5 -0
- package/dist/types/components/wallets/Zalopay/Zalopay.d.ts +5 -0
- package/dist/types/components/wallets/index.d.ts +7 -0
- package/dist/types/core/checkout.d.ts +2 -9
- package/dist/types/core/payment.d.ts +21 -0
- package/dist/types/hooks/useBaseWallet.d.ts +2 -2
- package/dist/types/hooks/usePayState.d.ts +3 -1
- package/dist/types/hooks/useRetry.console-tests.d.ts +41 -0
- package/dist/types/hooks/useRetry.d.ts +22 -3
- package/dist/types/out/base-fraud-detection.d.ts +1 -0
- package/dist/types/out/config.d.ts +1 -1
- package/dist/types/out/fraud-detection.d.ts +2 -8
- package/dist/types/out/types.d.ts +3 -1
- package/dist/types/out/worldpay-ddc-manager.d.ts +6 -7
- package/dist/types/types/event.d.ts +6 -1
- package/dist/types/types/message.d.ts +24 -3
- package/dist/types/types/payment.d.ts +4 -0
- package/dist/types/utils/iframe.d.ts +1 -1
- package/dist/types/utils/payment.d.ts +10 -10
- package/package.json +9 -5
- package/dist/es/components/Boost/index.js +0 -349
- package/dist/es/components/GrabPay/index.js +0 -349
- package/dist/es/components/LinePay/index.js +0 -349
- package/dist/es/components/MayBankQRPay/index.js +0 -355
- package/dist/es/components/NinePay/index.js +0 -349
- package/dist/es/components/ShopeePay/index.js +0 -349
- package/dist/es/components/TNGWallet/index.js +0 -349
- package/dist/types/components/GrabPay/type.d.ts +0 -28
- package/dist/types/components/MayBankQRPay/MayBankQRPay.d.ts +0 -10
- package/dist/types/components/NinePay/NinePay.d.ts +0 -10
- /package/dist/types/components/{Boost → wallets/Boost}/index.d.ts +0 -0
- /package/dist/types/components/{GrabPay → wallets/GrabPay}/index.d.ts +0 -0
- /package/dist/types/components/{LinePay → wallets/LinePay}/index.d.ts +0 -0
- /package/dist/types/components/{MayBankQRPay → wallets/MayBankQRPay}/index.d.ts +0 -0
- /package/dist/types/components/{NinePay → wallets/NinePay}/index.d.ts +0 -0
- /package/dist/types/components/{ShopeePay → wallets/ShopeePay}/index.d.ts +0 -0
- /package/dist/types/components/{TNGWallet → wallets/TNGWallet}/index.d.ts +0 -0
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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.
|
|
39
|
+
app_version: "0.14.0"
|
|
43
40
|
};
|
|
44
41
|
};
|
|
45
42
|
const getBrowserParams = async (params = {}) => {
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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 "
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
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";
|
|
@@ -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,
|
|
50
|
+
const { onChange, allowedCountries, mode, disabled = false } = props;
|
|
51
51
|
const { i18n } = useI18n();
|
|
52
52
|
const addressCore = context.core.getAddressCore();
|
|
53
|
-
const addressMode = mode
|
|
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:
|
|
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
|