@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.
- package/dist/card-checkout-ui.js +20 -20
- package/dist/card-checkout-ui.umd.cjs +21 -21
- package/dist/es/_commonjsHelpers.js +1 -82
- package/dist/es/api/index.js +2 -1
- package/dist/es/api/modules/checkout/map.js +1 -0
- package/dist/es/api/modules/get-browser-params.js +20 -8
- package/dist/es/api/modules/index.js +2 -1
- package/dist/es/api/modules/map.js +2 -1
- package/dist/es/api/modules/risk/index.js +21 -18
- package/dist/es/api/modules/threeDS/index.js +2 -1
- package/dist/es/api/modules/vietqr/index.js +2 -1
- package/dist/es/api/utils/index.js +4 -1
- package/dist/es/components/AccordionItem/AccordionItem.js +0 -1
- package/dist/es/components/AccountNameField/index.js +1 -1
- package/dist/es/components/AddressField/index.js +1 -2
- package/dist/es/components/AliPay/index.js +4 -2
- package/dist/es/components/ApplePay/index.js +201 -135
- package/dist/es/components/Boost/index.js +4 -2
- package/dist/es/components/CPFField/index.js +88 -0
- package/dist/es/components/Card/index.js +5 -11
- package/dist/es/components/CardBrands/index.js +0 -1
- package/dist/es/components/CardExpireDateField/index.js +1 -1
- package/dist/es/components/CardHolderNameField/index.js +1 -1
- package/dist/es/components/CardIBANField/index.js +1 -1
- package/dist/es/components/CardNo/index.js +0 -1
- package/dist/es/components/CardNumberField/index.js +1 -1
- package/dist/es/components/CardSecurityCodeField/index.js +1 -1
- package/dist/es/components/CardSelector/index.js +1 -1
- package/dist/es/components/CombinedCardInfo/index.js +1 -1
- package/dist/es/components/DropIn/index.js +0 -1
- package/dist/es/components/EmailField/EmailField.js +1 -1
- package/dist/es/components/EncryptedCard/index.js +12 -11
- package/dist/es/components/GooglePay/index.js +1 -0
- package/dist/es/components/GrabPay/index.js +4 -2
- package/dist/es/components/GuideCard/index.js +1 -1
- package/dist/es/components/LinePay/index.js +4 -2
- package/dist/es/components/MayBankQRPay/index.js +4 -2
- package/dist/es/components/NinePay/index.js +4 -2
- package/dist/es/components/RecurringTip/index.js +1 -2
- package/dist/es/components/SecuredFieldsProvider/index.js +20 -3
- package/dist/es/components/SecuredIframe/index.js +50 -22
- package/dist/es/components/Sepa/index.js +4 -2
- package/dist/es/components/ShopeePay/index.js +4 -2
- package/dist/es/components/SubmitButton/index.js +1 -1
- package/dist/es/components/TNGWallet/index.js +4 -2
- package/dist/es/components/ThreeDS/index.js +1 -2
- package/dist/es/components/Tip/index.js +18 -0
- package/dist/es/components/WechatPay/index.js +4 -2
- package/dist/es/components/business/QRCodeModal/QRCodeModal.js +1 -1
- package/dist/es/components/business/QRCodeModal/index.js +0 -1
- package/dist/es/components/business/index.js +0 -1
- package/dist/es/components/index.js +0 -1
- package/dist/es/components/internal/Accordion/index.js +0 -1
- package/dist/es/components/internal/Button/Button.js +0 -1
- package/dist/es/components/internal/Button/index.js +0 -1
- package/dist/es/components/internal/CheckBox/CheckBox.js +0 -1
- package/dist/es/components/internal/CheckBox/index.js +0 -1
- package/dist/es/components/internal/Form/type.js +0 -1
- package/dist/es/components/internal/Info/Info.js +0 -1
- package/dist/es/components/internal/Info/index.js +0 -1
- package/dist/es/components/internal/Input/Input.js +1 -1
- package/dist/es/components/internal/Input/type.js +0 -1
- package/dist/es/components/internal/LoadingCheck/LoadingCheck.js +0 -1
- package/dist/es/components/internal/LoadingCheck/index.js +0 -1
- package/dist/es/components/internal/Modal/Modal.js +1 -1
- package/dist/es/components/internal/QRCode/QRCode.js +0 -1
- package/dist/es/components/internal/QRCode/index.js +0 -1
- package/dist/es/components/internal/Select/Select.js +14 -17
- package/dist/es/components/internal/Select/SelectMenu.js +2 -3
- package/dist/es/components/internal/Select/SelectMenuItem.js +0 -1
- package/dist/es/components/wallets/GCash/GCash.js +4 -2
- package/dist/es/components/wallets/OpayWallet/OpayWallet.js +8 -9
- package/dist/es/components/wallets/PagaWallet/PagaWallet.js +8 -9
- package/dist/es/components/wallets/Paymaya/Paymaya.js +4 -2
- package/dist/es/components/wallets/PicPay/PicPay.js +136 -72
- package/dist/es/components/wallets/Pix/Pix.js +136 -72
- package/dist/es/components/wallets/Vietqr/Vietqr.js +4 -2
- package/dist/es/components/wallets/Zalopay/Zalopay.js +4 -2
- package/dist/es/config.js +1 -1
- package/dist/es/constant.js +2 -0
- package/dist/es/core/checkout.js +15 -3
- package/dist/es/core/environment.js +10 -2
- package/dist/es/core/index.js +0 -1
- package/dist/es/core/query.js +2 -1
- package/dist/es/core/session.js +6 -2
- package/dist/es/core/theme.js +0 -1
- package/dist/es/core.js +585 -4
- package/dist/es/hooks/index.js +0 -1
- package/dist/es/hooks/useI18n.js +0 -1
- package/dist/es/hooks/usePayState.js +13 -6
- package/dist/es/i18n/locales/de-DE.js +6 -1
- package/dist/es/i18n/locales/en-GB.js +6 -1
- package/dist/es/i18n/locales/es-ES.js +6 -1
- package/dist/es/i18n/locales/fr-FR.js +7 -2
- package/dist/es/i18n/locales/ja-JP.js +6 -1
- package/dist/es/i18n/locales/ko-KR.js +6 -1
- package/dist/es/i18n/locales/nl-NL.js +6 -1
- package/dist/es/i18n/locales/pt-PT.js +6 -1
- package/dist/es/i18n/locales/ru-RU.js +6 -1
- package/dist/es/i18n/locales/zh-CN.js +6 -1
- package/dist/es/i18n/locales/zh-HK.js +7 -2
- package/dist/es/i18n/locales/zh-TW.js +7 -2
- package/dist/es/index.js +6 -3
- package/dist/es/out/base-fraud-detection.js +134 -0
- package/dist/es/out/config.js +16 -0
- package/dist/es/out/fraud-detection.js +118 -27
- package/dist/es/out/paykka-detection.js +63 -0
- package/dist/es/out/stripe-radar.js +25 -51
- package/dist/es/out/worldpay-ddc.js +52 -99
- package/dist/es/out/worldpay-jsc-origin.js +0 -1
- package/dist/es/out/worldpay-jsc.js +21 -43
- package/dist/es/style.css +1 -1
- package/dist/es/types/event.js +33 -13
- package/dist/es/types/index.js +14 -0
- package/dist/es/utils/cpf.js +48 -0
- package/dist/es/utils/encrypt.js +18 -0
- package/dist/es/utils/iframe.js +1 -1
- package/dist/es/utils/location.js +4 -2
- package/dist/es/utils/redirect.js +8 -5
- package/dist/es/utils/system-info/index.js +1 -3
- package/dist/style.css +1 -1
- package/dist/types/api/modules/checkout/type.d.ts +2 -0
- package/dist/types/api/modules/get-browser-params.d.ts +25 -1
- package/dist/types/api/modules/risk/index.d.ts +28 -12
- package/dist/types/api/modules/type.d.ts +5 -0
- package/dist/types/api/utils/index.d.ts +3 -0
- package/dist/types/components/ApplePay/config.d.ts +9 -0
- package/dist/types/components/ApplePay/hooks/useApplePay.d.ts +15 -0
- package/dist/types/components/ApplePay/type.d.ts +53 -10
- package/dist/types/components/ApplePay/utils.d.ts +8 -2
- package/dist/types/components/CPFField/CPFField.d.ts +4 -0
- package/dist/types/components/CPFField/index.d.ts +2 -0
- package/dist/types/components/CPFField/type.d.ts +21 -0
- package/dist/types/components/SecuredFieldsProvider/type.d.ts +8 -3
- package/dist/types/components/SecuredIframe/useSecuredInput.d.ts +2 -5
- package/dist/types/components/ThreeDS/components/ThreeDSIframe/ThreeDSIframe.d.ts +6 -0
- package/dist/types/components/Tip/Tip.d.ts +3 -0
- package/dist/types/components/Tip/index.d.ts +2 -0
- package/dist/types/components/Tip/type.d.ts +12 -0
- package/dist/types/constant.d.ts +3 -1
- package/dist/types/core/checkout.d.ts +1 -1
- package/dist/types/core/environment.d.ts +12 -0
- package/dist/types/core/session.d.ts +1 -0
- package/dist/types/i18n/locales/de-DE.d.ts +4 -0
- package/dist/types/i18n/locales/en-GB.d.ts +4 -0
- package/dist/types/i18n/locales/es-ES.d.ts +4 -0
- package/dist/types/i18n/locales/fr-FR.d.ts +4 -0
- package/dist/types/i18n/locales/ja-JP.d.ts +4 -0
- package/dist/types/i18n/locales/ko-KR.d.ts +4 -0
- package/dist/types/i18n/locales/nl-NL.d.ts +4 -0
- package/dist/types/i18n/locales/pt-PT.d.ts +4 -0
- package/dist/types/i18n/locales/ru-RU.d.ts +4 -0
- package/dist/types/i18n/locales/zh-CN.d.ts +4 -0
- package/dist/types/i18n/locales/zh-HK.d.ts +4 -0
- package/dist/types/i18n/locales/zh-TW.d.ts +4 -0
- package/dist/types/out/base-fraud-detection.d.ts +53 -0
- package/dist/types/out/config.d.ts +11 -0
- package/dist/types/out/fraud-detection.d.ts +14 -3
- package/dist/types/out/paykka-detection.d.ts +20 -0
- package/dist/types/out/stripe-radar.d.ts +7 -9
- package/dist/types/out/types.d.ts +8 -2
- package/dist/types/out/worldpay-ddc.d.ts +7 -19
- package/dist/types/out/worldpay-jsc.d.ts +8 -18
- package/dist/types/types/event.d.ts +86 -39
- package/dist/types/types/fraud-detection.d.ts +1 -1
- package/dist/types/types/index.d.ts +22 -2
- package/dist/types/types/message.d.ts +12 -12
- package/dist/types/utils/app-payment.d.ts +2 -0
- package/dist/types/utils/cpf.d.ts +32 -0
- package/dist/types/utils/encrypt.d.ts +9 -0
- package/dist/types/utils/location.d.ts +1 -0
- package/dist/types/utils/system-info/index.d.ts +0 -1
- package/package.json +5 -4
- package/dist/types/components/ThreeDS/components/ThreeDSStatus/ThreeDSStatus.d.ts +0 -3
- package/dist/types/components/ThreeDS/components/ThreeDSStatus/type.d.ts +0 -6
|
@@ -6,7 +6,6 @@ import "../../../core/context.js";
|
|
|
6
6
|
import "../../../utils/card-brand/brands.js";
|
|
7
7
|
import "../../../utils/system-info/get-browser-info.js";
|
|
8
8
|
import { normalizedClass } from "../../../utils/format.js";
|
|
9
|
-
import "../../../api/http.js";
|
|
10
9
|
import "../../../out/worldpay-jsc-origin.js";
|
|
11
10
|
const { bem } = useBEM("button");
|
|
12
11
|
function Button(props) {
|
|
@@ -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 { COMMON_CLASS_NAME } from "../../../constant.js";
|
|
10
9
|
import "../../../out/worldpay-jsc-origin.js";
|
|
11
10
|
import { IconChecked } from "../icons/iconChecked.js";
|
|
@@ -3,7 +3,6 @@ import "../../../core.js";
|
|
|
3
3
|
import "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import "../../../api/http.js";
|
|
7
6
|
import "../../../out/worldpay-jsc-origin.js";
|
|
8
7
|
const formItemBEM = useBEM("form-item");
|
|
9
8
|
const formItemLabelClassName = formItemBEM.bem("label");
|
|
@@ -6,7 +6,6 @@ import "../../../core/context.js";
|
|
|
6
6
|
import "../../../utils/card-brand/brands.js";
|
|
7
7
|
import "../../../utils/system-info/get-browser-info.js";
|
|
8
8
|
import { normalizedClass } from "../../../utils/format.js";
|
|
9
|
-
import "../../../api/http.js";
|
|
10
9
|
import "../../../out/worldpay-jsc-origin.js";
|
|
11
10
|
import { IconError } from "../icons/IconError.js";
|
|
12
11
|
const { bem } = useBEM("info");
|
|
@@ -63,10 +63,10 @@ const Input = w((props, ref) => {
|
|
|
63
63
|
}
|
|
64
64
|
if (isComposing)
|
|
65
65
|
return;
|
|
66
|
-
const { value } = event.target;
|
|
67
66
|
if (event instanceof InputEvent && event.inputType === "insertCompositionText")
|
|
68
67
|
return;
|
|
69
68
|
(_a = props.onInput) == null ? void 0 : _a.call(props, event);
|
|
69
|
+
const { value } = event.target;
|
|
70
70
|
formItemContext == null ? void 0 : formItemContext.setValue(value);
|
|
71
71
|
formItemContext == null ? void 0 : formItemContext.validateChange(value);
|
|
72
72
|
}
|
|
@@ -3,7 +3,6 @@ import "../../../core.js";
|
|
|
3
3
|
import "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import "../../../api/http.js";
|
|
7
6
|
import "../../../out/worldpay-jsc-origin.js";
|
|
8
7
|
const inputBEM = useBEM("input");
|
|
9
8
|
const inputWrapperClassName = inputBEM.bem("input-wrapper");
|
|
@@ -7,7 +7,6 @@ import { isUndefined } from "../../../utils/is.js";
|
|
|
7
7
|
import "../../../utils/card-brand/brands.js";
|
|
8
8
|
import "../../../utils/system-info/get-browser-info.js";
|
|
9
9
|
import { normalizedClass, normalizedStyle } from "../../../utils/format.js";
|
|
10
|
-
import "../../../api/http.js";
|
|
11
10
|
import "../../../out/worldpay-jsc-origin.js";
|
|
12
11
|
const SIZE = 40;
|
|
13
12
|
const SVG_VIEW_BOX = `0 0 ${SIZE} ${SIZE}`;
|
|
@@ -3,7 +3,7 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { useI18n } from "../../../hooks/useI18n.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import "../../../
|
|
6
|
+
import "../../../core/context.js";
|
|
7
7
|
import "../../../out/worldpay-jsc-origin.js";
|
|
8
8
|
import "./modal2.js";
|
|
9
9
|
const { bem } = useBEM("modal");
|
|
@@ -4,7 +4,6 @@ import "../../../core/context.js";
|
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
6
|
import { normalizedClass } from "../../../utils/format.js";
|
|
7
|
-
import "../../../api/http.js";
|
|
8
7
|
import { COMMON_CLASS_NAME } from "../../../constant.js";
|
|
9
8
|
import "../../../out/worldpay-jsc-origin.js";
|
|
10
9
|
const { bem } = useBEM("qr-code");
|
|
@@ -4,7 +4,6 @@ import "../../../core/context.js";
|
|
|
4
4
|
import { isNil } from "../../../utils/is.js";
|
|
5
5
|
import "../../../utils/card-brand/brands.js";
|
|
6
6
|
import "../../../utils/system-info/get-browser-info.js";
|
|
7
|
-
import "../../../api/http.js";
|
|
8
7
|
import "../../../out/worldpay-jsc-origin.js";
|
|
9
8
|
import "../Form/type.js";
|
|
10
9
|
import { FormItemContext } from "../Form/context.js";
|
|
@@ -18,7 +17,9 @@ import { SelectMenuItem } from "./SelectMenuItem.js";
|
|
|
18
17
|
const { bem } = useBEM("select");
|
|
19
18
|
const Select = w((props, ref) => {
|
|
20
19
|
const formItemContext = x(FormItemContext);
|
|
21
|
-
props.status ?? (formItemContext == null ? void 0 : formItemContext.validationResult.status);
|
|
20
|
+
let status = props.status ?? (formItemContext == null ? void 0 : formItemContext.validationResult.status);
|
|
21
|
+
if (status === "unValidate")
|
|
22
|
+
status = void 0;
|
|
22
23
|
const [isFocus, setIsFocus] = h(false);
|
|
23
24
|
const [isInputChange, setIsInputChange] = h(false);
|
|
24
25
|
const [selectOptions, setSelectOptions] = h([]);
|
|
@@ -83,30 +84,24 @@ const Select = w((props, ref) => {
|
|
|
83
84
|
var _a;
|
|
84
85
|
setIsFocus(false);
|
|
85
86
|
(_a = props.onBlur) == null ? void 0 : _a.call(props, event);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (!selectOptions.length && props.options.length) {
|
|
90
|
-
setInputValue("");
|
|
91
|
-
setIsInputChange(false);
|
|
92
|
-
} else {
|
|
93
|
-
const { value: value2 } = event.currentTarget;
|
|
94
|
-
formItemContext == null ? void 0 : formItemContext.validateBlur(value2);
|
|
95
|
-
}
|
|
87
|
+
setInputValue("");
|
|
88
|
+
setIsInputChange(false);
|
|
89
|
+
formItemContext == null ? void 0 : formItemContext.validateBlur(isNil(value) ? "" : String(value));
|
|
96
90
|
}
|
|
97
91
|
function onInput(event) {
|
|
98
92
|
setIsInputChange(true);
|
|
99
93
|
setInputValue(event.currentTarget.value);
|
|
100
94
|
}
|
|
101
95
|
function onSelect(option, callCallBack = true) {
|
|
102
|
-
var _a, _b;
|
|
96
|
+
var _a, _b, _c, _d;
|
|
103
97
|
const { value: selectedValue, label } = option;
|
|
104
98
|
setInputValue("");
|
|
105
99
|
setValue(selectedValue);
|
|
106
100
|
setDisplay(((_a = props.renderLabel) == null ? void 0 : _a.call(props, option)) || label);
|
|
107
101
|
setDropMenuVisible(false);
|
|
108
102
|
setIsInputChange(false);
|
|
109
|
-
|
|
103
|
+
(_c = (_b = inputRef.current) == null ? void 0 : _b.input) == null ? void 0 : _c.blur();
|
|
104
|
+
callCallBack && ((_d = props == null ? void 0 : props.onSelect) == null ? void 0 : _d.call(props, selectedValue, option));
|
|
110
105
|
}
|
|
111
106
|
function onInputChange(event) {
|
|
112
107
|
setIsInputChange(true);
|
|
@@ -153,11 +148,12 @@ const Select = w((props, ref) => {
|
|
|
153
148
|
var _a, _b;
|
|
154
149
|
return (_b = (_a = inputRef.current) == null ? void 0 : _a.input) == null ? void 0 : _b.focus();
|
|
155
150
|
}, children: [
|
|
156
|
-
/* @__PURE__ */ u(
|
|
151
|
+
/* @__PURE__ */ u(FormItemContext.Provider, { value: null, children: /* @__PURE__ */ u(
|
|
157
152
|
Input,
|
|
158
153
|
{
|
|
159
154
|
ref: inputRef,
|
|
160
155
|
value: inputValue,
|
|
156
|
+
status,
|
|
161
157
|
readOnly: !props.filterable,
|
|
162
158
|
onInput,
|
|
163
159
|
onFocus,
|
|
@@ -168,7 +164,7 @@ const Select = w((props, ref) => {
|
|
|
168
164
|
rightIcon: props.rightIcon || defRightIcon,
|
|
169
165
|
inputClassName: props.inputClassName
|
|
170
166
|
}
|
|
171
|
-
),
|
|
167
|
+
) }),
|
|
172
168
|
/* @__PURE__ */ u(
|
|
173
169
|
"div",
|
|
174
170
|
{
|
|
@@ -199,7 +195,8 @@ const Select = w((props, ref) => {
|
|
|
199
195
|
var _a;
|
|
200
196
|
return (_a = props.renderLabel) == null ? void 0 : _a.call(props, item);
|
|
201
197
|
} : item.label
|
|
202
|
-
}
|
|
198
|
+
},
|
|
199
|
+
item.value
|
|
203
200
|
)),
|
|
204
201
|
props.action
|
|
205
202
|
]
|
|
@@ -4,12 +4,11 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
4
4
|
import "../../../core/context.js";
|
|
5
5
|
import "../../../utils/card-brand/brands.js";
|
|
6
6
|
import "../../../utils/system-info/get-browser-info.js";
|
|
7
|
-
import "../../../api/http.js";
|
|
8
7
|
import "../../../out/worldpay-jsc-origin.js";
|
|
9
8
|
const { bem } = useBEM("select");
|
|
10
9
|
const SelectMenu = (props) => {
|
|
11
|
-
const { style, children } = props;
|
|
12
|
-
return /* @__PURE__ */ u("div", { style, class: bem("menu"), children });
|
|
10
|
+
const { style, children, ...rest } = props;
|
|
11
|
+
return /* @__PURE__ */ u("div", { style, class: bem("menu"), onMouseDown: (e) => e.preventDefault(), ...rest, children });
|
|
13
12
|
};
|
|
14
13
|
export {
|
|
15
14
|
SelectMenu
|
|
@@ -5,7 +5,6 @@ import "../../../core/context.js";
|
|
|
5
5
|
import { isFunction } from "../../../utils/is.js";
|
|
6
6
|
import "../../../utils/card-brand/brands.js";
|
|
7
7
|
import "../../../utils/system-info/get-browser-info.js";
|
|
8
|
-
import "../../../api/http.js";
|
|
9
8
|
import "../../../out/worldpay-jsc-origin.js";
|
|
10
9
|
import { IconTick } from "../icons/IconTick.js";
|
|
11
10
|
const { bem } = useBEM("select");
|
|
@@ -78,7 +78,7 @@ const GCash = w((props, ref) => {
|
|
|
78
78
|
const addressFieldRef = A(null);
|
|
79
79
|
const emailFieldRef = A(null);
|
|
80
80
|
const [isCheckoutEnabled, setIsCheckoutEnabled] = h(false);
|
|
81
|
-
const { setErrorMsg, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
|
|
81
|
+
const { setErrorMsg, fraudDetection, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
|
|
82
82
|
const [submitButtonStatus, setSubmitButtonStatus] = h("unSubmit");
|
|
83
83
|
const formRef = A(null);
|
|
84
84
|
const [form, setForm] = h({
|
|
@@ -177,7 +177,9 @@ const GCash = w((props, ref) => {
|
|
|
177
177
|
state: form.address.province ? addressCore.getLabel(form.address.province, addressCore.getProvinceOption()) ?? form.address.province : void 0,
|
|
178
178
|
city: form.address.city ? addressCore.getLabel(form.address.city, addressCore.getCityOptions()) ?? form.address.city : void 0
|
|
179
179
|
},
|
|
180
|
-
browser: await getBrowserParams(
|
|
180
|
+
browser: await getBrowserParams({
|
|
181
|
+
fraudDetectionId: await (fraudDetection == null ? void 0 : fraudDetection.getFraudDetectionId())
|
|
182
|
+
})
|
|
181
183
|
};
|
|
182
184
|
};
|
|
183
185
|
const pay = async (search = false, timeout) => {
|
|
@@ -73,7 +73,7 @@ const OpayWallet = w((props, ref) => {
|
|
|
73
73
|
const addressFieldRef = A(null);
|
|
74
74
|
const emailFieldRef = A(null);
|
|
75
75
|
const [isCheckoutEnabled, setIsCheckoutEnabled] = h(false);
|
|
76
|
-
const { setErrorMsg, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
|
|
76
|
+
const { setErrorMsg, fraudDetection, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
|
|
77
77
|
const [submitButtonStatus, setSubmitButtonStatus] = h("unSubmit");
|
|
78
78
|
const formRef = A(null);
|
|
79
79
|
const [form, setForm] = h({
|
|
@@ -165,7 +165,9 @@ const OpayWallet = w((props, ref) => {
|
|
|
165
165
|
state: form.address.province ? addressCore.getLabel(form.address.province, addressCore.getProvinceOption()) ?? form.address.province : void 0,
|
|
166
166
|
city: form.address.city ? addressCore.getLabel(form.address.city, addressCore.getCityOptions()) ?? form.address.city : void 0
|
|
167
167
|
},
|
|
168
|
-
browser: await getBrowserParams(
|
|
168
|
+
browser: await getBrowserParams({
|
|
169
|
+
fraudDetectionId: await (fraudDetection == null ? void 0 : fraudDetection.getFraudDetectionId())
|
|
170
|
+
})
|
|
169
171
|
};
|
|
170
172
|
};
|
|
171
173
|
const pay = async (search = false, timeout) => {
|
|
@@ -204,14 +206,11 @@ const OpayWallet = w((props, ref) => {
|
|
|
204
206
|
processOnError(new PayKKaError("API_ERROR", errorMessage, { code: errorCode }));
|
|
205
207
|
return { end: true };
|
|
206
208
|
} else if (orderStatus === "PROCESSING") {
|
|
207
|
-
if (
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
return { end: true };
|
|
211
|
-
} else {
|
|
212
|
-
startReFetchPayInfo();
|
|
213
|
-
}
|
|
209
|
+
if (redirectMode === "auto" && (payInfo == null ? void 0 : payInfo.targetUrl)) {
|
|
210
|
+
redirectToPayment(payInfo);
|
|
211
|
+
return { end: true };
|
|
214
212
|
}
|
|
213
|
+
!search && startReFetchPayInfo();
|
|
215
214
|
return { end: false };
|
|
216
215
|
} else if (orderStatus === "CANCELED") {
|
|
217
216
|
setSubmitButtonStatus("unSubmit");
|
|
@@ -73,7 +73,7 @@ const PagaWallet = w((props, ref) => {
|
|
|
73
73
|
const addressFieldRef = A(null);
|
|
74
74
|
const emailFieldRef = A(null);
|
|
75
75
|
const [isCheckoutEnabled, setIsCheckoutEnabled] = h(false);
|
|
76
|
-
const { setErrorMsg, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
|
|
76
|
+
const { setErrorMsg, fraudDetection, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
|
|
77
77
|
const [submitButtonStatus, setSubmitButtonStatus] = h("unSubmit");
|
|
78
78
|
const formRef = A(null);
|
|
79
79
|
const [form, setForm] = h({
|
|
@@ -165,7 +165,9 @@ const PagaWallet = w((props, ref) => {
|
|
|
165
165
|
state: form.address.province ? addressCore.getLabel(form.address.province, addressCore.getProvinceOption()) ?? form.address.province : void 0,
|
|
166
166
|
city: form.address.city ? addressCore.getLabel(form.address.city, addressCore.getCityOptions()) ?? form.address.city : void 0
|
|
167
167
|
},
|
|
168
|
-
browser: await getBrowserParams(
|
|
168
|
+
browser: await getBrowserParams({
|
|
169
|
+
fraudDetectionId: await (fraudDetection == null ? void 0 : fraudDetection.getFraudDetectionId())
|
|
170
|
+
})
|
|
169
171
|
};
|
|
170
172
|
};
|
|
171
173
|
const pay = async (search = false, timeout) => {
|
|
@@ -204,14 +206,11 @@ const PagaWallet = w((props, ref) => {
|
|
|
204
206
|
processOnError(new PayKKaError("API_ERROR", errorMessage, { code: errorCode }));
|
|
205
207
|
return { end: true };
|
|
206
208
|
} else if (orderStatus === "PROCESSING") {
|
|
207
|
-
if (
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
return { end: true };
|
|
211
|
-
} else {
|
|
212
|
-
startReFetchPayInfo();
|
|
213
|
-
}
|
|
209
|
+
if (redirectMode === "auto" && (payInfo == null ? void 0 : payInfo.targetUrl)) {
|
|
210
|
+
redirectToPayment(payInfo);
|
|
211
|
+
return { end: true };
|
|
214
212
|
}
|
|
213
|
+
!search && startReFetchPayInfo();
|
|
215
214
|
return { end: false };
|
|
216
215
|
} else if (orderStatus === "CANCELED") {
|
|
217
216
|
setSubmitButtonStatus("unSubmit");
|
|
@@ -73,7 +73,7 @@ const Paymaya = w((props, ref) => {
|
|
|
73
73
|
const addressFieldRef = A(null);
|
|
74
74
|
const emailFieldRef = A(null);
|
|
75
75
|
const [isCheckoutEnabled, setIsCheckoutEnabled] = h(false);
|
|
76
|
-
const { setErrorMsg, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
|
|
76
|
+
const { setErrorMsg, fraudDetection, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
|
|
77
77
|
const [submitButtonStatus, setSubmitButtonStatus] = h("unSubmit");
|
|
78
78
|
const formRef = A(null);
|
|
79
79
|
const [form, setForm] = h({
|
|
@@ -165,7 +165,9 @@ const Paymaya = w((props, ref) => {
|
|
|
165
165
|
state: form.address.province ? addressCore.getLabel(form.address.province, addressCore.getProvinceOption()) ?? form.address.province : void 0,
|
|
166
166
|
city: form.address.city ? addressCore.getLabel(form.address.city, addressCore.getCityOptions()) ?? form.address.city : void 0
|
|
167
167
|
},
|
|
168
|
-
browser: await getBrowserParams(
|
|
168
|
+
browser: await getBrowserParams({
|
|
169
|
+
fraudDetectionId: await (fraudDetection == null ? void 0 : fraudDetection.getFraudDetectionId())
|
|
170
|
+
})
|
|
169
171
|
};
|
|
170
172
|
};
|
|
171
173
|
const pay = async (search = false, timeout) => {
|