@pisell/private-materials 6.3.22 → 6.3.24
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 +1 -1
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +8 -8
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/editBookingModal/index.js +8 -2
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/footer.js +4 -13
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -2
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +35 -13
- package/es/components/eftposPay/linkly/index.d.ts +0 -1
- package/es/components/eftposPay/payo/config.js +10 -10
- package/es/components/eftposPay/store/index.d.ts +6 -6
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -3
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -3
- package/es/components/ticketBooking/components/timeBar/index.js +2 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/plus/saasCreateOrganization/index.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/editBookingModal/index.js +6 -1
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/footer.js +7 -13
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -2
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +43 -11
- package/lib/components/eftposPay/linkly/index.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.js +9 -9
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -2
- package/lib/components/ticketBooking/components/timeBar/index.js +2 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
- package/package.json +2 -2
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
30
30
|
* @return {*}
|
|
31
31
|
* @Author: xiangfeng.xue
|
|
32
32
|
*/
|
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) =>
|
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
|
|
34
34
|
/**
|
|
35
35
|
* 计算所有价格明细
|
|
36
36
|
* @param items - 购物车商品数组
|
|
@@ -71,7 +71,7 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
71
71
|
var getInitData = /*#__PURE__*/function () {
|
|
72
72
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
73
73
|
var _data$fromResource, _data$toResource;
|
|
74
|
-
var mockProps, _data, _initResourceVal, fromResourceFormId, toResourceFormId, _form_id, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx, _sameResource;
|
|
74
|
+
var mockProps, _data, _initResourceVal, fromResourceFormId, toResourceFormId, _form_id, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx, _sameResource, _targetIdx;
|
|
75
75
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
76
76
|
while (1) switch (_context.prev = _context.next) {
|
|
77
77
|
case 0:
|
|
@@ -129,7 +129,13 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
129
129
|
_cloned[_idx] = _targetResource; // 替换现有对象
|
|
130
130
|
}
|
|
131
131
|
} else {
|
|
132
|
-
|
|
132
|
+
// 未发现原资源位置(短时间内通过其它渠道修改过资源)
|
|
133
|
+
_targetIdx = _cloned.findIndex(function (rs) {
|
|
134
|
+
return rs.relation_id == (_targetResource === null || _targetResource === void 0 ? void 0 : _targetResource.relation_id);
|
|
135
|
+
}); // 判断是否已经包含了目标资源,不包含则加入进来
|
|
136
|
+
if (_targetIdx === -1) {
|
|
137
|
+
_cloned.push(_targetResource); // 添加新对象
|
|
138
|
+
}
|
|
133
139
|
}
|
|
134
140
|
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, _form_id, _cloned));
|
|
135
141
|
} else {
|
|
@@ -9,7 +9,7 @@ import useSendModal from "./sendModal/useSendModal";
|
|
|
9
9
|
import SendModal from "./sendModal";
|
|
10
10
|
import { locales } from '@pisell/utils';
|
|
11
11
|
var Footer = function Footer(_ref) {
|
|
12
|
-
var _state$
|
|
12
|
+
var _state$client6, _state$form, _state$client7;
|
|
13
13
|
var state = _ref.state,
|
|
14
14
|
reload = _ref.reload;
|
|
15
15
|
var _useSendModal = useSendModal(state === null || state === void 0 ? void 0 : state.bookingId),
|
|
@@ -37,14 +37,6 @@ var Footer = function Footer(_ref) {
|
|
|
37
37
|
return _ref2.apply(this, arguments);
|
|
38
38
|
};
|
|
39
39
|
}();
|
|
40
|
-
|
|
41
|
-
// 是否都填写完成
|
|
42
|
-
var isAllCompleted = useMemo(function () {
|
|
43
|
-
var _state$form;
|
|
44
|
-
return Object.values((state === null || state === void 0 || (_state$form = state.form) === null || _state$form === void 0 ? void 0 : _state$form.value) || {}).every(function (item) {
|
|
45
|
-
return item.length > 0;
|
|
46
|
-
});
|
|
47
|
-
}, [state === null || state === void 0 || (_state$form2 = state.form) === null || _state$form2 === void 0 ? void 0 : _state$form2.value]);
|
|
48
40
|
var defaultValues = useMemo(function () {
|
|
49
41
|
var _state$client, _state$client2, _state$client3, _state$client4, _state$client5;
|
|
50
42
|
return {
|
|
@@ -57,7 +49,7 @@ var Footer = function Footer(_ref) {
|
|
|
57
49
|
}
|
|
58
50
|
};
|
|
59
51
|
}, [(_state$client6 = state.client) === null || _state$client6 === void 0 ? void 0 : _state$client6.value]);
|
|
60
|
-
if (!state.bookingId || !(state !== null && state !== void 0 && (_state$
|
|
52
|
+
if (!state.bookingId || !(state !== null && state !== void 0 && (_state$form = state.form) !== null && _state$form !== void 0 && _state$form.forms.length)) {
|
|
61
53
|
return null;
|
|
62
54
|
}
|
|
63
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -72,9 +64,8 @@ var Footer = function Footer(_ref) {
|
|
|
72
64
|
size: "large",
|
|
73
65
|
block: true,
|
|
74
66
|
type: "primary",
|
|
75
|
-
onClick: handleOpen
|
|
76
|
-
|
|
77
|
-
}, !isAllCompleted ? locales.getText('pisell2.text.send-form-reminder') : locales.getText('pisell2.text.send-form-reminder-completed')), /*#__PURE__*/React.createElement(SendModal, {
|
|
67
|
+
onClick: handleOpen
|
|
68
|
+
}, locales.getText('pisell2.text.send-form-reminder')), /*#__PURE__*/React.createElement(SendModal, {
|
|
78
69
|
refreshKey: (_state$client7 = state.client) === null || _state$client7 === void 0 || (_state$client7 = _state$client7.value) === null || _state$client7 === void 0 ? void 0 : _state$client7.id,
|
|
79
70
|
open: open,
|
|
80
71
|
onCancel: function onCancel() {
|
|
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
244
244
|
* @Author: WangHan
|
|
245
245
|
* @Date: 2024-12-24 11:32
|
|
246
246
|
*/
|
|
247
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
247
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
|
166
166
|
type: string;
|
|
167
167
|
value: number;
|
|
168
|
-
}) => number | {
|
|
168
|
+
}) => number | "flexible" | {
|
|
169
169
|
type: string;
|
|
170
170
|
value: number;
|
|
171
|
-
}
|
|
171
|
+
};
|
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
|
174
174
|
export {};
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "
|
|
12
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PosProps, RouteType } from './const';
|
|
3
2
|
declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
|
|
4
3
|
action: RouteType;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PayProps, PosProps } from './const';
|
|
3
2
|
import './device.less';
|
|
4
3
|
/**
|
|
@@ -11,7 +10,7 @@ import './device.less';
|
|
|
11
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
12
11
|
api: PayProps['api'];
|
|
13
12
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "
|
|
13
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
14
|
[keys: string]: unknown;
|
|
16
15
|
} | undefined, other?: any) => void) | undefined;
|
|
17
16
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -4,13 +4,14 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
5
|
import { useRef } from 'react';
|
|
6
6
|
import { getUniqueId, locales, sendWarningLog } from '@pisell/utils';
|
|
7
|
+
import dayjs from 'dayjs';
|
|
7
8
|
import { useDispatch, updateCustom, updateStatus, updateState } from "../../store";
|
|
8
9
|
import { useFail, useStoreRef } from "../../hooks";
|
|
9
10
|
import { ModeEnum, PayStatus, StatusEnum } from "../../const";
|
|
10
11
|
import { LinklyActionStatus } from "../const";
|
|
11
12
|
|
|
12
13
|
// 全局超时时间
|
|
13
|
-
var GlobalTimeout = 1000 * 60;
|
|
14
|
+
var GlobalTimeout = 1000 * 60 * 2;
|
|
14
15
|
// 单次请求超时时间
|
|
15
16
|
var RequestTimeout = 1000 * 5;
|
|
16
17
|
export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, handleLinklySuccess) {
|
|
@@ -18,7 +19,8 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
18
19
|
var _useStoreRef = useStoreRef(),
|
|
19
20
|
numRef = _useStoreRef.numRef,
|
|
20
21
|
modeRef = _useStoreRef.modeRef,
|
|
21
|
-
deviceRef = _useStoreRef.deviceRef
|
|
22
|
+
deviceRef = _useStoreRef.deviceRef,
|
|
23
|
+
orderIdRef = _useStoreRef.orderIdRef;
|
|
22
24
|
var fail = useFail(0);
|
|
23
25
|
var failRef = useRef(fail);
|
|
24
26
|
var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
|
|
@@ -82,7 +84,6 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
82
84
|
console.log('Success: 全局超时或不需要处理结果,终止查询');
|
|
83
85
|
return;
|
|
84
86
|
}
|
|
85
|
-
_log("Success", result);
|
|
86
87
|
isQueryFinishedRef.current = true;
|
|
87
88
|
var data = (result === null || result === void 0 ? void 0 : result.data) || {};
|
|
88
89
|
// 交易成功,终止查询
|
|
@@ -103,8 +104,11 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
103
104
|
// 交易状态为0,且不需要签名,则继续查询
|
|
104
105
|
if ((data === null || data === void 0 ? void 0 : data.status) == 0 && (data === null || data === void 0 ? void 0 : data.signature_flag) != 1) {
|
|
105
106
|
console.log('交易状态为0需要继续查询');
|
|
107
|
+
_log("Querying", result);
|
|
106
108
|
isQueryFinishedRef.current = false;
|
|
107
|
-
|
|
109
|
+
setTimeout(function () {
|
|
110
|
+
_resultQuery();
|
|
111
|
+
}, 1500);
|
|
108
112
|
return;
|
|
109
113
|
}
|
|
110
114
|
|
|
@@ -153,7 +157,20 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
153
157
|
_log("AbortError");
|
|
154
158
|
console.log('Error: 请求被取消,将继续查询');
|
|
155
159
|
isQueryFinishedRef.current = false;
|
|
156
|
-
|
|
160
|
+
setTimeout(function () {
|
|
161
|
+
_resultQuery();
|
|
162
|
+
}, 1500);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// 网关类报错,继续查询
|
|
167
|
+
if (!(error !== null && error !== void 0 && error.code) || "".concat(error.code) === PayStatus.Timeout) {
|
|
168
|
+
_log("NetworkError");
|
|
169
|
+
console.log('Error: 网关类报错,将继续查询');
|
|
170
|
+
isQueryFinishedRef.current = false;
|
|
171
|
+
setTimeout(function () {
|
|
172
|
+
_resultQuery();
|
|
173
|
+
}, 1500);
|
|
157
174
|
return;
|
|
158
175
|
}
|
|
159
176
|
_log("Error", error);
|
|
@@ -243,20 +260,25 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
243
260
|
session_id: numRef.current
|
|
244
261
|
};
|
|
245
262
|
var content = [{
|
|
246
|
-
key: '
|
|
247
|
-
value: JSON.stringify(
|
|
263
|
+
key: 'description',
|
|
264
|
+
value: JSON.stringify({
|
|
265
|
+
queryId: queryIdRef.current,
|
|
266
|
+
orderId: orderIdRef.current,
|
|
267
|
+
type: type,
|
|
268
|
+
date: dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
269
|
+
})
|
|
248
270
|
}, {
|
|
249
271
|
key: 'params',
|
|
250
272
|
value: JSON.stringify(params)
|
|
251
273
|
}];
|
|
252
|
-
if (type === "
|
|
274
|
+
if (type === "Error") {
|
|
253
275
|
content.push({
|
|
254
|
-
key: '
|
|
276
|
+
key: 'error',
|
|
255
277
|
value: JSON.stringify(res)
|
|
256
278
|
});
|
|
257
|
-
} else
|
|
279
|
+
} else {
|
|
258
280
|
content.push({
|
|
259
|
-
key: '
|
|
281
|
+
key: 'response',
|
|
260
282
|
value: JSON.stringify(res)
|
|
261
283
|
});
|
|
262
284
|
}
|
|
@@ -268,8 +290,6 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
268
290
|
var run = function run() {
|
|
269
291
|
// 重置状态
|
|
270
292
|
reset();
|
|
271
|
-
console.log('开始查询linkly结果---->>>>>>>');
|
|
272
|
-
_log("Start");
|
|
273
293
|
|
|
274
294
|
// 设置全局超时定时器
|
|
275
295
|
globalTimeoutIdRef.current = setTimeout(function () {
|
|
@@ -285,6 +305,8 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
285
305
|
startTimeRef.current = Date.now();
|
|
286
306
|
isQueryFinishedRef.current = false;
|
|
287
307
|
queryIdRef.current = getUniqueId();
|
|
308
|
+
console.log('开始查询linkly结果---->>>>>>>');
|
|
309
|
+
_log("Start");
|
|
288
310
|
return _resultQuery();
|
|
289
311
|
};
|
|
290
312
|
return {
|
|
@@ -152,15 +152,15 @@ export var POS = function POS(_ref) {
|
|
|
152
152
|
controllerRef.current = new AbortController();
|
|
153
153
|
// 支付 or 退款
|
|
154
154
|
var resultPromise = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay ? api.pay(_objectSpread(_objectSpread({}, custom !== null && custom !== void 0 && custom.platform ? {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
operator_id: custom.operator_id,
|
|
156
|
+
operator_type: custom.operator_type,
|
|
157
|
+
platform: custom.platform,
|
|
158
|
+
custom_payment_id: custom.custom_payment_id,
|
|
159
|
+
service_charge: {
|
|
160
|
+
amount: payRef.current.surMoney,
|
|
161
|
+
percentage: payRef.current.surPercentRate
|
|
162
162
|
},
|
|
163
|
-
|
|
163
|
+
original_amount: payRef.current.amount
|
|
164
164
|
} : {}), {}, {
|
|
165
165
|
order_id: orderIdRef.current,
|
|
166
166
|
amount: payRef.current.total,
|
|
@@ -199,8 +199,8 @@ export var POS = function POS(_ref) {
|
|
|
199
199
|
if (unloadRef.current || !netRef.current) {
|
|
200
200
|
return;
|
|
201
201
|
}
|
|
202
|
-
// 支付接口超时
|
|
203
|
-
if (err && "".concat(err.code) === PayStatus.Timeout) {
|
|
202
|
+
// 支付接口超时 进行支付状态查询(超时或者其它错误)
|
|
203
|
+
if (!(err !== null && err !== void 0 && err.code) || "".concat(err.code) === PayStatus.Timeout) {
|
|
204
204
|
checkApi();
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "
|
|
177
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
298
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
301
|
-
action?: "amount" | "
|
|
300
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
|
301
|
+
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
305
305
|
subTitle?: string | undefined;
|
|
306
|
-
type?: "
|
|
306
|
+
type?: "unset" | "step" | undefined;
|
|
307
307
|
render?: boolean | undefined;
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "
|
|
311
|
+
status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|
|
@@ -262,7 +262,9 @@ export var createThreeDSMethodIframe = /*#__PURE__*/function () {
|
|
|
262
262
|
}
|
|
263
263
|
return _context3.abrupt("return", defaultReturnParams);
|
|
264
264
|
case 5:
|
|
265
|
-
displayBox = document.getElementById('threeds-container'); //
|
|
265
|
+
displayBox = document.getElementById('threeds-container'); // 清空dom中的内容
|
|
266
|
+
displayBox.innerHTML = '';
|
|
267
|
+
// 创建iframe
|
|
266
268
|
iframe = document.createElement('iframe'); // iframe.src = "about:blank";
|
|
267
269
|
iframe.classList.add('hidden_TDS_From');
|
|
268
270
|
iframe.name = 'threeDSMethodIframe';
|
|
@@ -315,7 +317,7 @@ export var createThreeDSMethodIframe = /*#__PURE__*/function () {
|
|
|
315
317
|
}
|
|
316
318
|
}, false);
|
|
317
319
|
}));
|
|
318
|
-
case
|
|
320
|
+
case 28:
|
|
319
321
|
case "end":
|
|
320
322
|
return _context3.stop();
|
|
321
323
|
}
|
|
@@ -436,7 +438,8 @@ export var checkTDSAuth = /*#__PURE__*/function () {
|
|
|
436
438
|
*/
|
|
437
439
|
export var createChallengeIframe = function createChallengeIframe(challengeData, callback) {
|
|
438
440
|
var displayBox = document.getElementById('threeds-container');
|
|
439
|
-
|
|
441
|
+
// 清空dom中的内容
|
|
442
|
+
displayBox.innerHTML = '';
|
|
440
443
|
// 创建iframe
|
|
441
444
|
var iframe = document.createElement('iframe');
|
|
442
445
|
iframe.classList.add('tdsv2challengeIframe');
|