@pisell/private-materials 3.0.136 → 3.0.138
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/forms/single/index.js +3 -0
- package/es/components/eftpos/const.d.ts +26 -0
- package/es/components/eftpos/const.js +40 -8
- package/es/components/eftpos/device.d.ts +3 -2
- package/es/components/eftpos/device.js +6 -5
- package/es/components/eftpos/form/index.d.ts +5 -0
- package/es/components/eftpos/form/index.js +8 -0
- package/es/components/eftpos/hooks.d.ts +34 -0
- package/es/components/{eftposPay/windcave/hook.js → eftpos/hooks.js} +96 -122
- package/es/components/eftpos/icon/apiKey.d.ts +5 -0
- package/es/components/eftpos/icon/apiKey.js +17 -0
- package/es/components/eftpos/icon/device.d.ts +5 -0
- package/es/components/eftpos/icon/device.js +19 -0
- package/es/components/eftpos/index.d.ts +10 -0
- package/es/components/eftpos/index.js +329 -46
- package/es/components/eftpos/index.less +38 -1
- package/es/components/eftpos/locales.d.ts +12 -0
- package/es/components/eftpos/locales.js +15 -3
- package/es/components/eftpos/log.d.ts +8 -0
- package/es/components/eftpos/log.js +85 -0
- package/es/components/eftpos/pos.d.ts +1 -1
- package/es/components/eftpos/pos.js +8 -5
- package/es/components/eftpos/surcharge/index.d.ts +25 -2
- package/es/components/eftpos/surcharge/index.js +100 -16
- package/es/components/eftpos/table.d.ts +4 -0
- package/es/components/eftpos/table.js +102 -10
- package/es/components/eftposPay/amount.d.ts +7 -1
- package/es/components/eftposPay/amount.js +65 -38
- package/es/components/eftposPay/component/fail/failCustom.js +65 -20
- package/es/components/eftposPay/component/fail/index.js +60 -30
- package/es/components/eftposPay/component/fail/network.d.ts +5 -0
- package/es/components/eftposPay/component/fail/network.js +13 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +6 -0
- package/es/components/eftposPay/component/fail/unknow.js +18 -3
- package/es/components/eftposPay/component/header/index.d.ts +2 -1
- package/es/components/eftposPay/component/header/index.js +4 -1
- package/es/components/eftposPay/component/header/index.less +1 -10
- package/es/components/eftposPay/component/manual/index.d.ts +6 -1
- package/es/components/eftposPay/component/manual/index.js +174 -23
- package/es/components/eftposPay/component/manual/index.less +42 -14
- package/es/components/eftposPay/component/signature/index.d.ts +5 -0
- package/es/components/eftposPay/component/signature/index.js +20 -2
- package/es/components/eftposPay/component/step/index.d.ts +7 -7
- package/es/components/eftposPay/component/step/step.d.ts +4 -4
- package/es/components/eftposPay/const.d.ts +19 -4
- package/es/components/eftposPay/const.js +4 -2
- package/es/components/eftposPay/device.d.ts +7 -0
- package/es/components/eftposPay/device.js +22 -0
- package/es/components/eftposPay/helper.d.ts +54 -0
- package/es/components/eftposPay/helper.js +93 -1
- package/es/components/eftposPay/hooks.d.ts +30 -1
- package/es/components/eftposPay/hooks.js +181 -26
- package/es/components/eftposPay/index.d.ts +2 -4
- package/es/components/eftposPay/index.js +119 -31
- package/es/components/eftposPay/index.less +27 -19
- package/es/components/eftposPay/locales.d.ts +45 -0
- package/es/components/eftposPay/locales.js +348 -3
- package/es/components/eftposPay/manufacturer.d.ts +2 -2
- package/es/components/eftposPay/manufacturer.js +9 -10
- package/es/components/eftposPay/pay.d.ts +10 -1
- package/es/components/eftposPay/pay.js +112 -34
- package/es/components/eftposPay/payo/config.js +137 -270
- package/es/components/eftposPay/payo/const.d.ts +22 -2
- package/es/components/eftposPay/payo/const.js +83 -33
- package/es/components/eftposPay/payo/hooks.d.ts +5 -0
- package/es/components/eftposPay/payo/hooks.js +19 -2
- package/es/components/eftposPay/store/index.d.ts +154 -53
- package/es/components/eftposPay/store/index.js +112 -60
- package/es/components/eftposPay/tyro/const.d.ts +17 -0
- package/es/components/eftposPay/{eftpos → tyro}/const.js +71 -90
- package/es/components/eftposPay/tyro/hooks.d.ts +14 -0
- package/es/components/eftposPay/tyro/hooks.js +40 -0
- package/es/components/eftposPay/tyro/index.d.ts +9 -0
- package/es/components/eftposPay/tyro/index.js +575 -0
- package/es/components/eftposPay/windcave/const.d.ts +24 -9
- package/es/components/eftposPay/windcave/const.js +90 -81
- package/es/components/eftposPay/windcave/helper.d.ts +16 -2
- package/es/components/eftposPay/windcave/helper.js +175 -42
- package/es/components/eftposPay/windcave/receiptAction.d.ts +12 -0
- package/es/components/eftposPay/windcave/receiptAction.js +91 -43
- package/es/components/eftposPay/windcave/timer.d.ts +13 -1
- package/es/components/eftposPay/windcave/timer.js +18 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +2 -1
- package/es/components/eftposPay/windcave/windcave.js +155 -139
- package/es/utils/load.d.ts +11 -0
- package/es/utils/load.js +85 -0
- package/lib/components/booking/forms/single/index.js +1 -0
- package/lib/components/eftpos/const.d.ts +26 -0
- package/lib/components/eftpos/const.js +13 -1
- package/lib/components/eftpos/device.d.ts +3 -2
- package/lib/components/eftpos/device.js +2 -2
- package/lib/components/eftpos/form/index.d.ts +5 -0
- package/lib/components/eftpos/hooks.d.ts +34 -0
- package/lib/components/eftpos/hooks.js +106 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +5 -0
- package/lib/components/eftpos/icon/apiKey.js +57 -0
- package/lib/components/eftpos/icon/device.d.ts +5 -0
- package/lib/components/eftpos/icon/device.js +57 -0
- package/lib/components/eftpos/index.d.ts +10 -0
- package/lib/components/eftpos/index.js +262 -97
- package/lib/components/eftpos/index.less +38 -1
- package/lib/components/eftpos/locales.d.ts +12 -0
- package/lib/components/eftpos/locales.js +15 -3
- package/lib/components/eftpos/log.d.ts +8 -0
- package/lib/components/eftpos/log.js +87 -0
- package/lib/components/eftpos/pos.d.ts +1 -1
- package/lib/components/eftpos/pos.js +5 -4
- package/lib/components/eftpos/surcharge/index.d.ts +25 -2
- package/lib/components/eftpos/surcharge/index.js +36 -6
- package/lib/components/eftpos/table.d.ts +4 -0
- package/lib/components/eftpos/table.js +40 -8
- package/lib/components/eftposPay/amount.d.ts +7 -1
- package/lib/components/eftposPay/amount.js +10 -33
- package/lib/components/eftposPay/component/fail/failCustom.js +27 -6
- package/lib/components/eftposPay/component/fail/index.js +39 -18
- package/lib/components/eftposPay/component/fail/network.d.ts +5 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +6 -0
- package/lib/components/eftposPay/component/fail/unknow.js +3 -3
- package/lib/components/eftposPay/component/header/index.d.ts +2 -1
- package/lib/components/eftposPay/component/header/index.js +2 -1
- package/lib/components/eftposPay/component/header/index.less +1 -10
- package/lib/components/eftposPay/component/manual/index.d.ts +6 -1
- package/lib/components/eftposPay/component/manual/index.js +122 -31
- package/lib/components/eftposPay/component/manual/index.less +42 -14
- package/lib/components/eftposPay/component/signature/index.d.ts +5 -0
- package/lib/components/eftposPay/component/signature/index.js +2 -2
- package/lib/components/eftposPay/component/step/index.d.ts +7 -7
- package/lib/components/eftposPay/component/step/step.d.ts +4 -4
- package/lib/components/eftposPay/const.d.ts +19 -4
- package/lib/components/eftposPay/const.js +3 -1
- package/lib/components/eftposPay/device.d.ts +7 -0
- package/lib/components/eftposPay/helper.d.ts +54 -0
- package/lib/components/eftposPay/helper.js +64 -0
- package/lib/components/eftposPay/hooks.d.ts +30 -1
- package/lib/components/eftposPay/hooks.js +182 -44
- package/lib/components/eftposPay/index.d.ts +2 -4
- package/lib/components/eftposPay/index.js +74 -27
- package/lib/components/eftposPay/index.less +27 -19
- package/lib/components/eftposPay/locales.d.ts +45 -0
- package/lib/components/eftposPay/locales.js +352 -3
- package/lib/components/eftposPay/manufacturer.d.ts +2 -2
- package/lib/components/eftposPay/manufacturer.js +13 -13
- package/lib/components/eftposPay/pay.d.ts +10 -1
- package/lib/components/eftposPay/pay.js +86 -25
- package/lib/components/eftposPay/payo/config.js +121 -268
- package/lib/components/eftposPay/payo/const.d.ts +22 -2
- package/lib/components/eftposPay/payo/const.js +55 -36
- package/lib/components/eftposPay/payo/hooks.d.ts +5 -0
- package/lib/components/eftposPay/payo/hooks.js +1 -1
- package/lib/components/eftposPay/store/index.d.ts +154 -53
- package/lib/components/eftposPay/store/index.js +7 -66
- package/lib/components/eftposPay/tyro/const.d.ts +17 -0
- package/lib/components/eftposPay/tyro/const.js +114 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +14 -0
- package/lib/components/eftposPay/{eftpos/index.js → tyro/hooks.js} +31 -36
- package/lib/components/eftposPay/tyro/index.d.ts +9 -0
- package/lib/components/eftposPay/tyro/index.js +558 -0
- package/lib/components/eftposPay/windcave/const.d.ts +24 -9
- package/lib/components/eftposPay/windcave/const.js +53 -104
- package/lib/components/eftposPay/windcave/helper.d.ts +16 -2
- package/lib/components/eftposPay/windcave/helper.js +163 -48
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +12 -0
- package/lib/components/eftposPay/windcave/receiptAction.js +15 -47
- package/lib/components/eftposPay/windcave/timer.d.ts +13 -1
- package/lib/components/eftposPay/windcave/timer.js +5 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +2 -1
- package/lib/components/eftposPay/windcave/windcave.js +130 -130
- package/lib/utils/load.d.ts +11 -0
- package/lib/utils/load.js +100 -0
- package/lowcode/eftpos/meta.ts +202 -160
- package/lowcode/eftpos-pay/meta.ts +45 -12
- package/package.json +4 -4
- package/es/components/eftposPay/eftpos/config.d.ts +0 -11
- package/es/components/eftposPay/eftpos/config.js +0 -178
- package/es/components/eftposPay/eftpos/const.d.ts +0 -10
- package/es/components/eftposPay/eftpos/index.d.ts +0 -7
- package/es/components/eftposPay/eftpos/index.js +0 -35
- package/es/components/eftposPay/windcave/action.d.ts +0 -8
- package/es/components/eftposPay/windcave/action.js +0 -104
- package/es/components/eftposPay/windcave/hook.d.ts +0 -14
- package/es/components/eftposPay/windcave/index.d.ts +0 -8
- package/es/components/eftposPay/windcave/index.js +0 -49
- package/es/components/eftposPay/windcave/pos.d.ts +0 -8
- package/es/components/eftposPay/windcave/pos.js +0 -180
- package/es/components/eftposPay/windcave/pwd.d.ts +0 -8
- package/es/components/eftposPay/windcave/pwd.js +0 -124
- package/es/components/eftposPay/windcave/receipet.d.ts +0 -6
- package/es/components/eftposPay/windcave/receipet.js +0 -67
- package/es/components/eftposPay/windcave/wait.d.ts +0 -12
- package/es/components/eftposPay/windcave/wait.js +0 -139
- package/lib/components/eftposPay/eftpos/config.d.ts +0 -11
- package/lib/components/eftposPay/eftpos/config.js +0 -199
- package/lib/components/eftposPay/eftpos/const.d.ts +0 -10
- package/lib/components/eftposPay/eftpos/const.js +0 -165
- package/lib/components/eftposPay/eftpos/index.d.ts +0 -7
- package/lib/components/eftposPay/windcave/action.d.ts +0 -8
- package/lib/components/eftposPay/windcave/action.js +0 -143
- package/lib/components/eftposPay/windcave/hook.d.ts +0 -14
- package/lib/components/eftposPay/windcave/hook.js +0 -139
- package/lib/components/eftposPay/windcave/index.d.ts +0 -8
- package/lib/components/eftposPay/windcave/index.js +0 -78
- package/lib/components/eftposPay/windcave/pos.d.ts +0 -8
- package/lib/components/eftposPay/windcave/pos.js +0 -197
- package/lib/components/eftposPay/windcave/pwd.d.ts +0 -8
- package/lib/components/eftposPay/windcave/pwd.js +0 -143
- package/lib/components/eftposPay/windcave/receipet.d.ts +0 -6
- package/lib/components/eftposPay/windcave/receipet.js +0 -93
- package/lib/components/eftposPay/windcave/wait.d.ts +0 -12
- package/lib/components/eftposPay/windcave/wait.js +0 -163
|
@@ -1,136 +1,130 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["order_id", "name", "symbol", "amount", "mode", "number", "pay", "device", "net"];
|
|
2
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
5
|
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
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
10
|
import { locales } from '@pisell/utils';
|
|
8
|
-
import React from 'react';
|
|
9
11
|
import { EftposEnum, StatusEnum, PayRouteEnum, ModeEnum } from "../const";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @title: 初始化 windcave 数据
|
|
14
|
+
* @return store 全局数据管理
|
|
15
|
+
* @Author: hongbing.wang
|
|
16
|
+
* @Date: 2024-08-12 10:42
|
|
17
|
+
*/
|
|
18
|
+
export default (function (params) {
|
|
19
|
+
var _ref = params || {
|
|
14
20
|
mode: ModeEnum.Pay
|
|
15
21
|
},
|
|
16
|
-
|
|
22
|
+
order_id = _ref.order_id,
|
|
23
|
+
name = _ref.name,
|
|
17
24
|
symbol = _ref.symbol,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
warn: '',
|
|
32
|
-
tip: locales.getText('page.eftpos-pay.text.processing'),
|
|
33
|
-
status: StatusEnum.Loading
|
|
34
|
-
}, {
|
|
35
|
-
title: locales.getText('page.eftpos-pay.text.loading')(mode || ModeEnum.Pay),
|
|
36
|
-
key: Date.now(),
|
|
37
|
-
text: locales.getText('page.eftpos-pay.text.receipt'),
|
|
38
|
-
warn: '',
|
|
39
|
-
tip: locales.getText('page.eftpos-pay.text.processing'),
|
|
40
|
-
status: StatusEnum.Loading
|
|
41
|
-
}, {
|
|
42
|
-
title: locales.getText('page.eftpos-pay.text.loading')(mode || ModeEnum.Pay),
|
|
43
|
-
key: Date.now(),
|
|
44
|
-
text: locales.getText('page.eftpos-pay.text.receipt.again.title'),
|
|
45
|
-
warn: locales.getText('page.eftpos-pay.text.receipt.again.text'),
|
|
46
|
-
tip: '',
|
|
47
|
-
status: StatusEnum.Warn
|
|
48
|
-
}, {
|
|
49
|
-
title: locales.getText('page.eftpos-pay.text.loading')(mode || ModeEnum.Pay),
|
|
50
|
-
key: Date.now(),
|
|
51
|
-
text: locales.getText('page.eftpos-pay.text.waiting.processing'),
|
|
52
|
-
success: 'Approade',
|
|
53
|
-
warn: '',
|
|
54
|
-
tip: locales.getText('page.eftpos-pay.text.processing'),
|
|
55
|
-
status: StatusEnum.Loading
|
|
56
|
-
}];
|
|
57
|
-
};
|
|
58
|
-
var getInitState = function getInitState(params) {
|
|
59
|
-
if (typeof params.number !== 'undefined') {
|
|
60
|
-
params.isPay = true;
|
|
61
|
-
}
|
|
62
|
-
return _objectSpread({
|
|
63
|
-
mode: (params === null || params === void 0 ? void 0 : params.mode) || ModeEnum.Pay,
|
|
25
|
+
amount = _ref.amount,
|
|
26
|
+
mode = _ref.mode,
|
|
27
|
+
number = _ref.number,
|
|
28
|
+
pay = _ref.pay,
|
|
29
|
+
device = _ref.device,
|
|
30
|
+
net = _ref.net,
|
|
31
|
+
other = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
33
|
+
order_id: order_id,
|
|
34
|
+
name: name,
|
|
35
|
+
symbol: symbol,
|
|
36
|
+
amount: amount,
|
|
37
|
+
mode: mode,
|
|
64
38
|
eftpos: EftposEnum.Windcave,
|
|
65
39
|
key: Date.now(),
|
|
66
40
|
warn: '',
|
|
67
41
|
step: 0,
|
|
68
42
|
type: PayRouteEnum.Step,
|
|
69
|
-
title: locales.getText('page.eftpos-pay.text.loading')(
|
|
43
|
+
title: locales.getText('page.eftpos-pay.text.loading')(mode),
|
|
70
44
|
component: '',
|
|
71
45
|
status: StatusEnum.Loading,
|
|
72
|
-
steps:
|
|
73
|
-
|
|
46
|
+
steps: [],
|
|
47
|
+
render: true,
|
|
48
|
+
custom: other ? _objectSpread(_objectSpread({}, other), {}, {
|
|
74
49
|
list: [],
|
|
75
|
-
step:
|
|
50
|
+
step: StepStatusEnum.Free
|
|
76
51
|
}) : {
|
|
77
52
|
list: [],
|
|
78
|
-
step:
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
53
|
+
step: StepStatusEnum.Free
|
|
54
|
+
}
|
|
55
|
+
}, typeof net !== 'undefined' ? {
|
|
56
|
+
net: net
|
|
57
|
+
} : {}), typeof number !== 'undefined' ? {
|
|
58
|
+
number: number
|
|
59
|
+
} : {}), typeof pay !== 'undefined' ? {
|
|
60
|
+
pay: pay
|
|
61
|
+
} : {}), typeof device !== 'undefined' ? {
|
|
62
|
+
device: device
|
|
83
63
|
} : {});
|
|
84
|
-
};
|
|
85
|
-
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @title: windcave 金额信息
|
|
68
|
+
* @description:
|
|
69
|
+
* @param {State} store : 全局store数据管理
|
|
70
|
+
* @return 金额信息
|
|
71
|
+
* @Author: hongbing.wang
|
|
72
|
+
* @Date: 2024-08-12 10:43
|
|
73
|
+
*/
|
|
86
74
|
export function getAmonunt(store) {
|
|
87
75
|
var device = store.device,
|
|
88
|
-
|
|
76
|
+
pay = store.pay,
|
|
77
|
+
custom = store.custom,
|
|
78
|
+
name = store.name,
|
|
79
|
+
symbol = store.symbol,
|
|
80
|
+
amount = store.amount;
|
|
89
81
|
if (!device || !custom) {
|
|
90
82
|
throw Error('device or custom is not defined');
|
|
91
83
|
}
|
|
92
|
-
var name = custom.name;
|
|
93
|
-
var symbol = custom.symbol;
|
|
94
|
-
// const format = custom.format as string;
|
|
95
|
-
var money = custom.amount;
|
|
96
|
-
var pay = custom.pay;
|
|
97
84
|
var setting = device.setting;
|
|
85
|
+
|
|
86
|
+
// 从 金额编辑页 获取到 支付数据
|
|
98
87
|
if (pay) {
|
|
99
88
|
return {
|
|
100
89
|
name: name,
|
|
101
90
|
symbol: symbol,
|
|
102
91
|
// format,
|
|
103
|
-
money:
|
|
92
|
+
money: Number(amount),
|
|
104
93
|
amount: Number(pay.amount),
|
|
105
94
|
surRate: Number(pay.surRate),
|
|
106
95
|
surMoney: Number(pay.surMoney),
|
|
107
|
-
surcharge: (setting === null || setting === void 0 ? void 0 : setting.surcharge) || false
|
|
96
|
+
surcharge: (setting === null || setting === void 0 ? void 0 : setting.surcharge) || false,
|
|
97
|
+
useOriginSurcharge: (pay === null || pay === void 0 ? void 0 : pay.useOriginSurcharge) || false
|
|
108
98
|
};
|
|
109
99
|
}
|
|
100
|
+
// 原始支付总额
|
|
110
101
|
if (!setting) {
|
|
111
102
|
return {
|
|
112
103
|
name: name,
|
|
113
104
|
symbol: symbol,
|
|
114
105
|
// format,
|
|
115
|
-
money:
|
|
116
|
-
amount:
|
|
106
|
+
money: Number(amount),
|
|
107
|
+
amount: Number(amount),
|
|
117
108
|
surRate: 0,
|
|
118
109
|
surMoney: 0,
|
|
119
|
-
surcharge: false
|
|
110
|
+
surcharge: false,
|
|
111
|
+
useOriginSurcharge: false
|
|
120
112
|
};
|
|
121
113
|
}
|
|
114
|
+
// 直接设备中手续费金额 + 原始支付总额
|
|
122
115
|
var surRate = setting.constant_rate || 0;
|
|
123
116
|
var surMoney = setting.constant_money || 0;
|
|
124
117
|
var surcharge = setting.surcharge;
|
|
118
|
+
var useOriginSurcharge = setting.useOriginSurcharge || false;
|
|
125
119
|
return {
|
|
126
120
|
name: name,
|
|
127
121
|
symbol: symbol,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
122
|
+
money: Number(amount),
|
|
123
|
+
amount: Number(amount),
|
|
124
|
+
surRate: useOriginSurcharge ? 0 : surcharge ? surRate : 0,
|
|
125
|
+
surMoney: useOriginSurcharge ? 0 : surcharge ? surMoney : 0,
|
|
126
|
+
surcharge: surcharge,
|
|
127
|
+
useOriginSurcharge: useOriginSurcharge
|
|
134
128
|
};
|
|
135
129
|
}
|
|
136
130
|
export var StepStatusEnum;
|
|
@@ -145,6 +139,14 @@ export var StepStatusEnum;
|
|
|
145
139
|
StepStatusEnum[StepStatusEnum["Wait"] = 8] = "Wait";
|
|
146
140
|
})(StepStatusEnum || (StepStatusEnum = {}));
|
|
147
141
|
export var StemTypeEnum;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @title: windcave 步骤信息
|
|
145
|
+
* @description: 步骤对应配置信息
|
|
146
|
+
* @return 步骤配置信息
|
|
147
|
+
* @Author: hongbing.wang
|
|
148
|
+
* @Date: 2024-08-12 10:44
|
|
149
|
+
*/
|
|
148
150
|
(function (StemTypeEnum) {
|
|
149
151
|
StemTypeEnum["Active"] = "active";
|
|
150
152
|
StemTypeEnum["Passive"] = "passive";
|
|
@@ -228,7 +230,14 @@ export var getStepMapping = function getStepMapping(type, _ref2) {
|
|
|
228
230
|
// passive active
|
|
229
231
|
status: 'pedding',
|
|
230
232
|
//
|
|
231
|
-
pedding:
|
|
233
|
+
pedding: "".concat(locales.getText('page.eftpos-pay.text.receipt.again.title'), "\n").concat(locales.getText('page.eftpos-pay.text.receipt.again.text')),
|
|
234
|
+
// pedding: (
|
|
235
|
+
// <>
|
|
236
|
+
// {locales.getText('page.eftpos-pay.text.receipt.again.title')}
|
|
237
|
+
// <br />
|
|
238
|
+
// {locales.getText('page.eftpos-pay.text.receipt.again.text')}
|
|
239
|
+
// </>
|
|
240
|
+
// ),
|
|
232
241
|
resolve: locales.getText('page.eftpos-pay.text.receipt.again.title'),
|
|
233
242
|
reject: locales.getText('page.eftpos-pay.text.receipt.again.title'),
|
|
234
243
|
// locales.getText('page.eftpos-pay.text.waiting.decline'), // 'Wait for the Decline',
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PayStatus } from '../const';
|
|
3
3
|
import XhrTimer from './timer';
|
|
4
|
+
/**
|
|
5
|
+
* @title: windcave 支付,退款,查询 错误逻辑处理
|
|
6
|
+
* @description: 动态步骤页 异常前往 FailCustom 页面
|
|
7
|
+
* @return null
|
|
8
|
+
* @Author: hongbing.wang
|
|
9
|
+
* @Date: 2024-08-12 10:29
|
|
10
|
+
*/
|
|
4
11
|
export declare const useFail: () => (res: {
|
|
5
|
-
code?: "200" | "4004" | "701000" | "701001" | "701003" | "701004" | "701005" | "701006" | "701007" | undefined;
|
|
12
|
+
code?: "200" | "4004" | "701000" | "701001" | "701003" | "701004" | "701005" | "701006" | "701007" | "701008" | "701009" | "701010" | undefined;
|
|
6
13
|
}, isMark?: boolean) => void;
|
|
14
|
+
/**
|
|
15
|
+
* @title: 轮询 check 接口
|
|
16
|
+
* @description: 轮询 终止条件 1.超时 , 2. 返回非200状态码 , 3. 外部关闭
|
|
17
|
+
* @return [run, XhrTimer] run: 启动函数 , XhrTimer 轮询类
|
|
18
|
+
* @Author: hongbing.wang
|
|
19
|
+
* @Date: 2024-08-12 10:30
|
|
20
|
+
*/
|
|
7
21
|
export declare const useValidate: (check: (...agrn: unknown[]) => Promise<unknown>, num: number, onChange: (params: {
|
|
8
22
|
[key: string]: unknown;
|
|
9
|
-
}) => unknown) => readonly [(timeout?: number) => void, React.MutableRefObject<XhrTimer | undefined>];
|
|
23
|
+
}) => unknown) => readonly [(timeout?: number) => void, React.MutableRefObject<((res: any, isRun?: boolean) => unknown) | undefined>, React.MutableRefObject<XhrTimer | undefined>];
|