@paykka/card-checkout-ui 0.13.1 → 0.13.5
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 +21 -21
- package/dist/card-checkout-ui.umd.cjs +21 -21
- package/dist/es/_commonjsHelpers.js +82 -1
- package/dist/es/api/modules/get-browser-params.js +4 -1
- package/dist/es/api/modules/opay-wallet/index.js +16 -0
- package/dist/es/api/modules/paga-wallet/index.js +16 -0
- package/dist/es/api/modules/pic-pay/index.js +16 -0
- package/dist/es/api/modules/pix/index.js +16 -0
- package/dist/es/api/modules/vietqr/index.js +4 -0
- package/dist/es/components/AliPay/index.js +29 -35
- package/dist/es/components/Boost/index.js +34 -40
- package/dist/es/components/Card/index.js +35 -39
- package/dist/es/components/DropIn/index.js +42 -2
- package/dist/es/components/EncryptedCard/index.js +5 -1
- package/dist/es/components/GooglePay/index.js +1 -0
- package/dist/es/components/GrabPay/index.js +34 -40
- package/dist/es/components/GuideCard/index.js +6 -1
- package/dist/es/components/LinePay/index.js +34 -40
- package/dist/es/components/MayBankQRPay/index.js +35 -41
- package/dist/es/components/NinePay/index.js +34 -40
- package/dist/es/components/SecuredFieldsProvider/index.js +23 -7
- package/dist/es/components/SecuredIframe/index.js +36 -59
- package/dist/es/components/Sepa/index.js +17 -21
- package/dist/es/components/ShopeePay/index.js +34 -40
- package/dist/es/components/TNGWallet/index.js +34 -40
- package/dist/es/components/ThreeDS/index.js +32 -7
- package/dist/es/components/WechatPay/index.js +19 -24
- package/dist/es/components/business/QRCodeModal/QRCodeModal.js +6 -6
- package/dist/es/components/index.js +5 -0
- package/dist/es/components/internal/Form/FormItem.js +1 -1
- package/dist/es/components/internal/Form/util.js +1 -1
- package/dist/es/components/internal/Select/SelectMenu.js +2 -2
- package/dist/es/components/internal/icons/IconError.js +7 -4
- package/dist/es/components/internal/icons/IconOpayWallet.js +71 -0
- package/dist/es/components/internal/icons/IconPagaWallet.js +141 -0
- package/dist/es/components/internal/icons/IconPaymaya.js +42 -86
- package/dist/es/components/internal/icons/IconPicPay.js +49 -0
- package/dist/es/components/internal/icons/IconPix.js +75 -0
- package/dist/es/components/internal/icons/IconVietqr.js +45 -0
- package/dist/es/components/internal/icons/IconVietqrComplete.js +49 -0
- package/dist/es/components/wallets/GCash/GCash.js +20 -25
- package/dist/es/components/wallets/OpayWallet/OpayWallet.js +346 -0
- package/dist/es/components/wallets/OpayWallet/index.js +1 -0
- package/dist/es/components/wallets/OpayWallet/opay-wallet.js +1 -0
- package/dist/es/components/wallets/OpayWallet/type.js +1 -0
- package/dist/es/components/wallets/PagaWallet/PagaWallet.js +346 -0
- package/dist/es/components/wallets/PagaWallet/index.js +1 -0
- package/dist/es/components/wallets/PagaWallet/paga-wallet.js +1 -0
- package/dist/es/components/wallets/PagaWallet/type.js +1 -0
- package/dist/es/components/wallets/Paymaya/Paymaya.js +34 -40
- package/dist/es/components/wallets/PicPay/PicPay.js +346 -0
- package/dist/es/components/wallets/PicPay/index.js +1 -0
- package/dist/es/components/wallets/PicPay/pic-pay.js +1 -0
- package/dist/es/components/wallets/PicPay/type.js +1 -0
- package/dist/es/components/wallets/Pix/Pix.js +346 -0
- package/dist/es/components/wallets/Pix/index.js +1 -0
- package/dist/es/components/wallets/Pix/pix2.js +1 -0
- package/dist/es/components/wallets/Pix/type.js +1 -0
- package/dist/es/components/wallets/Vietqr/Vietqr.js +380 -0
- package/dist/es/components/wallets/Vietqr/index.js +1 -0
- package/dist/es/components/wallets/Vietqr/type.js +1 -0
- package/dist/es/components/wallets/Vietqr/vietqr2.js +1 -0
- package/dist/es/components/wallets/Zalopay/Zalopay.js +17 -21
- package/dist/es/components/wallets/index.js +8 -0
- package/dist/es/constant.js +32 -2
- package/dist/es/core/checkout.js +24 -1
- package/dist/es/core/create.js +1 -1
- package/dist/es/core/session.js +2 -23
- package/dist/es/core/theme.js +65 -0
- package/dist/es/core.js +34 -34
- package/dist/es/i18n/locales/de-DE.js +8 -2
- package/dist/es/i18n/locales/en-GB.js +8 -2
- package/dist/es/i18n/locales/es-ES.js +8 -2
- package/dist/es/i18n/locales/fr-FR.js +8 -2
- package/dist/es/i18n/locales/ja-JP.js +8 -2
- package/dist/es/i18n/locales/ko-KR.js +8 -2
- package/dist/es/i18n/locales/nl-NL.js +8 -2
- package/dist/es/i18n/locales/pt-PT.js +8 -2
- package/dist/es/i18n/locales/ru-RU.js +8 -2
- package/dist/es/i18n/locales/zh-CN.js +10 -4
- package/dist/es/i18n/locales/zh-HK.js +10 -4
- package/dist/es/i18n/locales/zh-TW.js +10 -4
- package/dist/es/index.js +17 -5
- package/dist/es/style.css +1 -1
- package/dist/es/utils/format.js +0 -5
- package/dist/es/utils/object.js +31 -1
- package/dist/es/utils/string.js +10 -0
- package/dist/es/utils/system-info/is-ua-webview.js +14 -12
- package/dist/es/utils/theme.js +7 -0
- package/dist/style.css +1 -1
- package/dist/types/api/modules/get-browser-params.d.ts +1 -0
- package/dist/types/api/modules/index.d.ts +5 -0
- package/dist/types/api/modules/opay-wallet/index.d.ts +4 -0
- package/dist/types/api/modules/paga-wallet/index.d.ts +4 -0
- package/dist/types/api/modules/pic-pay/index.d.ts +4 -0
- package/dist/types/api/modules/pix/index.d.ts +4 -0
- package/dist/types/api/modules/vietqr/index.d.ts +4 -0
- package/dist/types/components/DropIn/type.d.ts +3 -2
- package/dist/types/components/SecuredFieldsProvider/type.d.ts +5 -0
- package/dist/types/components/SecuredIframe/HiddenIframe.d.ts +3 -1
- package/dist/types/components/ThreeDS/components/ThreeDSAuth/type.d.ts +2 -0
- package/dist/types/components/business/QRCodeModal/type.d.ts +2 -0
- package/dist/types/components/index.d.ts +1 -3
- package/dist/types/components/internal/Loading/Loading.d.ts +1 -0
- package/dist/types/components/internal/Select/SelectMenu.d.ts +1 -1
- package/dist/types/components/internal/icons/IconOpayWallet.d.ts +2 -0
- package/dist/types/components/internal/icons/IconPagaWallet.d.ts +2 -0
- package/dist/types/components/internal/icons/IconPicPay.d.ts +2 -0
- package/dist/types/components/internal/icons/IconPix.d.ts +2 -0
- package/dist/types/components/internal/icons/IconVietqr.d.ts +2 -0
- package/dist/types/components/internal/icons/IconVietqrComplete.d.ts +2 -0
- package/dist/types/components/internal/icons/index.d.ts +6 -0
- package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +10 -0
- package/dist/types/components/wallets/OpayWallet/index.d.ts +2 -0
- package/dist/types/components/wallets/OpayWallet/type.d.ts +40 -0
- package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +10 -0
- package/dist/types/components/wallets/PagaWallet/index.d.ts +2 -0
- package/dist/types/components/wallets/PagaWallet/type.d.ts +40 -0
- package/dist/types/components/wallets/PicPay/PicPay.d.ts +10 -0
- package/dist/types/components/wallets/PicPay/index.d.ts +2 -0
- package/dist/types/components/wallets/PicPay/type.d.ts +40 -0
- package/dist/types/components/wallets/Pix/Pix.d.ts +10 -0
- package/dist/types/components/wallets/Pix/index.d.ts +2 -0
- package/dist/types/components/wallets/Pix/type.d.ts +40 -0
- package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +10 -0
- package/dist/types/components/wallets/Vietqr/index.d.ts +2 -0
- package/dist/types/components/wallets/Vietqr/type.d.ts +39 -0
- package/dist/types/components/wallets/index.d.ts +8 -0
- package/dist/types/components/wallets/type.d.ts +9 -0
- package/dist/types/constant.d.ts +11 -1
- package/dist/types/core/checkout.d.ts +4 -0
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/core/session.d.ts +1 -11
- package/dist/types/core/theme.d.ts +7 -0
- package/dist/types/i18n/locales/de-DE.d.ts +6 -0
- package/dist/types/i18n/locales/en-GB.d.ts +6 -0
- package/dist/types/i18n/locales/es-ES.d.ts +6 -0
- package/dist/types/i18n/locales/fr-FR.d.ts +6 -0
- package/dist/types/i18n/locales/ja-JP.d.ts +6 -0
- package/dist/types/i18n/locales/ko-KR.d.ts +6 -0
- package/dist/types/i18n/locales/nl-NL.d.ts +6 -0
- package/dist/types/i18n/locales/pt-PT.d.ts +6 -0
- package/dist/types/i18n/locales/ru-RU.d.ts +6 -0
- package/dist/types/i18n/locales/zh-CN.d.ts +6 -0
- package/dist/types/i18n/locales/zh-HK.d.ts +6 -0
- package/dist/types/i18n/locales/zh-TW.d.ts +6 -0
- package/dist/types/types/message.d.ts +29 -25
- package/dist/types/utils/index.d.ts +3 -2
- package/dist/types/utils/object.d.ts +7 -0
- package/dist/types/utils/string.d.ts +1 -0
- package/dist/types/utils/style.d.ts +1 -1
- package/dist/types/utils/system-info/is-ua-webview.d.ts +1 -1
- package/dist/types/utils/theme.d.ts +4 -0
- package/package.json +67 -67
- package/dist/es/utils/deep-freeze.js +0 -13
- package/dist/es/utils/obj.js +0 -22
- package/dist/types/utils/deep-freeze.d.ts +0 -1
- package/dist/types/utils/obj.d.ts +0 -6
|
@@ -3,7 +3,7 @@ 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 {
|
|
6
|
+
import { normalizedClass, formatAmount } from "../../utils/format.js";
|
|
7
7
|
import { redirectToPayment } from "../../utils/redirect.js";
|
|
8
8
|
import { formatPaymentResult } from "../../utils/payment.js";
|
|
9
9
|
import { isTimeoutError } from "../../api/http.js";
|
|
@@ -25,7 +25,6 @@ import { GuideCard } from "../GuideCard/index.js";
|
|
|
25
25
|
const { bem } = useBEM("line-pay");
|
|
26
26
|
const fieldClassNames = bem("field");
|
|
27
27
|
const LinePay = w((props, ref) => {
|
|
28
|
-
var _a, _b, _c, _d, _e, _f;
|
|
29
28
|
const {
|
|
30
29
|
session,
|
|
31
30
|
showEmail = false,
|
|
@@ -46,21 +45,21 @@ const LinePay = w((props, ref) => {
|
|
|
46
45
|
startReFetchPayInfo({ timeout });
|
|
47
46
|
},
|
|
48
47
|
updateAddress: () => {
|
|
49
|
-
var
|
|
48
|
+
var _a;
|
|
50
49
|
if (!(fieldStatus == null ? void 0 : fieldStatus.address.show))
|
|
51
50
|
return;
|
|
52
51
|
const newForm = Object.assign(form, { address: addressCore.getAddressState() });
|
|
53
52
|
setForm(newForm);
|
|
54
|
-
(
|
|
53
|
+
(_a = addressFieldRef.current) == null ? void 0 : _a.update(addressCore.getAddressState());
|
|
55
54
|
validateForm();
|
|
56
55
|
},
|
|
57
56
|
updateEmail: () => {
|
|
58
|
-
var
|
|
57
|
+
var _a;
|
|
59
58
|
if (!(fieldStatus == null ? void 0 : fieldStatus.email.show))
|
|
60
59
|
return;
|
|
61
60
|
const newForm = Object.assign(form, { email: emailState.email });
|
|
62
61
|
setForm(newForm);
|
|
63
|
-
(
|
|
62
|
+
(_a = emailFieldRef.current) == null ? void 0 : _a.update(emailState.email);
|
|
64
63
|
validateForm();
|
|
65
64
|
},
|
|
66
65
|
payment: () => {
|
|
@@ -103,11 +102,11 @@ const LinePay = w((props, ref) => {
|
|
|
103
102
|
setFieldStatus({ ...field });
|
|
104
103
|
};
|
|
105
104
|
const processOnSuccess = (res) => {
|
|
106
|
-
var
|
|
105
|
+
var _a, _b;
|
|
107
106
|
setSubmitButtonStatus("success");
|
|
108
|
-
(
|
|
107
|
+
(_b = props.onSuccess) == null ? void 0 : _b.call(props, formatPaymentResult({
|
|
109
108
|
...res,
|
|
110
|
-
returnUrl: (
|
|
109
|
+
returnUrl: (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.returnUrl
|
|
111
110
|
}));
|
|
112
111
|
};
|
|
113
112
|
y(() => {
|
|
@@ -129,16 +128,16 @@ const LinePay = w((props, ref) => {
|
|
|
129
128
|
}
|
|
130
129
|
}, [sessionReady]);
|
|
131
130
|
const processOnError = (error) => {
|
|
132
|
-
var
|
|
133
|
-
(
|
|
131
|
+
var _a;
|
|
132
|
+
(_a = props.onError) == null ? void 0 : _a.call(props, error);
|
|
134
133
|
core.resetEnablePaymentMethod();
|
|
135
134
|
};
|
|
136
135
|
const onTimeout = q(
|
|
137
136
|
(message) => {
|
|
138
|
-
var
|
|
137
|
+
var _a;
|
|
139
138
|
setErrorMsg(message || i18n.get("common.payTimeout"));
|
|
140
139
|
setSubmitButtonStatus("unSubmit");
|
|
141
|
-
(
|
|
140
|
+
(_a = props.onTimeout) == null ? void 0 : _a.call(props);
|
|
142
141
|
core.resetEnablePaymentMethod();
|
|
143
142
|
},
|
|
144
143
|
[i18n, props.onTimeout]
|
|
@@ -168,12 +167,12 @@ const LinePay = w((props, ref) => {
|
|
|
168
167
|
};
|
|
169
168
|
};
|
|
170
169
|
const pay = async (search = false, timeout) => {
|
|
171
|
-
var
|
|
170
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
172
171
|
try {
|
|
173
172
|
const requestOptions = { locale: i18n.locale, timeout };
|
|
174
173
|
let res = null;
|
|
175
174
|
if (search) {
|
|
176
|
-
const extraParams = (
|
|
175
|
+
const extraParams = (_b = (_a = core.config)._getExtraParams) == null ? void 0 : _b.call(_a, "query", PaymentMethod.LINE_PAY);
|
|
177
176
|
res = await getLinePayInfo(
|
|
178
177
|
{
|
|
179
178
|
sessionId: session.sessionId,
|
|
@@ -184,10 +183,10 @@ const LinePay = w((props, ref) => {
|
|
|
184
183
|
requestOptions
|
|
185
184
|
);
|
|
186
185
|
} else {
|
|
187
|
-
const extraParams = (
|
|
186
|
+
const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", PaymentMethod.LINE_PAY);
|
|
188
187
|
res = await linePay(await getPaymentParams(), extraParams, requestOptions);
|
|
189
188
|
}
|
|
190
|
-
!search && ((
|
|
189
|
+
!search && ((_e = props.onSubmitResponse) == null ? void 0 : _e.call(props, res));
|
|
191
190
|
const { status, orderStatus, errorMessage, errorCode, payInfo, sessionId } = res;
|
|
192
191
|
sessionId && (session.sessionId = sessionId);
|
|
193
192
|
if (status === "PROCESSING") {
|
|
@@ -214,7 +213,7 @@ const LinePay = w((props, ref) => {
|
|
|
214
213
|
return { end: false };
|
|
215
214
|
} else if (orderStatus === "CANCELED") {
|
|
216
215
|
setSubmitButtonStatus("unSubmit");
|
|
217
|
-
(
|
|
216
|
+
(_f = props.onTimeout) == null ? void 0 : _f.call(props);
|
|
218
217
|
core.resetEnablePaymentMethod();
|
|
219
218
|
return { end: true };
|
|
220
219
|
}
|
|
@@ -246,8 +245,8 @@ const LinePay = w((props, ref) => {
|
|
|
246
245
|
}
|
|
247
246
|
};
|
|
248
247
|
const validateForm = () => {
|
|
249
|
-
var
|
|
250
|
-
(
|
|
248
|
+
var _a;
|
|
249
|
+
(_a = formRef.current) == null ? void 0 : _a.validate(void 0, false).then(() => {
|
|
251
250
|
setValidated(true);
|
|
252
251
|
}).catch(() => {
|
|
253
252
|
setValidated(false);
|
|
@@ -257,12 +256,12 @@ const LinePay = w((props, ref) => {
|
|
|
257
256
|
validateForm();
|
|
258
257
|
}, [form]);
|
|
259
258
|
const onSubmit = async () => {
|
|
260
|
-
var
|
|
259
|
+
var _a;
|
|
261
260
|
setErrorMsg("");
|
|
262
|
-
(
|
|
263
|
-
var
|
|
261
|
+
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
262
|
+
var _a2;
|
|
264
263
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
265
|
-
(
|
|
264
|
+
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors);
|
|
266
265
|
if (errors) {
|
|
267
266
|
setSubmitButtonStatus("unSubmit");
|
|
268
267
|
return;
|
|
@@ -277,8 +276,8 @@ const LinePay = w((props, ref) => {
|
|
|
277
276
|
dom && validateForm();
|
|
278
277
|
};
|
|
279
278
|
const Button = () => {
|
|
280
|
-
var
|
|
281
|
-
const transAmount = (
|
|
279
|
+
var _a;
|
|
280
|
+
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
282
281
|
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
283
282
|
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
284
283
|
return /* @__PURE__ */ u(
|
|
@@ -304,24 +303,17 @@ const LinePay = w((props, ref) => {
|
|
|
304
303
|
}
|
|
305
304
|
) }) });
|
|
306
305
|
};
|
|
307
|
-
const formStyle = {
|
|
308
|
-
[cssVarPrefix("button-bg-color")]: (_a = session == null ? void 0 : session.colors) == null ? void 0 : _a.primary,
|
|
309
|
-
[cssVarPrefix("button-bg-color-hover")]: (_b = session == null ? void 0 : session.colors) == null ? void 0 : _b.primaryHover,
|
|
310
|
-
[cssVarPrefix("button-bg-color-active")]: (_c = session == null ? void 0 : session.colors) == null ? void 0 : _c.primaryActive,
|
|
311
|
-
[cssVarPrefix("button-text-color")]: (_e = (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.theme) == null ? void 0 : _e.payButtonTextColor,
|
|
312
|
-
[cssVarPrefix("input-color")]: (_f = session == null ? void 0 : session.colors) == null ? void 0 : _f.primary
|
|
313
|
-
};
|
|
314
306
|
const ErrorMessage = () => {
|
|
315
|
-
return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg
|
|
307
|
+
return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg }) });
|
|
316
308
|
};
|
|
317
309
|
const Address = () => {
|
|
318
|
-
var
|
|
310
|
+
var _a, _b;
|
|
319
311
|
return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
|
|
320
312
|
AddressField,
|
|
321
313
|
{
|
|
322
314
|
ref: addressFieldRef,
|
|
323
315
|
value: form.address,
|
|
324
|
-
country: ((
|
|
316
|
+
country: ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.country) || ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.bill.country),
|
|
325
317
|
onAddressChange: (value) => setForm(Object.assign(form, { address: value }))
|
|
326
318
|
}
|
|
327
319
|
) }) });
|
|
@@ -334,13 +326,15 @@ const LinePay = w((props, ref) => {
|
|
|
334
326
|
session,
|
|
335
327
|
core
|
|
336
328
|
},
|
|
337
|
-
children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u(
|
|
329
|
+
children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u("div", { className: core.theme.className, children: [
|
|
338
330
|
showGuideCard && /* @__PURE__ */ u(GuideCard, { type: PaymentCategory.LINE_PAY }),
|
|
339
|
-
/* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()),
|
|
331
|
+
/* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
|
|
340
332
|
Email(),
|
|
341
333
|
Address(),
|
|
342
|
-
|
|
343
|
-
|
|
334
|
+
/* @__PURE__ */ u("div", { className: bem("footer-wrapper"), children: [
|
|
335
|
+
ErrorMessage(),
|
|
336
|
+
!hidePaymentButton && Button()
|
|
337
|
+
] })
|
|
344
338
|
] }) })
|
|
345
339
|
] })
|
|
346
340
|
}
|
|
@@ -3,7 +3,7 @@ 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 {
|
|
6
|
+
import { normalizedClass, formatAmount } from "../../utils/format.js";
|
|
7
7
|
import { redirectToPayment } from "../../utils/redirect.js";
|
|
8
8
|
import { formatPaymentResult } from "../../utils/payment.js";
|
|
9
9
|
import { isTimeoutError } from "../../api/http.js";
|
|
@@ -26,7 +26,6 @@ const { bem } = useBEM("may-bank-qr-pay");
|
|
|
26
26
|
const fieldClassNames = bem("field");
|
|
27
27
|
const MayBankQRPay = w(
|
|
28
28
|
(props, ref) => {
|
|
29
|
-
var _a, _b, _c, _d, _e, _f;
|
|
30
29
|
const {
|
|
31
30
|
session,
|
|
32
31
|
showEmail = false,
|
|
@@ -47,21 +46,21 @@ const MayBankQRPay = w(
|
|
|
47
46
|
startReFetchPayInfo({ timeout });
|
|
48
47
|
},
|
|
49
48
|
updateAddress: () => {
|
|
50
|
-
var
|
|
49
|
+
var _a;
|
|
51
50
|
if (!(fieldStatus == null ? void 0 : fieldStatus.address.show))
|
|
52
51
|
return;
|
|
53
52
|
const newForm = Object.assign(form, { address: addressCore.getAddressState() });
|
|
54
53
|
setForm(newForm);
|
|
55
|
-
(
|
|
54
|
+
(_a = addressFieldRef.current) == null ? void 0 : _a.update(addressCore.getAddressState());
|
|
56
55
|
validateForm();
|
|
57
56
|
},
|
|
58
57
|
updateEmail: () => {
|
|
59
|
-
var
|
|
58
|
+
var _a;
|
|
60
59
|
if (!(fieldStatus == null ? void 0 : fieldStatus.email.show))
|
|
61
60
|
return;
|
|
62
61
|
const newForm = Object.assign(form, { email: emailState.email });
|
|
63
62
|
setForm(newForm);
|
|
64
|
-
(
|
|
63
|
+
(_a = emailFieldRef.current) == null ? void 0 : _a.update(emailState.email);
|
|
65
64
|
validateForm();
|
|
66
65
|
},
|
|
67
66
|
payment: () => {
|
|
@@ -104,11 +103,11 @@ const MayBankQRPay = w(
|
|
|
104
103
|
setFieldStatus({ ...field });
|
|
105
104
|
};
|
|
106
105
|
const processOnSuccess = (res) => {
|
|
107
|
-
var
|
|
106
|
+
var _a, _b;
|
|
108
107
|
setSubmitButtonStatus("success");
|
|
109
|
-
(
|
|
108
|
+
(_b = props.onSuccess) == null ? void 0 : _b.call(props, formatPaymentResult({
|
|
110
109
|
...res,
|
|
111
|
-
returnUrl: (
|
|
110
|
+
returnUrl: (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.returnUrl
|
|
112
111
|
}));
|
|
113
112
|
};
|
|
114
113
|
y(() => {
|
|
@@ -130,16 +129,16 @@ const MayBankQRPay = w(
|
|
|
130
129
|
}
|
|
131
130
|
}, [sessionReady]);
|
|
132
131
|
const processOnError = (error) => {
|
|
133
|
-
var
|
|
134
|
-
(
|
|
132
|
+
var _a;
|
|
133
|
+
(_a = props.onError) == null ? void 0 : _a.call(props, error);
|
|
135
134
|
core.resetEnablePaymentMethod();
|
|
136
135
|
};
|
|
137
136
|
const onTimeout = q(
|
|
138
137
|
(message) => {
|
|
139
|
-
var
|
|
138
|
+
var _a;
|
|
140
139
|
setErrorMsg(message || i18n.get("common.payTimeout"));
|
|
141
140
|
setSubmitButtonStatus("unSubmit");
|
|
142
|
-
(
|
|
141
|
+
(_a = props.onTimeout) == null ? void 0 : _a.call(props);
|
|
143
142
|
core.resetEnablePaymentMethod();
|
|
144
143
|
},
|
|
145
144
|
[i18n, props.onTimeout]
|
|
@@ -169,12 +168,12 @@ const MayBankQRPay = w(
|
|
|
169
168
|
};
|
|
170
169
|
};
|
|
171
170
|
const pay = async (search = false, timeout) => {
|
|
172
|
-
var
|
|
171
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
173
172
|
try {
|
|
174
173
|
const requestOptions = { locale: i18n.locale, timeout };
|
|
175
174
|
let res = null;
|
|
176
175
|
if (search) {
|
|
177
|
-
const extraParams = (
|
|
176
|
+
const extraParams = (_b = (_a = core.config)._getExtraParams) == null ? void 0 : _b.call(_a, "query", PaymentMethod.MAY_BANK_QR_PAY);
|
|
178
177
|
res = await getMayBankQRPayInfo(
|
|
179
178
|
{
|
|
180
179
|
sessionId: session.sessionId,
|
|
@@ -185,14 +184,14 @@ const MayBankQRPay = w(
|
|
|
185
184
|
requestOptions
|
|
186
185
|
);
|
|
187
186
|
} else {
|
|
188
|
-
const extraParams = (
|
|
189
|
-
|
|
187
|
+
const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(
|
|
188
|
+
_c,
|
|
190
189
|
"payment",
|
|
191
190
|
PaymentMethod.MAY_BANK_QR_PAY
|
|
192
191
|
);
|
|
193
192
|
res = await mayBankQRPay(await getPaymentParams(), extraParams, requestOptions);
|
|
194
193
|
}
|
|
195
|
-
!search && ((
|
|
194
|
+
!search && ((_e = props.onSubmitResponse) == null ? void 0 : _e.call(props, res));
|
|
196
195
|
const { status, orderStatus, errorMessage, errorCode, payInfo, sessionId } = res;
|
|
197
196
|
sessionId && (session.sessionId = sessionId);
|
|
198
197
|
if (status === "PROCESSING") {
|
|
@@ -219,7 +218,7 @@ const MayBankQRPay = w(
|
|
|
219
218
|
return { end: false };
|
|
220
219
|
} else if (orderStatus === "CANCELED") {
|
|
221
220
|
setSubmitButtonStatus("unSubmit");
|
|
222
|
-
(
|
|
221
|
+
(_f = props.onTimeout) == null ? void 0 : _f.call(props);
|
|
223
222
|
core.resetEnablePaymentMethod();
|
|
224
223
|
return { end: true };
|
|
225
224
|
}
|
|
@@ -251,8 +250,8 @@ const MayBankQRPay = w(
|
|
|
251
250
|
}
|
|
252
251
|
};
|
|
253
252
|
const validateForm = () => {
|
|
254
|
-
var
|
|
255
|
-
(
|
|
253
|
+
var _a;
|
|
254
|
+
(_a = formRef.current) == null ? void 0 : _a.validate(void 0, false).then(() => {
|
|
256
255
|
setValidated(true);
|
|
257
256
|
}).catch(() => {
|
|
258
257
|
setValidated(false);
|
|
@@ -262,12 +261,12 @@ const MayBankQRPay = w(
|
|
|
262
261
|
validateForm();
|
|
263
262
|
}, [form]);
|
|
264
263
|
const onSubmit = async () => {
|
|
265
|
-
var
|
|
264
|
+
var _a;
|
|
266
265
|
setErrorMsg("");
|
|
267
|
-
(
|
|
268
|
-
var
|
|
266
|
+
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
267
|
+
var _a2;
|
|
269
268
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
270
|
-
(
|
|
269
|
+
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors);
|
|
271
270
|
if (errors) {
|
|
272
271
|
setSubmitButtonStatus("unSubmit");
|
|
273
272
|
return;
|
|
@@ -282,8 +281,8 @@ const MayBankQRPay = w(
|
|
|
282
281
|
dom && validateForm();
|
|
283
282
|
};
|
|
284
283
|
const Button = () => {
|
|
285
|
-
var
|
|
286
|
-
const transAmount = (
|
|
284
|
+
var _a;
|
|
285
|
+
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
287
286
|
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
288
287
|
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
289
288
|
return /* @__PURE__ */ u(
|
|
@@ -309,24 +308,17 @@ const MayBankQRPay = w(
|
|
|
309
308
|
}
|
|
310
309
|
) }) });
|
|
311
310
|
};
|
|
312
|
-
const formStyle = {
|
|
313
|
-
[cssVarPrefix("button-bg-color")]: (_a = session == null ? void 0 : session.colors) == null ? void 0 : _a.primary,
|
|
314
|
-
[cssVarPrefix("button-bg-color-hover")]: (_b = session == null ? void 0 : session.colors) == null ? void 0 : _b.primaryHover,
|
|
315
|
-
[cssVarPrefix("button-bg-color-active")]: (_c = session == null ? void 0 : session.colors) == null ? void 0 : _c.primaryActive,
|
|
316
|
-
[cssVarPrefix("button-text-color")]: (_e = (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.theme) == null ? void 0 : _e.payButtonTextColor,
|
|
317
|
-
[cssVarPrefix("input-color")]: (_f = session == null ? void 0 : session.colors) == null ? void 0 : _f.primary
|
|
318
|
-
};
|
|
319
311
|
const ErrorMessage = () => {
|
|
320
|
-
return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg
|
|
312
|
+
return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg }) });
|
|
321
313
|
};
|
|
322
314
|
const Address = () => {
|
|
323
|
-
var
|
|
315
|
+
var _a, _b;
|
|
324
316
|
return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
|
|
325
317
|
AddressField,
|
|
326
318
|
{
|
|
327
319
|
ref: addressFieldRef,
|
|
328
320
|
value: form.address,
|
|
329
|
-
country: ((
|
|
321
|
+
country: ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.country) || ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.bill.country),
|
|
330
322
|
onAddressChange: (value) => setForm(Object.assign(form, { address: value }))
|
|
331
323
|
}
|
|
332
324
|
) }) });
|
|
@@ -339,13 +331,15 @@ const MayBankQRPay = w(
|
|
|
339
331
|
session,
|
|
340
332
|
core
|
|
341
333
|
},
|
|
342
|
-
children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u(
|
|
334
|
+
children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u("div", { className: core.theme.className, children: [
|
|
343
335
|
showGuideCard && /* @__PURE__ */ u(GuideCard, { type: PaymentCategory.MAY_BANK_QR_PAY }),
|
|
344
|
-
/* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()),
|
|
336
|
+
/* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
|
|
345
337
|
Email(),
|
|
346
338
|
Address(),
|
|
347
|
-
|
|
348
|
-
|
|
339
|
+
/* @__PURE__ */ u("div", { className: bem("footer-wrapper"), children: [
|
|
340
|
+
ErrorMessage(),
|
|
341
|
+
!hidePaymentButton && Button()
|
|
342
|
+
] })
|
|
349
343
|
] }) })
|
|
350
344
|
] })
|
|
351
345
|
}
|
|
@@ -3,7 +3,7 @@ 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 {
|
|
6
|
+
import { normalizedClass, formatAmount } from "../../utils/format.js";
|
|
7
7
|
import { redirectToPayment } from "../../utils/redirect.js";
|
|
8
8
|
import { formatPaymentResult } from "../../utils/payment.js";
|
|
9
9
|
import { isTimeoutError } from "../../api/http.js";
|
|
@@ -25,7 +25,6 @@ import { GuideCard } from "../GuideCard/index.js";
|
|
|
25
25
|
const { bem } = useBEM("nine-pay");
|
|
26
26
|
const fieldClassNames = bem("field");
|
|
27
27
|
const NinePay = w((props, ref) => {
|
|
28
|
-
var _a, _b, _c, _d, _e, _f;
|
|
29
28
|
const {
|
|
30
29
|
session,
|
|
31
30
|
showEmail = false,
|
|
@@ -46,21 +45,21 @@ const NinePay = w((props, ref) => {
|
|
|
46
45
|
startReFetchPayInfo({ timeout });
|
|
47
46
|
},
|
|
48
47
|
updateAddress: () => {
|
|
49
|
-
var
|
|
48
|
+
var _a;
|
|
50
49
|
if (!(fieldStatus == null ? void 0 : fieldStatus.address.show))
|
|
51
50
|
return;
|
|
52
51
|
const newForm = Object.assign(form, { address: addressCore.getAddressState() });
|
|
53
52
|
setForm(newForm);
|
|
54
|
-
(
|
|
53
|
+
(_a = addressFieldRef.current) == null ? void 0 : _a.update(addressCore.getAddressState());
|
|
55
54
|
validateForm();
|
|
56
55
|
},
|
|
57
56
|
updateEmail: () => {
|
|
58
|
-
var
|
|
57
|
+
var _a;
|
|
59
58
|
if (!(fieldStatus == null ? void 0 : fieldStatus.email.show))
|
|
60
59
|
return;
|
|
61
60
|
const newForm = Object.assign(form, { email: emailState.email });
|
|
62
61
|
setForm(newForm);
|
|
63
|
-
(
|
|
62
|
+
(_a = emailFieldRef.current) == null ? void 0 : _a.update(emailState.email);
|
|
64
63
|
validateForm();
|
|
65
64
|
},
|
|
66
65
|
payment: () => {
|
|
@@ -103,11 +102,11 @@ const NinePay = w((props, ref) => {
|
|
|
103
102
|
setFieldStatus({ ...field });
|
|
104
103
|
};
|
|
105
104
|
const processOnSuccess = (res) => {
|
|
106
|
-
var
|
|
105
|
+
var _a, _b;
|
|
107
106
|
setSubmitButtonStatus("success");
|
|
108
|
-
(
|
|
107
|
+
(_b = props.onSuccess) == null ? void 0 : _b.call(props, formatPaymentResult({
|
|
109
108
|
...res,
|
|
110
|
-
returnUrl: (
|
|
109
|
+
returnUrl: (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.returnUrl
|
|
111
110
|
}));
|
|
112
111
|
};
|
|
113
112
|
y(() => {
|
|
@@ -129,16 +128,16 @@ const NinePay = w((props, ref) => {
|
|
|
129
128
|
}
|
|
130
129
|
}, [sessionReady]);
|
|
131
130
|
const processOnError = (error) => {
|
|
132
|
-
var
|
|
133
|
-
(
|
|
131
|
+
var _a;
|
|
132
|
+
(_a = props.onError) == null ? void 0 : _a.call(props, error);
|
|
134
133
|
core.resetEnablePaymentMethod();
|
|
135
134
|
};
|
|
136
135
|
const onTimeout = q(
|
|
137
136
|
(message) => {
|
|
138
|
-
var
|
|
137
|
+
var _a;
|
|
139
138
|
setErrorMsg(message || i18n.get("common.payTimeout"));
|
|
140
139
|
setSubmitButtonStatus("unSubmit");
|
|
141
|
-
(
|
|
140
|
+
(_a = props.onTimeout) == null ? void 0 : _a.call(props);
|
|
142
141
|
core.resetEnablePaymentMethod();
|
|
143
142
|
},
|
|
144
143
|
[i18n, props.onTimeout]
|
|
@@ -168,12 +167,12 @@ const NinePay = w((props, ref) => {
|
|
|
168
167
|
};
|
|
169
168
|
};
|
|
170
169
|
const pay = async (search = false, timeout) => {
|
|
171
|
-
var
|
|
170
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
172
171
|
try {
|
|
173
172
|
const requestOptions = { locale: i18n.locale, timeout };
|
|
174
173
|
let res = null;
|
|
175
174
|
if (search) {
|
|
176
|
-
const extraParams = (
|
|
175
|
+
const extraParams = (_b = (_a = core.config)._getExtraParams) == null ? void 0 : _b.call(_a, "query", PaymentMethod.NINE_PAY);
|
|
177
176
|
res = await getNinePayInfo(
|
|
178
177
|
{
|
|
179
178
|
sessionId: session.sessionId,
|
|
@@ -184,10 +183,10 @@ const NinePay = w((props, ref) => {
|
|
|
184
183
|
requestOptions
|
|
185
184
|
);
|
|
186
185
|
} else {
|
|
187
|
-
const extraParams = (
|
|
186
|
+
const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", PaymentMethod.NINE_PAY);
|
|
188
187
|
res = await ninePay(await getPaymentParams(), extraParams, requestOptions);
|
|
189
188
|
}
|
|
190
|
-
!search && ((
|
|
189
|
+
!search && ((_e = props.onSubmitResponse) == null ? void 0 : _e.call(props, res));
|
|
191
190
|
const { status, orderStatus, errorMessage, errorCode, payInfo, sessionId } = res;
|
|
192
191
|
sessionId && (session.sessionId = sessionId);
|
|
193
192
|
if (status === "PROCESSING") {
|
|
@@ -214,7 +213,7 @@ const NinePay = w((props, ref) => {
|
|
|
214
213
|
return { end: false };
|
|
215
214
|
} else if (orderStatus === "CANCELED") {
|
|
216
215
|
setSubmitButtonStatus("unSubmit");
|
|
217
|
-
(
|
|
216
|
+
(_f = props.onTimeout) == null ? void 0 : _f.call(props);
|
|
218
217
|
core.resetEnablePaymentMethod();
|
|
219
218
|
return { end: true };
|
|
220
219
|
}
|
|
@@ -246,8 +245,8 @@ const NinePay = w((props, ref) => {
|
|
|
246
245
|
}
|
|
247
246
|
};
|
|
248
247
|
const validateForm = () => {
|
|
249
|
-
var
|
|
250
|
-
(
|
|
248
|
+
var _a;
|
|
249
|
+
(_a = formRef.current) == null ? void 0 : _a.validate(void 0, false).then(() => {
|
|
251
250
|
setValidated(true);
|
|
252
251
|
}).catch(() => {
|
|
253
252
|
setValidated(false);
|
|
@@ -257,12 +256,12 @@ const NinePay = w((props, ref) => {
|
|
|
257
256
|
validateForm();
|
|
258
257
|
}, [form]);
|
|
259
258
|
const onSubmit = async () => {
|
|
260
|
-
var
|
|
259
|
+
var _a;
|
|
261
260
|
setErrorMsg("");
|
|
262
|
-
(
|
|
263
|
-
var
|
|
261
|
+
(_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
|
|
262
|
+
var _a2;
|
|
264
263
|
(fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
|
|
265
|
-
(
|
|
264
|
+
(_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors);
|
|
266
265
|
if (errors) {
|
|
267
266
|
setSubmitButtonStatus("unSubmit");
|
|
268
267
|
return;
|
|
@@ -277,8 +276,8 @@ const NinePay = w((props, ref) => {
|
|
|
277
276
|
dom && validateForm();
|
|
278
277
|
};
|
|
279
278
|
const Button = () => {
|
|
280
|
-
var
|
|
281
|
-
const transAmount = (
|
|
279
|
+
var _a;
|
|
280
|
+
const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
|
|
282
281
|
const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
|
|
283
282
|
const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
|
|
284
283
|
return /* @__PURE__ */ u(
|
|
@@ -304,24 +303,17 @@ const NinePay = w((props, ref) => {
|
|
|
304
303
|
}
|
|
305
304
|
) }) });
|
|
306
305
|
};
|
|
307
|
-
const formStyle = {
|
|
308
|
-
[cssVarPrefix("button-bg-color")]: (_a = session == null ? void 0 : session.colors) == null ? void 0 : _a.primary,
|
|
309
|
-
[cssVarPrefix("button-bg-color-hover")]: (_b = session == null ? void 0 : session.colors) == null ? void 0 : _b.primaryHover,
|
|
310
|
-
[cssVarPrefix("button-bg-color-active")]: (_c = session == null ? void 0 : session.colors) == null ? void 0 : _c.primaryActive,
|
|
311
|
-
[cssVarPrefix("button-text-color")]: (_e = (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.theme) == null ? void 0 : _e.payButtonTextColor,
|
|
312
|
-
[cssVarPrefix("input-color")]: (_f = session == null ? void 0 : session.colors) == null ? void 0 : _f.primary
|
|
313
|
-
};
|
|
314
306
|
const ErrorMessage = () => {
|
|
315
|
-
return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg
|
|
307
|
+
return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg }) });
|
|
316
308
|
};
|
|
317
309
|
const Address = () => {
|
|
318
|
-
var
|
|
310
|
+
var _a, _b;
|
|
319
311
|
return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
|
|
320
312
|
AddressField,
|
|
321
313
|
{
|
|
322
314
|
ref: addressFieldRef,
|
|
323
315
|
value: form.address,
|
|
324
|
-
country: ((
|
|
316
|
+
country: ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.country) || ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.bill.country),
|
|
325
317
|
onAddressChange: (value) => setForm(Object.assign(form, { address: value }))
|
|
326
318
|
}
|
|
327
319
|
) }) });
|
|
@@ -334,13 +326,15 @@ const NinePay = w((props, ref) => {
|
|
|
334
326
|
session,
|
|
335
327
|
core
|
|
336
328
|
},
|
|
337
|
-
children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u(
|
|
329
|
+
children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u("div", { className: core.theme.className, children: [
|
|
338
330
|
showGuideCard && /* @__PURE__ */ u(GuideCard, { type: PaymentCategory.NINE_PAY }),
|
|
339
|
-
/* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()),
|
|
331
|
+
/* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
|
|
340
332
|
Email(),
|
|
341
333
|
Address(),
|
|
342
|
-
|
|
343
|
-
|
|
334
|
+
/* @__PURE__ */ u("div", { className: bem("footer-wrapper"), children: [
|
|
335
|
+
ErrorMessage(),
|
|
336
|
+
!hidePaymentButton && Button()
|
|
337
|
+
] })
|
|
344
338
|
] }) })
|
|
345
339
|
] })
|
|
346
340
|
}
|