@pisell/private-materials 6.6.61 → 6.6.63
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/booking/components/footer/amount.js +4 -3
- package/es/components/booking/components/footer/utils.js +10 -3
- package/es/components/booking/components/voucher/index.js +1 -1
- package/es/components/booking/info2/service/editService/index.js +76 -8
- package/es/components/booking/info2/service/editService/utils.d.ts +1 -0
- package/es/components/booking/info2/service/editService/utils.js +16 -0
- package/es/components/booking/payments/index.js +1 -1
- package/es/components/eftpos/PairModal/hooks.d.ts +27 -0
- package/es/components/eftpos/PairModal/hooks.js +67 -0
- package/es/components/eftpos/PairModal/index.d.ts +11 -0
- package/es/components/eftpos/PairModal/index.js +246 -0
- package/es/components/eftpos/PairModal/index.less +70 -0
- package/es/components/eftpos/SettlementModal/Action.d.ts +7 -0
- package/es/components/eftpos/SettlementModal/Action.js +141 -0
- package/es/components/eftpos/SettlementModal/index.d.ts +7 -0
- package/es/components/eftpos/SettlementModal/index.js +135 -0
- package/es/components/eftpos/SettlementModal/index.less +33 -0
- package/es/components/eftpos/SettlementModal/serve.d.ts +8 -0
- package/es/components/eftpos/SettlementModal/serve.js +171 -0
- package/es/components/eftpos/SettlementModal/types.d.ts +138 -0
- package/es/components/eftpos/SettlementModal/types.js +35 -0
- package/es/components/eftpos/SettlementModal/utils.d.ts +18 -0
- package/es/components/eftpos/SettlementModal/utils.js +351 -0
- package/es/components/eftpos/assets/mx51SCI.svg +15 -0
- package/es/components/eftpos/const.d.ts +3 -1
- package/es/components/eftpos/const.js +2 -0
- package/es/components/eftpos/device.d.ts +3 -1
- package/es/components/eftpos/device.js +14 -3
- package/es/components/eftpos/hooks.d.ts +13 -0
- package/es/components/eftpos/hooks.js +35 -0
- package/es/components/eftpos/index.js +198 -24
- package/es/components/eftpos/index.less +32 -1
- package/es/components/eftpos/locales.d.ts +80 -0
- package/es/components/eftpos/locales.js +205 -25
- package/es/components/eftpos/table.js +47 -3
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +2 -2
- package/es/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +8 -0
- package/es/components/eftposPay/aggregatePayment/hooks/usePayment.js +145 -0
- package/es/components/eftposPay/aggregatePayment/index.d.ts +2 -1
- package/es/components/eftposPay/aggregatePayment/index.js +2 -1
- package/es/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
- package/es/components/eftposPay/aggregatePayment/mock.js +567 -0
- package/es/components/eftposPay/aggregatePayment/service.js +1 -0
- package/es/components/eftposPay/aggregatePayment/types.d.ts +12 -12
- package/es/components/eftposPay/aggregatePayment/types.js +4 -8
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +13 -13
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +231 -168
- package/es/components/eftposPay/amount.js +15 -1
- package/es/components/eftposPay/app.js +2 -3
- package/es/components/eftposPay/component/fail/failCustom.js +13 -4
- package/es/components/eftposPay/component/fail/index.js +12 -5
- package/es/components/eftposPay/component/fail/network.js +3 -0
- package/es/components/eftposPay/component/fail/unknow.js +8 -0
- package/es/components/eftposPay/component/manual/index.js +17 -3
- package/es/components/eftposPay/component/signature/index.js +3 -0
- package/es/components/eftposPay/const.d.ts +8 -3
- package/es/components/eftposPay/const.js +2 -0
- package/es/components/eftposPay/device.js +225 -38
- package/es/components/eftposPay/helper.d.ts +3 -0
- package/es/components/eftposPay/helper.js +2 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.js +50 -13
- package/es/components/eftposPay/linkly/const.js +1 -1
- package/es/components/eftposPay/linkly/hooks/normal.js +21 -68
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +20 -81
- package/es/components/eftposPay/linkly/index.js +11 -23
- package/es/components/eftposPay/locales.d.ts +15 -0
- package/es/components/eftposPay/locales.js +30 -15
- package/es/components/eftposPay/manufacturer.d.ts +1 -0
- package/es/components/eftposPay/manufacturer.js +4 -0
- package/es/components/eftposPay/mx51/Action.d.ts +6 -0
- package/es/components/eftposPay/mx51/Action.js +144 -0
- package/es/components/eftposPay/mx51/const.d.ts +5 -0
- package/es/components/eftposPay/mx51/const.js +69 -0
- package/es/components/eftposPay/mx51/index.d.ts +6 -0
- package/es/components/eftposPay/mx51/index.js +498 -0
- package/es/components/eftposPay/mx51/types.d.ts +142 -0
- package/es/components/eftposPay/mx51/types.js +35 -0
- package/es/components/eftposPay/mx51/utils.d.ts +10 -0
- package/es/components/eftposPay/mx51/utils.js +121 -0
- package/es/components/eftposPay/pay.js +21 -9
- package/es/components/eftposPay/payo/config.js +39 -5
- package/es/components/eftposPay/payo/const.js +1 -1
- package/es/components/eftposPay/payo/hooks.js +3 -12
- package/es/components/eftposPay/payo/payment.js +69 -136
- package/es/components/eftposPay/store/index.d.ts +5 -9
- package/es/components/eftposPay/tip.js +5 -0
- package/es/components/eftposPay/tyro/const.js +1 -1
- package/es/components/eftposPay/tyro/index.js +44 -11
- package/es/components/eftposPay/utils/payLog.d.ts +81 -0
- package/es/components/eftposPay/utils/payLog.js +458 -0
- package/es/components/eftposPay/windcave/const.js +1 -1
- package/es/components/eftposPay/windcave/receiptAction.js +5 -0
- package/es/components/eftposPay/windcave/windcave.js +37 -38
- package/es/components/ticketBooking/utils/formatProductMessage.js +47 -2
- package/lib/components/booking/components/footer/amount.js +3 -3
- package/lib/components/booking/components/footer/utils.js +12 -5
- package/lib/components/booking/components/voucher/index.js +1 -1
- package/lib/components/booking/info2/service/editService/index.js +56 -5
- package/lib/components/booking/info2/service/editService/utils.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/utils.js +16 -0
- package/lib/components/booking/payments/index.js +1 -1
- package/lib/components/eftpos/PairModal/hooks.d.ts +27 -0
- package/lib/components/eftpos/PairModal/hooks.js +70 -0
- package/lib/components/eftpos/PairModal/index.d.ts +11 -0
- package/lib/components/eftpos/PairModal/index.js +197 -0
- package/lib/components/eftpos/PairModal/index.less +70 -0
- package/lib/components/eftpos/SettlementModal/Action.d.ts +7 -0
- package/lib/components/eftpos/SettlementModal/Action.js +153 -0
- package/lib/components/eftpos/SettlementModal/index.d.ts +7 -0
- package/lib/components/eftpos/SettlementModal/index.js +170 -0
- package/lib/components/eftpos/SettlementModal/index.less +33 -0
- package/lib/components/eftpos/SettlementModal/serve.d.ts +8 -0
- package/lib/components/eftpos/SettlementModal/serve.js +45 -0
- package/lib/components/eftpos/SettlementModal/types.d.ts +138 -0
- package/lib/components/eftpos/SettlementModal/types.js +43 -0
- package/lib/components/eftpos/SettlementModal/utils.d.ts +18 -0
- package/lib/components/eftpos/SettlementModal/utils.js +248 -0
- package/lib/components/eftpos/assets/mx51SCI.svg +15 -0
- package/lib/components/eftpos/const.d.ts +3 -1
- package/lib/components/eftpos/const.js +2 -0
- package/lib/components/eftpos/device.d.ts +3 -1
- package/lib/components/eftpos/device.js +13 -3
- package/lib/components/eftpos/hooks.d.ts +13 -0
- package/lib/components/eftpos/hooks.js +30 -0
- package/lib/components/eftpos/index.js +121 -8
- package/lib/components/eftpos/index.less +32 -1
- package/lib/components/eftpos/locales.d.ts +80 -0
- package/lib/components/eftpos/locales.js +231 -21
- package/lib/components/eftpos/table.js +30 -2
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +2 -2
- package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +8 -0
- package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.js +171 -0
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +2 -1
- package/lib/components/eftposPay/aggregatePayment/index.js +5 -2
- package/lib/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
- package/lib/components/eftposPay/aggregatePayment/mock.js +679 -0
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +12 -12
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +13 -13
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +173 -123
- package/lib/components/eftposPay/amount.js +13 -1
- package/lib/components/eftposPay/app.js +4 -5
- package/lib/components/eftposPay/component/fail/failCustom.js +10 -2
- package/lib/components/eftposPay/component/fail/index.js +10 -2
- package/lib/components/eftposPay/component/fail/network.js +3 -0
- package/lib/components/eftposPay/component/fail/unknow.js +8 -0
- package/lib/components/eftposPay/component/manual/index.js +16 -2
- package/lib/components/eftposPay/component/signature/index.js +3 -0
- package/lib/components/eftposPay/const.d.ts +8 -3
- package/lib/components/eftposPay/const.js +2 -0
- package/lib/components/eftposPay/device.js +114 -25
- package/lib/components/eftposPay/helper.d.ts +3 -0
- package/lib/components/eftposPay/helper.js +2 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.js +38 -13
- package/lib/components/eftposPay/linkly/const.js +1 -1
- package/lib/components/eftposPay/linkly/hooks/normal.js +22 -43
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +13 -65
- package/lib/components/eftposPay/linkly/index.js +8 -10
- package/lib/components/eftposPay/locales.d.ts +15 -0
- package/lib/components/eftposPay/locales.js +30 -15
- package/lib/components/eftposPay/manufacturer.d.ts +1 -0
- package/lib/components/eftposPay/manufacturer.js +6 -0
- package/lib/components/eftposPay/mx51/Action.d.ts +6 -0
- package/lib/components/eftposPay/mx51/Action.js +154 -0
- package/lib/components/eftposPay/mx51/const.d.ts +5 -0
- package/lib/components/eftposPay/mx51/const.js +85 -0
- package/lib/components/eftposPay/mx51/index.d.ts +6 -0
- package/lib/components/eftposPay/mx51/index.js +433 -0
- package/lib/components/eftposPay/mx51/types.d.ts +142 -0
- package/lib/components/eftposPay/mx51/types.js +43 -0
- package/lib/components/eftposPay/mx51/utils.d.ts +10 -0
- package/lib/components/eftposPay/mx51/utils.js +115 -0
- package/lib/components/eftposPay/pay.js +13 -3
- package/lib/components/eftposPay/payo/config.js +16 -8
- package/lib/components/eftposPay/payo/const.js +1 -1
- package/lib/components/eftposPay/payo/hooks.js +12 -10
- package/lib/components/eftposPay/payo/payment.js +31 -65
- package/lib/components/eftposPay/store/index.d.ts +5 -9
- package/lib/components/eftposPay/tip.js +5 -0
- package/lib/components/eftposPay/tyro/const.js +1 -1
- package/lib/components/eftposPay/tyro/index.js +21 -17
- package/lib/components/eftposPay/utils/payLog.d.ts +81 -0
- package/lib/components/eftposPay/utils/payLog.js +321 -0
- package/lib/components/eftposPay/windcave/const.js +1 -1
- package/lib/components/eftposPay/windcave/receiptAction.js +5 -0
- package/lib/components/eftposPay/windcave/windcave.js +27 -29
- package/lib/components/ticketBooking/utils/formatProductMessage.js +44 -2
- package/package.json +4 -4
- package/es/components/eftposPay/utils/log/index.d.ts +0 -110
- package/es/components/eftposPay/utils/log/index.js +0 -371
- package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
- package/lib/components/eftposPay/utils/log/index.js +0 -294
|
@@ -12,11 +12,13 @@ import { locales } from '@pisell/utils';
|
|
|
12
12
|
import { InputNumber, Button, message } from 'antd';
|
|
13
13
|
import { Decimal } from 'decimal.js';
|
|
14
14
|
import React, { useMemo, useState } from 'react';
|
|
15
|
+
import { useMount } from 'ahooks';
|
|
15
16
|
import Alert from "./component/alert";
|
|
16
17
|
import Titlebar from "./component/header/titlebar";
|
|
17
18
|
import { getAmonunt } from "./manufacturer";
|
|
18
19
|
import { limitDecimals } from "./helper";
|
|
19
20
|
import { useDispatch, useContextData, updateComponent, updateState } from "./store";
|
|
21
|
+
import payLog from "./utils/payLog";
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
* @title: 支付金额信息配置页
|
|
@@ -108,6 +110,14 @@ export default (function (_ref) {
|
|
|
108
110
|
var currentMoneyDeci = new Decimal(currentMoney);
|
|
109
111
|
return moneyDeci.sub(currentMoneyDeci).toFixed(2, Decimal.ROUND_HALF_UP);
|
|
110
112
|
}, [currentMoney, money]);
|
|
113
|
+
useMount(function () {
|
|
114
|
+
payLog.log('金额页面展示', {
|
|
115
|
+
amount: currentMoney,
|
|
116
|
+
surcharge: totalSurMoney,
|
|
117
|
+
total: total,
|
|
118
|
+
surRate: curSurRate
|
|
119
|
+
});
|
|
120
|
+
});
|
|
111
121
|
|
|
112
122
|
/**
|
|
113
123
|
* @title:提交
|
|
@@ -143,7 +153,9 @@ export default (function (_ref) {
|
|
|
143
153
|
surRateMoney: "".concat(surRateMoney),
|
|
144
154
|
totalUnit: formatAmount(total, 2, symbol)
|
|
145
155
|
};
|
|
146
|
-
|
|
156
|
+
payLog.log('金额页-确认提交', {
|
|
157
|
+
pay: pay
|
|
158
|
+
});
|
|
147
159
|
dispatch(updateState({
|
|
148
160
|
pay: pay
|
|
149
161
|
}));
|
|
@@ -162,6 +174,7 @@ export default (function (_ref) {
|
|
|
162
174
|
setStatus(true);
|
|
163
175
|
return;
|
|
164
176
|
}
|
|
177
|
+
payLog.log('金额页-点击取消');
|
|
165
178
|
onClose();
|
|
166
179
|
};
|
|
167
180
|
|
|
@@ -172,6 +185,7 @@ export default (function (_ref) {
|
|
|
172
185
|
* @Date: 2024-08-19 09:53
|
|
173
186
|
*/
|
|
174
187
|
var onEdit = function onEdit() {
|
|
188
|
+
payLog.log('金额页-点击编辑');
|
|
175
189
|
setStatus(false);
|
|
176
190
|
setTempSurRate(curSurRate);
|
|
177
191
|
setTempSurMoney(curSurMoney);
|
|
@@ -21,8 +21,7 @@ import { RouteEnum, ClientEnum, RestoreEumn } from "./const";
|
|
|
21
21
|
import Device from "./device";
|
|
22
22
|
import Pay from "./pay";
|
|
23
23
|
import { useContextData, useDispatch, updateState, updateClient } from "./store";
|
|
24
|
-
import
|
|
25
|
-
import { request } from "../../utils";
|
|
24
|
+
import payLog from "./utils/payLog";
|
|
26
25
|
var App = function App(_ref) {
|
|
27
26
|
var action = _ref.action,
|
|
28
27
|
api = _ref.api,
|
|
@@ -121,7 +120,6 @@ var App = function App(_ref) {
|
|
|
121
120
|
}));
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
|
-
console.log('状态切换 = ', status, params, other);
|
|
125
123
|
props.onChangeStatus(status, params, other);
|
|
126
124
|
}, []);
|
|
127
125
|
|
|
@@ -131,6 +129,7 @@ var App = function App(_ref) {
|
|
|
131
129
|
* @Date: 2024-08-20 13:09
|
|
132
130
|
*/
|
|
133
131
|
var onClose = function onClose() {
|
|
132
|
+
payLog.log('关闭支付');
|
|
134
133
|
onChange('fail', {
|
|
135
134
|
number: data.number,
|
|
136
135
|
uniquePaymentNumber: data.number,
|
|
@@ -14,6 +14,7 @@ import { getInitState } from "../../manufacturer";
|
|
|
14
14
|
import XClose from '@pisell/icon/es/XClose';
|
|
15
15
|
import { useDispatch, useContextData, updateState, updateComponent } from "../../store";
|
|
16
16
|
import Header from "../header";
|
|
17
|
+
import payLog from "../../utils/payLog";
|
|
17
18
|
export default (function (_ref) {
|
|
18
19
|
var _ref$className = _ref.className,
|
|
19
20
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -40,14 +41,17 @@ export default (function (_ref) {
|
|
|
40
41
|
* @Date: 2024-08-20 11:30
|
|
41
42
|
*/
|
|
42
43
|
var onRetry = function onRetry() {
|
|
44
|
+
payLog.log('自定义失败页:重试');
|
|
43
45
|
onChange('page', 'pay');
|
|
44
46
|
var params = _objectSpread(_objectSpread({}, originalParams || {}), {}, {
|
|
45
47
|
mode: mode,
|
|
46
48
|
name: name,
|
|
47
49
|
symbol: symbol,
|
|
48
50
|
amount: amount,
|
|
49
|
-
order_id: order_id
|
|
51
|
+
order_id: order_id,
|
|
52
|
+
client: client
|
|
50
53
|
});
|
|
54
|
+
// 非查询模式,清空支付流水号
|
|
51
55
|
if (mode !== ModeEnum.Query) {
|
|
52
56
|
params.number = '';
|
|
53
57
|
}
|
|
@@ -66,7 +70,8 @@ export default (function (_ref) {
|
|
|
66
70
|
symbol: symbol,
|
|
67
71
|
amount: amount,
|
|
68
72
|
order_id: order_id,
|
|
69
|
-
number: ''
|
|
73
|
+
number: '',
|
|
74
|
+
client: client
|
|
70
75
|
}))));
|
|
71
76
|
onChange('page', 'amount');
|
|
72
77
|
};
|
|
@@ -79,6 +84,7 @@ export default (function (_ref) {
|
|
|
79
84
|
* @Date: 2024-08-20 11:31
|
|
80
85
|
*/
|
|
81
86
|
var onManually = function onManually() {
|
|
87
|
+
payLog.log('自定义失败页:点击手动标记');
|
|
82
88
|
dispatch(updateState({
|
|
83
89
|
manual: {
|
|
84
90
|
title: locales.getText('page.eftpos-pay.text.request.unknown.title')(mode),
|
|
@@ -88,6 +94,7 @@ export default (function (_ref) {
|
|
|
88
94
|
dispatch(updateComponent('Manual'));
|
|
89
95
|
};
|
|
90
96
|
var onNotin = function onNotin() {
|
|
97
|
+
payLog.log('自定义失败页:点击打印小票');
|
|
91
98
|
onChange('print', [], 'print_on_timeout');
|
|
92
99
|
};
|
|
93
100
|
|
|
@@ -98,6 +105,7 @@ export default (function (_ref) {
|
|
|
98
105
|
* @Date: 2024-08-20 11:32
|
|
99
106
|
*/
|
|
100
107
|
var onClose = function onClose() {
|
|
108
|
+
payLog.log('自定义失败页:关闭');
|
|
101
109
|
onChange('fail', {
|
|
102
110
|
number: number,
|
|
103
111
|
uniquePaymentNumber: number,
|
|
@@ -105,9 +113,10 @@ export default (function (_ref) {
|
|
|
105
113
|
order_id: order_id
|
|
106
114
|
});
|
|
107
115
|
};
|
|
108
|
-
|
|
109
|
-
// 错误页 通知外界 开发关闭按钮
|
|
110
116
|
useMount(function () {
|
|
117
|
+
payLog.log('自定义失败页展示', {
|
|
118
|
+
status: failCustom === null || failCustom === void 0 ? void 0 : failCustom.status
|
|
119
|
+
});
|
|
111
120
|
if ((failCustom === null || failCustom === void 0 ? void 0 : failCustom.status) === 'fail') {
|
|
112
121
|
onChange('page', 'fail');
|
|
113
122
|
}
|
|
@@ -14,6 +14,7 @@ import { ClientEnum } from "../../const";
|
|
|
14
14
|
import { getInitState } from "../../manufacturer";
|
|
15
15
|
import { useDispatch, useContextData, updateState, updateComponent } from "../../store";
|
|
16
16
|
import Header from "../header";
|
|
17
|
+
import payLog from "../../utils/payLog";
|
|
17
18
|
export default (function (_ref) {
|
|
18
19
|
var _steps$step;
|
|
19
20
|
var onChange = _ref.onChange,
|
|
@@ -42,6 +43,7 @@ export default (function (_ref) {
|
|
|
42
43
|
* @Date: 2024-08-20 11:30
|
|
43
44
|
*/
|
|
44
45
|
var onRetry = function onRetry() {
|
|
46
|
+
payLog.log('失败页:点击重试');
|
|
45
47
|
onChange('page', 'pay');
|
|
46
48
|
dispatch(updateState(getInitState(eftpos, _objectSpread(_objectSpread({}, originalParams || {}), {}, {
|
|
47
49
|
mode: mode,
|
|
@@ -49,7 +51,8 @@ export default (function (_ref) {
|
|
|
49
51
|
symbol: symbol,
|
|
50
52
|
amount: amount,
|
|
51
53
|
order_id: order_id,
|
|
52
|
-
number: ''
|
|
54
|
+
number: '',
|
|
55
|
+
client: client
|
|
53
56
|
}))));
|
|
54
57
|
};
|
|
55
58
|
|
|
@@ -65,7 +68,8 @@ export default (function (_ref) {
|
|
|
65
68
|
symbol: symbol,
|
|
66
69
|
amount: amount,
|
|
67
70
|
order_id: order_id,
|
|
68
|
-
number: ''
|
|
71
|
+
number: '',
|
|
72
|
+
client: client
|
|
69
73
|
}))));
|
|
70
74
|
onChange('page', 'amount');
|
|
71
75
|
};
|
|
@@ -78,6 +82,7 @@ export default (function (_ref) {
|
|
|
78
82
|
* @Date: 2024-08-20 11:31
|
|
79
83
|
*/
|
|
80
84
|
var onManually = function onManually() {
|
|
85
|
+
payLog.log('失败页:点击手动标记');
|
|
81
86
|
dispatch(updateState({
|
|
82
87
|
manual: {
|
|
83
88
|
title: locales.getText('page.eftpos-pay.text.request.unknown.title')(mode),
|
|
@@ -87,6 +92,7 @@ export default (function (_ref) {
|
|
|
87
92
|
dispatch(updateComponent('Manual'));
|
|
88
93
|
};
|
|
89
94
|
var onNotin = function onNotin() {
|
|
95
|
+
payLog.log('失败页:点击打印小票');
|
|
90
96
|
onChange('print', [], 'print_on_timeout');
|
|
91
97
|
};
|
|
92
98
|
|
|
@@ -97,7 +103,7 @@ export default (function (_ref) {
|
|
|
97
103
|
* @Date: 2024-08-20 11:32
|
|
98
104
|
*/
|
|
99
105
|
var onClose = function onClose() {
|
|
100
|
-
|
|
106
|
+
payLog.log('失败页:点击关闭');
|
|
101
107
|
onChange('fail', {
|
|
102
108
|
number: number,
|
|
103
109
|
uniquePaymentNumber: number,
|
|
@@ -105,9 +111,10 @@ export default (function (_ref) {
|
|
|
105
111
|
order_id: order_id
|
|
106
112
|
});
|
|
107
113
|
};
|
|
108
|
-
|
|
109
|
-
// 错误页 通知外界 开发关闭按钮
|
|
110
114
|
useMount(function () {
|
|
115
|
+
payLog.log('失败页展示', {
|
|
116
|
+
status: steps[step].status
|
|
117
|
+
});
|
|
111
118
|
if (steps[step].status === 'fail') {
|
|
112
119
|
onChange('page', 'fail');
|
|
113
120
|
}
|
|
@@ -8,6 +8,7 @@ import { locales } from '@pisell/utils';
|
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
9
|
import { Button, message } from 'antd';
|
|
10
10
|
import Header from "../header";
|
|
11
|
+
import payLog from "../../utils/payLog";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* @title: 断网(客户端)提示页
|
|
@@ -22,6 +23,7 @@ export default (function (_ref) {
|
|
|
22
23
|
hasBtn = _useState2[0],
|
|
23
24
|
setBtn = _useState2[1];
|
|
24
25
|
useEffect(function () {
|
|
26
|
+
payLog.log('断网提示页展示');
|
|
25
27
|
var clear = setTimeout(function () {
|
|
26
28
|
setBtn(true);
|
|
27
29
|
}, 1000);
|
|
@@ -37,6 +39,7 @@ export default (function (_ref) {
|
|
|
37
39
|
* @Date: 2024-08-20 11:41
|
|
38
40
|
*/
|
|
39
41
|
var onReconnect = function onReconnect() {
|
|
42
|
+
payLog.log('断网提示页:点击重新连接');
|
|
40
43
|
message.open({
|
|
41
44
|
key: 'net-warning',
|
|
42
45
|
type: 'loading',
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
import { locales } from '@pisell/utils';
|
|
3
3
|
import { Button } from 'antd';
|
|
4
4
|
import React, { useEffect } from 'react';
|
|
5
|
+
import { useMount } from 'ahooks';
|
|
5
6
|
import { ClientEnum } from "../../const";
|
|
6
7
|
import { useDispatch, useContextData, updateState, updateComponent } from "../../store";
|
|
7
8
|
import Header from "../header";
|
|
9
|
+
import payLog from "../../utils/payLog";
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* @title: 支付状态未知页面
|
|
@@ -21,6 +23,9 @@ export default (function (_ref) {
|
|
|
21
23
|
mode = _useContextData.mode,
|
|
22
24
|
client = _useContextData.client;
|
|
23
25
|
var dispatch = useDispatch();
|
|
26
|
+
useMount(function () {
|
|
27
|
+
payLog.log('未知状态处理页展示');
|
|
28
|
+
});
|
|
24
29
|
|
|
25
30
|
/**
|
|
26
31
|
* @title: 手动标记
|
|
@@ -29,6 +34,7 @@ export default (function (_ref) {
|
|
|
29
34
|
* @Date: 2024-08-20 11:31
|
|
30
35
|
*/
|
|
31
36
|
var onManually = function onManually() {
|
|
37
|
+
payLog.log('未知状态处理页:点击手动标记');
|
|
32
38
|
dispatch(updateState({
|
|
33
39
|
manual: {
|
|
34
40
|
title: locales.getText('page.eftpos-pay.text.request.unknown.title')(mode),
|
|
@@ -38,11 +44,13 @@ export default (function (_ref) {
|
|
|
38
44
|
dispatch(updateComponent('Manual'));
|
|
39
45
|
};
|
|
40
46
|
var onNotin = function onNotin() {
|
|
47
|
+
payLog.log('未知状态处理页:点击打印小票');
|
|
41
48
|
onChange('print', [], 'print_on_timeout');
|
|
42
49
|
};
|
|
43
50
|
useEffect(function () {
|
|
44
51
|
// 如果 网络终端 恢复至此页面 则需要 回归 步骤流程
|
|
45
52
|
if (form === 'Network' || form === 'restore') {
|
|
53
|
+
payLog.log('未知状态处理页:网络终端');
|
|
46
54
|
dispatch(updateComponent(''));
|
|
47
55
|
}
|
|
48
56
|
}, [form]);
|
|
@@ -13,11 +13,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import { locales } from '@pisell/utils';
|
|
14
14
|
import { Decimal } from 'decimal.js';
|
|
15
15
|
import { Button, InputNumber } from 'antd';
|
|
16
|
-
import React, { useMemo, useState } from 'react';
|
|
16
|
+
import React, { useMemo, useState, useEffect } from 'react';
|
|
17
17
|
import usePrefix from "../../../../hooks/usePrefix";
|
|
18
18
|
import { ModeEnum } from "../../const";
|
|
19
19
|
import { useContextData, useDispatch, updateState } from "../../store";
|
|
20
20
|
import { limitDecimals } from "../../helper";
|
|
21
|
+
import payLog from "../../utils/payLog";
|
|
21
22
|
import "./index.less";
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -40,6 +41,9 @@ export default (function (_ref) {
|
|
|
40
41
|
number = _useContextData.number,
|
|
41
42
|
pay = _useContextData.pay,
|
|
42
43
|
amount = _useContextData.amount;
|
|
44
|
+
useEffect(function () {
|
|
45
|
+
payLog.log('手动标记页展示');
|
|
46
|
+
}, []);
|
|
43
47
|
var start = useMemo(function () {
|
|
44
48
|
if (typeof (manual === null || manual === void 0 ? void 0 : manual.money) === 'number' || typeof (manual === null || manual === void 0 ? void 0 : manual.money) === 'string') {
|
|
45
49
|
return Number(manual === null || manual === void 0 ? void 0 : manual.money);
|
|
@@ -70,6 +74,7 @@ export default (function (_ref) {
|
|
|
70
74
|
*/
|
|
71
75
|
var onSuccess = function onSuccess() {
|
|
72
76
|
if (disabled) {
|
|
77
|
+
payLog.log('手动标记:点击成功被拦截');
|
|
73
78
|
return;
|
|
74
79
|
}
|
|
75
80
|
// if (mode === ModeEnum.Pay) {
|
|
@@ -84,6 +89,7 @@ export default (function (_ref) {
|
|
|
84
89
|
// return;
|
|
85
90
|
// }
|
|
86
91
|
if (mode === ModeEnum.Refund) {
|
|
92
|
+
payLog.log('手动标记(退款):点击标记为成功');
|
|
87
93
|
setDisabled(true);
|
|
88
94
|
onChange('success', {
|
|
89
95
|
amount: amount,
|
|
@@ -91,10 +97,12 @@ export default (function (_ref) {
|
|
|
91
97
|
number: number,
|
|
92
98
|
uniquePaymentNumber: number,
|
|
93
99
|
device: device,
|
|
94
|
-
order_id: order_id
|
|
100
|
+
order_id: order_id,
|
|
101
|
+
manual_marking_flag: 1 // 手动标记标志
|
|
95
102
|
});
|
|
96
103
|
return;
|
|
97
104
|
}
|
|
105
|
+
payLog.log('手动标记:点击标记为成功');
|
|
98
106
|
updateAmountStatus(true);
|
|
99
107
|
dispatch(updateState({
|
|
100
108
|
manual: _objectSpread(_objectSpread({}, manual), {}, {
|
|
@@ -112,6 +120,7 @@ export default (function (_ref) {
|
|
|
112
120
|
if (disabled) {
|
|
113
121
|
return;
|
|
114
122
|
}
|
|
123
|
+
payLog.log('手动标记:点击标记为失败');
|
|
115
124
|
setDisabled(true);
|
|
116
125
|
onChange('fail', {
|
|
117
126
|
number: number,
|
|
@@ -124,6 +133,9 @@ export default (function (_ref) {
|
|
|
124
133
|
if (disabled) {
|
|
125
134
|
return;
|
|
126
135
|
}
|
|
136
|
+
payLog.log('手动标记-确认金额:点击确认', {
|
|
137
|
+
money: money
|
|
138
|
+
});
|
|
127
139
|
setDisabled(true);
|
|
128
140
|
if (mode === ModeEnum.Refund || mode === ModeEnum.Query) {
|
|
129
141
|
return;
|
|
@@ -155,11 +167,13 @@ export default (function (_ref) {
|
|
|
155
167
|
number: number,
|
|
156
168
|
uniquePaymentNumber: number,
|
|
157
169
|
device: device,
|
|
158
|
-
order_id: order_id
|
|
170
|
+
order_id: order_id,
|
|
171
|
+
manual_marking_flag: 1 // 手动标记标志
|
|
159
172
|
}));
|
|
160
173
|
return;
|
|
161
174
|
};
|
|
162
175
|
var onCancel = function onCancel() {
|
|
176
|
+
payLog.log('手动标记-确认金额:点击取消');
|
|
163
177
|
updateAmountStatus(false);
|
|
164
178
|
setMoney(pay === null || pay === void 0 ? void 0 : pay.total);
|
|
165
179
|
dispatch(updateState({
|
|
@@ -9,6 +9,7 @@ import { Button } from 'antd';
|
|
|
9
9
|
import React, { useState } from 'react';
|
|
10
10
|
import { useContextData, useDispatch, updateNextStep, updateComponent } from "../../store";
|
|
11
11
|
import Header from "../header";
|
|
12
|
+
import payLog from "../../utils/payLog";
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* @title: 取消签名确认页
|
|
@@ -34,6 +35,7 @@ export default (function (_ref) {
|
|
|
34
35
|
* @Date: 2024-08-20 11:51
|
|
35
36
|
*/
|
|
36
37
|
var onBack = function onBack() {
|
|
38
|
+
payLog.log('取消签名确认页:点击返回');
|
|
37
39
|
dispatch(updateComponent(''));
|
|
38
40
|
};
|
|
39
41
|
|
|
@@ -43,6 +45,7 @@ export default (function (_ref) {
|
|
|
43
45
|
* @Date: 2024-08-20 11:51
|
|
44
46
|
*/
|
|
45
47
|
var onConfirm = function onConfirm() {
|
|
48
|
+
payLog.log('取消签名确认页:点击确认');
|
|
46
49
|
setDisabled(true);
|
|
47
50
|
api.update({
|
|
48
51
|
type: 'NO',
|
|
@@ -7,9 +7,12 @@ export declare enum EftposEnum {
|
|
|
7
7
|
/** 后端支付 - 支付 + 退款 */
|
|
8
8
|
Windcave = "windcave",
|
|
9
9
|
Stripe = "stripe",
|
|
10
|
+
/** 后端支付 - 支付 + 退款 */
|
|
10
11
|
Linkly = "linkly",
|
|
11
12
|
/** 汇付天下 */
|
|
12
|
-
Huifu = "huifu"
|
|
13
|
+
Huifu = "huifu",
|
|
14
|
+
/** mx51支付 - 支付 + 退款 */
|
|
15
|
+
MX51 = "mx51"
|
|
13
16
|
}
|
|
14
17
|
export declare enum StatusEnum {
|
|
15
18
|
Init = "init",
|
|
@@ -163,7 +166,7 @@ export declare enum PayStatus {
|
|
|
163
166
|
'Unknown' = "701000",
|
|
164
167
|
/** 交易请求超时 */
|
|
165
168
|
'Timeout' = "701001",
|
|
166
|
-
/**
|
|
169
|
+
/** 支付失败 */
|
|
167
170
|
'PaymentFailed' = "701002",
|
|
168
171
|
/** 繁忙 EFTPOS终端暂时不可用,因为EFTPOS正在处理另一个请求。 */
|
|
169
172
|
'PayOtherEftposFailed' = "701003",
|
|
@@ -180,7 +183,9 @@ export declare enum PayStatus {
|
|
|
180
183
|
/** 签名拒绝 */
|
|
181
184
|
'SignatureDeclined' = "701009",
|
|
182
185
|
/** 配置参数错误 */
|
|
183
|
-
'UserConfigError' = "701010"
|
|
186
|
+
'UserConfigError' = "701010",
|
|
187
|
+
/** mx51未知状态 */
|
|
188
|
+
'UnknownMx51' = "702001"
|
|
184
189
|
}
|
|
185
190
|
export interface ActionProps {
|
|
186
191
|
onChange: (status: `${StatusEnum.Success}` | `${StatusEnum.Fail}` | 'page', params?: {
|
|
@@ -5,6 +5,7 @@ export var EftposEnum = /*#__PURE__*/function (EftposEnum) {
|
|
|
5
5
|
EftposEnum["Stripe"] = "stripe";
|
|
6
6
|
EftposEnum["Linkly"] = "linkly";
|
|
7
7
|
EftposEnum["Huifu"] = "huifu";
|
|
8
|
+
EftposEnum["MX51"] = "mx51";
|
|
8
9
|
return EftposEnum;
|
|
9
10
|
}({});
|
|
10
11
|
export var StatusEnum = /*#__PURE__*/function (StatusEnum) {
|
|
@@ -79,5 +80,6 @@ export var PayStatus = /*#__PURE__*/function (PayStatus) {
|
|
|
79
80
|
PayStatus["PayBankRefuses"] = "701008";
|
|
80
81
|
PayStatus["SignatureDeclined"] = "701009";
|
|
81
82
|
PayStatus["UserConfigError"] = "701010";
|
|
83
|
+
PayStatus["UnknownMx51"] = "702001";
|
|
82
84
|
return PayStatus;
|
|
83
85
|
}({});
|