@pisell/private-materials 3.4.87 → 3.4.89
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/footer/utils.js +4 -4
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/hooks/useClearCart.d.ts +1 -1
- package/es/components/booking/hooks/useClearCart.js +39 -9
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/index.less +4 -2
- package/es/components/booking/info2/service/editService/index.js +36 -6
- package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/es/components/booking/info2/service/editService/utils.js +76 -0
- package/es/components/booking/locales.d.ts +20 -0
- package/es/components/booking/locales.js +20 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentList/payment/google_pay.svg +26 -8
- package/es/components/pay/toC/PaymentList/payment/google_pay2.svg +9 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +65 -21
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +110 -9
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +28 -16
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +20 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +14 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +20 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +7 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +167 -56
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +47 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.d.ts +34 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.js +83 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.less +52 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +9 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.js +260 -33
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +23 -3
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +292 -115
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/index.js +12 -2
- package/es/components/pay/toC/index.js +53 -18
- package/es/components/pay/toC/locales.d.ts +115 -0
- package/es/components/pay/toC/locales.js +143 -18
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pay/toC/serve.d.ts +10 -0
- package/es/components/pay/toC/serve.js +40 -1
- package/es/components/pay/toC/utils.d.ts +5 -0
- package/es/components/pay/toC/utils.js +10 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/index.less +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
- package/es/components/shoppingCart/hooks/useClearCart.js +41 -11
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +13 -5
- package/es/plus/walletPassGallery/components/recharge/index.less +70 -1
- package/es/plus/walletPassGallery/locales.d.ts +10 -0
- package/es/plus/walletPassGallery/locales.js +26 -5
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/utils.js +2 -2
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -1
- package/lib/components/booking/hooks/useClearCart.js +28 -6
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/index.less +4 -2
- package/lib/components/booking/info2/service/editService/index.js +24 -1
- package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/lib/components/booking/info2/service/editService/utils.js +38 -2
- package/lib/components/booking/locales.d.ts +20 -0
- package/lib/components/booking/locales.js +20 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentList/payment/google_pay.svg +26 -8
- package/lib/components/pay/toC/PaymentList/payment/google_pay2.svg +9 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +40 -17
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +110 -9
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +17 -5
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +20 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +8 -2
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +20 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +7 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +98 -24
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +47 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.d.ts +34 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.js +107 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.less +52 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +9 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.js +149 -5
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +23 -3
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +99 -16
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +19 -14
- package/lib/components/pay/toC/index.js +34 -3
- package/lib/components/pay/toC/locales.d.ts +115 -0
- package/lib/components/pay/toC/locales.js +133 -18
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pay/toC/serve.d.ts +10 -0
- package/lib/components/pay/toC/serve.js +10 -0
- package/lib/components/pay/toC/utils.d.ts +5 -0
- package/lib/components/pay/toC/utils.js +17 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/index.less +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
- package/lib/components/shoppingCart/hooks/useClearCart.js +42 -11
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -5
- package/lib/plus/walletPassGallery/components/recharge/index.less +70 -1
- package/lib/plus/walletPassGallery/locales.d.ts +10 -0
- package/lib/plus/walletPassGallery/locales.js +20 -5
- package/lowcode/eco-cup-list/meta.ts +20 -56
- package/lowcode/eco-customer-list/meta.ts +20 -56
- package/package.json +3 -3
|
@@ -33,6 +33,7 @@ __export(TDSPay_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(TDSPay_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
36
37
|
var import_materials = require("@pisell/materials");
|
|
37
38
|
var import_ThreedsLoading = __toESM(require("./ThreedsLoading"));
|
|
38
39
|
var import_tds2 = require("../tds2");
|
|
@@ -42,35 +43,69 @@ var import_payGroup = require("../../../payGroup");
|
|
|
42
43
|
var import_index = require("./index.less");
|
|
43
44
|
var import_utils = require("@pisell/utils");
|
|
44
45
|
var TDSPay = (props, ref) => {
|
|
45
|
-
const { onChange } = props;
|
|
46
|
+
const { onChange, closeAll } = props;
|
|
46
47
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
48
|
+
const [showCloseConfirm, setShowCloseConfirm] = (0, import_react.useState)(false);
|
|
49
|
+
const sessionIdRef = (0, import_react.useRef)(0);
|
|
50
|
+
const payingRef = (0, import_react.useRef)(false);
|
|
47
51
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
48
|
-
|
|
52
|
+
(0, import_react.useEffect)(() => {
|
|
53
|
+
return () => {
|
|
54
|
+
sessionIdRef.current += 1;
|
|
55
|
+
(0, import_tds2.cancelCurrentPayment)();
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
const createSessionCallback = (session) => (res) => {
|
|
59
|
+
if (sessionIdRef.current !== session) return;
|
|
60
|
+
setOpen(false);
|
|
61
|
+
setShowCloseConfirm(false);
|
|
62
|
+
payingRef.current = false;
|
|
63
|
+
if (res.key === "hideModal") return;
|
|
64
|
+
onChange == null ? void 0 : onChange(res);
|
|
65
|
+
};
|
|
66
|
+
const init = async (res, order, preCheckData) => {
|
|
67
|
+
if (payingRef.current) return;
|
|
68
|
+
payingRef.current = true;
|
|
69
|
+
sessionIdRef.current += 1;
|
|
70
|
+
(0, import_tds2.cancelCurrentPayment)();
|
|
71
|
+
const session = sessionIdRef.current;
|
|
49
72
|
setOpen(true);
|
|
73
|
+
const isCancelled = () => sessionIdRef.current !== session;
|
|
74
|
+
const callback = createSessionCallback(session);
|
|
75
|
+
if (preCheckData) {
|
|
76
|
+
(0, import_tds2.startPayment)({ payData: preCheckData }, { callback, isCancelled });
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
50
79
|
if (res.id) {
|
|
51
|
-
_fastPayNew(res);
|
|
80
|
+
_fastPayNew(res, callback, isCancelled);
|
|
52
81
|
} else {
|
|
53
|
-
newCardPay(res);
|
|
82
|
+
newCardPay(res, callback, isCancelled);
|
|
54
83
|
}
|
|
55
84
|
};
|
|
56
|
-
const
|
|
85
|
+
const handleCloseClick = () => {
|
|
86
|
+
setShowCloseConfirm(true);
|
|
87
|
+
};
|
|
88
|
+
const handleContinueWaiting = () => {
|
|
89
|
+
setShowCloseConfirm(false);
|
|
90
|
+
};
|
|
91
|
+
const handleViewOrder = () => {
|
|
92
|
+
sessionIdRef.current += 1;
|
|
93
|
+
(0, import_tds2.cancelCurrentPayment)();
|
|
94
|
+
payingRef.current = false;
|
|
95
|
+
setShowCloseConfirm(false);
|
|
57
96
|
setOpen(false);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
onChange == null ? void 0 : onChange(res);
|
|
97
|
+
closeAll == null ? void 0 : closeAll();
|
|
98
|
+
onChange == null ? void 0 : onChange({ key: "cancel" });
|
|
62
99
|
};
|
|
63
|
-
const _fastPayNew = async (res) => {
|
|
100
|
+
const _fastPayNew = async (res, callback, isCancelled) => {
|
|
64
101
|
var _a, _b, _c;
|
|
65
102
|
try {
|
|
66
103
|
const params = (0, import_payGroup.getPayGroupParamsFromStorage)(
|
|
67
104
|
(_a = state.payGroup) == null ? void 0 : _a.order_id,
|
|
68
|
-
{
|
|
69
|
-
card_id: res.id
|
|
70
|
-
}
|
|
105
|
+
{ card_id: res.id }
|
|
71
106
|
);
|
|
72
107
|
if (!params) {
|
|
73
|
-
|
|
108
|
+
callback({
|
|
74
109
|
key: "fail",
|
|
75
110
|
data: {
|
|
76
111
|
res,
|
|
@@ -84,15 +119,16 @@ var TDSPay = (props, ref) => {
|
|
|
84
119
|
order_id: (_b = state.payGroup) == null ? void 0 : _b.order_id,
|
|
85
120
|
params
|
|
86
121
|
});
|
|
122
|
+
if (isCancelled()) return;
|
|
87
123
|
(0, import_payGroup.setPayNumber)((_c = state.payGroup) == null ? void 0 : _c.order_id, data == null ? void 0 : data.pay_number);
|
|
88
124
|
if ((data == null ? void 0 : data.type) === "token") {
|
|
89
|
-
|
|
125
|
+
callback({ key: "success", data });
|
|
90
126
|
}
|
|
91
127
|
if ((data == null ? void 0 : data.type) === "3ds") {
|
|
92
|
-
(0, import_tds2.startPayment)({ payData: data },
|
|
128
|
+
(0, import_tds2.startPayment)({ payData: data }, { callback, isCancelled });
|
|
93
129
|
}
|
|
94
130
|
} catch (e) {
|
|
95
|
-
|
|
131
|
+
callback({
|
|
96
132
|
key: "fail",
|
|
97
133
|
data: {
|
|
98
134
|
res,
|
|
@@ -102,7 +138,7 @@ var TDSPay = (props, ref) => {
|
|
|
102
138
|
});
|
|
103
139
|
}
|
|
104
140
|
};
|
|
105
|
-
const newCardPay = (res) => {
|
|
141
|
+
const newCardPay = (res, callback, isCancelled) => {
|
|
106
142
|
var _a, _b;
|
|
107
143
|
let _cardInfo = {
|
|
108
144
|
card_name: res.card_name,
|
|
@@ -117,7 +153,7 @@ var TDSPay = (props, ref) => {
|
|
|
117
153
|
_cardInfo
|
|
118
154
|
);
|
|
119
155
|
if (!_cardInfo) {
|
|
120
|
-
|
|
156
|
+
callback({
|
|
121
157
|
key: "fail",
|
|
122
158
|
data: {
|
|
123
159
|
_cardInfo,
|
|
@@ -129,7 +165,7 @@ var TDSPay = (props, ref) => {
|
|
|
129
165
|
}
|
|
130
166
|
(0, import_tds2.startPayment)(
|
|
131
167
|
{ orderId: (_b = state.payGroup) == null ? void 0 : _b.order_id, cardInfo: _cardInfo },
|
|
132
|
-
|
|
168
|
+
{ callback, isCancelled }
|
|
133
169
|
);
|
|
134
170
|
};
|
|
135
171
|
(0, import_react.useImperativeHandle)(
|
|
@@ -138,17 +174,55 @@ var TDSPay = (props, ref) => {
|
|
|
138
174
|
init
|
|
139
175
|
})
|
|
140
176
|
);
|
|
141
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
177
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
142
178
|
import_materials.PisellModal,
|
|
143
179
|
{
|
|
144
180
|
platform: "h5",
|
|
145
181
|
open,
|
|
146
182
|
footer: false,
|
|
147
183
|
header: false,
|
|
148
|
-
closable:
|
|
184
|
+
closable: true,
|
|
185
|
+
onCancel: handleCloseClick,
|
|
149
186
|
bodyStyle: { padding: 0 }
|
|
150
187
|
},
|
|
151
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "" }, /* @__PURE__ */ import_react.default.createElement(
|
|
152
|
-
|
|
188
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "" }, /* @__PURE__ */ import_react.default.createElement(
|
|
189
|
+
import_ThreedsLoading.default,
|
|
190
|
+
{
|
|
191
|
+
title: import_utils.locales.getText("tocPay.text.processingPayment"),
|
|
192
|
+
subtitle: import_utils.locales.getText("tocPay.text.securityCheckRequired"),
|
|
193
|
+
description: import_utils.locales.getText("tocPay.text.doNotClosePage")
|
|
194
|
+
}
|
|
195
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { id: "threeds-container" }))
|
|
196
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
197
|
+
import_materials.PisellModal,
|
|
198
|
+
{
|
|
199
|
+
open: showCloseConfirm,
|
|
200
|
+
closable: false,
|
|
201
|
+
footer: null,
|
|
202
|
+
header: false,
|
|
203
|
+
mobileModalHeight: "auto",
|
|
204
|
+
headerDivider: false,
|
|
205
|
+
footerDivider: false,
|
|
206
|
+
bodyStyle: { padding: 24 },
|
|
207
|
+
transitionName: "pisell-move-down"
|
|
208
|
+
},
|
|
209
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "tds-close-confirm-modal" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "tds-close-confirm-title" }, import_utils.locales.getText("tocPay.text.stopWaitingTitle")), /* @__PURE__ */ import_react.default.createElement("div", { className: "tds-close-confirm-desc" }, import_utils.locales.getText("tocPay.text.stopWaitingDesc")), /* @__PURE__ */ import_react.default.createElement("div", { className: "tds-close-confirm-actions" }, /* @__PURE__ */ import_react.default.createElement(
|
|
210
|
+
import_antd.Button,
|
|
211
|
+
{
|
|
212
|
+
type: "primary",
|
|
213
|
+
block: true,
|
|
214
|
+
className: "tds-close-confirm-btn-primary",
|
|
215
|
+
onClick: handleContinueWaiting
|
|
216
|
+
},
|
|
217
|
+
import_utils.locales.getText("tocPay.text.continueWaiting")
|
|
218
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
219
|
+
"div",
|
|
220
|
+
{
|
|
221
|
+
className: "tds-close-confirm-link",
|
|
222
|
+
onClick: handleViewOrder
|
|
223
|
+
},
|
|
224
|
+
import_utils.locales.getText("tocPay.text.viewOrder")
|
|
225
|
+
)))
|
|
226
|
+
));
|
|
153
227
|
};
|
|
154
228
|
var TDSPay_default = (0, import_react.forwardRef)(TDSPay);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** 关闭确认弹窗样式 */
|
|
2
|
+
.tds-close-confirm-modal {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.tds-close-confirm-title {
|
|
9
|
+
color: var(--Gray-900, #101828);
|
|
10
|
+
font-size: 20px;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
line-height: 28px;
|
|
13
|
+
margin-bottom: 8px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.tds-close-confirm-desc {
|
|
17
|
+
color: var(--Gray-600, #475467);
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
line-height: 20px;
|
|
21
|
+
margin-bottom: 24px;
|
|
22
|
+
white-space: pre-line;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.tds-close-confirm-actions {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 12px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tds-close-confirm-btn-primary {
|
|
33
|
+
height: 44px;
|
|
34
|
+
font-size: 16px;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tds-close-confirm-link {
|
|
40
|
+
color: var(--Gray-500, #667085);
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
line-height: 20px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
text-decoration: underline;
|
|
46
|
+
padding: 4px 0;
|
|
47
|
+
}
|
package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
/** 弹窗场景类型 */
|
|
4
|
+
export declare type TDSErrorModalType = 'tds-not-supported' | 'bank-verify-failed';
|
|
5
|
+
export interface TDSErrorModalProps {
|
|
6
|
+
/** 弹窗是否可见 */
|
|
7
|
+
open: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* 弹窗场景类型,决定标题与描述文案
|
|
10
|
+
* - 'tds-not-supported':卡不支持 3DS 验证(默认)
|
|
11
|
+
* - 'bank-verify-failed':银行安全验证失败(700500)
|
|
12
|
+
*/
|
|
13
|
+
type?: TDSErrorModalType;
|
|
14
|
+
/** 商家联系电话 */
|
|
15
|
+
shopPhone?: string;
|
|
16
|
+
/** 商家联系邮箱 */
|
|
17
|
+
shopEmail?: string;
|
|
18
|
+
/** 更换卡片(留在卡列表页面) */
|
|
19
|
+
onUseAnotherCard?: () => void;
|
|
20
|
+
/** 使用其他支付方式(返回支付方式列表) */
|
|
21
|
+
onUseAnotherPayment?: () => void;
|
|
22
|
+
/** 稍后支付(跳转订单详情页) */
|
|
23
|
+
onPayLater?: () => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @title: 支付错误弹窗(通用)
|
|
27
|
+
* @description: 根据 type 展示不同文案,按钮行为一致:
|
|
28
|
+
* 更换卡片 / 使用其他支付方式 / 稍后支付。
|
|
29
|
+
* 支持两种场景:
|
|
30
|
+
* 1. tds-not-supported —— 预检查发现卡不支持 3DS 验证
|
|
31
|
+
* 2. bank-verify-failed —— 3DS 流程中银行安全验证失败(700500)
|
|
32
|
+
*/
|
|
33
|
+
declare const TDSErrorModal: React.FC<TDSErrorModalProps>;
|
|
34
|
+
export default TDSErrorModal;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.tsx
|
|
30
|
+
var TDSErrorModal_exports = {};
|
|
31
|
+
__export(TDSErrorModal_exports, {
|
|
32
|
+
default: () => TDSErrorModal_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(TDSErrorModal_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_materials = require("@pisell/materials");
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var TEXT_KEY_MAP = {
|
|
41
|
+
/** 预检查:卡不支持 3DS 验证 */
|
|
42
|
+
"tds-not-supported": {
|
|
43
|
+
title: "tocPay.text.tdsErrorTitle",
|
|
44
|
+
desc: "tocPay.text.tdsErrorDesc"
|
|
45
|
+
},
|
|
46
|
+
/** 支付中:银行安全验证失败(700500) */
|
|
47
|
+
"bank-verify-failed": {
|
|
48
|
+
title: "tocPay.text.bankVerifyFailedTitle",
|
|
49
|
+
desc: "tocPay.text.bankVerifyFailedDesc"
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var TDSErrorModal = ({
|
|
53
|
+
open,
|
|
54
|
+
type = "tds-not-supported",
|
|
55
|
+
shopPhone,
|
|
56
|
+
shopEmail,
|
|
57
|
+
onUseAnotherCard,
|
|
58
|
+
onUseAnotherPayment,
|
|
59
|
+
onPayLater
|
|
60
|
+
}) => {
|
|
61
|
+
const showContact = !!(shopPhone || shopEmail);
|
|
62
|
+
const textKeys = (0, import_react.useMemo)(() => TEXT_KEY_MAP[type], [type]);
|
|
63
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
64
|
+
import_materials.PisellModal,
|
|
65
|
+
{
|
|
66
|
+
open,
|
|
67
|
+
closable: false,
|
|
68
|
+
footer: null,
|
|
69
|
+
header: false,
|
|
70
|
+
mobileModalHeight: "auto",
|
|
71
|
+
headerDivider: false,
|
|
72
|
+
footerDivider: false,
|
|
73
|
+
bodyStyle: { padding: 24 },
|
|
74
|
+
transitionName: "pisell-move-down"
|
|
75
|
+
},
|
|
76
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "tds-error-modal" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "tds-error-modal-title" }, import_utils.locales.getText(textKeys.title)), /* @__PURE__ */ import_react.default.createElement("div", { className: "tds-error-modal-desc" }, import_utils.locales.getText(textKeys.desc)), /* @__PURE__ */ import_react.default.createElement("div", { className: "tds-error-modal-actions" }, /* @__PURE__ */ import_react.default.createElement(
|
|
77
|
+
import_antd.Button,
|
|
78
|
+
{
|
|
79
|
+
type: "primary",
|
|
80
|
+
block: true,
|
|
81
|
+
className: "tds-error-modal-btn-primary",
|
|
82
|
+
onClick: onUseAnotherCard
|
|
83
|
+
},
|
|
84
|
+
import_utils.locales.getText("tocPay.text.useAnotherCard")
|
|
85
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
86
|
+
import_antd.Button,
|
|
87
|
+
{
|
|
88
|
+
block: true,
|
|
89
|
+
className: "tds-error-modal-btn-secondary",
|
|
90
|
+
onClick: onUseAnotherPayment
|
|
91
|
+
},
|
|
92
|
+
import_utils.locales.getText("tocPay.text.useAnotherPayment")
|
|
93
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
94
|
+
import_antd.Button,
|
|
95
|
+
{
|
|
96
|
+
block: true,
|
|
97
|
+
className: "tds-error-modal-btn-secondary",
|
|
98
|
+
onClick: onPayLater
|
|
99
|
+
},
|
|
100
|
+
import_utils.locales.getText("tocPay.text.payLater")
|
|
101
|
+
)), showContact && /* @__PURE__ */ import_react.default.createElement("div", { className: "tds-error-modal-contact" }, import_utils.locales.getText("tocPay.text.paymentTroubleContact")(
|
|
102
|
+
shopPhone || "",
|
|
103
|
+
shopEmail || ""
|
|
104
|
+
)))
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
var TDSErrorModal_default = TDSErrorModal;
|
package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.less
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.tds-error-modal {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tds-error-modal-title {
|
|
8
|
+
color: var(--Gray-900, #101828);
|
|
9
|
+
font-size: 20px;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
line-height: 28px;
|
|
12
|
+
margin-bottom: 8px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tds-error-modal-desc {
|
|
16
|
+
color: var(--Gray-600, #475467);
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
font-weight: 400;
|
|
19
|
+
line-height: 20px;
|
|
20
|
+
margin-bottom: 24px;
|
|
21
|
+
white-space: pre-line;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tds-error-modal-actions {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: 12px;
|
|
28
|
+
margin-bottom: 16px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.tds-error-modal-btn-primary {
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tds-error-modal-btn-secondary {
|
|
38
|
+
font-size: 16px;
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tds-error-modal-contact {
|
|
44
|
+
color: var(--Gray-500, #667085);
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
line-height: 18px;
|
|
48
|
+
text-align: center;
|
|
49
|
+
padding-top: 8px;
|
|
50
|
+
border-top: 1px solid var(--Gray-200, #eaecf0);
|
|
51
|
+
word-break: break-word;
|
|
52
|
+
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
|
+
interface MWCreditCardProps {
|
|
4
|
+
/** 店铺名称,用于授权说明文案 */
|
|
5
|
+
shopName?: string;
|
|
6
|
+
/** 商家联系电话(用于 3DS 错误弹窗联系方式) */
|
|
7
|
+
shopPhone?: string;
|
|
8
|
+
/** 商家联系邮箱(用于 3DS 错误弹窗联系方式) */
|
|
9
|
+
shopEmail?: string;
|
|
10
|
+
}
|
|
3
11
|
export interface MWCreditCardRef {
|
|
4
12
|
init: (res: any) => void;
|
|
5
13
|
}
|
|
6
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
14
|
+
declare const _default: React.ForwardRefExoticComponent<MWCreditCardProps & React.RefAttributes<unknown>>;
|
|
7
15
|
export default _default;
|
|
@@ -35,27 +35,148 @@ module.exports = __toCommonJS(MWCreditCard_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_List = __toESM(require("./List"));
|
|
37
37
|
var import_Add = __toESM(require("./Add"));
|
|
38
|
+
var import_serve = require("./List/serve");
|
|
38
39
|
var import_TDSPay = __toESM(require("./TDSPay"));
|
|
39
40
|
var import_model = require("../../model");
|
|
41
|
+
var import_tds2 = require("./tds2");
|
|
42
|
+
var import_payGroup = require("../../payGroup");
|
|
43
|
+
var import_utils = require("@pisell/utils");
|
|
44
|
+
var import_materials = require("@pisell/materials");
|
|
45
|
+
var import_TDSErrorModal = __toESM(require("./components/TDSErrorModal"));
|
|
40
46
|
var import_index = require("./index.less");
|
|
47
|
+
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
41
48
|
var MWCreditCard = (props, ref) => {
|
|
42
49
|
const MWCreditCardListRef2 = (0, import_react.useRef)();
|
|
43
50
|
const AddMWCreditCardRef2 = (0, import_react.useRef)();
|
|
44
51
|
const TDSPayRef2 = (0, import_react.useRef)();
|
|
52
|
+
const context = (0, import_useEngineContext.default)();
|
|
53
|
+
const utils = context.appHelper.utils || {};
|
|
45
54
|
const [order, setOrder] = (0, import_react.useState)(null);
|
|
55
|
+
const [tdsErrorVisible, setTdsErrorVisible] = (0, import_react.useState)(false);
|
|
56
|
+
const [bankVerifyFailVisible, setBankVerifyFailVisible] = (0, import_react.useState)(false);
|
|
57
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
46
58
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
47
59
|
const init = async (res) => {
|
|
48
60
|
var _a;
|
|
49
61
|
setOrder(res.order);
|
|
50
62
|
(_a = MWCreditCardListRef2.current) == null ? void 0 : _a.init(order);
|
|
51
63
|
};
|
|
64
|
+
const closeAll = () => {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
(_a = MWCreditCardListRef2.current) == null ? void 0 : _a.close();
|
|
67
|
+
(_b = AddMWCreditCardRef2.current) == null ? void 0 : _b.close();
|
|
68
|
+
};
|
|
52
69
|
const fastPay = async (card) => {
|
|
70
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
71
|
+
try {
|
|
72
|
+
setLoading(true);
|
|
73
|
+
(_b = (_a = utils == null ? void 0 : utils.Toast) == null ? void 0 : _a.loading) == null ? void 0 : _b.call(_a, import_utils.locales.getText("tocPay.text.checkingCard"), 0, void 0, true);
|
|
74
|
+
const params = (0, import_payGroup.getPayGroupParamsFromStorage)(
|
|
75
|
+
(_c = state.payGroup) == null ? void 0 : _c.order_id,
|
|
76
|
+
{ card_id: card.id }
|
|
77
|
+
);
|
|
78
|
+
if (!params) {
|
|
79
|
+
(_d = state.payCallback) == null ? void 0 : _d.call(state, {
|
|
80
|
+
key: "fail",
|
|
81
|
+
data: {
|
|
82
|
+
res: card,
|
|
83
|
+
fn: "MWCreditCard.fastPay.noParams",
|
|
84
|
+
message: import_utils.locales.getText("tocPay.text.getParamsFail")
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const { data } = await (0, import_serve.fastPayNew)({
|
|
90
|
+
order_id: (_e = state.payGroup) == null ? void 0 : _e.order_id,
|
|
91
|
+
params
|
|
92
|
+
});
|
|
93
|
+
(0, import_payGroup.setPayNumber)((_f = state.payGroup) == null ? void 0 : _f.order_id, data == null ? void 0 : data.pay_number);
|
|
94
|
+
if ((data == null ? void 0 : data.type) === "token") {
|
|
95
|
+
(_g = TDSPayRef2.current) == null ? void 0 : _g.init(card, order, data);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if ((data == null ? void 0 : data.type) === "3ds") {
|
|
99
|
+
(_h = TDSPayRef2.current) == null ? void 0 : _h.init(card, order, data);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
} catch (e) {
|
|
103
|
+
if ((e == null ? void 0 : e.code) === 700500) {
|
|
104
|
+
setTdsErrorVisible(true);
|
|
105
|
+
} else {
|
|
106
|
+
(0, import_materials.PisellToast)({ content: (e == null ? void 0 : e.message) || "", duration: 2 });
|
|
107
|
+
}
|
|
108
|
+
} finally {
|
|
109
|
+
setLoading(false);
|
|
110
|
+
(_j = (_i = utils == null ? void 0 : utils.Toast) == null ? void 0 : _i.hide) == null ? void 0 : _j.call(_i);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const onCreate = async (res) => {
|
|
114
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
115
|
+
try {
|
|
116
|
+
setLoading(true);
|
|
117
|
+
(_b = (_a = utils == null ? void 0 : utils.Toast) == null ? void 0 : _a.loading) == null ? void 0 : _b.call(_a, import_utils.locales.getText("tocPay.text.checkingCard"), 0, void 0, true);
|
|
118
|
+
let _cardInfo = {
|
|
119
|
+
card_name: res.card_name,
|
|
120
|
+
card_number: res.card_number,
|
|
121
|
+
card_expiry_month: res.date.format("MM"),
|
|
122
|
+
card_expiry_year: res.date.format("YY"),
|
|
123
|
+
card_ccv: res.card_ccv,
|
|
124
|
+
is_save: res.is_save ? 1 : 0
|
|
125
|
+
};
|
|
126
|
+
_cardInfo = (0, import_payGroup.getPayGroupParamsFromStorage)(
|
|
127
|
+
(_c = state.payGroup) == null ? void 0 : _c.order_id,
|
|
128
|
+
_cardInfo
|
|
129
|
+
);
|
|
130
|
+
if (!_cardInfo) {
|
|
131
|
+
(_d = state.payCallback) == null ? void 0 : _d.call(state, {
|
|
132
|
+
key: "fail",
|
|
133
|
+
data: {
|
|
134
|
+
_cardInfo,
|
|
135
|
+
message: import_utils.locales.getText("tocPay.text.getParamsFail"),
|
|
136
|
+
fn: "MWCreditCard.onCreate.noCardInfo"
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const preCheckData = await (0, import_tds2.preCheckEnrollment)(
|
|
142
|
+
(_e = state.payGroup) == null ? void 0 : _e.order_id,
|
|
143
|
+
_cardInfo
|
|
144
|
+
);
|
|
145
|
+
(_f = TDSPayRef2.current) == null ? void 0 : _f.init(res, order, preCheckData);
|
|
146
|
+
} catch (e) {
|
|
147
|
+
if ((e == null ? void 0 : e.code) === 700500) {
|
|
148
|
+
setTdsErrorVisible(true);
|
|
149
|
+
} else {
|
|
150
|
+
(0, import_materials.PisellToast)({ content: (e == null ? void 0 : e.message) || "", duration: 2 });
|
|
151
|
+
}
|
|
152
|
+
} finally {
|
|
153
|
+
setLoading(false);
|
|
154
|
+
(_h = (_g = utils == null ? void 0 : utils.Toast) == null ? void 0 : _g.hide) == null ? void 0 : _h.call(_g);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
const handleTDSPayChange = (res) => {
|
|
53
158
|
var _a;
|
|
54
|
-
(
|
|
159
|
+
if ((res == null ? void 0 : res.key) === "bankVerifyFailed") {
|
|
160
|
+
setBankVerifyFailVisible(true);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
(_a = state.payCallback) == null ? void 0 : _a.call(state, res);
|
|
55
164
|
};
|
|
56
|
-
const
|
|
165
|
+
const handleUseAnotherCard = () => {
|
|
166
|
+
setTdsErrorVisible(false);
|
|
167
|
+
setBankVerifyFailVisible(false);
|
|
168
|
+
};
|
|
169
|
+
const handleUseAnotherPayment = () => {
|
|
170
|
+
setTdsErrorVisible(false);
|
|
171
|
+
setBankVerifyFailVisible(false);
|
|
172
|
+
closeAll();
|
|
173
|
+
};
|
|
174
|
+
const handlePayLater = () => {
|
|
57
175
|
var _a;
|
|
58
|
-
(
|
|
176
|
+
setTdsErrorVisible(false);
|
|
177
|
+
setBankVerifyFailVisible(false);
|
|
178
|
+
closeAll();
|
|
179
|
+
(_a = state.payCallback) == null ? void 0 : _a.call(state, { key: "cancel" });
|
|
59
180
|
};
|
|
60
181
|
(0, import_react.useImperativeHandle)(
|
|
61
182
|
ref,
|
|
@@ -73,8 +194,31 @@ var MWCreditCard = (props, ref) => {
|
|
|
73
194
|
var _a;
|
|
74
195
|
(_a = AddMWCreditCardRef2.current) == null ? void 0 : _a.init();
|
|
75
196
|
},
|
|
76
|
-
onChange: fastPay
|
|
197
|
+
onChange: fastPay,
|
|
198
|
+
btnLoading: loading
|
|
199
|
+
}
|
|
200
|
+
), /* @__PURE__ */ import_react.default.createElement(import_Add.default, { ref: AddMWCreditCardRef2, onCreate, shopName: props.shopName, btnLoading: loading }), /* @__PURE__ */ import_react.default.createElement(import_TDSPay.default, { ref: TDSPayRef2, onChange: handleTDSPayChange, closeAll }), /* @__PURE__ */ import_react.default.createElement(
|
|
201
|
+
import_TDSErrorModal.default,
|
|
202
|
+
{
|
|
203
|
+
open: tdsErrorVisible,
|
|
204
|
+
type: "tds-not-supported",
|
|
205
|
+
shopPhone: props.shopPhone,
|
|
206
|
+
shopEmail: props.shopEmail,
|
|
207
|
+
onUseAnotherCard: handleUseAnotherCard,
|
|
208
|
+
onUseAnotherPayment: handleUseAnotherPayment,
|
|
209
|
+
onPayLater: handlePayLater
|
|
210
|
+
}
|
|
211
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
212
|
+
import_TDSErrorModal.default,
|
|
213
|
+
{
|
|
214
|
+
open: bankVerifyFailVisible,
|
|
215
|
+
type: "bank-verify-failed",
|
|
216
|
+
shopPhone: props.shopPhone,
|
|
217
|
+
shopEmail: props.shopEmail,
|
|
218
|
+
onUseAnotherCard: handleUseAnotherCard,
|
|
219
|
+
onUseAnotherPayment: handleUseAnotherPayment,
|
|
220
|
+
onPayLater: handlePayLater
|
|
77
221
|
}
|
|
78
|
-
)
|
|
222
|
+
));
|
|
79
223
|
};
|
|
80
224
|
var MWCreditCard_default = (0, import_react.forwardRef)(MWCreditCard);
|