@paykka/card-checkout-ui 0.14.0 → 0.15.1
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/README.md +1 -1
- package/dist/card-checkout-ui.js +20 -20
- package/dist/card-checkout-ui.umd.cjs +20 -20
- package/dist/es/api/http.js +1 -1
- package/dist/es/api/index.js +1 -1
- package/dist/es/api/modules/checkout/index.js +1 -3
- package/dist/es/api/modules/checkout/map.js +12 -4
- package/dist/es/api/modules/encrypted-card/index.js +3 -2
- package/dist/es/api/modules/get-browser-params.js +4 -5
- package/dist/es/api/modules/index.js +1 -1
- package/dist/es/api/modules/map.js +4 -1
- package/dist/es/components/AccordionItem/AccordionItem.js +1 -1
- package/dist/es/components/AccountNameField/index.js +1 -1
- package/dist/es/components/AddressField/index.js +1 -1
- package/dist/es/components/ApplePay/index.js +34 -21
- package/dist/es/components/CPFField/index.js +1 -1
- package/dist/es/components/Card/index.js +38 -30
- package/dist/es/components/CardBrands/index.js +1 -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 +1 -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 +2 -2
- package/dist/es/components/CombinedCardInfo/index.js +1 -1
- package/dist/es/components/DropIn/index.js +117 -123
- package/dist/es/components/EmailField/EmailField.js +1 -1
- package/dist/es/components/EncryptedCard/index.js +5 -5
- package/dist/es/components/GooglePay/index.js +32 -29
- package/dist/es/components/GuideCard/index.js +2 -2
- package/dist/es/components/PaymentButton/index.js +22 -7
- package/dist/es/components/RecurringTip/index.js +1 -1
- package/dist/es/components/SecuredIframe/index.js +3 -4
- package/dist/es/components/Sepa/index.js +15 -7
- package/dist/es/components/SubmitButton/index.js +2 -2
- package/dist/es/components/ThreeDS/index.js +32 -20
- package/dist/es/components/Tip/index.js +1 -1
- package/dist/es/components/business/BlikCodeField/BlikCodeField.js +1 -1
- package/dist/es/components/business/BlikCodeField/index.js +1 -1
- package/dist/es/components/business/BlikConfirmModal/BlikConfirmModal.js +3 -3
- package/dist/es/components/business/BlikConfirmModal/index.js +2 -2
- package/dist/es/components/business/NameField/NameField.js +1 -1
- package/dist/es/components/business/NameField/index.js +1 -1
- package/dist/es/components/business/PhoneField/PhoneField.js +1 -1
- package/dist/es/components/business/PhoneField/index.js +1 -1
- package/dist/es/components/business/QRCodeModal/QRCodeModal.js +2 -2
- package/dist/es/components/business/QRCodeModal/index.js +1 -1
- package/dist/es/components/business/Tooltip/Tooltip.js +1 -1
- package/dist/es/components/business/Tooltip/index.js +1 -1
- package/dist/es/components/business/index.js +2 -2
- package/dist/es/components/index.js +4 -4
- package/dist/es/components/internal/Accordion/index.js +1 -1
- package/dist/es/components/internal/Button/{Button.js → Button2.js} +2 -2
- package/dist/es/components/internal/Button/index.js +2 -2
- package/dist/es/components/internal/CheckBox/CheckBox.js +1 -1
- package/dist/es/components/internal/CheckBox/index.js +1 -1
- package/dist/es/components/internal/Form/type.js +1 -1
- package/dist/es/components/internal/Info/Info.js +1 -1
- package/dist/es/components/internal/Info/index.js +1 -1
- package/dist/es/components/internal/Input/type.js +1 -1
- package/dist/es/components/internal/Loading/Loading2.js +20 -0
- package/dist/es/{api/modules/line-pay → components/internal/Loading}/index.js +3 -2
- package/dist/es/components/internal/Loading/loading.js +1 -0
- package/dist/es/components/internal/LoadingCheck/LoadingCheck.js +1 -1
- package/dist/es/components/internal/LoadingCheck/index.js +1 -1
- package/dist/es/components/internal/Modal/Modal.js +1 -1
- package/dist/es/components/internal/QRCode/QRCode.js +1 -1
- package/dist/es/components/internal/QRCode/index.js +1 -1
- package/dist/es/components/internal/Select/Select.js +1 -1
- package/dist/es/components/internal/Select/SelectMenu.js +1 -1
- package/dist/es/components/internal/Select/SelectMenuItem.js +1 -1
- package/dist/es/components/internal/icons/IconAlipayPlus.js +116 -0
- package/dist/es/components/internal/icons/IconError.js +2 -2
- package/dist/es/components/internal/icons/IconSuccess.js +2 -2
- package/dist/es/components/internal/icons/IconWechatPayGlobal.js +45 -0
- package/dist/es/components/internal/icons/IconWechatPayGlobalComplete.js +107 -0
- package/dist/es/components/wallets/AliPay/AliPay.js +186 -0
- package/dist/es/components/wallets/AliPay/ali-pay.js +1 -0
- package/dist/es/components/wallets/AliPay/index.js +1 -0
- package/dist/es/components/wallets/AliPay/type.js +1 -0
- package/dist/es/components/wallets/Bancontact/Bancontact.js +7 -10
- package/dist/es/components/wallets/Blik/Blik.js +14 -11
- package/dist/es/components/wallets/Boost/Boost.js +6 -9
- package/dist/es/components/wallets/GCash/GCash.js +7 -10
- package/dist/es/components/wallets/GrabPay/GrabPay.js +7 -14
- package/dist/es/components/wallets/IDeal/IDeal.js +7 -10
- package/dist/es/components/wallets/LinePay/LinePay.js +6 -9
- package/dist/es/components/wallets/MayBankQRPay/MayBankQRPay.js +6 -9
- package/dist/es/components/wallets/NinePay/NinePay.js +6 -9
- package/dist/es/components/wallets/OVO/OVO.js +7 -10
- package/dist/es/components/wallets/OpayWallet/OpayWallet.js +6 -9
- package/dist/es/components/wallets/P24/P24.js +7 -10
- package/dist/es/components/wallets/PagaWallet/PagaWallet.js +6 -9
- package/dist/es/components/wallets/Paymaya/Paymaya.js +6 -9
- package/dist/es/components/wallets/PicPay/PicPay.js +54 -217
- package/dist/es/components/wallets/Pix/Pix.js +54 -217
- package/dist/es/components/wallets/ShopeePay/ShopeePay.js +6 -9
- package/dist/es/components/wallets/Skrill/Skrill.js +7 -10
- package/dist/es/components/wallets/TNGWallet/TNGWallet.js +6 -9
- package/dist/es/components/wallets/Trustly/Trustly.js +7 -10
- package/dist/es/components/wallets/Vietqr/Vietqr.js +14 -15
- package/dist/es/components/wallets/WechatPay/WechatPay.js +250 -0
- package/dist/es/components/wallets/WechatPay/index.js +1 -0
- package/dist/es/components/wallets/WechatPay/type.js +1 -0
- package/dist/es/components/wallets/WechatPay/util.js +47 -0
- package/dist/es/components/wallets/WechatPay/wechat-pay.js +1 -0
- package/dist/es/components/wallets/Zalopay/Zalopay.js +10 -13
- package/dist/es/components/wallets/index.js +2 -0
- package/dist/es/constant.js +7 -0
- package/dist/es/core/checkout.js +36 -9
- package/dist/es/core/create-child.js +5 -4
- package/dist/es/core/index.js +1 -1
- package/dist/es/core/logger.js +1 -1
- package/dist/es/core/payment.js +13 -0
- package/dist/es/core/preview.js +29 -0
- package/dist/es/core/query.js +12 -3
- package/dist/es/core/session.js +36 -6
- package/dist/es/core/theme.js +1 -1
- package/dist/es/hooks/index.js +1 -1
- package/dist/es/hooks/useBaseWallet.js +121 -52
- package/dist/es/hooks/useI18n.js +3 -3
- package/dist/es/i18n/locales/de-DE.js +7 -0
- package/dist/es/i18n/locales/en-GB.js +7 -0
- package/dist/es/i18n/locales/es-ES.js +7 -0
- package/dist/es/i18n/locales/fr-FR.js +7 -0
- package/dist/es/i18n/locales/ja-JP.js +7 -0
- package/dist/es/i18n/locales/ko-KR.js +7 -0
- package/dist/es/i18n/locales/nl-NL.js +7 -0
- package/dist/es/i18n/locales/pt-PT.js +7 -0
- package/dist/es/i18n/locales/ru-RU.js +7 -0
- package/dist/es/i18n/locales/zh-CN.js +7 -0
- package/dist/es/i18n/locales/zh-HK.js +7 -0
- package/dist/es/i18n/locales/zh-TW.js +7 -0
- package/dist/es/i18n/util.js +10 -10
- package/dist/es/index.js +7 -5
- package/dist/es/out/base-fraud-detection.js +1 -1
- package/dist/es/out/fraud-detection.js +59 -44
- package/dist/es/out/paykka-detection.js +5 -7
- package/dist/es/out/stripe-radar.js +1 -1
- package/dist/es/out/worldpay-ddc-manager.js +3 -0
- package/dist/es/out/worldpay-ddc.js +1 -1
- package/dist/es/style.css +1 -1
- package/dist/es/types/event.js +10 -1
- package/dist/es/types/index.js +7 -0
- package/dist/es/utils/array.js +19 -5
- package/dist/es/utils/business/amount.js +15 -0
- package/dist/es/utils/business/index.js +1 -0
- package/dist/es/utils/detect.js +8 -0
- package/dist/es/utils/index.js +7 -9
- package/dist/es/utils/location.js +8 -0
- package/dist/es/utils/number.js +19 -0
- package/dist/es/utils/redirect.js +2 -0
- package/dist/style.css +1 -1
- package/dist/types/api/modules/checkout/type.d.ts +1 -1
- package/dist/types/api/modules/index.d.ts +0 -17
- package/dist/types/api/modules/threeDS/index.d.ts +13 -5
- package/dist/types/components/ApplePay/type.d.ts +6 -2
- package/dist/types/components/Card/type.d.ts +2 -18
- package/dist/types/components/DropIn/layout.d.ts +33 -0
- package/dist/types/components/DropIn/type.d.ts +6 -6
- package/dist/types/components/GooglePay/createGooglePay.d.ts +1 -1
- package/dist/types/components/GooglePay/type.d.ts +6 -2
- package/dist/types/components/PaymentButton/type.d.ts +2 -0
- package/dist/types/components/Sepa/type.d.ts +3 -4
- package/dist/types/components/business/QRCodeModal/type.d.ts +12 -3
- package/dist/types/components/index.d.ts +0 -2
- package/dist/types/components/internal/Loading/Loading.d.ts +2 -1
- package/dist/types/components/internal/Loading/type.d.ts +8 -0
- package/dist/types/components/internal/ResultMessage/ResultMessage.d.ts +3 -0
- package/dist/types/components/internal/ResultMessage/index.d.ts +2 -0
- package/dist/types/components/internal/ResultMessage/type.d.ts +13 -0
- package/dist/types/components/internal/icons/IconAlipayPlus.d.ts +2 -0
- package/dist/types/components/internal/icons/IconError.d.ts +1 -1
- package/dist/types/components/internal/icons/IconSuccess.d.ts +1 -1
- package/dist/types/components/internal/icons/IconWechatPayGlobal.d.ts +2 -0
- package/dist/types/components/internal/icons/IconWechatPayGlobalComplete.d.ts +2 -0
- package/dist/types/components/internal/icons/index.d.ts +3 -0
- package/dist/types/components/{AliPay → wallets/AliPay}/AliPay.d.ts +9 -4
- package/dist/types/components/wallets/AliPay/type.d.ts +7 -0
- package/dist/types/components/wallets/Bancontact/type.d.ts +2 -24
- package/dist/types/components/wallets/Blik/type.d.ts +2 -24
- package/dist/types/components/wallets/Boost/type.d.ts +2 -24
- package/dist/types/components/wallets/GCash/type.d.ts +2 -24
- package/dist/types/components/wallets/GrabPay/type.d.ts +2 -12
- package/dist/types/components/wallets/IDeal/type.d.ts +2 -24
- package/dist/types/components/wallets/LinePay/type.d.ts +2 -24
- package/dist/types/components/wallets/MayBankQRPay/type.d.ts +2 -24
- package/dist/types/components/wallets/NinePay/type.d.ts +2 -24
- package/dist/types/components/wallets/OVO/type.d.ts +2 -24
- package/dist/types/components/wallets/OpayWallet/type.d.ts +2 -24
- package/dist/types/components/wallets/P24/type.d.ts +2 -24
- package/dist/types/components/wallets/PagaWallet/type.d.ts +2 -24
- package/dist/types/components/wallets/Paymaya/type.d.ts +2 -24
- package/dist/types/components/wallets/PicPay/type.d.ts +2 -24
- package/dist/types/components/wallets/Pix/type.d.ts +2 -24
- package/dist/types/components/wallets/ShopeePay/type.d.ts +2 -24
- package/dist/types/components/wallets/Skrill/type.d.ts +2 -12
- package/dist/types/components/wallets/TNGWallet/type.d.ts +2 -24
- package/dist/types/components/wallets/Trustly/type.d.ts +2 -16
- package/dist/types/components/wallets/Vietqr/type.d.ts +2 -24
- package/dist/types/components/wallets/WechatPay/WechatPay.d.ts +16 -0
- package/dist/types/components/wallets/WechatPay/type.d.ts +12 -0
- package/dist/types/components/wallets/WechatPay/util.d.ts +13 -0
- package/dist/types/components/wallets/Zalopay/type.d.ts +2 -24
- package/dist/types/components/wallets/index.d.ts +2 -0
- package/dist/types/components/wallets/type.d.ts +0 -14
- package/dist/types/constant.d.ts +8 -0
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/core/preview.d.ts +1 -0
- package/dist/types/core/session.d.ts +2 -2
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/useBaseWallet.d.ts +27 -5
- package/dist/types/hooks/useI18n.d.ts +1 -1
- package/dist/types/hooks/usePayState.d.ts +1 -4
- package/dist/types/i18n/I18n.d.ts +1 -0
- package/dist/types/i18n/locales/de-DE.d.ts +7 -0
- package/dist/types/i18n/locales/en-GB.d.ts +7 -0
- package/dist/types/i18n/locales/es-ES.d.ts +7 -0
- package/dist/types/i18n/locales/fr-FR.d.ts +7 -0
- package/dist/types/i18n/locales/ja-JP.d.ts +7 -0
- package/dist/types/i18n/locales/ko-KR.d.ts +7 -0
- package/dist/types/i18n/locales/nl-NL.d.ts +7 -0
- package/dist/types/i18n/locales/pt-PT.d.ts +7 -0
- package/dist/types/i18n/locales/ru-RU.d.ts +7 -0
- package/dist/types/i18n/locales/zh-CN.d.ts +7 -0
- package/dist/types/i18n/locales/zh-HK.d.ts +7 -0
- package/dist/types/i18n/locales/zh-TW.d.ts +7 -0
- package/dist/types/i18n/util.d.ts +8 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/out/fraud-detection.d.ts +2 -5
- package/dist/types/out/types.d.ts +5 -6
- package/dist/types/out/worldpay-ddc-manager.d.ts +1 -0
- package/dist/types/types/event.d.ts +24 -2
- package/dist/types/types/index.d.ts +14 -0
- package/dist/types/types/message.d.ts +3 -1
- package/dist/types/types/payment.d.ts +26 -3
- package/dist/types/utils/app-payment.d.ts +1 -0
- package/dist/types/utils/array.d.ts +17 -0
- package/dist/types/utils/business/amount.d.ts +7 -0
- package/dist/types/utils/business/index.d.ts +1 -0
- package/dist/types/utils/detect.d.ts +3 -0
- package/dist/types/utils/index.d.ts +1 -6
- package/dist/types/utils/number.d.ts +4 -0
- package/dist/types/utils/redirect.d.ts +10 -0
- package/dist/types/utils/system-info/get-browser-info.d.ts +4 -0
- package/package.json +4 -2
- package/dist/es/api/modules/ali-pay/index.js +0 -16
- package/dist/es/api/modules/boost/index.js +0 -5
- package/dist/es/api/modules/gcash/index.js +0 -5
- package/dist/es/api/modules/grab-pay/index.js +0 -5
- package/dist/es/api/modules/may-bank-qr-pay/index.js +0 -5
- package/dist/es/api/modules/nine-pay/index.js +0 -5
- package/dist/es/api/modules/opay-wallet/index.js +0 -5
- package/dist/es/api/modules/paga-wallet/index.js +0 -5
- package/dist/es/api/modules/paymaya/index.js +0 -5
- package/dist/es/api/modules/pic-pay/index.js +0 -16
- package/dist/es/api/modules/pix/index.js +0 -16
- package/dist/es/api/modules/shopee-pay/index.js +0 -5
- package/dist/es/api/modules/tng-wallet/index.js +0 -5
- package/dist/es/api/modules/vietqr/index.js +0 -5
- package/dist/es/api/modules/wechat-pay/index.js +0 -16
- package/dist/es/api/modules/zalopay/index.js +0 -5
- package/dist/es/components/AliPay/index.js +0 -332
- package/dist/es/components/WechatPay/index.js +0 -340
- package/dist/es/hooks/usePayment.js +0 -1
- package/dist/types/api/modules/ali-pay/index.d.ts +0 -4
- package/dist/types/api/modules/boost/index.d.ts +0 -4
- package/dist/types/api/modules/gcash/index.d.ts +0 -4
- package/dist/types/api/modules/grab-pay/index.d.ts +0 -4
- package/dist/types/api/modules/line-pay/index.d.ts +0 -4
- package/dist/types/api/modules/may-bank-qr-pay/index.d.ts +0 -4
- package/dist/types/api/modules/nine-pay/index.d.ts +0 -4
- package/dist/types/api/modules/opay-wallet/index.d.ts +0 -4
- package/dist/types/api/modules/paga-wallet/index.d.ts +0 -4
- package/dist/types/api/modules/paymaya/index.d.ts +0 -4
- package/dist/types/api/modules/pic-pay/index.d.ts +0 -4
- package/dist/types/api/modules/pix/index.d.ts +0 -4
- package/dist/types/api/modules/shopee-pay/index.d.ts +0 -4
- package/dist/types/api/modules/tng-wallet/index.d.ts +0 -4
- package/dist/types/api/modules/vietqr/index.d.ts +0 -4
- package/dist/types/api/modules/wechat-pay/index.d.ts +0 -4
- package/dist/types/api/modules/zalopay/index.d.ts +0 -4
- package/dist/types/components/AliPay/type.d.ts +0 -26
- package/dist/types/components/WechatPay/WechatPay.d.ts +0 -10
- package/dist/types/components/WechatPay/type.d.ts +0 -28
- package/dist/types/hooks/usePayment.d.ts +0 -8
- package/dist/types/hooks/useRetry.console-tests.d.ts +0 -41
- package/dist/types/utils/behavior-tracker.d.ts +0 -36
- /package/dist/es/components/internal/Button/{button2.js → button.js} +0 -0
- /package/dist/types/components/{AliPay → wallets/AliPay}/index.d.ts +0 -0
- /package/dist/types/components/{WechatPay → wallets/WechatPay}/index.d.ts +0 -0
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import { createEmailCore, EmailField } from "../../EmailField/EmailField.js";
|
|
@@ -106,7 +106,9 @@ const Boost = w((props, ref) => {
|
|
|
106
106
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
107
107
|
var _a2;
|
|
108
108
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
109
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
109
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
110
|
+
if (submitResult === false)
|
|
111
|
+
return;
|
|
110
112
|
if (errors) {
|
|
111
113
|
setPaymentButtonStatus("unSubmit");
|
|
112
114
|
return;
|
|
@@ -137,10 +139,6 @@ const Boost = w((props, ref) => {
|
|
|
137
139
|
) }) });
|
|
138
140
|
};
|
|
139
141
|
const Button = () => {
|
|
140
|
-
var _a;
|
|
141
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
142
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
143
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
144
142
|
return /* @__PURE__ */ u(
|
|
145
143
|
PaymentButton,
|
|
146
144
|
{
|
|
@@ -148,8 +146,7 @@ const Boost = w((props, ref) => {
|
|
|
148
146
|
status: paymentButtonStatus,
|
|
149
147
|
disabled,
|
|
150
148
|
verified: validated,
|
|
151
|
-
onClick: onSubmit
|
|
152
|
-
children: text
|
|
149
|
+
onClick: onSubmit
|
|
153
150
|
}
|
|
154
151
|
);
|
|
155
152
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import { createEmailCore, EmailField } from "../../EmailField/EmailField.js";
|
|
@@ -25,7 +25,7 @@ import "../../business/PhoneField/phone-field.js";
|
|
|
25
25
|
import { IconGcashComplete } from "../../internal/icons/IconGcashComplete.js";
|
|
26
26
|
import "../../business/Tooltip/tooltip2.js";
|
|
27
27
|
import "../../business/BlikCodeField/blik-code-field.js";
|
|
28
|
-
import "../../internal/Button/
|
|
28
|
+
import "../../internal/Button/button.js";
|
|
29
29
|
import "../../internal/Modal/Modal.js";
|
|
30
30
|
import "../../business/BlikConfirmModal/blik-confirm-modal.js";
|
|
31
31
|
import "../../internal/LoadingCheck/loading-check.js";
|
|
@@ -123,7 +123,9 @@ const GCash = w((props, ref) => {
|
|
|
123
123
|
(_a2 = formRef.current) == null ? void 0 : _a2.validate(async (errors) => {
|
|
124
124
|
var _a3;
|
|
125
125
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
126
|
-
(_a3 = props.onSubmit) == null ? void 0 : _a3.call(props, errors, getPaymentMethodContext());
|
|
126
|
+
const submitResult = await ((_a3 = props.onSubmit) == null ? void 0 : _a3.call(props, errors, getPaymentMethodContext()));
|
|
127
|
+
if (submitResult === false)
|
|
128
|
+
return;
|
|
127
129
|
if (errors) {
|
|
128
130
|
setPaymentButtonStatus("unSubmit");
|
|
129
131
|
return;
|
|
@@ -137,10 +139,6 @@ const GCash = w((props, ref) => {
|
|
|
137
139
|
dom && validateFormSilently();
|
|
138
140
|
};
|
|
139
141
|
const Button = () => {
|
|
140
|
-
var _a2;
|
|
141
|
-
const transAmount = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.transAmount;
|
|
142
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
143
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
144
142
|
return /* @__PURE__ */ u(
|
|
145
143
|
PaymentButton,
|
|
146
144
|
{
|
|
@@ -148,8 +146,7 @@ const GCash = w((props, ref) => {
|
|
|
148
146
|
status: paymentButtonStatus,
|
|
149
147
|
disabled,
|
|
150
148
|
verified: validated,
|
|
151
|
-
onClick: onSubmit
|
|
152
|
-
children: text
|
|
149
|
+
onClick: onSubmit
|
|
153
150
|
}
|
|
154
151
|
);
|
|
155
152
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import { createEmailCore, EmailField } from "../../EmailField/EmailField.js";
|
|
@@ -66,11 +66,7 @@ const GrabPay = w((props, ref) => {
|
|
|
66
66
|
stopRetry,
|
|
67
67
|
getPaymentMethodContext
|
|
68
68
|
} = useBaseWallet(CURR_PAYMENT_METHOD, props, {
|
|
69
|
-
getFormData: () =>
|
|
70
|
-
return {
|
|
71
|
-
...form
|
|
72
|
-
};
|
|
73
|
-
}
|
|
69
|
+
getFormData: () => form
|
|
74
70
|
});
|
|
75
71
|
const addressCore = core.getAddressCore();
|
|
76
72
|
const emailState = createEmailCore();
|
|
@@ -106,7 +102,9 @@ const GrabPay = w((props, ref) => {
|
|
|
106
102
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
107
103
|
var _a2;
|
|
108
104
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
109
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
105
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
106
|
+
if (submitResult === false)
|
|
107
|
+
return;
|
|
110
108
|
if (errors) {
|
|
111
109
|
setPaymentButtonStatus("unSubmit");
|
|
112
110
|
return;
|
|
@@ -116,10 +114,6 @@ const GrabPay = w((props, ref) => {
|
|
|
116
114
|
});
|
|
117
115
|
};
|
|
118
116
|
const Button = () => {
|
|
119
|
-
var _a;
|
|
120
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
121
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
122
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
123
117
|
return /* @__PURE__ */ u(
|
|
124
118
|
PaymentButton,
|
|
125
119
|
{
|
|
@@ -127,8 +121,7 @@ const GrabPay = w((props, ref) => {
|
|
|
127
121
|
status: paymentButtonStatus,
|
|
128
122
|
disabled,
|
|
129
123
|
verified: validated,
|
|
130
|
-
onClick: onSubmit
|
|
131
|
-
children: text
|
|
124
|
+
onClick: onSubmit
|
|
132
125
|
}
|
|
133
126
|
);
|
|
134
127
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME, PaymentType } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import "./ideal2.js";
|
|
@@ -27,7 +27,7 @@ import "../../business/PhoneField/config.js";
|
|
|
27
27
|
import "../../business/PhoneField/phone-field.js";
|
|
28
28
|
import "../../business/Tooltip/tooltip2.js";
|
|
29
29
|
import "../../business/BlikCodeField/blik-code-field.js";
|
|
30
|
-
import "../../internal/Button/
|
|
30
|
+
import "../../internal/Button/button.js";
|
|
31
31
|
import "../../business/BlikConfirmModal/blik-confirm-modal.js";
|
|
32
32
|
import "../../internal/LoadingCheck/loading-check.js";
|
|
33
33
|
import { RecurringTip } from "../../RecurringTip/index.js";
|
|
@@ -122,7 +122,9 @@ const IDeal = w((props, ref) => {
|
|
|
122
122
|
setErrorMessage("");
|
|
123
123
|
(_a2 = formRef.current) == null ? void 0 : _a2.validate(async (errors) => {
|
|
124
124
|
var _a3;
|
|
125
|
-
(_a3 = props.onSubmit) == null ? void 0 : _a3.call(props, errors, getPaymentMethodContext());
|
|
125
|
+
const submitResult = await ((_a3 = props.onSubmit) == null ? void 0 : _a3.call(props, errors, getPaymentMethodContext()));
|
|
126
|
+
if (submitResult === false)
|
|
127
|
+
return;
|
|
126
128
|
if (errors) {
|
|
127
129
|
setPaymentButtonStatus("unSubmit");
|
|
128
130
|
return;
|
|
@@ -153,10 +155,6 @@ const IDeal = w((props, ref) => {
|
|
|
153
155
|
) }) });
|
|
154
156
|
};
|
|
155
157
|
const Button = () => {
|
|
156
|
-
var _a2;
|
|
157
|
-
const transAmount = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.transAmount;
|
|
158
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
159
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
160
158
|
return /* @__PURE__ */ u(
|
|
161
159
|
PaymentButton,
|
|
162
160
|
{
|
|
@@ -164,8 +162,7 @@ const IDeal = w((props, ref) => {
|
|
|
164
162
|
status: paymentButtonStatus,
|
|
165
163
|
verified: validated,
|
|
166
164
|
disabled,
|
|
167
|
-
onClick: onSubmit
|
|
168
|
-
children: text
|
|
165
|
+
onClick: onSubmit
|
|
169
166
|
}
|
|
170
167
|
);
|
|
171
168
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import { createEmailCore, EmailField } from "../../EmailField/EmailField.js";
|
|
@@ -106,7 +106,9 @@ const LinePay = w((props, ref) => {
|
|
|
106
106
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
107
107
|
var _a2;
|
|
108
108
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
109
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
109
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
110
|
+
if (submitResult === false)
|
|
111
|
+
return;
|
|
110
112
|
if (errors) {
|
|
111
113
|
setPaymentButtonStatus("unSubmit");
|
|
112
114
|
return;
|
|
@@ -116,10 +118,6 @@ const LinePay = w((props, ref) => {
|
|
|
116
118
|
});
|
|
117
119
|
};
|
|
118
120
|
const Button = () => {
|
|
119
|
-
var _a;
|
|
120
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
121
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
122
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
123
121
|
return /* @__PURE__ */ u(
|
|
124
122
|
PaymentButton,
|
|
125
123
|
{
|
|
@@ -127,8 +125,7 @@ const LinePay = w((props, ref) => {
|
|
|
127
125
|
status: paymentButtonStatus,
|
|
128
126
|
disabled,
|
|
129
127
|
verified: validated,
|
|
130
|
-
onClick: onSubmit
|
|
131
|
-
children: text
|
|
128
|
+
onClick: onSubmit
|
|
132
129
|
}
|
|
133
130
|
);
|
|
134
131
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import { createEmailCore, EmailField } from "../../EmailField/EmailField.js";
|
|
@@ -105,7 +105,9 @@ const MayBankQRPay = w(
|
|
|
105
105
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
106
106
|
var _a2;
|
|
107
107
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
108
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
108
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
109
|
+
if (submitResult === false)
|
|
110
|
+
return;
|
|
109
111
|
if (errors) {
|
|
110
112
|
setPaymentButtonStatus("unSubmit");
|
|
111
113
|
return;
|
|
@@ -119,10 +121,6 @@ const MayBankQRPay = w(
|
|
|
119
121
|
dom && validateFormSilently();
|
|
120
122
|
};
|
|
121
123
|
const Button = () => {
|
|
122
|
-
var _a;
|
|
123
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
124
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
125
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
126
124
|
return /* @__PURE__ */ u(
|
|
127
125
|
PaymentButton,
|
|
128
126
|
{
|
|
@@ -130,8 +128,7 @@ const MayBankQRPay = w(
|
|
|
130
128
|
status: paymentButtonStatus,
|
|
131
129
|
disabled,
|
|
132
130
|
verified: validated,
|
|
133
|
-
onClick: onSubmit
|
|
134
|
-
children: text
|
|
131
|
+
onClick: onSubmit
|
|
135
132
|
}
|
|
136
133
|
);
|
|
137
134
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import { createEmailCore, EmailField } from "../../EmailField/EmailField.js";
|
|
@@ -104,7 +104,9 @@ const NinePay = w((props, ref) => {
|
|
|
104
104
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
105
105
|
var _a2;
|
|
106
106
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
107
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
107
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
108
|
+
if (submitResult === false)
|
|
109
|
+
return;
|
|
108
110
|
if (errors) {
|
|
109
111
|
setPaymentButtonStatus("unSubmit");
|
|
110
112
|
return;
|
|
@@ -118,10 +120,6 @@ const NinePay = w((props, ref) => {
|
|
|
118
120
|
dom && validateFormSilently();
|
|
119
121
|
};
|
|
120
122
|
const Button = () => {
|
|
121
|
-
var _a;
|
|
122
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
123
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
124
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
125
123
|
return /* @__PURE__ */ u(
|
|
126
124
|
PaymentButton,
|
|
127
125
|
{
|
|
@@ -129,8 +127,7 @@ const NinePay = w((props, ref) => {
|
|
|
129
127
|
status: paymentButtonStatus,
|
|
130
128
|
disabled,
|
|
131
129
|
verified: validated,
|
|
132
|
-
onClick: onSubmit
|
|
133
|
-
children: text
|
|
130
|
+
onClick: onSubmit
|
|
134
131
|
}
|
|
135
132
|
);
|
|
136
133
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass,
|
|
6
|
+
import { normalizedClass, limitedToNumber } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import "./ovo2.js";
|
|
@@ -25,7 +25,7 @@ import "../../business/Tooltip/tooltip2.js";
|
|
|
25
25
|
import "../../internal/Input/Input.js";
|
|
26
26
|
import "../../internal/Input/type.js";
|
|
27
27
|
import "../../business/BlikCodeField/blik-code-field.js";
|
|
28
|
-
import "../../internal/Button/
|
|
28
|
+
import "../../internal/Button/button.js";
|
|
29
29
|
import "../../business/BlikConfirmModal/blik-confirm-modal.js";
|
|
30
30
|
import "../../internal/LoadingCheck/loading-check.js";
|
|
31
31
|
import { DEFAULT_ADDRESS, AddressField } from "../../AddressField/index.js";
|
|
@@ -121,7 +121,9 @@ const OVO = w((props, ref) => {
|
|
|
121
121
|
setErrorMessage("");
|
|
122
122
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
123
123
|
var _a2;
|
|
124
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
124
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
125
|
+
if (submitResult === false)
|
|
126
|
+
return;
|
|
125
127
|
if (errors) {
|
|
126
128
|
setPaymentButtonStatus("unSubmit");
|
|
127
129
|
return;
|
|
@@ -152,10 +154,6 @@ const OVO = w((props, ref) => {
|
|
|
152
154
|
) }) });
|
|
153
155
|
};
|
|
154
156
|
const Button = () => {
|
|
155
|
-
var _a;
|
|
156
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
157
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
158
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
159
157
|
return /* @__PURE__ */ u(
|
|
160
158
|
PaymentButton,
|
|
161
159
|
{
|
|
@@ -163,8 +161,7 @@ const OVO = w((props, ref) => {
|
|
|
163
161
|
status: paymentButtonStatus,
|
|
164
162
|
verified: validated,
|
|
165
163
|
disabled,
|
|
166
|
-
onClick: onSubmit
|
|
167
|
-
children: text
|
|
164
|
+
onClick: onSubmit
|
|
168
165
|
}
|
|
169
166
|
);
|
|
170
167
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import { createEmailCore, EmailField } from "../../EmailField/EmailField.js";
|
|
@@ -104,7 +104,9 @@ const OpayWallet = w((props, ref) => {
|
|
|
104
104
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
105
105
|
var _a2;
|
|
106
106
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
107
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
107
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
108
|
+
if (submitResult === false)
|
|
109
|
+
return;
|
|
108
110
|
if (errors) {
|
|
109
111
|
setPaymentButtonStatus("unSubmit");
|
|
110
112
|
return;
|
|
@@ -118,10 +120,6 @@ const OpayWallet = w((props, ref) => {
|
|
|
118
120
|
dom && validateFormSilently();
|
|
119
121
|
};
|
|
120
122
|
const Button = () => {
|
|
121
|
-
var _a;
|
|
122
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
123
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
124
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
125
123
|
return /* @__PURE__ */ u(
|
|
126
124
|
PaymentButton,
|
|
127
125
|
{
|
|
@@ -129,8 +127,7 @@ const OpayWallet = w((props, ref) => {
|
|
|
129
127
|
status: paymentButtonStatus,
|
|
130
128
|
disabled,
|
|
131
129
|
verified: validated,
|
|
132
|
-
onClick: onSubmit
|
|
133
|
-
children: text
|
|
130
|
+
onClick: onSubmit
|
|
134
131
|
}
|
|
135
132
|
);
|
|
136
133
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import "./p242.js";
|
|
@@ -27,7 +27,7 @@ import "../../business/PhoneField/config.js";
|
|
|
27
27
|
import "../../business/PhoneField/phone-field.js";
|
|
28
28
|
import "../../business/Tooltip/tooltip2.js";
|
|
29
29
|
import "../../business/BlikCodeField/blik-code-field.js";
|
|
30
|
-
import "../../internal/Button/
|
|
30
|
+
import "../../internal/Button/button.js";
|
|
31
31
|
import "../../business/BlikConfirmModal/blik-confirm-modal.js";
|
|
32
32
|
import "../../internal/LoadingCheck/loading-check.js";
|
|
33
33
|
import { DEFAULT_ADDRESS, AddressField } from "../../AddressField/index.js";
|
|
@@ -120,7 +120,9 @@ const P24 = w((props, ref) => {
|
|
|
120
120
|
setErrorMessage("");
|
|
121
121
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
122
122
|
var _a2;
|
|
123
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
123
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
124
|
+
if (submitResult === false)
|
|
125
|
+
return;
|
|
124
126
|
if (errors) {
|
|
125
127
|
setPaymentButtonStatus("unSubmit");
|
|
126
128
|
return;
|
|
@@ -151,10 +153,6 @@ const P24 = w((props, ref) => {
|
|
|
151
153
|
) }) });
|
|
152
154
|
};
|
|
153
155
|
const Button = () => {
|
|
154
|
-
var _a;
|
|
155
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
156
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
157
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
158
156
|
return /* @__PURE__ */ u(
|
|
159
157
|
PaymentButton,
|
|
160
158
|
{
|
|
@@ -162,8 +160,7 @@ const P24 = w((props, ref) => {
|
|
|
162
160
|
status: paymentButtonStatus,
|
|
163
161
|
verified: validated,
|
|
164
162
|
disabled,
|
|
165
|
-
onClick: onSubmit
|
|
166
|
-
children: text
|
|
163
|
+
onClick: onSubmit
|
|
167
164
|
}
|
|
168
165
|
);
|
|
169
166
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import { createEmailCore, EmailField } from "../../EmailField/EmailField.js";
|
|
@@ -104,7 +104,9 @@ const PagaWallet = w((props, ref) => {
|
|
|
104
104
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
105
105
|
var _a2;
|
|
106
106
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
107
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
107
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
108
|
+
if (submitResult === false)
|
|
109
|
+
return;
|
|
108
110
|
if (errors) {
|
|
109
111
|
setPaymentButtonStatus("unSubmit");
|
|
110
112
|
return;
|
|
@@ -118,10 +120,6 @@ const PagaWallet = w((props, ref) => {
|
|
|
118
120
|
dom && validateFormSilently();
|
|
119
121
|
};
|
|
120
122
|
const Button = () => {
|
|
121
|
-
var _a;
|
|
122
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
123
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
124
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
125
123
|
return /* @__PURE__ */ u(
|
|
126
124
|
PaymentButton,
|
|
127
125
|
{
|
|
@@ -129,8 +127,7 @@ const PagaWallet = w((props, ref) => {
|
|
|
129
127
|
status: paymentButtonStatus,
|
|
130
128
|
disabled,
|
|
131
129
|
verified: validated,
|
|
132
|
-
onClick: onSubmit
|
|
133
|
-
children: text
|
|
130
|
+
onClick: onSubmit
|
|
134
131
|
}
|
|
135
132
|
);
|
|
136
133
|
};
|
|
@@ -3,9 +3,9 @@ import { useBEM } from "../../../hooks/useBEM.js";
|
|
|
3
3
|
import { CoreContext } from "../../../core/context.js";
|
|
4
4
|
import "../../../utils/card-brand/brands.js";
|
|
5
5
|
import "../../../utils/system-info/get-browser-info.js";
|
|
6
|
-
import { normalizedClass
|
|
6
|
+
import { normalizedClass } from "../../../utils/format.js";
|
|
7
7
|
import { PaymentMethod, PaymentCategory, COMMON_CLASS_NAME } from "../../../constant.js";
|
|
8
|
-
import "../../../out/
|
|
8
|
+
import "../../../out/fraud-detection.js";
|
|
9
9
|
import { usePayState } from "../../../hooks/usePayState.js";
|
|
10
10
|
import { useBaseWallet } from "../../../hooks/useBaseWallet.js";
|
|
11
11
|
import { createEmailCore, EmailField } from "../../EmailField/EmailField.js";
|
|
@@ -104,7 +104,9 @@ const Paymaya = w((props, ref) => {
|
|
|
104
104
|
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
105
105
|
var _a2;
|
|
106
106
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
107
|
-
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext());
|
|
107
|
+
const submitResult = await ((_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors, getPaymentMethodContext()));
|
|
108
|
+
if (submitResult === false)
|
|
109
|
+
return;
|
|
108
110
|
if (errors) {
|
|
109
111
|
setPaymentButtonStatus("unSubmit");
|
|
110
112
|
return;
|
|
@@ -118,10 +120,6 @@ const Paymaya = w((props, ref) => {
|
|
|
118
120
|
dom && validateFormSilently();
|
|
119
121
|
};
|
|
120
122
|
const Button = () => {
|
|
121
|
-
var _a;
|
|
122
|
-
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
123
|
-
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
124
|
-
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
125
123
|
return /* @__PURE__ */ u(
|
|
126
124
|
PaymentButton,
|
|
127
125
|
{
|
|
@@ -129,8 +127,7 @@ const Paymaya = w((props, ref) => {
|
|
|
129
127
|
status: paymentButtonStatus,
|
|
130
128
|
disabled,
|
|
131
129
|
verified: validated,
|
|
132
|
-
onClick: onSubmit
|
|
133
|
-
children: text
|
|
130
|
+
onClick: onSubmit
|
|
134
131
|
}
|
|
135
132
|
);
|
|
136
133
|
};
|