@pisell/private-materials 6.3.105 → 6.3.107
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.js +17 -12
- package/es/components/eftposPay/component/fail/index.js +5 -4
- package/es/components/eftposPay/const.d.ts +2 -0
- package/es/components/eftposPay/const.js +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -0
- package/es/components/eftposPay/hooks.js +12 -0
- package/es/components/eftposPay/index.js +5 -1
- package/es/components/eftposPay/linkly/const.js +1 -1
- package/es/components/eftposPay/payo/config.js +1 -0
- package/es/components/eftposPay/payo/const.js +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -0
- package/es/components/eftposPay/tyro/const.js +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/windcave/const.js +1 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentList/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +165 -142
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/es/components/pay/toC/index.js +65 -31
- package/es/components/pay/toC/model.d.ts +1 -0
- package/es/components/pay/toC/serve.d.ts +18 -0
- package/es/components/pay/toC/serve.js +31 -3
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +4 -0
- package/es/components/systemSettings/registry/components/ItemModal.js +121 -51
- package/es/components/systemSettings/registry/locales.d.ts +9 -0
- package/es/components/systemSettings/registry/locales.js +15 -3
- package/es/components/systemSettings/registry/types.d.ts +1 -0
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/plus/pisellSalesManagement/components/BookingFormsPreview.js +11 -1
- package/es/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.js +15 -9
- package/lib/components/eftposPay/component/fail/index.js +4 -1
- package/lib/components/eftposPay/const.d.ts +2 -0
- package/lib/components/eftposPay/const.js +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -0
- package/lib/components/eftposPay/hooks.js +16 -0
- package/lib/components/eftposPay/index.js +5 -1
- package/lib/components/eftposPay/linkly/const.js +1 -1
- package/lib/components/eftposPay/payo/config.js +1 -0
- package/lib/components/eftposPay/payo/const.js +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -0
- package/lib/components/eftposPay/tyro/const.js +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/windcave/const.js +1 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentList/serve.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +90 -100
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/lib/components/pay/toC/index.js +52 -19
- package/lib/components/pay/toC/model.d.ts +1 -0
- package/lib/components/pay/toC/serve.d.ts +18 -0
- package/lib/components/pay/toC/serve.js +7 -1
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +4 -0
- package/lib/components/systemSettings/registry/components/ItemModal.js +78 -24
- package/lib/components/systemSettings/registry/locales.d.ts +9 -0
- package/lib/components/systemSettings/registry/locales.js +15 -3
- package/lib/components/systemSettings/registry/types.d.ts +1 -0
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/plus/pisellSalesManagement/components/BookingFormsPreview.js +5 -2
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/lowcode/eco-cup-list/meta.ts +1 -1
- package/lowcode/eco-customer-list/meta.ts +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
7
|
/* eslint-disable no-nested-ternary */
|
|
2
8
|
import { locales } from '@pisell/utils';
|
|
3
9
|
import { useMount } from 'ahooks';
|
|
@@ -23,7 +29,8 @@ export default (function (_ref) {
|
|
|
23
29
|
order_id = _useContextData.order_id,
|
|
24
30
|
number = _useContextData.number,
|
|
25
31
|
device = _useContextData.device,
|
|
26
|
-
client = _useContextData.client
|
|
32
|
+
client = _useContextData.client,
|
|
33
|
+
originalParams = _useContextData.originalParams;
|
|
27
34
|
var failCustom = custom === null || custom === void 0 ? void 0 : custom.failCustom;
|
|
28
35
|
var dispatch = useDispatch();
|
|
29
36
|
|
|
@@ -34,20 +41,18 @@ export default (function (_ref) {
|
|
|
34
41
|
*/
|
|
35
42
|
var onRetry = function onRetry() {
|
|
36
43
|
onChange('page', 'pay');
|
|
37
|
-
|
|
44
|
+
var params = _objectSpread(_objectSpread({}, originalParams || {}), {}, {
|
|
38
45
|
mode: mode,
|
|
39
46
|
name: name,
|
|
40
47
|
symbol: symbol,
|
|
41
48
|
amount: amount,
|
|
42
49
|
order_id: order_id
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
number: ''
|
|
50
|
-
})));
|
|
50
|
+
});
|
|
51
|
+
// 非查询模式,清空支付流水号
|
|
52
|
+
if (mode !== ModeEnum.Query) {
|
|
53
|
+
params.number = '';
|
|
54
|
+
}
|
|
55
|
+
dispatch(updateState(getInitState(eftpos, params)));
|
|
51
56
|
};
|
|
52
57
|
|
|
53
58
|
/**
|
|
@@ -56,14 +61,14 @@ export default (function (_ref) {
|
|
|
56
61
|
* @Date: 2024-08-20 11:30
|
|
57
62
|
*/
|
|
58
63
|
var onModify = function onModify() {
|
|
59
|
-
dispatch(updateState(getInitState(eftpos, {
|
|
64
|
+
dispatch(updateState(getInitState(eftpos, _objectSpread(_objectSpread({}, originalParams || {}), {}, {
|
|
60
65
|
mode: mode,
|
|
61
66
|
name: name,
|
|
62
67
|
symbol: symbol,
|
|
63
68
|
amount: amount,
|
|
64
69
|
order_id: order_id,
|
|
65
70
|
number: ''
|
|
66
|
-
})));
|
|
71
|
+
}))));
|
|
67
72
|
onChange('page', 'amount');
|
|
68
73
|
};
|
|
69
74
|
|
|
@@ -32,7 +32,8 @@ export default (function (_ref) {
|
|
|
32
32
|
number = _useContextData.number,
|
|
33
33
|
device = _useContextData.device,
|
|
34
34
|
client = _useContextData.client,
|
|
35
|
-
custom = _useContextData.custom
|
|
35
|
+
custom = _useContextData.custom,
|
|
36
|
+
originalParams = _useContextData.originalParams;
|
|
36
37
|
var isPosNetworkError = ((_steps$step = steps[step]) === null || _steps$step === void 0 || (_steps$step = _steps$step.custom) === null || _steps$step === void 0 ? void 0 : _steps$step.isPosNetworkError) || false;
|
|
37
38
|
var dispatch = useDispatch();
|
|
38
39
|
|
|
@@ -43,7 +44,7 @@ export default (function (_ref) {
|
|
|
43
44
|
*/
|
|
44
45
|
var onRetry = function onRetry() {
|
|
45
46
|
onChange('page', 'pay');
|
|
46
|
-
dispatch(updateState(getInitState(eftpos, _objectSpread({
|
|
47
|
+
dispatch(updateState(getInitState(eftpos, _objectSpread(_objectSpread({}, originalParams || {}), {}, {
|
|
47
48
|
mode: mode,
|
|
48
49
|
name: name,
|
|
49
50
|
symbol: symbol,
|
|
@@ -64,14 +65,14 @@ export default (function (_ref) {
|
|
|
64
65
|
* @Date: 2024-08-20 11:30
|
|
65
66
|
*/
|
|
66
67
|
var onModify = function onModify() {
|
|
67
|
-
dispatch(updateState(getInitState(eftpos, {
|
|
68
|
+
dispatch(updateState(getInitState(eftpos, _objectSpread(_objectSpread({}, originalParams || {}), {}, {
|
|
68
69
|
mode: mode,
|
|
69
70
|
name: name,
|
|
70
71
|
symbol: symbol,
|
|
71
72
|
amount: amount,
|
|
72
73
|
order_id: order_id,
|
|
73
74
|
number: ''
|
|
74
|
-
})));
|
|
75
|
+
}))));
|
|
75
76
|
onChange('page', 'amount');
|
|
76
77
|
};
|
|
77
78
|
|
|
@@ -154,6 +154,8 @@ export declare enum PayStatus {
|
|
|
154
154
|
'Unknown' = "701000",
|
|
155
155
|
/** 交易请求超时 */
|
|
156
156
|
'Timeout' = "701001",
|
|
157
|
+
/** 支付失败 */
|
|
158
|
+
'PaymentFailed' = "701002",
|
|
157
159
|
/** 繁忙 EFTPOS终端暂时不可用,因为EFTPOS正在处理另一个请求。 */
|
|
158
160
|
'PayOtherEftposFailed' = "701003",
|
|
159
161
|
/** 购物者没有出示卡片/卡片金额不足/在线拒绝/卡已过期/卡被锁定 */
|
|
@@ -68,6 +68,7 @@ export var PayStatus = /*#__PURE__*/function (PayStatus) {
|
|
|
68
68
|
PayStatus["PairingFailure"] = "606020";
|
|
69
69
|
PayStatus["Unknown"] = "701000";
|
|
70
70
|
PayStatus["Timeout"] = "701001";
|
|
71
|
+
PayStatus["PaymentFailed"] = "701002";
|
|
71
72
|
PayStatus["PayOtherEftposFailed"] = "701003";
|
|
72
73
|
PayStatus["PayCardErrorFailed"] = "701004";
|
|
73
74
|
PayStatus["NoNetWork"] = "701005";
|
|
@@ -314,6 +314,18 @@ export var useFail = function useFail(index) {
|
|
|
314
314
|
}));
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
|
+
if (code === PayStatus.PaymentFailed) {
|
|
318
|
+
// 前往错误页 不可标记状态
|
|
319
|
+
steps[index].title = locales.getText('page.eftpos-pay.text.transaction.fail');
|
|
320
|
+
steps[index].fail = (res === null || res === void 0 ? void 0 : res.message) || locales.getText('page.eftpos-pay.text.failed')(modeRef.current);
|
|
321
|
+
steps[index].status = 'fail';
|
|
322
|
+
dispatch(updateSteps(steps));
|
|
323
|
+
dispatch(updateComponent('Fail'));
|
|
324
|
+
dispatch(updateCustom({
|
|
325
|
+
errorStatus: 'know' // unknow know
|
|
326
|
+
}));
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
317
329
|
|
|
318
330
|
// 其他场景前往未知错误页
|
|
319
331
|
steps[index].title = locales.getText('page.eftpos-pay.text.failed')(modeRef.current);
|
|
@@ -114,7 +114,7 @@ export default (function (props) {
|
|
|
114
114
|
if (props.source === RestoreEumn.Restore) {
|
|
115
115
|
return props.params;
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
var initState = getInitState(props.type, props.params ? _objectSpread(_objectSpread({
|
|
118
118
|
mode: mode
|
|
119
119
|
}, props.params), {}, {
|
|
120
120
|
symbol: current
|
|
@@ -122,6 +122,10 @@ export default (function (props) {
|
|
|
122
122
|
mode: mode,
|
|
123
123
|
symbol: current
|
|
124
124
|
});
|
|
125
|
+
// 手动将 originalParams 添加到 State 根级别
|
|
126
|
+
return _objectSpread(_objectSpread({}, initState || {}), {}, {
|
|
127
|
+
originalParams: props.params || {}
|
|
128
|
+
});
|
|
125
129
|
}, [mode, props.params, props.type, symbol]);
|
|
126
130
|
var stateRef = useRef(state);
|
|
127
131
|
useEffect(function () {
|
|
@@ -54,7 +54,7 @@ export default (function (params) {
|
|
|
54
54
|
status: StatusEnum.Loading,
|
|
55
55
|
steps: getStep(mode),
|
|
56
56
|
render: true,
|
|
57
|
-
client: client !== 'undefined' ? client : ClientEnum.Merchant,
|
|
57
|
+
client: client !== 'undefined' && client !== undefined ? client : ClientEnum.Merchant,
|
|
58
58
|
warn: '',
|
|
59
59
|
custom: other || {}
|
|
60
60
|
}, typeof net !== 'undefined' ? {
|
|
@@ -188,6 +188,7 @@ export var POS = function POS(_ref) {
|
|
|
188
188
|
card_reader_type: eftposRef.current,
|
|
189
189
|
card_reader_id: (_deviceRef$current3 = deviceRef.current) === null || _deviceRef$current3 === void 0 ? void 0 : _deviceRef$current3.id,
|
|
190
190
|
number: numRef.current,
|
|
191
|
+
original_payment_number: custom === null || custom === void 0 ? void 0 : custom.original_payment_number,
|
|
191
192
|
pay_param_base64: encodeURIComponent(btoa(encodeURIComponent(JSON.stringify(_objectSpread(_objectSpread({}, dataRef.current), {}, {
|
|
192
193
|
number: numRef.current
|
|
193
194
|
})))))
|
|
@@ -68,7 +68,7 @@ export default (function (params) {
|
|
|
68
68
|
status: StatusEnum.Loading,
|
|
69
69
|
steps: getStep(mode),
|
|
70
70
|
render: true,
|
|
71
|
-
client: client !== 'undefined' ? client : ClientEnum.Merchant,
|
|
71
|
+
client: client !== 'undefined' && client !== undefined ? client : ClientEnum.Merchant,
|
|
72
72
|
custom: other || {}
|
|
73
73
|
}, typeof net !== 'undefined' ? {
|
|
74
74
|
net: net
|
|
@@ -91,6 +91,8 @@ export declare type State = {
|
|
|
91
91
|
};
|
|
92
92
|
backup?: Omit<State, 'backup'>;
|
|
93
93
|
client: ClientEnum;
|
|
94
|
+
/** 支付原始参数 */
|
|
95
|
+
originalParams?: Record<string, any>;
|
|
94
96
|
};
|
|
95
97
|
export declare type Action = {
|
|
96
98
|
type: EActionTypes;
|
|
@@ -344,6 +346,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
344
346
|
} | undefined;
|
|
345
347
|
backup?: Omit<State, "backup"> | undefined;
|
|
346
348
|
client?: ClientEnum | undefined;
|
|
349
|
+
originalParams?: Record<string, any> | undefined;
|
|
347
350
|
};
|
|
348
351
|
};
|
|
349
352
|
export declare function reducers(state: State, action: Action): State;
|
|
@@ -45,7 +45,7 @@ export default (function (params) {
|
|
|
45
45
|
status: StatusEnum.Loading,
|
|
46
46
|
steps: [],
|
|
47
47
|
render: true,
|
|
48
|
-
client: client !== 'undefined' ? client : ClientEnum.Merchant,
|
|
48
|
+
client: client !== 'undefined' && client !== undefined ? client : ClientEnum.Merchant,
|
|
49
49
|
custom: other || {}
|
|
50
50
|
}, typeof net !== 'undefined' ? {
|
|
51
51
|
net: net
|
|
@@ -46,7 +46,7 @@ export default (function (params) {
|
|
|
46
46
|
status: StatusEnum.Loading,
|
|
47
47
|
steps: [],
|
|
48
48
|
render: true,
|
|
49
|
-
client: client !== 'undefined' ? client : ClientEnum.Merchant,
|
|
49
|
+
client: client !== 'undefined' && client !== undefined ? client : ClientEnum.Merchant,
|
|
50
50
|
custom: other ? _objectSpread(_objectSpread({}, other), {}, {
|
|
51
51
|
list: [],
|
|
52
52
|
step: StepStatusEnum.Free
|
|
@@ -15,7 +15,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
15
15
|
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); }); }; }
|
|
16
16
|
import { request } from "../../../../utils";
|
|
17
17
|
import { paymentKeys } from "./status";
|
|
18
|
-
import { isWx, isIOS } from '@pisell/utils';
|
|
18
|
+
import { isWx, isSafari, isIOS } from '@pisell/utils';
|
|
19
19
|
import { paymentTypes, isCustomPayment } from "./status";
|
|
20
20
|
import { formatCreditCardSurchargeList, formatCreditCardSurchargeText } from "./utils";
|
|
21
21
|
|
|
@@ -106,7 +106,7 @@ export var filterPaymentList = function filterPaymentList(list) {
|
|
|
106
106
|
// }
|
|
107
107
|
|
|
108
108
|
// 非IOS 隐藏苹果支付
|
|
109
|
-
if (!isIOS()) {
|
|
109
|
+
if (!isIOS() && !isSafari()) {
|
|
110
110
|
arr = arr.concat(['mw.apple']);
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -15,11 +15,16 @@ export interface WalletPassProps {
|
|
|
15
15
|
walletPass: {
|
|
16
16
|
cards: WalletPassDataType[];
|
|
17
17
|
amount: number;
|
|
18
|
+
recommended?: WalletPassDataType[];
|
|
19
|
+
transformList?: WalletPassDataType[];
|
|
20
|
+
noApplicableVoucher?: WalletPassDataType[];
|
|
18
21
|
};
|
|
19
22
|
walletSetting: {
|
|
20
23
|
name: string;
|
|
21
24
|
popup_status: 0 | 1;
|
|
22
25
|
};
|
|
26
|
+
orderDetail: any;
|
|
27
|
+
total_amount: number;
|
|
23
28
|
}
|
|
24
29
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<WalletPassProps & React.RefAttributes<WalletPassRef>>>;
|
|
25
30
|
export default _default;
|