@pisell/private-materials 6.3.14 → 6.3.16
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 +13 -13
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.js +9 -9
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +52 -6
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +58 -8
- package/es/components/pay/toC/PaymentMethods/CashManual/index.js +74 -12
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.js +73 -12
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +93 -11
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +90 -12
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +46 -7
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +90 -12
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +64 -13
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.js +73 -8
- package/es/components/pay/toC/PaymentMethods/StripePay/index.js +68 -17
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +86 -14
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +89 -15
- package/es/components/pay/toC/index.js +278 -118
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -0
- package/es/components/wallet/Detail/index.js +3 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/components/WalletCard.js +8 -3
- package/es/components/wallet/model.d.ts +9 -1
- package/es/hooks/usePaymentLogger.d.ts +22 -0
- package/es/hooks/usePaymentLogger.js +78 -0
- package/es/utils/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +42 -3
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +52 -15
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.js +60 -2
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.js +60 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +66 -2
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +29 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +50 -6
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.js +72 -10
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +47 -5
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +61 -3
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +63 -3
- package/lib/components/pay/toC/index.js +183 -48
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -0
- package/lib/components/wallet/Detail/index.js +18 -5
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/components/WalletCard.js +3 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/hooks/usePaymentLogger.d.ts +22 -0
- package/lib/hooks/usePaymentLogger.js +69 -0
- package/lib/utils/index.d.ts +1 -1
- package/package.json +3 -3
@@ -8,15 +8,17 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
8
8
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
9
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
|
-
import React, { useState, useImperativeHandle, forwardRef } from 'react';
|
11
|
+
import React, { useState, useImperativeHandle, forwardRef, useContext } from 'react';
|
12
12
|
import { PisellModal } from '@pisell/materials';
|
13
13
|
import ThreedsLoading from "../MWCreditCard/TDSPay/ThreedsLoading";
|
14
14
|
import { getWxPayUrl } from "./serve";
|
15
|
+
import { Context } from "../../model";
|
15
16
|
import { getPayGroupParamsFromStorage, setPayNumber } from "../../payGroup";
|
16
17
|
import "./index.less";
|
17
18
|
import { locales } from '@pisell/utils';
|
18
19
|
import { clientPayment } from "../../utils";
|
19
20
|
import useEngineContext from "../../../../../hooks/useEngineContext";
|
21
|
+
import usePaymentLogger from "../../../../../hooks/usePaymentLogger";
|
20
22
|
/**
|
21
23
|
* @title: 微信支付
|
22
24
|
* @description:
|
@@ -27,7 +29,9 @@ import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
27
29
|
* @Date: 2024-08-16 11:18
|
28
30
|
*/
|
29
31
|
var SuperPayWxPayH5 = function SuperPayWxPayH5(props, ref) {
|
30
|
-
var _context$appHelper;
|
32
|
+
var _context$appHelper, _state$payGroup;
|
33
|
+
var _useContext = useContext(Context),
|
34
|
+
state = _useContext.state;
|
31
35
|
var _useState = useState(false),
|
32
36
|
_useState2 = _slicedToArray(_useState, 2),
|
33
37
|
open = _useState2[0],
|
@@ -36,6 +40,12 @@ var SuperPayWxPayH5 = function SuperPayWxPayH5(props, ref) {
|
|
36
40
|
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
37
41
|
interaction = _context$appHelper$ut.interaction;
|
38
42
|
|
43
|
+
// SuperPayWxPayH5支付日志记录器
|
44
|
+
var paymentLogger = usePaymentLogger({
|
45
|
+
orderId: ((_state$payGroup = state.payGroup) === null || _state$payGroup === void 0 ? void 0 : _state$payGroup.order_id) || 'unknown',
|
46
|
+
step: '2'
|
47
|
+
});
|
48
|
+
|
39
49
|
/**
|
40
50
|
* @title: 初始化
|
41
51
|
* @description:
|
@@ -52,52 +62,116 @@ var SuperPayWxPayH5 = function SuperPayWxPayH5(props, ref) {
|
|
52
62
|
while (1) switch (_context.prev = _context.next) {
|
53
63
|
case 0:
|
54
64
|
payGroup = _ref.payGroup;
|
65
|
+
// 记录SuperPayWxPayH5初始化开始
|
66
|
+
paymentLogger.addLog({
|
67
|
+
key: 'SuperPayWxPayH5初始化开始',
|
68
|
+
value: ""
|
69
|
+
});
|
70
|
+
|
55
71
|
// 获取交易组
|
56
72
|
values = getPayGroupParamsFromStorage(payGroup.order_id);
|
57
73
|
if (!(interaction !== null && interaction !== void 0 && (_interaction$utils = interaction.utils) !== null && _interaction$utils !== void 0 && (_interaction$utils$is = _interaction$utils.isAppEnv) !== null && _interaction$utils$is !== void 0 && _interaction$utils$is.call(_interaction$utils))) {
|
58
|
-
_context.next =
|
74
|
+
_context.next = 7;
|
59
75
|
break;
|
60
76
|
}
|
77
|
+
// 记录App环境检测
|
78
|
+
paymentLogger.addLog({
|
79
|
+
key: 'SuperPayWxPayH5App环境检测',
|
80
|
+
value: "检测到App环境,调用客户端支付"
|
81
|
+
});
|
82
|
+
paymentLogger.sendLogs('SuperPayWxPayH5App环境支付');
|
61
83
|
return _context.abrupt("return", clientPayment({
|
62
84
|
order_id: payGroup.order_id,
|
63
85
|
type: 'wxPay',
|
64
86
|
values: values,
|
65
87
|
interaction: interaction
|
66
88
|
}));
|
67
|
-
case
|
89
|
+
case 7:
|
68
90
|
setOpen(true);
|
69
91
|
if (values) {
|
70
|
-
_context.next =
|
92
|
+
_context.next = 13;
|
71
93
|
break;
|
72
94
|
}
|
95
|
+
// 记录获取支付参数失败
|
96
|
+
paymentLogger.addLog({
|
97
|
+
key: 'SuperPayWxPayH5获取支付参数失败',
|
98
|
+
value: {
|
99
|
+
title: "\u8BA2\u5355".concat(payGroup === null || payGroup === void 0 ? void 0 : payGroup.order_id, " \u672A\u627E\u5230\u5B58\u50A8\u7684\u652F\u4ED8\u53C2\u6570"),
|
100
|
+
data: {
|
101
|
+
payGroup: payGroup
|
102
|
+
}
|
103
|
+
}
|
104
|
+
});
|
105
|
+
paymentLogger.sendLogs('SuperPayWxPayH5获取支付参数失败');
|
73
106
|
setOpen(false);
|
74
107
|
return _context.abrupt("return");
|
75
|
-
case
|
76
|
-
|
77
|
-
|
108
|
+
case 13:
|
109
|
+
// 记录获取支付参数成功
|
110
|
+
paymentLogger.addLog({
|
111
|
+
key: 'SuperPayWxPayH5获取支付参数成功',
|
112
|
+
value: ""
|
113
|
+
});
|
114
|
+
_context.prev = 14;
|
115
|
+
_context.next = 17;
|
78
116
|
return getWxPayUrl(payGroup.order_id, values);
|
79
|
-
case
|
117
|
+
case 17:
|
80
118
|
data = _context.sent;
|
81
119
|
if (data !== null && data !== void 0 && data.pay_url) {
|
120
|
+
// 记录获取微信支付链接成功
|
121
|
+
paymentLogger.addLog({
|
122
|
+
key: 'SuperPayWxPayH5获取支付链接成功',
|
123
|
+
value: ""
|
124
|
+
});
|
125
|
+
|
82
126
|
// 设置交易号
|
83
127
|
setPayNumber(payGroup === null || payGroup === void 0 ? void 0 : payGroup.order_id, data === null || data === void 0 ? void 0 : data.pay_number);
|
84
128
|
|
129
|
+
// 记录即将跳转到微信支付
|
130
|
+
paymentLogger.addLog({
|
131
|
+
key: 'SuperPayWxPayH5准备跳转微信支付',
|
132
|
+
value: ""
|
133
|
+
});
|
134
|
+
paymentLogger.sendLogs('SuperPayWxPayH5跳转成功');
|
135
|
+
|
85
136
|
// 跳转支付
|
86
137
|
window.location.href = data === null || data === void 0 ? void 0 : data.pay_url;
|
87
138
|
} else {
|
139
|
+
// 记录支付链接为空
|
140
|
+
paymentLogger.addLog({
|
141
|
+
key: 'SuperPayWxPayH5支付链接为空',
|
142
|
+
value: {
|
143
|
+
title: "\u8BA2\u5355".concat(payGroup === null || payGroup === void 0 ? void 0 : payGroup.order_id, " \u5FAE\u4FE1\u652F\u4ED8\u94FE\u63A5\u4E3A\u7A7A"),
|
144
|
+
data: {
|
145
|
+
response_data: data
|
146
|
+
}
|
147
|
+
}
|
148
|
+
});
|
149
|
+
paymentLogger.sendLogs('SuperPayWxPayH5支付链接为空');
|
88
150
|
setOpen(false);
|
89
151
|
}
|
90
|
-
_context.next =
|
152
|
+
_context.next = 26;
|
91
153
|
break;
|
92
|
-
case
|
93
|
-
_context.prev =
|
94
|
-
_context.t0 = _context["catch"](
|
154
|
+
case 21:
|
155
|
+
_context.prev = 21;
|
156
|
+
_context.t0 = _context["catch"](14);
|
157
|
+
// 记录SuperPayWxPayH5处理错误
|
158
|
+
paymentLogger.addLog({
|
159
|
+
key: 'SuperPayWxPayH5处理错误',
|
160
|
+
value: {
|
161
|
+
title: "\u8BA2\u5355".concat(payGroup === null || payGroup === void 0 ? void 0 : payGroup.order_id, " SuperPayWxPayH5\u5904\u7406\u5931\u8D25: ").concat((_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || '未知错误'),
|
162
|
+
data: {
|
163
|
+
payGroup: payGroup,
|
164
|
+
values: values
|
165
|
+
}
|
166
|
+
}
|
167
|
+
});
|
168
|
+
paymentLogger.sendLogs('SuperPayWxPayH5处理失败', _context.t0);
|
95
169
|
setOpen(false);
|
96
|
-
case
|
170
|
+
case 26:
|
97
171
|
case "end":
|
98
172
|
return _context.stop();
|
99
173
|
}
|
100
|
-
}, _callee, null, [[
|
174
|
+
}, _callee, null, [[14, 21]]);
|
101
175
|
}));
|
102
176
|
return function init(_x) {
|
103
177
|
return _ref2.apply(this, arguments);
|